Fwd: [kconfig] src/core: Store app config file in ~/.config/<domain>/<app>rc
David Faure
faure at kde.org
Sun May 4 21:53:40 UTC 2014
Hello,
please note this change in KConfig.
I would recommend making sure your applications call
app.setOrganizationDomain("kde.org") so that the config files go into the
right subdir right now. Otherwise you'll face migration issues later when
setting that.
---------- Forwarded Message ----------
Subject: [kconfig] src/core: Store app config file in
~/.config/<domain>/<app>rc
Date: Sunday 04 May 2014, 21:26:08
From: David Faure <faure at kde.org>
To: kde-commits at kde.org
Git commit 625e124898afad04ab5c3939b1b129b6014046cd by David Faure.
Committed on 04/05/2014 at 17:13.
Pushed by dfaure into branch 'master'.
Store app config file in ~/.config/<domain>/<app>rc
Only KSharedConfig::openConfig() and KConfig default constructor are affected.
KConfig("kdeglobals"), for instance, points to ~/.config so that it can be
shared.
REVIEW: 117989
M +8 -2 src/core/kconfig.cpp
http://commits.kde.org/kconfig/625e124898afad04ab5c3939b1b129b6014046cd
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp
index ea9746c..d3dc417 100644
--- a/src/core/kconfig.cpp
+++ b/src/core/kconfig.cpp
@@ -534,8 +534,14 @@ QString KConfig::mainConfigName()
return globalName;
}
- QString appName = QCoreApplication::applicationName();
- return appName + QLatin1String("rc");
+ QString fileName;
+ const QString domain = QCoreApplication::organizationDomain();
+ if (!domain.isEmpty()) {
+ fileName = domain + QLatin1Char('/');
+ }
+
+ fileName += QCoreApplication::applicationName() + QLatin1String("rc");
+ return fileName;
}
void KConfigPrivate::changeFileName(const QString &name)
-----------------------------------------
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the Plasma-devel
mailing list