diff options
Diffstat (limited to 'common/resourceconfig.cpp')
-rw-r--r-- | common/resourceconfig.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/resourceconfig.cpp b/common/resourceconfig.cpp index 39f9ddb..68ac0bc 100644 --- a/common/resourceconfig.cpp +++ b/common/resourceconfig.cpp | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <QFile> | 23 | #include <QFile> |
24 | #include <log.h> | 24 | #include <log.h> |
25 | #include <definitions.h> | 25 | #include <definitions.h> |
26 | #include <applicationdomaintype.h> | ||
26 | 27 | ||
27 | static QSharedPointer<QSettings> getConfig(const QByteArray &identifier) | 28 | static QSharedPointer<QSettings> getConfig(const QByteArray &identifier) |
28 | { | 29 | { |
@@ -43,7 +44,7 @@ void ResourceConfig::addResource(const QByteArray &identifier, const QByteArray | |||
43 | { | 44 | { |
44 | auto settings = getConfig("resources"); | 45 | auto settings = getConfig("resources"); |
45 | settings->beginGroup(QString::fromLatin1(identifier)); | 46 | settings->beginGroup(QString::fromLatin1(identifier)); |
46 | settings->setValue("type", type); | 47 | settings->setValue(Sink::ApplicationDomain::SinkResource::ResourceType::name, type); |
47 | settings->endGroup(); | 48 | settings->endGroup(); |
48 | settings->sync(); | 49 | settings->sync(); |
49 | } | 50 | } |
@@ -64,7 +65,7 @@ QMap<QByteArray, QByteArray> ResourceConfig::getResources() | |||
64 | auto settings = getConfig("resources"); | 65 | auto settings = getConfig("resources"); |
65 | for (const auto &identifier : settings->childGroups()) { | 66 | for (const auto &identifier : settings->childGroups()) { |
66 | settings->beginGroup(identifier); | 67 | settings->beginGroup(identifier); |
67 | const auto type = settings->value("type").toByteArray(); | 68 | const auto type = settings->value(Sink::ApplicationDomain::SinkResource::ResourceType::name).toByteArray(); |
68 | resources.insert(identifier.toLatin1(), type); | 69 | resources.insert(identifier.toLatin1(), type); |
69 | settings->endGroup(); | 70 | settings->endGroup(); |
70 | } | 71 | } |