summaryrefslogtreecommitdiff
path: root/src/settings/settings.cpp
blob: 190bc97757445eb574b8950289c9012f1e88b554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ============================================================
 *     The rekonq project
 * ============================================================
 * SPDX-License-Identifier: GPL-3.0-only
 * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
 * ============================================================
 * Description: Application Settings
 * ============================================================ */

#include "settings.hpp"
#include <QSettings>

Settings::Settings(const QString &path, QObject *parent) : RekonqSettings(parent)
{
  d = new QSettings(path, QSettings::IniFormat, this);
}

void Settings::beginGroup(const QString &prefix) { d->beginGroup(prefix); }

void Settings::endGroup() { d->endGroup(); }

void Settings::setValue(const QString &key, const QVariant &value)
{
  d->setValue(key, value);
  emit changed(key, value);
}

QVariant Settings::value(const QString &key, const QVariant &defaultValue) const { return d->value(key, defaultValue); }

QString Settings::filePath() const { return d->fileName(); }