subsurface/core/settings/qPrefAnimations.cpp
jan Iversen 3c3729711c core: remove QSettings in qPref* and use a shared variable
Add qPrefPrivate class which contains one QSettings variable,
delete QSettings from qPref* class definitions

this secures there are only instance of QSettings
(QSettings needs to be in a QObject class to work)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-18 10:40:08 -07:00

21 lines
483 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "qPref.h"
#include "qPrefPrivate.h"
static const QString group = QStringLiteral("Animations");
qPrefAnimations::qPrefAnimations(QObject *parent) : QObject(parent)
{
}
qPrefAnimations *qPrefAnimations::instance()
{
static qPrefAnimations *self = new qPrefAnimations;
return self;
}
void qPrefAnimations::loadSync(bool doSync)
{
disk_animation_speed(doSync);
}
HANDLE_PREFERENCE_INT(Animations, "/animation_speed", animation_speed);