mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Location service: instantiate location provider in the desktop UI
We still aren't doing anything with it, but at least it's there now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									456cc3955a
								
							
						
					
					
						commit
						ff5bd062f6
					
				
					 4 changed files with 10 additions and 0 deletions
				
			
		|  | @ -205,6 +205,7 @@ MainWindow::MainWindow() : QMainWindow(), | ||||||
| 	enableDisableCloudActions(); | 	enableDisableCloudActions(); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | 	GpsLocation *locationProvider = new GpsLocation(&report_message, this); | ||||||
| 	ui.mainErrorMessage->hide(); | 	ui.mainErrorMessage->hide(); | ||||||
| 	graphics()->setEmptyState(); | 	graphics()->setEmptyState(); | ||||||
| 	initialUiSetup(); | 	initialUiSetup(); | ||||||
|  |  | ||||||
|  | @ -16,6 +16,7 @@ | ||||||
| #include "ui_mainwindow.h" | #include "ui_mainwindow.h" | ||||||
| #include "notificationwidget.h" | #include "notificationwidget.h" | ||||||
| #include "windowtitleupdate.h" | #include "windowtitleupdate.h" | ||||||
|  | #include "gpslocation.h" | ||||||
| 
 | 
 | ||||||
| struct DiveList; | struct DiveList; | ||||||
| class QSortFilterProxyModel; | class QSortFilterProxyModel; | ||||||
|  | @ -93,6 +94,7 @@ public: | ||||||
| 	NotificationWidget *getNotificationWidget(); | 	NotificationWidget *getNotificationWidget(); | ||||||
| 	void enableDisableCloudActions(); | 	void enableDisableCloudActions(); | ||||||
| 	void showError(); | 	void showError(); | ||||||
|  | 
 | ||||||
| private | private | ||||||
| slots: | slots: | ||||||
| 	/* file menu action */ | 	/* file menu action */ | ||||||
|  | @ -254,6 +256,7 @@ private: | ||||||
| 	QHash<QByteArray, PropertiesForQuadrant> stateProperties; | 	QHash<QByteArray, PropertiesForQuadrant> stateProperties; | ||||||
| 
 | 
 | ||||||
| 	WindowTitleUpdate *wtu; | 	WindowTitleUpdate *wtu; | ||||||
|  | 	GpsLocation *locationProvider; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // MAINWINDOW_H
 | #endif // MAINWINDOW_H
 | ||||||
|  |  | ||||||
|  | @ -637,6 +637,7 @@ extern "C" { | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| extern int report_error(const char *fmt, ...); | extern int report_error(const char *fmt, ...); | ||||||
|  | extern void report_message(const char *msg); | ||||||
| extern const char *get_error_string(void); | extern const char *get_error_string(void); | ||||||
| 
 | 
 | ||||||
| extern struct dive *find_dive_including(timestamp_t when); | extern struct dive *find_dive_including(timestamp_t when); | ||||||
|  |  | ||||||
|  | @ -445,6 +445,11 @@ int report_error(const char *fmt, ...) | ||||||
| 	return -1; | 	return -1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void report_message(const char *msg) | ||||||
|  | { | ||||||
|  | 	(void)report_error("%s", msg); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * libgit2 has a "git_treebuilder" concept, but it's broken, and can not |  * libgit2 has a "git_treebuilder" concept, but it's broken, and can not | ||||||
|  * be used to do a flat tree (like the git "index") nor a recursive tree. |  * be used to do a flat tree (like the git "index") nor a recursive tree. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue