Age | Commit message (Collapse) | Author |
|
|
|
|
|
Summary: Following D27059, add `parentGroupName` attribute to `group` element to generate kconfig settings with subgroups
Reviewers: ervin, dfaure, #frameworks, meven
Reviewed By: ervin, meven
Subscribers: apol, meven, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27133
|
|
Summary:
- Fix order of member initialisation (compiling with -Wreorder)
- Use Q_UNUSED where needed
- QAtomicInteger::loadRelaxed() has been available since Qt 5.14
Test Plan: make && ctest
Reviewers: #frameworks, dfaure, apol
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27158
|
|
Summary:
KApiDox & ECMAddQch have been just teached about Q_DECLARE_FLAGS, so the
underlying typedefs are no longer skipped by doxygen, but can be
documented now, allowing links to be generated for these types e.g. when
used as arguments.
The "#" prefix to the enum name in the description text of all the
Q_DECLARE_FLAGS docs seems needed to properly trigger doxygen autolinks.
GIT_SILENT
|
|
Summary:
Fix the following bug, if an entry is set on HOME/.config/kdeglobals and on a specific config file like kcmfonts
When you hit restore defaults button and apply, value will be not wrote on the specific file, but then the value is the one from kdeglobals
This patch ensure we write the key to the specific configuration file on those case with an empty value. KConfig will take default value automatically
Test Plan:
Added a test to ensure flag is working
Tested using some KCM to ensure all is working fine
Reviewers: ervin, dfaure, meven, crossi, hchain
Reviewed By: ervin, dfaure, meven
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28128
|
|
Summary:
Add a standard shortcut for this action so it can be synchronized between different apps
and the file dialog; see https://bugs.kde.org/show_bug.cgi?id=262551.
The action in Dolphin also has F8 bound to this, but the definition here only accept two
default shortcuts, and F8 seems kind of random.
CCBUG: 262551
Test Plan: Apply D28803 to KIO and D28804 to Dolphin and test there
Reviewers: dfaure, #frameworks
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28802
|
|
|
|
|
|
A similar patch was approved in https://phabricator.kde.org/D26102
|
|
Summary:
This is an addendum for commit a2774ff5b41987c3919a9e; making the check
tighter.
Test Plan: make && ctest
Reviewers: #frameworks, dfaure, davidedmundson, cfeck, ervin, meven, bport
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27811
|
|
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
|
|
It is a small trivial typo about showing same file instead of actual
config file.
REVIEW: D28151
|
|
|
|
Summary:
Allow to write choices such as :
```
<choices>
<choice name="enum_name" value="I can't containt (anything)"></choice>
<choice name="normal_choice"></choice>
</choices>
```
Test Plan: ctest
Reviewers: ervin, bport, crossi, #frameworks
Reviewed By: ervin
Subscribers: ngraham, davidre, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27463
|
|
|
|
|
|
|
|
|
|
Summary:
If the styleName property is set for a QFont, using setBold(true) would
lead to Qt using an "emboldended"/synthetic font style instead of using
the bold style provided by the font itself (usually as a standalone font
file), the former looks ugly (IIUC, Freetype emboldens fonts as a last
resort for fonts that don't provide a bold style at all).
Accoring to upstream[1] the styleName property is useful for fonts with
fancy style names, and also it shouldn't be set if it's not needed; and
indeed using styleName with e.g. "Regular" doesn't make sense, as there
is no "Regular Bold" style AFAICS.
Checking for "Regular|Normal|Book|Roman" is based on examining the font
styles provided by the font packages available on OpenSuse Tumbleweed ATM,
(I didn't include some of the weird/non-common ones e.g. I've seen "Roma"
and "Rounded"). Some statistics about the "Regular"-like font styles from
my testing:
Regular: 2486
Normal: 66
Book: 20
Roman: 13
For more details see:
[1] https://bugreports.qt.io/browse/QTBUG-63792
https://bugs.kde.org/show_bug.cgi?id=378523
BUG: 378523
FIXED-IN: 5.68
Test Plan:
All unit tests still pass.
Changing the fonts via e.g. the fonts KCM doesn't append the font sytleName,
to the relevant font config entry, if the "Regular" style or co. is used.
A simple test, look at the current dir name in the Dolphin url bar with
and without ",Regular" appended to the font= entry (assuming you're using
Noto Sans or DejaVu Sans as the styleName varies from font to font).
Reviewers: #frameworks, dfaure, davidedmundson, cfeck, ervin
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27735
|
|
Summary:
D27497 was causing cases with dpointer + min/max to fail
Specifically, this okular build: https://build.kde.org/job/Applications/job/okular/job/kf5-qt5 SUSEQt5.12/175/console
Test Plan: Added min/max to dpointer autotest
Reviewers: meven, ervin
Subscribers: kde-frameworks-devel, aacid
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27717
|
|
Summary: See https://phabricator.kde.org/D27497#618156
Test Plan: ctest
Reviewers: hchain, ervin, bport, crossi, #frameworks
Reviewed By: hchain
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27672
|
|
Summary:
- When GenerateProperties and Mutators are activated, the generated code
did not handle min/max properly
- In the case of a parameterized entry, generated code also did not
handle min/max
BUG: 418146
Test Plan: - auto tests included
Reviewers: meven, crossi, ervin, bport, tcanabrava
Reviewed By: meven, ervin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27497
|
|
nested groups
Summary:
Currently KConfgiSkeleton cannot manage item entry in subgroup, like
```
[General][Colors]
MyItem=foo
```
Example of use
```
// Generated Class with KConfig compiler, inherits KConfigSkeleton
KConfigGroup generalGroup( &config, "General" );
KConfigGroup colorsGroup = config.group( "Colors" )
myItem->setGroup(cg); // Now can take a KConfigGroup
addItem(myItem, "MyItem");
```
Evolution of kconfig compiler will follow to consider this.
Reviewers: ervin, dfaure, #frameworks, mdawson
Reviewed By: ervin, dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27059
|
|
Summary: Relates to D26368
Test Plan: ctest
Reviewers: hchain, ervin, bport, crossi, #frameworks
Reviewed By: hchain, crossi
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27496
|
|
namespaced
|
|
|
|
Summary: This function will be called when the property value change
Reviewers: ervin, meven, crossi
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27342
|
|
|
|
|
|
Summary:
- Drop redundant args to startElement()/endEelement()
- Use range-for
- Drop ConfigLoaderHandler methods that weren't used anywhere AFAICS
and ConfigLoaderHandler is private API
Test Plan: make && ctest
Reviewers: #frameworks, apol, dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27157
|
|
Summary:
Add a utility function is<Parameter>Immutable to access immutability quickly.
Generated classes uses them internally to avoid code redundance.
Sample:
```
/**
Set blocked-by-default
*/
void setBlockedByDefault( bool v )
{
if (v != mBlockedByDefault && !isBlockedByDefaultImmutable() ) {
mBlockedByDefault = v;
Q_EMIT blockedByDefaultChanged();
}
}
/**
Is blocked-by-default Immutable
*/
bool isBlockedByDefaultImmutable()
{
return isImmutable( QStringLiteral( "blockedByDefault" ) );
}
```
```
/**
Set org.kde.ActivityManager.ResourceScoringEnabled
*/
void setResourceScoringEnabled( bool v )
{
if (!isResourceScoringEnabledImmutable() )
mResourceScoringEnabled = v;
}
/**
Is org.kde.ActivityManager.ResourceScoringEnabled Immutable
*/
bool isResourceScoringEnabledImmutable()
{
return isImmutable( QStringLiteral( "resourceScoringEnabled" ) );
}
```
Reviewers: ervin, #frameworks, dfaure
Reviewed By: ervin
Subscribers: dfaure, tcanabrava, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26368
|
|
|
|
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
|