Age | Commit message (Collapse) | Author |
|
|
|
|
|
Summary: QXmlInputSource is deprecated in qt5.15
Test Plan: autotest ok
Reviewers: dfaure, apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26890
|
|
Port "dec"/"hex" as it's Qt namespaced too
|
|
std::cout/std::cerr
Summary: Port endl to "\n" as it's qt namespaced
Test Plan: autotest ok
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26860
|
|
Summary:
The current KConfigXT compiler is in a sad state:
It's a massive file with loads of global variables that handle state, the generator is done within the main() function and it seems to have grown organically. There are no classes to separate logic / state / generation, what exists is code that generates code from a xml / ini pair, but it's hard to even discover what a bit of code is doing. The code istyle is C++ / Java from the nineties, which is not bad per see but it also uses quite a few things that are going to be deprecated in Qt 6 so I'm also taking the time make the code more streamlined with newer code style (no iterators, lambdas, auto usage, etc).
The code that generates the files simplly pushes strings to a text stream, and it's hard to figure out when something starts or something ends: for instance, the code that generates the Constructor has more than sixty lines of code englobing some nested if - for - if - for constructs.
Currently the code is "done" - there's one bug that I still need to find & fix regarding Translations, but the rest seems sane.
The current testcode generates incorrect *whitespaces* regarding the old code (there's some parts that I feel that it's important to fix before merging, but overall, the whitespace changes are not bad and easier to handle, old code had a hand-counted amount of spaces before each line, new code has a function whitespace() that adds the current-and-correct amount of whitespaces based on indentation level that you start by startScope() and ends with endScope(). rest of the code still needs to be ported to it.
I plan to fix the testcases whitespace by manually adding them, I'v fougth with the code for a while and added a few hacks there but I don't want to make the code hackish again.
New code is not perfect by any means, but is a good step in the right direction.
This code tries to Separate the compiler code into many different files / classes to be more obvious what's happening, and each class also has many helper methods to minimize copypaste.
- CodeGenerator: Has base code for the header and source files that can be shared
- HeaderGenerator: Logic for generating the header file
- SourceGenerator: Logic for generating the source file
- KcfgParser: Logic for parsing the kcfg file and extracting the information from the Xml file
- CommonStructs: a header that contains the structs that are currently used everywhere.
- KConfigParameters: (was CfgConfig - ConfigConfig, wat) - Has information passed via the kcfgc file
- kcfg_compiler - will be renamed to main - start the other classes and generates the files.
This code here currently has the begining of this separation, with the CodeGenerator and the HeaderGenerator in a ~good~ state, but unfinished.
Test Plan:
- Run the test cases,
- Compare the diffs generated by the testcases and fix in the code the errors / differences
- Run and compare real kde source with the new and old generators to look for errors
Reviewers: #frameworks, ervin, bport, dfaure
Reviewed By: dfaure
Subscribers: davidre, bcooksley, cgiboudeaux, kossebau, bport, ngraham, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26202
|
|
The new API breaks python bindings compilation since sip can't understand KSharedConfig::Ptr type
Differential Revision: https://phabricator.kde.org/D26815
|
|
Test Plan: "touch"ing kconfig_compiler results in regeneration now.
Reviewers: #frameworks, vkrause
Reviewed By: vkrause
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26723
|
|
This reverts commit 98c32e29f50465d4d4e16bafdf0491edbfb422b0.
This broke kdevelop and kmymoney. I'm workin on the fixes and more
unittests for them.
|
|
Summary:
The current KConfigXT compiler is in a sad state:
It's a massive file with loads of global variables that handle state, the generator is done within the main() function and it seems to have grown organically. There are no classes to separate logic / state / generation, what exists is code that generates code from a xml / ini pair, but it's hard to even discover what a bit of code is doing. The code istyle is C++ / Java from the nineties, which is not bad per see but it also uses quite a few things that are going to be deprecated in Qt 6 so I'm also taking the time make the code more streamlined with newer code style (no iterators, lambdas, auto usage, etc).
The code that generates the files simplly pushes strings to a text stream, and it's hard to figure out when something starts or something ends: for instance, the code that generates the Constructor has more than sixty lines of code englobing some nested if - for - if - for constructs.
Currently the code is "done" - there's one bug that I still need to find & fix regarding Translations, but the rest seems sane.
The current testcode generates incorrect *whitespaces* regarding the old code (there's some parts that I feel that it's important to fix before merging, but overall, the whitespace changes are not bad and easier to handle, old code had a hand-counted amount of spaces before each line, new code has a function whitespace() that adds the current-and-correct amount of whitespaces based on indentation level that you start by startScope() and ends with endScope(). rest of the code still needs to be ported to it.
I plan to fix the testcases whitespace by manually adding them, I'v fougth with the code for a while and added a few hacks there but I don't want to make the code hackish again.
New code is not perfect by any means, but is a good step in the right direction.
This code tries to Separate the compiler code into many different files / classes to be more obvious what's happening, and each class also has many helper methods to minimize copypaste.
- CodeGenerator: Has base code for the header and source files that can be shared
- HeaderGenerator: Logic for generating the header file
- SourceGenerator: Logic for generating the source file
- KcfgParser: Logic for parsing the kcfg file and extracting the information from the Xml file
- CommonStructs: a header that contains the structs that are currently used everywhere.
- KConfigParameters: (was CfgConfig - ConfigConfig, wat) - Has information passed via the kcfgc file
- kcfg_compiler - will be renamed to main - start the other classes and generates the files.
This code here currently has the begining of this separation, with the CodeGenerator and the HeaderGenerator in a ~good~ state, but unfinished.
Test Plan:
- Run the test cases,
- Compare the diffs generated by the testcases and fix in the code the errors / differences
- Run and compare real kde source with the new and old generators to look for errors
Reviewers: #frameworks, ervin, bport, dfaure
Reviewed By: dfaure
Subscribers: bport, ngraham, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26202
|
|
GIT_SILENT
|
|
Makes this file self contained
GIT_SILENT
|
|
Summary: Brings us one step to closer to not needing to create lists of source files
Reviewers: #frameworks, #build_system, apol
Reviewed By: apol
Subscribers: apol, kossebau, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26626
|
|
|
|
Reviewers: ervin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26495
|
|
Summary:
A common complaint is that our apps store 'state' information such as recent files or window sizes in their configuration files, making it ugly to store them in version control systems.
Therefore we should not store such information in XDG_CONFIG_DIR but instead use XDG_DATA_DIR for this.
This patch adds a utility method that creates a KSharedConfig backed by a file in such a suitable location.
For e.g. dolphin the file .local/share/dolphin/dolphinstaterc would be created.
See T12246 for some context
Reviewers: #frameworks, dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26440
|
|
|
|
Exclude the new function from the sip parser
Differential Revision: https://phabricator.kde.org/D26430
|
|
Summary:
Port QRegExp::exactMatch() by using QRegularExpression::anchoredPattern()
to match the entire subject string.
Remove filenameOnly(), it's been broken for a long time (QStringLiteral("[/\\]")
is not a valid QRegExp pattern); besides it's not needed as QFileInfo::fileName()
is used to get the filename.
Test Plan: make && ctest
Reviewers: #frameworks, dfaure, ervin, apol
Reviewed By: dfaure, ervin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Summary: Change and test transport protocol from http to https while correcting dead link
Reviewers: apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25829
|
|
|
|
Summary:
It can help save users having to member variables for the config and the
watcher.
Reviewers: broulik
Reviewed By: broulik
Subscribers: broulik, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25833
|
|
Summary:
KConfigCompilerSignallingItem both inherits KConfigSkeletonItem and
internally is powered by a separate KConfigSkeletonItem
The generated code calls setWriteFlags on the outer
KConfigCompilerSignallingItem instance, but the real writing is
performed by the internal version. We need to set the flags in the right
place.
Ideally we would do this in an overload of KConfigSkeletonItem, but
given we can't, I've shadowed the method. This isn't pretty, but given
the docs say it should generally only be used from auto generated code,
should be fine.
Test Plan: Used in workspace KCM
Reviewers: ervin
Reviewed By: ervin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25791
|
|
Use the generic redirect commits.kde.org.
Change discussed on the kde-frameworks-devel list:
https://mail.kde.org/pipermail/kde-frameworks-devel/2019-November/097564.html
|
|
cgit.kde.org may go away at a certain point,
while commits.kde.org is meant to stay around.
|
|
|
|
|
|
|
|
|
|
Differential Revision: https://phabricator.kde.org/D25678
|
|
GIT_SILENT
|
|
Summary:
This allows manually invoking session restoration logic without creating duplicate
configs, in support of D25106 and https://invent.kde.org/kde/okular/merge_requests/58/
Test Plan: Apply either of the above patches and verify that it works
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: anthonyfieroni, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25219
|
|
Summary: Add a simple delete option to kwriteconfig. A possible usecase of this option is to delete unused shortcut bindings.
Reviewers: #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Reviewed By: davidedmundson
Subscribers: davidedmundson, ngraham, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25307
|
|
Summary:
This new item allows to use a QObject property as a source for a
setting. This is especially convenient for using with KCMs present in
systemsettings which tend to store information outside of KConfig (for
interfacing deeper with the system).
Reviewers: #frameworks, dfaure, davidedmundson, bport, crossi
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25211
|
|
Reviewers: #frameworks, dfaure, davidedmundson, bport, crossi
Subscribers: vkrause, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25210
|
|
|
|
|
|
|
|
|
|
Summary:
The generated classes of kconfig_compiler take a KSharedConfig::Ptr by
value, one possibility would be to make them const & but that is BIC so
instead what we do is just move them to the only place the config is
used so the cheaper move constructor can be used instead of the copy
constructor
Reviewers: ervin, apol
Reviewed By: ervin, apol
Subscribers: kde-frameworks-devel, ervin, apol
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25061
|
|
|
|
|
|
GIT_SILENT
|
|
GIT_SILENT
|