mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
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>
This commit is contained in:
parent
baa828e900
commit
504e912512
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue