[Service] Use KConfig::SimpleConfig

I don't get the comment on why it is /dev/null instead of QString() but using SimpleConfig at least saves 0.3ms per call for me.

Differential Revision: https://phabricator.kde.org/D7510
This commit is contained in:
Kai Uwe Broulik 2017-08-25 11:24:03 +02:00
parent b4c1c9cdfa
commit 5137a988b1

View File

@ -173,7 +173,7 @@ void Service::setOperationsScheme(QIODevice *xml)
// KSharedConfig. We need a config object for the config loader even
// though we dont' actually want to use any config parts from it,
// we just want to share the KConfigLoader XML parsing.
KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("/dev/null"));
KSharedConfigPtr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigLoader loader(config, xml);
foreach (const QString &group, loader.groupList()) {