aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler
AgeCommit message (Collapse)Author
2019-01-10kconfig_compiler: delete the assignment operator and copy constructorAlbert Astals Cid
Summary: of the generated class that has a pointer and raw copy would be bad. Those generated classes are internal and nobody would probably have this, but being safe never hurts Reviewers: vkrause Reviewed By: vkrause Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D18136
2018-05-16KConfigCompiler_Test: Update test_signal.h.ref to follow the generated fileMaximiliano Curia
Summary: Since "Use override" (3985f2a0) kconfig_compiler.cpp generates usrSave with override instead of Q_DECL_OVERRIDE. This causes the KConfigCompiler_Test to fail [1], as the reference file of the test was not updated. [1]: https://build.kde.org/job/Frameworks%20kconfig%20kf5-qt5%20SUSEQt5.10/32/ Reviewers: #frameworks, mlaurent Reviewed By: mlaurent Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D12892
2018-04-06Fix autotestLaurent Montel
2018-03-11Remove not necessary QtCore and coLaurent Montel
2017-11-30Fix some clazy warningMontel Laurent
2017-05-26tests: use QIODevice::Text in kconfigcompiler_testPino Toscano
This way, different newline endings in OSes are handled as \n when reading, and thus fixing the comparison on non-\n OSes.
2017-05-26tests: use right QProcess API in kconfigcompiler_testPino Toscano
Use the QProcess::start() variant with explicit (empty, in this case) arguments, so the program string is not parsed as shell command, thus preserving paths with spaces as such.
2017-01-16Prefer nullptr over Q_NULLPTRKevin Funk
2017-01-08This should now use nullptrDavid Faure
2017-01-06Generate an instance with KSharedConfig::Ptr for singleton and argMartin Gräßlin
Summary: In case a kcfg with arg="true" was used and singleton the static instance method only accepted a QString config name. This made it impossible to combine a singleton config with an already existing and open KSharedConfig::Ptr. With this change an overloaded instance method is added which takes a KSharedConfig::Ptr as argument. The private ctor, though, only takes a KSharedConfig::Ptr and the instance method taking a QString argument uses KSharedConfig::openConfig on the config file name. The change is source-incompatible in the following situation: * kcfgfile arg="true" * Singleton = true * Inherits is specified In this situation the previous revision created an instance method with a QString argument and passed that to the parent constructor. This is not in accordance with the documentation. Any user of this behavior was relying on a bug. With this change now the call to the parent constructor carries a KSharedConfigPtr. Test Plan: kconfigcompiler tests still pass and a config with singleton and arg="true" generates the code as I need it Reviewers: #frameworks, dfaure, mdawson Differential Revision: https://phabricator.kde.org/D3690
2016-12-16kconfig_compiler: Use nullptr in generated codeKevin Funk
Reviewers: #frameworks, davidedmundson Reviewed By: davidedmundson Differential Revision: https://phabricator.kde.org/D3702
2016-12-07Revert "Generate an instance with KSharedConfig::Ptr for singleton and arg"David Faure
This reverts commit cd4e6504dfbdface00037625f0cedda511e6d839. As suggested by Martin on release-team@kde.org, given that it breaks SC.
2016-12-07Revert "[autotest] Fix stupidity"David Faure
This reverts commit 71f16741a0288d8587876dcc7dbb33ba8f00546a.
2016-12-02[autotest] Fix stupidityMartin Gräßlin
Sorry.
2016-12-02Generate an instance with KSharedConfig::Ptr for singleton and argMartin Gräßlin
Summary: In case a kcfg with arg="true" was used and singleton the static instance method only accepted a QString config name. This made it impossible to combine a singleton config with an already existing and open KSharedConfig::Ptr. With this change an overloaded instance method is added which takes a KSharedConfig::Ptr as argument. The private ctor, though, only takes a KSharedConfig::Ptr and the instance method taking a QString argument uses KSharedConfig::openConfig on the config file name. This provides full API compatibility and at the same time allows to use KSharedConfig in addition to the arg name based variant. Test Plan: kconfigcompiler tests still pass and a config with singleton and arg="true" generates the code as I need it Reviewers: #frameworks Differential Revision: https://phabricator.kde.org/D3386
2016-11-12kconfig_compiler - generate code with overridesAllen Winter
REVIEW: 129382
2016-10-31Make kconfig_compiler autotests use the KCONFIG_ADD_KCFG_FILESAleix Pol
Summary: Instead of having an odd fake of it. Will help some required refactorings and already showed some issues, fixed by this patch, namely: - don't use string(regex replace) to extract a string from another string. in case it doesn't match it will offer the whole content which is never what we want. - messages(ERROR), the correct parameter is FATAL_ERROR, cmake understands "ERROR" as mere output string - turn the macro into a function, otherwise 2 calls in the same subdirectory are dangerous. CCBUG: 371562 Test Plan: tests still pass, projects that use the macro still build Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: dfaure Differential Revision: https://phabricator.kde.org/D3178
2016-04-16kconfigcompiler_test_signals.cpp - pedanticAllen Winter
2015-12-23Fix some Clazy warningsImran Tatriev
2015-10-30Use QStringLiteral in generated codeMontel Laurent
REVIEW: 125833
2015-08-18Fix unit-tests, expected output changed, so update the tests.Sergio Martins
2015-07-27Don't generate deprecated codeAleix Pol
::usrWriteConfig is deprecated, use ::usrSave as recommended by the documentation. REVIEW: 124467
2015-06-22Support translation domain in 'kde' translation systemChusslove Illich (Часлав Илић)
In applications translations can be looked up in the globally set translation domain, but in libraries it is necessary to link every i18n call to the library's own translation domain. A new code generation option TranslationDomain= is added to enable this. It has effect only if TranslationSystem=kde is set. Added unit tests to check generated translation calls. CHANGELOG: New code generation option TranslationDomain=, for use with TranslationSystem=kde; normally needed in libraries. REVIEW: 123872
2015-05-02Make the test[0-9] executables non gui, to fix OSXDavid Faure
2015-05-02improve error message when binary is not foundDavid Faure
2015-04-26Generate Q_PROPERTY entries out of KConfigSkeleton classesAleix Pol
It adds a configuration setting that makes it possible to generate Q_PROPERTY instances out of each variable exposed by the configuration class. Especially useful when it comes to exposing these classes to QtQuick interfaces. REVIEW: 123367 CHANGELOG: Generate QML-proof classes using the kconfigcompiler
2015-03-17Allow to generate qloggingcategories support.Montel Laurent
Add new variable to specify it in *.kcfgc : "CategoryLoggingName" CHANGELOG: Allow to generate file with qloggingcategories support. REVIEW: 122931
2014-09-18Replace nullptr with Q_NULLPTR.Nicolás Alvarez
gcc 4.5 doesn't have nullptr.
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-10Revert "adapt to ECMAddTests change"Alex Richardson
This reverts commit 88c9a9664e99b639df4cde2be22dbe44df228879.
2014-05-10adapt to ECMAddTests changeAlex Richardson
2014-05-07Generate MOC files for kconfig_compiler outputs in tests.Matthew Dawson
The MOC files for generated output from kconfig_compiler are not automatically generated. Re-add the code that does this, fixing the build. I'm assuming this isn't an issue on Windows, as I don't have any machines to test on. Please let me know if this isn't the case. CC: arichardson.kde@gmail.com
2014-05-07fix kconfig_compiler test on windowsAlex Richardson
We have to generate the files in the same directory as the test executables otherwise QFINDTESTDATA will fail
2014-05-07Use ecm_add_test(s) instead of own macroAlex Richardson
This also fixes running 'nmake test' on Windows.
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-24Rename the kconfig_compiler_kf5 target to kconfig_compilerAlex Merry
Just because the executable has the "_kf5" suffix, that does not mean the target should have it. This is ugly API, and will be unnecessary porting effort for KF6. REVIEW: 116995
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
2014-02-20Make kconfig_compiler signals actually useful + add unit testAlex Richardson
Previously the classes generated by kconfig_compiler would only emit the defined signals when using the setters provided by that class. However, when using e.g. KConfigDialog which uses KConfigSkeletonItem::setProperty() to change the items no signal was generated. This patch fixes this by using a wrapper KConfigSkeletonItem subclass that calls a private itemChanged() method in the generated class which updates the set of changed properties. As soon as the item is saved (usrWriteConfig() in the generated class is called) the signal will be emitted REVIEW: 115635 REVIEW: 115634
2014-02-19Print the diff to stdout on comparison failureAlex Richardson
Previously the output of diff -u was written to a file when the generated file did not match the expectations. Having the output printed to stdout makes it easier to see the exact error without having to know that a diff exists in a certain file somewhere in the build directory. REVIEW: 115832
2014-01-09further rename of kconfig_compiler to kconfig_compiler_kf5Jonathan Riddell
2014-01-09Further renaming to kconfig_compiler_kf5Jonathan Riddell
2014-01-09rename kconfig_compiler to kconfig_compiler_kf5Jonathan Riddell
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