From fb451a380c088f315e60de92288326fc7fdfd394 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 23 Mar 2014 22:57:45 +0100 Subject: Rename readConfig() to load(), to make it clear it's loading from disk. As discussed with Matthew Dawson in review 116461. --- src/core/kcoreconfigskeleton.cpp | 4 ++-- src/core/kcoreconfigskeleton.h | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index 2ae3a9bd..69a4bf04 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -1061,7 +1061,7 @@ void KCoreConfigSkeleton::setDefaults() usrSetDefaults(); } -void KCoreConfigSkeleton::readConfig() +void KCoreConfigSkeleton::load() { d->mConfig->reparseConfiguration(); read(); @@ -1091,7 +1091,7 @@ bool KCoreConfigSkeleton::writeConfig() if (!d->mConfig->sync()) { return false; } - readConfig(); + load(); emit configChanged(); } return true; diff --git a/src/core/kcoreconfigskeleton.h b/src/core/kcoreconfigskeleton.h index ebfad52c..41f14289 100644 --- a/src/core/kcoreconfigskeleton.h +++ b/src/core/kcoreconfigskeleton.h @@ -1036,7 +1036,18 @@ public: * registered items from the KConfig. You can overridde usrReadConfig() * in derived classes if you have special requirements. */ - void readConfig(); // KDE5 TODO rename to load() + void load(); + +#ifndef KCONFIGCORE_NO_DEPRECATED + /** + * @deprecated since 5.0, call load() instead (to reload from disk) or just read() + * if the underlying KConfig object is already up-to-date. + */ + KCONFIGCORE_DEPRECATED void readConfig() + { + load(); + } +#endif /** * Read preferences from the KConfig object. -- cgit v1.2.1