aboutsummaryrefslogtreecommitdiff
path: root/src/kconf_update
AgeCommit message (Collapse)Author
2022-03-06kconf_update: Fix checking for changes of update filesIlya Pominov
We save time of last modification in seconds, so compare only seconds. The incorrect comparison was introduced by a6e83f97d255023a76c8e8c83a5363f949c6d346 in monolithic kdelibs.
2022-01-04Add Samir variable fix tooLaurent Montel
2021-12-16WIP: Change the build system to enable building with Qt 6Ahmad Samir
This was built with: -DQT_MAJOR_VERSION=6 \ -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0 \ -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055a00 Move the include(KDEInstallDirs) call before the first find_package(Qt*, the former is what auto-detects the Qt version, and defaults to 5. This is needed to be able to build against Qt5 by default. All unit tests still pass.
2021-11-14Avoid some allocations by QString/QByteArray's toLower()Friedrich W. H. Kossebau
NO_CHANGELOG
2021-10-20GIT_SILENT Remove a bit of dead codeAlexander Lohnau
2021-08-28GIT_SILENT: we can use std::as_const directlyLaurent Montel
2021-08-18Port to QStrinViewAhmad Samir
Now that KF requires Qt 5.15.2; this basically reverts commit 2e8742e64fc0 with some trivial changes. NO_CHANGELOG
2021-08-13clang-tidy: one declaration per line; braces around statementsAhmad Samir
clang-tidy checks: readability-isolate-declaration and readability-braces-around-statements KF task: https://phabricator.kde.org/T14729 GIT_SILENT
2021-05-27Use more target-centric cmake codeFriedrich W. H. Kossebau
NO_CHANGELOG
2021-05-09Revert QStringView portAhmad Samir
QStringView has some bits of API that were only added in 5.15.2, whereas KF requires 5.15.0. This reverts commit 1780fb2a237af80ddc1f9cfb70cb892b53b91990.
2021-05-02Minor code refactoringAhmad Samir
Some methods in ConfigLoaderHandler always returned true, change them to return void instead. Also port them to take a QStringView instead of QStringRef, this doesn't require a lot of changes because a QStringView can be constructed from a QStringRef. QXmlStreamAttribute methods like value() and name() return QStringRef in Qt5 and QStringView in Qt6, "fix" the issue by using auto keyword, which works in both cases. QStringView::toInt() isn't efficient in Qt5 so make the build conditional. NO_CHANGELOG
2021-03-06Minor code optimisationAhmad Samir
- Use more range-for loops where appropriate - Use auto instead of the usually-long iterator type names - Use cbegin/cend(), to match the std:: containers, less confusion - Use qDeleteAll instead of a for loop - Make a QRE with a long-ish pattern static NO_CHANGELOG
2021-02-22Fix formatting in a couple of places after running clang-formatAhmad Samir
NO_CHANGELOG
2021-02-22Run clang-format on all cpp/h filesAhmad Samir
NO_CHANGELOG
2021-02-06Compile without implicit cast from ASCIIAhmad Samir
NO_CHANGELOG
2021-02-06Less implicit cast from ASCIIAhmad Samir
NO_CHANGELOG
2021-02-06Preincerment/predecrement operator where the post ones aren't neededAhmad Samir
NO_CHANGELOG
2021-01-17Adapt to Qt6 text codec changesNicolas Fella
In Qt6 QTextCodec/QTextStream::setCodec is replaced with QTextStream::setEncoding(QStringConverter::Encoding) Also UTF-8 is the new default for QTextStream.
2020-12-12Properly include QStringListNicolas Fella
Forward declaring it breaks with Qt6
2020-10-16kconf_update: Allow repeated tests in --testmode by ignoring kconf_updatercDavid Hurka
https://techbase.kde.org/Development/Tools/Using_kconf_update#Debugging_and_testing describes how to run repeated tests of kconf_update scripts in --testmode. It is necessary to delete update group flags from kconf_updaterc, which is inconvenient. With this patch, kconf_update will not use kconf_updaterc when in --testmode, so this step is no longer necessary. Additionally, running all installed update scripts automatically is no longer possible in --testmode, since that is probably only useful if you have your home directory in ~/.qttest/config/. I don’t expect problems, since this affects only --testmode, and the update group flags are still present in the modified config files themselves.
2020-08-30autotests: stop polluting /tmp with kconf_update.* temp filesDavid Faure
2020-08-30kconf_update: test the return value of QTemporaryFile::open() for good measureDavid Faure
2020-07-13Use KF-standardized Qt logging categoriesFriedrich W. H. Kossebau
See https://community.kde.org/Frameworks/Frameworks_Logging_Policy
2020-07-07Use camelcase include. (scripted)Laurent Montel
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
2020-02-12Use ecm_qt_install_logging_categories over manual categories fileFriedrich W. H. Kossebau
2020-01-03Remove endl at the end of qdebugLaurent Montel
2019-09-17[KConfig] port away from deprecated methods in Qt 5.14David Faure
Summary: In kconf_update, the ctime usage used to be about metadata change time (buff.st_ctime, before it got ported to the misnamed created()). I ported it to birthTime, because I think date of birth is a more useful way to identify a file than date of permission change which doesn't really matter to us. But in practice, I can't help but wonder if mtime alone wouldn't be enough. For the QStringLiteral("%%1").arg(i) bit, I tested it in tst_qstring, the first % is left untouched. Test Plan: make && ctest Reviewers: mdawson, arichardson, vkrause Reviewed By: vkrause Subscribers: pino, arojas, mlaurent, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D23815
2019-08-24String code optimization: use QLatin1String/QChar overload for string concatFriedrich W. H. Kossebau
GIT_SILENT
2019-03-26point readme to the wiki pageHarald Sitter
Summary: the wiki page says the readme is duplicated into the wiki. so, what we end up with is either - they end up out of sync - someone gets real angry because the wiki needs format markup while the readme must not have markup - someone doesn't get angry and simply copies either markup or nomarkup to the respectively unsuitable target it's an unsustainable situation... so instead let's point the readme to the wiki and consider that the place where the documentation is maintained Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19779
2019-03-12[kconf_update] move from custom logging tech to qCDebugHarald Sitter
Summary: the previous logging tech got kind of defunct in 2014 (to the point where it was basically qCDebug). seeing as no one really complained it seems reasonable to just move to qCDebug instead and make use of category filters and other qdebug goodness (such as system logging facilities for the various platforms) - new logging category kf5.kconfig.update; at info level by default (i.e. unless otherwise configured kconf_update is now silent) - --debug cmdline option now also attempts to force-enable the debug mode on that category (and debugs that attempt in of itself, so we don't get confused by categories magically getting enabled). - all log() calls are now qCDebug calls - all logFileErorr() calls (which was context-sensitive to the .upd file parsing) have been changed to qCDebugFile - qCDebugFile is a new *macro* wrapping around qCDebug to give it file context - everything is now qCDebug instead of qDebug - arguments updated to drop excess quoting and spaces to reduce "noise" https://markmail.org/thread/ofaeqcabguxyohyb Test Plan: updater still works and debugs when debug is enabled Reviewers: apol, aacid, #frameworks Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19508
2019-03-03[Kconfig] Compile without foreachLaurent Montel
Summary: compile without foreach Test Plan: Unittest Ok as previously Reviewers: dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19326
2019-01-09KonfUpdate: delete copy constructor and assignment operatorAlbert Astals Cid
they are unused, but if anyone would use them things would go wrong, so protect us from it
2018-03-11Remove not necessary QtCore and coLaurent Montel
2018-02-05Export kconf_update with toolingAleix Pol
Summary: This way if another cmake project imports it when cross-compiling, it can be executed. Reviewers: #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9652
2017-08-04Allow to build KConfig without Qt5GuiVolker Krause
Summary: This is particularly useful for cross-compilation, where we only need the kconfig_compiler on the host system. Reviewers: #frameworks, apol, aacid Reviewed By: aacid Subscribers: aacid Tags: #frameworks Differential Revision: https://phabricator.kde.org/D6994
2017-07-03API dox: update url from kdelibs to kconfigFriedrich W. H. Kossebau
2017-01-16Prefer nullptr over Q_NULLPTRKevin Funk
2017-01-03Fix build with CMP 0026 set to NEWSven Brauch
2015-12-29Ensure KonfUpdate's fields are all initialized.Matthew Dawson
These fields should all be written to before they are read during normal operation, but this ensures they have a sensible default in case they are not. Coverity issue 1291513.
2015-12-29Ensure group is unescaped properly in kconf_update.Matthew Dawson
During a kconf_update run, an invalid group name may be treated as correct even though the name failed to unescape. This leads the group name to be a null character, which will fail. If the unescape failed, return that failure status instead. This should have no impact, as the previous result would have been wrong anyways. Now a more useful diagnostic will be returned instead. Update the unit tests to ensure this issue is tested in the future. Found in Coverity issue 258087. REVIEW: 126556
2015-12-23Fix some Clazy warningsImran Tatriev
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-05finish the port to QCommandLineParser (it has addPositionalArgument now)David Faure
2015-08-05test_kconf_update: use QStandardPaths test modeDavid Faure
to avoid touching the user's real files
2015-08-01Upgrade Qt version requirement to 5.3David Faure
2015-05-02Fix kconf_update for spaces in pathsDavid Faure
(CI says it happens on OSX) Unittest it on Linux by exporting XDG_DATA_HOME with a space in it. CCMAIL: kde-mac@kde.org
2015-02-14Revert "Revert the SIC in commit 915976c1238be811f169eab1b02f7e8dad6410e0."Matthew Dawson
This reverts commit 9eee15917e01a89d937d1cba2eebbe9d65daeb72. As agreed with David Faure, we are going to leave this change in place for 5.7 and see what happens. CCMAIL: faure@kde.org CHANGELOG: Reverts previous commit, both can be left out of the changelog.
2015-02-14Revert the SIC in commit 915976c1238be811f169eab1b02f7e8dad6410e0.Matthew Dawson
On further reflection, introducing a SIC to fix the bug is not ideal. I'm working on something that will address the underlying bug, but I didn't have it in time for 5.7. The versioning behaviour is left, as I do want it to exist for the future. This only reverts the mandatory versioning of files to avoid the compatibility break. CHANGELOG: Undo 915976c123, which never saw a release, enough to avoid the SIC.
2015-01-10Update installation variables.Alex Merry