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:
Dirk Hohndel 2015-11-18 18:52:44 -08:00
parent 456cc3955a
commit ff5bd062f6
4 changed files with 10 additions and 0 deletions

View file

@ -205,6 +205,7 @@ MainWindow::MainWindow() : QMainWindow(),
enableDisableCloudActions();
#endif
GpsLocation *locationProvider = new GpsLocation(&report_message, this);
ui.mainErrorMessage->hide();
graphics()->setEmptyState();
initialUiSetup();

View file

@ -16,6 +16,7 @@
#include "ui_mainwindow.h"
#include "notificationwidget.h"
#include "windowtitleupdate.h"
#include "gpslocation.h"
struct DiveList;
class QSortFilterProxyModel;
@ -93,6 +94,7 @@ public:
NotificationWidget *getNotificationWidget();
void enableDisableCloudActions();
void showError();
private
slots:
/* file menu action */
@ -254,6 +256,7 @@ private:
QHash<QByteArray, PropertiesForQuadrant> stateProperties;
WindowTitleUpdate *wtu;
GpsLocation *locationProvider;
};
#endif // MAINWINDOW_H

View file

@ -637,6 +637,7 @@ extern "C" {
#endif
extern int report_error(const char *fmt, ...);
extern void report_message(const char *msg);
extern const char *get_error_string(void);
extern struct dive *find_dive_including(timestamp_t when);

View file

@ -445,6 +445,11 @@ int report_error(const char *fmt, ...)
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
* be used to do a flat tree (like the git "index") nor a recursive tree.