subsurface/core/settings/qPrefPrivate.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

11 lines
233 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "qPrefPrivate.h"
qPrefPrivate::qPrefPrivate(QObject *parent) : QObject(parent)
{
}
qPrefPrivate *qPrefPrivate::instance()
{
static qPrefPrivate *self = new qPrefPrivate;
return self;
}