Age | Commit message (Collapse) | Author |
|
|
|
|
|
When running unit tests, usually QStandardPaths TestMode is enabled so as
not to mess up the config files in the home dir of the dev running the unit
tests; sGlobalFileName, a global static, was defined only once, which meant
that if KSharedConfig::openConfig() is called before the unit test has had
a chance to call QStandardPaths::setTestModeEnabled(true), then sGlobalFileName
will go on referring to the wrong kdeglobals file (as can be seen in
dfaure's debugging of the issue at [1]). Change the code so as to
detect QStandardPaths TestMode status and change sGlobalFileName as needed.
All unit tests still pass.
[1] https://invent.kde.org/frameworks/kio/-/merge_requests/77#note_74124
|
|
While the API might have been once designed to allow random byte strings
to be used as ids and only converted QString to UTF-8, the current
implementation in many places assumes the byte strings passed via
const char* or QByteArray are also in of UTF-8 encoding
(or at least ASCII7-only).
See e.g. KConfigGroup::entryMap() or KConfigGroup::name().
Stating the supported encoding explicitly should avoid any misassumptions.
|
|
|
|
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
|
|
See https://community.kde.org/Frameworks/Frameworks_Logging_Policy
|
|
|
|
|
|
|
|
locationType is used to determine where the config file should be saved.
If it is not passed on to the KConfigSkeleton constructor, the default
(GenericConfigLocation) will be used and any value the application had
set will be ignored.
|
|
This makes it follow the pattern of other "Configure X" style
actions. See also the discussion in
https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/4#note_60691
|
|
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
|
|
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
|
|
|
|
|
|
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
|
|
It will assert.
|
|
char*)
KStandardShortcut::name returns a QString, this makes the api symmetric and more
straightforward to use.
|
|
qstrcmp returns 0 if two strings are equal.
|
|
|
|
|
|
|
|
|
|
Summary:
This is useful for unittests. Example:
```
KCONFIGCORE_EXPORT void reloadUrlActionRestrictions();
void someTestMethod()
{
KConfigGroup cg(KSharedConfig::openConfig(), "KDE URL Restrictions");
cg.writeEntry("rule_count", 1);
cg.writeEntry("rule_1", QStringList{"open", {}, {}, {}, "file", "", "", "false"});
cg.sync();
reloadUrlActionRestrictions();
// Some test for code that uses KUrlAuthorized
cg.deleteEntry("rule_1");
cg.deleteEntry("rule_count");
cg.sync();
reloadUrlActionRestrictions();
}
```
This is consistent with the fact that other functions used by
KUrlAuthorized are defined here and exported internally.
Test Plan: Used this in a KIO unittest I'm writing for the future OpenUrlJob
Reviewers: aacid, apol, mdawson
Reviewed By: aacid
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D29347
|
|
|
|
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
|