From 4846b50aea0bc2262238963a85ab3556c22412e4 Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Fri, 28 Mar 2014 16:59:51 +0100 Subject: Stop re-loading values inside KCoreConfigSkeleton::save(). The extra load of values in KCoreConfigSkeleton is not documented anywhere that it happens, and in normal circumstances re-loading new values isn't expecterd during a save operation. Update various mentions of readConfig/writeConfig to read/save. Update documentation to match the new names of functions. Rename writeConfig() to save() and usrWriteConfig() to usrSave() Rename functions to match the new naming conventions. Also create old deprecated instances of both functions to ensure that old code continues to operate correctly. Also make save() non-virtual, for the same reasons read() is now non-virtual. Rename usrReadConfig to usrRead, to be consistent with the new name for readConfig. Rename usrReadConfig to usrRead, and mark the former as deprecated. To maintain compatibility, usrRead still calls usrReadConfig in its default implementation. usrReadConfig remains empty. REVIEW: 117010 --- autotests/kconfigskeletontest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autotests/kconfigskeletontest.cpp') diff --git a/autotests/kconfigskeletontest.cpp b/autotests/kconfigskeletontest.cpp index a25aaf40..f401b9f0 100644 --- a/autotests/kconfigskeletontest.cpp +++ b/autotests/kconfigskeletontest.cpp @@ -58,7 +58,7 @@ void KConfigSkeletonTest::testSimple() mMyFont = WRITE_SETTING3; mMyString = WRITE_SETTING4; - writeConfig(); + save(); mMyBool = false; mMyColor = QColor(); @@ -102,6 +102,6 @@ void KConfigSkeletonTest::testDefaults() QCOMPARE(mMyFont, DEFAULT_SETTING3); QCOMPARE(mMyString, DEFAULT_SETTING4); - writeConfig(); + save(); } -- cgit v1.2.1