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>
This commit is contained in:
jan Iversen 2018-07-17 15:22:51 +02:00 committed by Dirk Hohndel
parent c0e9e978a1
commit 3c3729711c
9 changed files with 46 additions and 25 deletions

View file

@ -1,11 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
#include "qPref.h"
#include "qPref_private.h"
#include "qPrefPrivate.h"
#include "core/subsurface-string.h"
#include <QApplication>
#include <QFont>
static const QString group = QStringLiteral("Display");
qPrefDisplay::qPrefDisplay(QObject *parent) : QObject(parent)
{
}