subsurface/core/settings/qPrefLocationService.cpp
Dirk Hohndel 2ecbea3d24 qPref: use helper function to ensure key/name grouping
We had a couple of instances of names being incorrectly merged with their
group, this should handle that better. It's a bit of a big hammer to use, but
it seems to work (and it makes it easy to then git grep for cases that don't
use the new helper function.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-07 14:37:18 -07:00

24 lines
656 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "qPrefLocationService.h"
#include "qPrefPrivate.h"
static const QString group = QStringLiteral("LocationService");
qPrefLocationService::qPrefLocationService(QObject *parent) : QObject(parent)
{
}
qPrefLocationService *qPrefLocationService::instance()
{
static qPrefLocationService *self = new qPrefLocationService;
return self;
}
void qPrefLocationService::loadSync(bool doSync)
{
disk_distance_threshold(doSync);
disk_time_threshold(doSync);
}
HANDLE_PREFERENCE_INT(LocationService, "distance_threshold", distance_threshold);
HANDLE_PREFERENCE_INT(LocationService, "time_threshold", time_threshold);