summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/mainwindow.cpp1
-rw-r--r--desktop-widgets/mainwindow.h3
-rw-r--r--subsurface-core/dive.h1
-rw-r--r--subsurface-core/save-git.c5
4 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 356196dad..732425ea7 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -205,6 +205,7 @@ MainWindow::MainWindow() : QMainWindow(),
enableDisableCloudActions();
#endif
+ GpsLocation *locationProvider = new GpsLocation(&report_message, this);
ui.mainErrorMessage->hide();
graphics()->setEmptyState();
initialUiSetup();
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index adf35686e..e53c1efc9 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -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
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h
index cef1106fd..3ff262e96 100644
--- a/subsurface-core/dive.h
+++ b/subsurface-core/dive.h
@@ -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);
diff --git a/subsurface-core/save-git.c b/subsurface-core/save-git.c
index 69ad0726d..d3601a272 100644
--- a/subsurface-core/save-git.c
+++ b/subsurface-core/save-git.c
@@ -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.