aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-09-19use the same open flags as the group handed inAaron Seigo
this way we actually get the same shared pointer and thus does not require a sync() call on the config object to get the right values REVIEW:120283
2014-09-19provide a getter for OpenFlagsAaron Seigo
2014-09-18Move diagnostic pragmas outside/around functions.Nicolás Alvarez
gcc 4.5 doesn't support "#pragma GCC diagnostic" inside functions. Apparently it also doesn't support "#pragma GCC diagnostic push/pop", but it doesn't fail for that, so meh.
2014-09-13Use const char[] instead of const char*, saves 8 byte in .data each.Volker Krause
2014-09-11Add class description to KConfigBase.Matthew Dawson
Add a class description to KConfigBase so that KConfig::sync can link to KConfigBase::sync. Also makes KConfigBase easier to find and understand.
2014-08-31Add documentation onto KWindowConfig namespaceDavid Edmundson
This is needed so doxygen includes the far more useful documentation on the contained methods.
2014-08-10Allow translations to have context again.Matthew Dawson
Switch to using QT_TRANSLATE_NOOP3 so that context information can be given for actions, allowing the translators to do better translations. BUG: 337979 FIXED-IN: 5.2.0 REVIEW: 119577
2014-07-29Fix KConfig compilationDavid Gil
KConfig fails building because QBasicAtomicInt is being treated as an int. REVIEW: 119417
2014-07-22allow the extraction of the shortcut names for translationLukáš Tinkl
using Qt-standard QT_TRANSLATE_NOOP instead of a fake I18N_NOOP2
2014-07-21create and install the QM loaderLukáš Tinkl
like all the other Qt-based modules do
2014-07-12SVN_SILENT made messages (.desktop file)l10n daemon script
2014-07-01Fix reading of XDG style semicolon separated lists with escaped ';'Alex Richardson
Previously the warning "Invalid escape sequence "\;"." would appear and "\;" was replaced with just the backslash as is done for all unrecognized escape sequences. Keep both characters so that readXdgListEntry() works with values containing semicolons REVIEW: 119074
2014-07-01Remove register keyword since it is deprecatedAlex Richardson
2014-07-01KSharedConfig: move mainConfig and wasTestEnabled to the thread storage.David Faure
This enables the mainConfig optimization in all threads, and ensures the user warning only happens in the main thread. The test-mode-enabled logic is only really useful in the main thread, but it's simpler to just do it in all threads. REVIEW: 118985
2014-06-28Fix data race on static int.David Faure
2014-06-23SVN_SILENT made messages (.desktop file)l10n daemon script
2014-06-22Make KSharedConfig thread-safeDavid Faure
... by having a different list of shareable objects per thread. REVIEW: 118739
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-19Optimize KConfigIniBackend::parseConfig by reducing allocations.Milian Wolff
Yet another awesome application of the Qt implicit sharing trick. Since config files often contain only few different keys and even value strings, we can share them. This reduces memory consumption and also speeds up parsing, as we do not have to allocate the duplicated strings, but can simply reuse the previous values. The most extreme case for this of my knowledge, is KatePart: katesyntaxhighlightingrc has more than 20k lines which triggered nearly 30k allocations on startup. With this patch applied, this value goes down dramatically. I added a simple static counter for the cache hit/miss ratio, which resulted in 5442 cache misses compared to 43624 cache hits across all KConfig files parsed by kwrite. REVIEW: 118587 This is a forward-port of b8aaeff128233cfaecf67899168887572589dde8.
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-06-06Fix kreadconfig to only print help when it matters.Matthew Dawson
kreadconfig only needs to print help when a key is not given or when extra text is on the end of the command line. BUG: 335806
2014-05-26Update usage of QVariant::type() for Qt5.Thomas Braxton
This should have been part of 8b88eaee. REVIEW: 118339
2014-05-26Update usage of QVariant::type() for Qt5.Thomas Braxton
According to http://qt-project.org/doc/qt-5/qvariant.html#type the return value of QVariant::type() should be interpreted as a QMetaType::Type. This also silences the compile-time warnings about 38 not being a member of QVariant::Type. REVIEW: 118332
2014-05-26REVIEW: 118039Thomas Braxton
Simplify KConfigGroup::readEntry/writeEntry. KConfigGroup::readCheck/writeCheck caused some compilers to complain since they were private functions that were being reimplemented outside the class definition. Updated KCONFIGGROUP_DECLARE_ENUM_QOBJECT/ deprecated global functions created in KDE4 times.
2014-05-23Fix searching of paths in kconf_updateDavid Edmundson
Previous code said if we found an executable in kconf_update_bin try to find a different executable in the normal path Reviewed-by: Rohan Garg
2014-05-12Fix lupdate warningsAlbert Astals Cid
/home/scripty/prod/git-unstable/frameworks_kconfig/src/core/bufferfragment_p.h:37: Ignoring definition of undeclared qualified class /home/scripty/prod/git-unstable/frameworks_kconfig/src/core/bufferfragment_p.h:37: Ignoring definition of undeclared qualified class
2014-05-12remove unused member of the private classMarco Martin
2014-05-07Fix kconf_update test on WindowsAlex Richardson
We get a CMake warning for reading the LOCATION property, but I don't see how else to do it (generator expressions don't seem to work)
2014-05-07Use QProcess in kconf_updateAlex Richardson
This allows removing some custom WIN32 API code and is also nicer than directly calling system()
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-05-03Fix lupdate warningAlbert Astals Cid
kconfigini.cpp:554: Class 'KConfigIniBackend' lacks Q_OBJECT macro
2014-05-03SVN_SILENT made messages (.desktop file)l10n daemon script
2014-05-02fix include path in .pri filesDavid Faure
2014-05-02Add/fix message extraction for repo frameworks/kconfigBurkhard Lück
REVIEW:117842
2014-05-02SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-29SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-29SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-28SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-28SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-28SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-28SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-27SVN_SILENT made messages (.desktop file)l10n daemon script
2014-04-27install libexec executables in the kf5 libexec directoryAleix Pol
2014-04-26Adapt to changes in KDEInstallDirsAleix Pol
kde5/services is kservices5 kde5/servicetypes is kservicestypes5
2014-04-27Rename kreadconfig and kwriteconfig for coinstallability with kde-runtime4.Michael Palimaka
REVIEW: 117792
2014-04-26Adopt kreadconfig and kwriteconfig to kconfigAleix Pol
Drop KCoreAddons and KI18n dependency. Add a bunch of QStringLiteral()