From 504e9125126cb24467ee8e038a461d731672c4b9 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 12 Sep 2018 12:45:19 +0200 Subject: 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 --- core/gpslocation.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 #include #include @@ -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() -- cgit v1.2.3-70-g09d2