aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfigskeletontest.cpp
AgeCommit message (Collapse)Author
2021-02-22Run clang-format on all cpp/h filesAhmad Samir
NO_CHANGELOG
2021-02-06Minor code optimisationsAhmad Samir
- Use a global var for a QString that's used many times - Break up long-all-cap variable names, it makes it harder to read (and I've fixed one typo in one of those ALLCAPS) - Fix some clazy warnings, make global QString objects in unit tests static (so that the compiler doesn't create symbols for them, it doesn't matter in a unit test but KF code acts as a reference sometimes that others copy from, tip from dfaure) - Add TODO note about changing kconfig_compiler to generate C++ code that uses multi-arg QString::arg(QString, QString, QString) instead of QString::arg().arg() - More const; more QString::at() instead of operator[] where appropriate - Use a ternary where it makes the code more readable (and uses less lines :)) NO_CHANGELOG
2021-02-06Less implicit cast from ASCIIAhmad Samir
NO_CHANGELOG
2020-03-22KConfig: Convert to SPDX license statementsAndreas Cord-Landwehr
Summary: Convert license headers to SPDX statements and add license files as required by REUSE specification. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: ognarb, cgiboudeaux, kde-frameworks-devel Tags: #frameworks Maniphest Tasks: T11550 Differential Revision: https://phabricator.kde.org/D27601
2019-10-10Add convenience for defaults/dirty states to KCoreConfigSkeletonKevin Ottens
Summary: It allows to verify if all the items of the skeleton are in their default values or if they hold any value deviating from the latest loaded values from KConfig. We didn't really need this during the KCModule/QtWidgets time since we could write KConfigDialogManager just fine without it. But for use with QML and aiming at having similar magic in KQuickAddons::ConfigModule such convenience functions will be needed. Reviewers: #plasma, #frameworks, dfaure, mart Subscribers: apol, kossebau, davidedmundson, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D24494
2018-03-11Remove not necessary QtCore and coLaurent Montel
2017-11-30Fix some clazy warningMontel Laurent
2017-08-01autotests: fix the failures I got here.David Faure
1) some of them can't run in parallel 2) kconfigskeletontest failed due to KSharedConfig being used under the scene (for a year now), and there's probably some QPA or widget style holding a ref (here, not in the CI). Indirectly, simply setting QStandardPaths::setTestModeEnabled(true) fixes this since KSharedConfig will then not share the instance with the non-test-mode-enabled instance.
2015-01-07Fix KCoreConfigSkeleton when toggling a value with saves in betweenAlbert Astals Cid
REVIEW: 121838 Acked by Matthew Dawson
2014-03-28Stop re-loading values inside KCoreConfigSkeleton::save().Matthew Dawson
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
2014-03-23Add KCoreConfigSkeleton::read() which doesn't call reparseConfiguration.David Faure
Call it from generated singletons, since the constructor creates a KConfig from a filename, which already loads from disk. This removes the need for using DelayedParsing. REVIEW: 116845
2013-12-18Code reformatted using kde-dev-scripts/astyle-kdelibs.David Faure
Use git blame -w 867e7a5 to show authorship as it was before this commit.
2013-12-18Move kconfig code to the root directory.Jenkins CI