Age | Commit message (Collapse) | Author |
|
Lets you specify Notifiers= in .kcfg for config entries that should be written with Notify flag,
i.e. announce the change to KConfigWatcher
Differential Revision: https://phabricator.kde.org/D20196
|
|
This enables KConfigWatcher to detect those changes, too.
Differential Revision: https://phabricator.kde.org/D20039
|
|
Summary: According to clazy since KConfigIniBackend::BufferFragment is very small it's faster to just copy it
Reviewers: apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19666
|
|
Summary: compile without foreach
Test Plan: Unittest Ok as previously
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19326
|
|
Summary:
the previous description of IncludeGlobals was a bit lackluster. the new
description should make it more obvious what the various flag permutations
achieve.
BUG: 306923
Reviewers: kde-frameworks-devel, apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19388
|
|
Summary:
In commit 8579ec54 (D13034), the Notify value got introduced in
enum WriteConfigFlag in KConfigBase. When adding this new value,
the value and its documentation (Doxygen format, /**<) got placed
wrongly.
After commit 8579ec54, the documentation for Notify "documents"
the previously existing value Localized, whereas the documentation
for Localized documents Notify.
Simply exchanging the order of the documentation comments fixes
this issue.
Reviewers: broulik, dfaure, davidedmundson
Reviewed By: davidedmundson
Subscribers: kde-frameworks-devel
Tags: documentation, frameworks
Differential Revision: https://phabricator.kde.org/D19320
|
|
Summary:
commit 6a18528 introduced escaping of bytes >= 127 to ensure that
KConfig files are valid UTF8.
The simplistic approach with a cutoff results in many escaped bytes
where it is not required. Especially non-western configuration files
would have many escapes.
This commit fixes that by only escaping bytes that are not valid UTF8.
BUG: 403557
FIXED-IN: 5.56
Test Plan: ninja && ninja test
Reviewers: dfaure, arichardson, apol, #frameworks, thiago
Subscribers: rapiteanu, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19107
|
|
Summary:
When /home is a symlink, for instance (as is often the case on FreeBSD),
group deletion would fail because KConfig was comparing non-canonical
paths with canonical-paths:
QDEBUG : KConfigTest::testDelete() Comparing "/home/adridg/.qttest/config/
kconfigtest_subdir/kconfigtest" and "/usr/home/adridg/.qttest/config/
kconfigtest_subdir/kconfigtest"
Test Plan:
mkdir /tmp/derp; ln -s /tmp/derp /tmp/drop
HOME=/tmp/derp bin/kconfigtest testDelete # Success
HOME=/tmp/drop bin/kconfigtest testDelete # Fail
Reviewers: adridg, arichardson, apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14927
|
|
Summary:
If someone was using them, it'd crash since it was raw-copying the d pointer
so you would end up with a double delete.
This is SIC, but IMHO it's fine, whoever gets a compiler failure has a bug to fix
Reviewers: vkrause
Reviewed By: vkrause
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18135
|
|
|
|
Summary:
Bytes from 'Strings' of type GroupString and KeyString should not be
escaped because they are valid UTF-8. Only instances of ValueString
should be escaped.
This fixes the failing test KConfigTest::testEncoding
Test Plan: Ran `ninja test` and found no errors.
Reviewers: dfaure, arichardson, apol, aacid, ngraham
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D17856
|
|
Summary:
UserBase tells me that KDE configuration files are encoded in UTF-8.
https://userbase.kde.org/KDE_System_Administration/Configuration_Files
In practice some *rc files have bytes outside that encoding. In my home directory I found two files that are not valid UTF-8.
I searched with
find ~/.config/ -name '*rc' -exec file {} +
which gives these exceptions:
akonadiconsolerc: Non-ISO extended-ASCII text, with very long lines
kmail2rc: Non-ISO extended-ASCII text, with very long lines
In kmail2rc, the offending fields are
[AttachmentView]/State
[CollectionFolderView]/HeaderState
Both are QByteArray values saved from QHeaderView::saveState().
In the instance I found, the offending bytes were 0x81 and 0x84.
akonadiconsolerc had way more of these values. All seem related to saving widget state and hence probably QByteArrays.
The written QByteArray values look very strange. The bytes in the non-printable ASCII range are written as \xXX but the values above 127 are written literally.
The encoding is done by KConfigIniBackend::stringToPrintable. It does not currently escape bytes that are larger than or equal to 127.
Reviewers: dfaure, arichardson, apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D17651
|
|
|
|
Notify was changed to 0x08 | Persistent as it implied the other flag
state. However this change was not updated in the test.
Reviewed-by: Kai Uwe Broulik
|
|
Relevant on Android.
|
|
Summary:
Intention is not to create a registry like system, but to replace
KDElibs4Support::KGlobalSettings and to replace other system settingss
-> some app communication in a more generic way.
writeEntry gains an additional flag Notify which if set, will notify
clients of what has actually changed when we sync.
Rationale to put this into KConfig was so that we could have everything
batched and sychronised to the file sync and to get the fine detailed
exposure of what has actually changed which we don't get with a file
watcher.
Default behaviour remains identical without any broadcast messages.
As it is a new dependency it is purely optional and anything referencing
DBus is not in the public API. Our deployment on platforms without DBus
tend to be standalone applications anyway.
Test Plan: Attached unit test
Reviewers: broulik, dfaure
Reviewed By: broulik, dfaure
Subscribers: dfaure, broulik, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13034
|
|
Test Plan: Used in subsequent patch
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13033
|
|
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"
|
|
Summary:
Removing the (typically empty) optional argument from the function
invocation avoids confusion and allows to remove the parameter.
See also D15558
Test Plan: make
Reviewers: #frameworks, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15848
|
|
Summary: They were not being split properly.
Test Plan: Tests pass, including the new one.
Reviewers: #frameworks, dfaure
Reviewed By: dfaure
Subscribers: dfaure, anthonyfieroni, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14162
|
|
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"
|
|
Summary:
The concept of KStandardDirs resources no longer exists;
and anyway kiosk users disable things at the feature level, not at
the config file level.
Test Plan: Compiles without warnings
Reviewers: davidedmundson, arichardson, broulik
Reviewed By: broulik
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14829
|
|
Differential revision: https://phabricator.kde.org/D13792
|
|
|
|
|
|
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"
|
|
We require Qt 5.8
|
|
|
|
Test Plan: tests pass
Reviewers: #frameworks, markg
Reviewed By: markg
Subscribers: markg
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D10771
|
|
Summary:
The SortOrder key is deprecated by the Desktop Entry Specification:
https://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
Reviewers: dfaure, #frameworks
Reviewed By: dfaure
Subscribers: #frameworks
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D9224
|
|
Summary:
KDesktopFile::sortOrder() returns the value of SortOrder key
as a string whithout parsing it as a list.
But according to Desktop Entry Specification
https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
it's type is "string(s)", i.e. the same type as the type of
Actions and MimeType keys, and thus it should be read the same way.
Reviewers: #frameworks, dfaure
Reviewed By: dfaure
Subscribers: dfaure, #frameworks
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D8689
|
|
|
|
|
|
Summary:
Every time we open a configuration file, we are checking if this file is there.
Since it's a sysadmin setting I'd say it's fine to assume that it's not appearing
and disappearing.
Also we are not supporting the case of the file changing during runtime or so.
Reviewers: #frameworks, mpyne, dfaure
Reviewed By: mpyne, dfaure
Subscribers: dfaure, mpyne
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D8871
|
|
Using initializer_lists for QList we reserve the right amount of memory in advance and also make for nicer code.
Also uses range-for where code was touched and a const container used.
Differential Revision: https://phabricator.kde.org/D7879
|
|
As per the Desktop Entry spec, we strip trailing whitespace from the key
when we split an entry into a key/value pair at the '='. Now we also
strip leading whitespace from the resulting value like we should.
CCBUG:310674
Differential Revision: https://phabricator.kde.org/D7169
|
|
Differential Revision: https://phabricator.kde.org/D7210
|
|
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
|
|
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"
|
|
|
|
Using the new extra-cmake-modules module ECMAddQch (since 5.36.0)
this adds the option to automatically build and install a file
in QCH format with the docs about the public API, which then can be
used e.g. in Qt Assistant, Qt Creator or KDevelop.
Additionally the installed cmake config files will be extended
with a target KF5Config_QCH containing information about how to "link"
into the generated QCH file, which then can be used in the cmake build
system of other libraries building on this library, by
simply listing this target in "LINK_QCHS" of their ecm_add_qch() usage.
And a respective doxygen tag file with all the metadata about the
generated QCH file and used for the "linking" will be created and
installed.
Pass -DBUILD_QCH=ON to cmake to enable this.
|
|
|
|
The "dir" and "path" variables were obviously swapped here by mistake.
This resulted in the relativePath always being empty, and made the
function return "~/.local/share/" (or "~/.config/") instead of the
correct path.
BUG: 345100
FIXED-IN: 5.34.0
Differential Revision: https://phabricator.kde.org/D5502
|
|
Spotted because it leads to race conditions due to tzset
(surely a Qt bug, but anyway no point in finding out lastModified
for nothing).
While at it, remove the unused size field as well.
|
|
clarity.
|
|
Differential Revision: https://phabricator.kde.org/D4941
|
|
Summary:
It can't possibly have been used anywhere, because it's not in the KConfig
API anywhere. The intended way to use this API was by providing a plugin
that would derive from KConfigBackend but the plugin loading code
in KConfigBackend::create has been disabled since before KF 5.0.
The reason I want to stop exporting this class is to be able to
optimize it (e.g. the QDateTime in it is completely unused but leads
to data races due to tzset)
Test Plan: Note, I'll rename it to _p.h if we agree, it would just have made this diff too big.
Reviewers: mdawson
Reviewed By: mdawson
Subscribers: #frameworks
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D4604
|
|
Even with 5.8 we need it, not due to QLockFile, but just due to mainConfigName(),
see unittest ksharedconfig_in_global_object
|
|
It's not needed, this is purely a test for the standalone KEntryMap class.
|
|
It is internal.
|