Commit ea08681e authored by Cyril Rossi's avatar Cyril Rossi

libnotificationmanager : deprecate Settings ctor that takes a config

Summary: Unused

Reviewers: ervin, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26834
parent 7b3b06a4
......@@ -35,6 +35,11 @@
#include "jobsettings.h"
#include "badgesettings.h"
namespace NotificationManager
{
constexpr const char s_configFile[] = "plasmanotifyrc";
}
using namespace NotificationManager;
class Q_DECL_HIDDEN Settings::Private
......@@ -69,7 +74,6 @@ public:
bool live = false; // set to true initially in constructor
bool dirty = false;
};
Settings::Private::Private(Settings *q)
......@@ -161,17 +165,10 @@ QStringList Settings::Private::behaviorMatchesList(const KConfigGroup &group, Se
}
Settings::Settings(QObject *parent)
// FIXME static thing for config file name
: Settings(KSharedConfig::openConfig(QStringLiteral("plasmanotifyrc")), parent)
{
}
Settings::Settings(const KSharedConfig::Ptr &config, QObject *parent)
: QObject(parent)
, d(new Private(this))
{
d->config = config;
d->config = KSharedConfig::openConfig(s_configFile);
setLive(true);
......@@ -186,6 +183,12 @@ Settings::Settings(const KSharedConfig::Ptr &config, QObject *parent)
}
}
Settings::Settings(const KSharedConfig::Ptr &config, QObject *parent)
: Settings(parent)
{
d->config = config;
}
Settings::~Settings()
{
d->config->markAsClean();
......
......@@ -227,6 +227,9 @@ class NOTIFICATIONMANAGER_EXPORT Settings : public QObject
public:
explicit Settings(QObject *parent = nullptr);
/**
* @deprecated
*/
Settings(const KSharedConfig::Ptr &config, QObject *parent = nullptr);
~Settings() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment