summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2017-03-08 12:39:32 +0100
committerKai Uwe Broulik <[email protected]>2017-03-08 12:39:32 +0100
commit891d8a3bcb236ff79f4dc81261e3b1f7051b998b (patch)
tree17a7ef2b60f4855a7b96a5a29b8099d3a4a51882
parentcc8fa379166d639f5a7a1129943202e232ce1bd0 (diff)
[Notifications Dataengine] Create KConfig object on the stack
I don't see why it should be created on the heap. Differential Revision: https://phabricator.kde.org/D4869
-rw-r--r--dataengines/notifications/notificationsengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/dataengines/notifications/notificationsengine.cpp b/dataengines/notifications/notificationsengine.cpp
index 9a33bf4..df137a3 100644
--- a/dataengines/notifications/notificationsengine.cpp
+++ b/dataengines/notifications/notificationsengine.cpp
@@ -321,12 +321,12 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
configurable = m_configurableApplications.value(appRealName);
} else {
// Check whether the application actually has notifications we can configure
- QScopedPointer<KConfig> config(new KConfig(appRealName + QStringLiteral(".notifyrc"), KConfig::NoGlobals));
- config->addConfigSources(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
- QStringLiteral("knotifications5/") + appRealName + QStringLiteral(".notifyrc")));
+ KConfig config(appRealName + QStringLiteral(".notifyrc"), KConfig::NoGlobals);
+ config.addConfigSources(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
+ QStringLiteral("knotifications5/") + appRealName + QStringLiteral(".notifyrc")));
const QRegularExpression regexp(QStringLiteral("^Event/([^/]*)$"));
- configurable = !config->groupList().filter(regexp).isEmpty();
+ configurable = !config.groupList().filter(regexp).isEmpty();
m_configurableApplications.insert(appRealName, configurable);
}
}