diff options
Diffstat (limited to 'common/configstore.cpp')
-rw-r--r-- | common/configstore.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/configstore.cpp b/common/configstore.cpp index a8469ba..c8809ea 100644 --- a/common/configstore.cpp +++ b/common/configstore.cpp | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <QFile> | 24 | #include <QFile> |
25 | #include <log.h> | 25 | #include <log.h> |
26 | 26 | ||
27 | SINK_DEBUG_AREA("configstore") | ||
28 | |||
27 | static QSharedPointer<QSettings> getConfig(const QByteArray &identifier) | 29 | static QSharedPointer<QSettings> getConfig(const QByteArray &identifier) |
28 | { | 30 | { |
29 | return QSharedPointer<QSettings>::create(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/sink/" + identifier + ".ini", QSettings::IniFormat); | 31 | return QSharedPointer<QSettings>::create(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/sink/" + identifier + ".ini", QSettings::IniFormat); |
@@ -50,7 +52,7 @@ QMap<QByteArray, QByteArray> ConfigStore::getEntries() | |||
50 | 52 | ||
51 | void ConfigStore::add(const QByteArray &identifier, const QByteArray &type) | 53 | void ConfigStore::add(const QByteArray &identifier, const QByteArray &type) |
52 | { | 54 | { |
53 | Trace() << "Adding " << identifier; | 55 | SinkTrace() << "Adding " << identifier; |
54 | mConfig->beginGroup(QString::fromLatin1(identifier)); | 56 | mConfig->beginGroup(QString::fromLatin1(identifier)); |
55 | mConfig->setValue("type", type); | 57 | mConfig->setValue("type", type); |
56 | mConfig->endGroup(); | 58 | mConfig->endGroup(); |
@@ -59,7 +61,7 @@ void ConfigStore::add(const QByteArray &identifier, const QByteArray &type) | |||
59 | 61 | ||
60 | void ConfigStore::remove(const QByteArray &identifier) | 62 | void ConfigStore::remove(const QByteArray &identifier) |
61 | { | 63 | { |
62 | Trace() << "Removing " << identifier; | 64 | SinkTrace() << "Removing " << identifier; |
63 | mConfig->beginGroup(QString::fromLatin1(identifier)); | 65 | mConfig->beginGroup(QString::fromLatin1(identifier)); |
64 | mConfig->remove(""); | 66 | mConfig->remove(""); |
65 | mConfig->endGroup(); | 67 | mConfig->endGroup(); |
@@ -75,7 +77,7 @@ void ConfigStore::clear() | |||
75 | 77 | ||
76 | void ConfigStore::modify(const QByteArray &identifier, const QMap<QByteArray, QVariant> &configuration) | 78 | void ConfigStore::modify(const QByteArray &identifier, const QMap<QByteArray, QVariant> &configuration) |
77 | { | 79 | { |
78 | Trace() << "Modifying " << identifier; | 80 | SinkTrace() << "Modifying " << identifier; |
79 | auto config = getConfig(identifier); | 81 | auto config = getConfig(identifier); |
80 | config->clear(); | 82 | config->clear(); |
81 | for (const auto &key : configuration.keys()) { | 83 | for (const auto &key : configuration.keys()) { |