diff options
author | jan Iversen <jani@apache.org> | 2018-09-12 12:45:19 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-12 20:18:32 -0700 |
commit | 504e9125126cb24467ee8e038a461d731672c4b9 (patch) | |
tree | 2b6aadc18ff5393ec4dfa1dcf3028d20db0c5a7e | |
parent | baa828e900b2dc1c647c62483a13737baadfa76c (diff) | |
download | subsurface-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.cpp | 4 |
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() |