aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfig.cpp
AgeCommit message (Collapse)Author
2018-02-24Save some memory allocations by using the right APIAleix Pol
Test Plan: tests pass Reviewers: #frameworks, markg Reviewed By: markg Subscribers: markg Tags: #frameworks Differential Revision: https://phabricator.kde.org/D10771
2017-12-02GIT_SILENT repair indentationDavid Faure
2017-11-20Don't look for /etc/kderc every single timeAleix Pol
Summary: Every time we open a configuration file, we are checking if this file is there. Since it's a sysadmin setting I'd say it's fine to assume that it's not appearing and disappearing. Also we are not supporting the case of the file changing during runtime or so. Reviewers: #frameworks, mpyne, dfaure Reviewed By: mpyne, dfaure Subscribers: dfaure, mpyne Tags: #frameworks Differential Revision: https://phabricator.kde.org/D8871
2017-03-15Now that kconfigbackend.h isn't installed anymore, rename it to _p.h for ↵David Faure
clarity.
2017-02-14GIT_SILENT remove comment about this being a temp workaround.David Faure
Even with 5.8 we need it, not due to QLockFile, but just due to mainConfigName(), see unittest ksharedconfig_in_global_object
2017-01-16Prefer nullptr over Q_NULLPTRKevin Funk
2017-01-16Use nullptr everywhereKevin Funk
Differential Revision: https://phabricator.kde.org/D3987
2016-04-27Make kdeglobals file path static as intendedAleix Pol
2016-04-27Remove unneeded ifdefs to compare pathsAleix Pol
Just keep the setting once and always use QString::compare instead of using QString::operator== or QString::compare depending on the platform.
2016-03-28Add support for get QStandardPaths locations.Sandro Knauß
Inside desktop files we want to reach also data, cache and config home to create files inside these directories. REVIEW: 127462 CHANGELOG: Add support for get QStandardPaths locations inside desktop files.
2015-10-17Allow KConfig to use resources as fallback config filesChristoph Cullmann
Fallback will be :/kconfig/ REVIEW: 125598
2015-10-05Minor optimizationsAlbert Astals Cid
Ran the clazy tool (http://www.kdab.com/use-static-analysis-improve-performance/) Mostly QStringLiteral/QLatin1String additions A few const & additions to non public methods Compiles, test pass REVIEW: 125106
2015-08-19Fix pedanticMontel Laurent
2015-08-12Minimize calls to expensive QStandardPaths::locateAll()Sergio Martins
It's called a lot at startup as shown by profiling. heaptrack also complains it does many heap allocations, so cache it. REVIEW: 124199
2015-04-04KConfig: fix using KSharedConfig in global object destructor.David Faure
ksharedconfig_in_global_object.cpp is now in kdelibs4 too (where it works) and reproduces Albert's KgDifficulty testcase. CHANGELOG: fix assert when using KSharedConfig in a global object destructor. REVIEW: 122232
2015-02-19Avoid code path that leaves local config lockedDavid Edmundson
The local config file gets locked on line 415, if we return early we need to unlock it. REVIEW: 122549 BUG: 344032
2014-09-19provide a getter for OpenFlagsAaron Seigo
2014-07-29Fix KConfig compilationDavid Gil
KConfig fails building because QBasicAtomicInt is being treated as an int. REVIEW: 119417
2014-06-28Fix data race on static int.David Faure
2014-06-21Fix reading of entries for language/country combinationsMartin Gräßlin
This fixes a regression introduced in 988f09bb051dca0437ecec431ee44ed5b4a560d8. The mentioned commit ensures that if the locale is e.g. "de_DE" the entry "de" will be used. But this breaks if there is a translation for another country. E.g. for "de_CH" it would also pick the "de" entry. This change now operates on both just the language code and the locale. If an entry with the language code is present it will be picked. If another entry with the exact locale is found it will be overwritten. Modifiers are not supported as this is currently missing in QLocale. REVIEW: 118692
2014-06-18Optimize KConfigGroup::exists and similar operations.Milian Wolff
Before, these kind of read-only operations did a lot of allocations: 1) allocate a list of all sub groups 2) for the above, also allocate a sub-group match key 3) iterate over sub groups, allocate a list of all keys in there and then finally check whether that list is non-empty All of the above is now done without a single allocation, by simply iterating over the list of entries. Note: The whole list was iterated even before in allSubGroups. Now we still do that, but check for non-empty keys in the group or sub group directly. Much more efficient. Note2: While at it, allSubGroups is also optimized to not require the allocation of the subgroup match key. REVIEW: 118586 forward-port of commit eaffd50adfd7fcbeafadb0248904176808b4499d
2014-06-18Remove duplicate comparison against group.Milian Wolff
forward-port of commit 416559cdb86f9cacf4ea4ed7530cbbbdb427302f
2014-06-12Fix locale-aware reading in KDesktopFileMartin Gräßlin
The underlying KConfig used QLocale::name() for getting the locale aware part. But this returns "de_DE" while the desktop files store "de". In addition it constructs a QLocale object instead of using the system locale. This has the advantage that the usage of QLocale::setDafault() gets honored by KConfig. REVIEW: 118564
2014-06-12Simple CleanupsThomas Braxton
- use Q_NULLPTR instead of 0 or NULL - simplify some foreach loops - use QStringLiteral in a few places - added a few consts REVIEW: 118666
2014-05-05Revert "Store app config file in ~/.config/<domain>/<app>rc"David Faure
This reverts commit 625e124898afad04ab5c3939b1b129b6014046cd. Let's take the time to think about a better solution, possibly.
2014-05-04Store app config file in ~/.config/<domain>/<app>rcDavid Faure
Only KSharedConfig::openConfig() and KConfig default constructor are affected. KConfig("kdeglobals"), for instance, points to ~/.config so that it can be shared. REVIEW: 117989
2014-04-01fixed mingw buildPatrick von Reth
2014-03-25Use the full path for kconf_update when running itAlex Merry
It is not on $PATH, so we cannot just expect QProcess to find it. REVIEW: 117023
2014-03-24Remove old kdelibs4 codeAlex Merry
All this ifdef'd-out code just makes it hard to see what's going on. REVIEW: 116962
2014-03-23Revert addition of DelayedParsing, not needed after all.David Faure
2014-03-13KCoreConfigSkeleton: delay parsing until the call to readConfig()David Faure
2014-03-01make comment less confusingDavid Faure
2014-03-01we use Qt5 now, so re-enable -DQT_NO_CAST_FROM_BYTEARRAYDavid Faure
2014-01-09Use kde5rc instead of kde4rc naming convention, REVIEW: 114917Siddharth Sharma
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