diff options
author | David Faure <faure@kde.org> | 2014-03-23 22:57:45 +0100 |
---|---|---|
committer | David Faure <faure@kde.org> | 2014-03-23 23:00:03 +0100 |
commit | fb451a380c088f315e60de92288326fc7fdfd394 (patch) | |
tree | bd6996b020b997506045417fa0b3b19c65586a81 | |
parent | 80ee4cd6aafc870909308485d6c42023fb875faa (diff) | |
download | kconfig-fb451a380c088f315e60de92288326fc7fdfd394.tar.gz kconfig-fb451a380c088f315e60de92288326fc7fdfd394.tar.bz2 |
Rename readConfig() to load(), to make it clear it's loading from disk.
As discussed with Matthew Dawson in review 116461.
-rw-r--r-- | src/core/kcoreconfigskeleton.cpp | 4 | ||||
-rw-r--r-- | src/core/kcoreconfigskeleton.h | 13 |
2 files changed, 14 insertions, 3 deletions
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. |