aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler
AgeCommit message (Collapse)Author
2018-03-11Remove not necessary QtCore and coLaurent Montel
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-01-16Use nullptr everywhereKevin Funk
Differential Revision: https://phabricator.kde.org/D3987
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-17[kconfig_compiler] Improve documentation about InheritsMartin Gräßlin
Summary: Better specify the requirements the parent class needs to have. KConfigCompiler generates different variants of ctors taking either: * a QStringLiteral argument (name set in <kcfgfile> * a KSharedConfig::Ptr argument (arg="true" in <kcfgfile>) * no argument (Inherits=true in kcfgc and no <kcfgfile>) In order to have Inherits generate compiling code in all cases the parent class needs to provide accessible ctors. This change updates the docuementation to reflect this. Reviewers: #frameworks, dfaure Differential Revision: https://phabricator.kde.org/D3636
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-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-24Add documentation for the GenerateProperties optionElvis Angelaccio
REVIEW: 129188
2016-10-02Fix memory leak in SignalsTestNoSingletonDpointer, found by ASAN.David Faure
2016-06-22Fix reproducibility in builds by ensuring utf-8 encoding.Scarlett Clark
REVIEW:128102 Set encoding on kconfig_compiler generated cpp and headers to utf-8 ( reproducible builds ) Under certain locals non standard characters will get dropped making builds un reproducible. Setting the encoding to utf-8 on the files makes all builds reproducible no matter what ( or none ) locale is in use. Thereby making the build reproducible.
2015-12-29Remove duplicate branch in kconfig_compiler.cppMatthew Dawson
This has been around for a long time, no need to dupilcate. Coverity issue 1289077.
2015-12-23Fix some Clazy warningsImran Tatriev
2015-10-30Use QStringLiteral in generated codeMontel Laurent
REVIEW: 125833
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-09-25Mark kconfig-compiler as non-gui toolHarald Fernengel
Makes sure that it doens't create an app bundle on Mac OS X REVIEW: 125337
2015-08-18Avoid QString::fromLatin1() in generated codeSergio Martins
Because it allocates memory. REVIEW: 124717
2015-08-01Upgrade Qt version requirement to 5.3David Faure
2015-07-27Don't generate deprecated codeAleix Pol
::usrWriteConfig is deprecated, use ::usrSave as recommended by the documentation. REVIEW: 124467
2015-06-24Mark message() as WARNINGAleix Pol
As recommended by Alex Merry CCMAIL: alex.merry@kde.org
2015-06-23Install kconfig_compiler into libexecAleix Pol
This will make it end up in a platform-dependent prefix (i.e. /usr/lib64, /usr/lib/arm-linux-gnueabihf, etc) rather than /usr/bin, making it possible to have different kconfig_compiler versions installed, useful for cross-compilation. REVIEW: 124138
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-06-21Make it possible to use kconfig_compiler from different sourcesAleix Pol
This way we can specify the used tooling targets to be used, useful if we're cross-compiling, since we get to use the tooling that runs in the local platform. REVIEW: 124104
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-22Initialize mParamMax coverty report 1289403Montel Laurent
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-04-26Use KF5_INCLUDE_INSTALL_DIR and KF5_INSTALL_TARGETS_DEFAULT_ARGSAlex Merry
This is instead of INCLUDE_INSTALL_DIR and INSTALL_TARGETS_DEFAULT_ARGS, which will lose the "KF5" suffix from the include path.
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-24Remove unhelpful commentsAlex Merry
These lines of code do not really require any justification. REVIEW: 116962
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-10kconfig_compiler: fix typo that prevented using default QDateTime valuesAlex Richardson
2014-01-11Port kconfig_compiler_kf5 to use QCommandLineParserBhushan Shah
REVIEW: 114937
2014-01-09more rename 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