aboutsummaryrefslogtreecommitdiff
path: root/src/core/kcoreconfigskeleton.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2014-02-23 12:11:12 +0100
committerDavid Faure <faure@kde.org>2014-02-27 20:57:42 +0100
commiteb604bc60bcc5cd94328de725ac357e728eae624 (patch)
treef17972049e58ae845ff35c8d9ed3398e2db2311e /src/core/kcoreconfigskeleton.cpp
parentb2a686625fe71637222bcc03c97515ac95bf38a8 (diff)
downloadkconfig-eb604bc60bcc5cd94328de725ac357e728eae624.tar.gz
kconfig-eb604bc60bcc5cd94328de725ac357e728eae624.tar.bz2
Add sharedConfig() accessor, to avoid manipulating a raw KConfig * as returned by config().
This is useful when using kconfigxt and some other code to read from the same config file (e.g. KColorScheme::contrastF(config)) - no need to call KSharedConfig::openConfig twice, just grab the KSharedConfig from the generated class. REVIEW: 115960
Diffstat (limited to 'src/core/kcoreconfigskeleton.cpp')
-rw-r--r--src/core/kcoreconfigskeleton.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp
index 98d9cdcc..9c5fb4a8 100644
--- a/src/core/kcoreconfigskeleton.cpp
+++ b/src/core/kcoreconfigskeleton.cpp
@@ -1022,6 +1022,11 @@ const KConfig *KCoreConfigSkeleton::config() const
return d->mConfig.data();
}
+KSharedConfig::Ptr KCoreConfigSkeleton::sharedConfig() const
+{
+ return d->mConfig;
+}
+
void KCoreConfigSkeleton::setSharedConfig(KSharedConfig::Ptr pConfig)
{
d->mConfig = pConfig;