aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-12 12:45:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-12 20:18:32 -0700
commit504e9125126cb24467ee8e038a461d731672c4b9 (patch)
tree2b6aadc18ff5393ec4dfa1dcf3028d20db0c5a7e
parentbaa828e900b2dc1c647c62483a13737baadfa76c (diff)
downloadsubsurface-504e9125126cb24467ee8e038a461d731672c4b9.tar.gz
core: connect qPref..::time_thresholdChanged to setGpsTimeThreshold
Automate calling of setGpsTimeThreshold when qPref..::time_threshold changes and thus avoiding the need to call setGpsTimeThreshold directly. Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r--core/gpslocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index 3336fe70c..76a4c718f 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -3,6 +3,7 @@
#include "qt-models/gpslistmodel.h"
#include "core/pref.h"
#include "core/qthelper.h"
+#include "core/settings/qPrefLocationService.h"
#include <time.h>
#include <unistd.h>
#include <QDebug>
@@ -36,6 +37,9 @@ GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) :
userAgent = getUserAgent();
(void)getGpsSource();
loadFromStorage();
+
+ // register changes in time threshold
+ connect(qPrefLocationService::instance(), SIGNAL(qPrefLocationService::time_thresholdChanged()), this, SLOT(setGpsTimeThreshold(int seconds)));
}
GpsLocation *GpsLocation::instance()