Age | Commit message (Collapse) | Author |
|
|
|
|
|
pyqt broke sip4 compatibility in 5.15.6, and there is no more maintainer
of the KF Python bindings to fix things.
Future support might need different code, so no advantage in keeping the
old code around.
|
|
This is basically the C++ counter-part to
https://invent.kde.org/frameworks/kconfig/-/merge_requests/94
and allows to easily retrofit window size persistence on existing windows/
dialogs, replacing e.g. code like
https://invent.kde.org/pim/pimcommon/-/blob/master/src/pimcommon/widgets/kpimprintpreviewdialog.cpp.
This is a bit more complicated than one might expect, as KWindowConfig
works with QWindows, but that's something freshly created QWidget windows/
dialogs don't have yet. Additionally, we are in a library here that doesn't
depend on Qt::Widgets. To overcome this we move the widget-dependent code
(basically just a call to QWidget::windowHandle()) to inline template code
(and thus into the consumer), use std::function's type erasure to pass it
into the library code, and an event filter on the widget to wait for the
QWindow to become available.
|
|
Macros Q_NAMESPACE_EXPORT should be used without semicolon
https://doc.qt.io/qt-5/qobject.html#Q_NAMESPACE_EXPORT
This generates warning: extra ‘;’ [-Wpedantic]
|
|
|
|
|
|
This fixes the build with Qt6 on Android.
|
|
This has should be done explicitely, as the docs explain.
This causes issues for the KScreenLocker KCM port.
|
|
|
|
|
|
Rather than abort the build, don't create a session config
and print a warning.
Signed-off-by: Eike Hein <eike.hein@mbition.io>
|
|
Rather than abort the build, don't create a session config
and print a warning.
Signed-off-by: Eike Hein <eike.hein@mbition.io>
|
|
Signed-off-by: Eike Hein <eike.hein@mbition.io>
|
|
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
|
|
Since we are not building the library but the source files we
don't want the macro to expand to __declspec(dllimport).
|
|
It will trigger side effects like triggering the dbus signal
which depending on the timing may be delivered only in the next
test case causing an unexpected change signal emission.
|
|
|
|
Currently an application needs to be restarted before it can see
any changes made to the standard shortcut configuration. To notify
about changes a new class is introduced that looks for those
changes using KConfigWatcher and also updates the global map.
CCBUG:426656
|
|
In Qt6 the Q_GLOBAL_STATIC will already report to be null while it is in
the process of being deleted, we therefore cannot access it anymore from
destruction code path as we did before.
This problem is hit for example by the Breeze style, making all 6 based
widgets applications crash on exit without this.
|
|
So that #include <kconfig_version.h> still works after changing its
location in the previous commit.
NO_CHANGELOG
|
|
Instead of /usr/include/KF5/kconfig_version.h.
For more details see:
https://invent.kde.org/frameworks/kservice/-/merge_requests/79
GIT_SILENT
|
|
Task: https://phabricator.kde.org/T15109
|
|
|
|
|
|
|
|
|
|
The eliminated duplication of the composite condition was error-prone
and less readable.
|
|
entryMap is ordered by the group name first. So there is no need to
iterate over the entire map to process entries whose group names start
with some prefix. Find the group name prefix's lower bound and iterate
over the proper subrange instead. This should be much faster, especially
if the subrange's size is much less than the entryMap's size.
Adjust isGroupOrSubGroupMatch() helper function to assert the extracted
startsWith() condition instead of rechecking it. Pass
KEntryMapConstIterator in place of the group name to this function in
order to simplify its callers' code. Reuse this helper function in
KConfigPrivate::copyGroup().
|
|
|
|
|
|
Usually multiple key entries belong to each group. Before this commit
every key entry's group name was converted from UTF-8 to UTF-16 and then
inserted into a set. With this commit every key entry's group name is
inserted as a std::string_view into a set, and only unique group names
are converted to UTF-16 in the end. This should improve performance.
|
|
This commit is an alternative to the earlier incorrect and reverted
b3dc879e8b108c26c929bfbe551bcdf77f140e94. That commit contained several
mistakes and an algorithmic complexity increase:
1) the added conditions were inverted: should have been
`hasNonDeletedEntries` (without `!`);
2) KConfigPrivate::groupList() passed group instead of key.mGroup to
hasNonDeletedEntries();
3) The complexity of hasNonDeletedEntries() is O(entryMap.size()). Calls
to this function were added into loops that iterated entryMap.size()
times. So the overall complexity of groupList() increased from linear
to quadratic.
This fix collects `mGroup`s of non-deleted key entries instead of
`mGroup`s of group entries. The number of key entries can be much
greater than the number of group entries, so this fix hurts performance.
But at least the algorithmic complexity of groupList() stays linear.
Future commits can optimize the loops and make them almost as fast or
even faster than before this fix.
The `!key.mKey.isNull() && !entryMapIt->bDeleted` checks added in this
commit are consistent with the check in
KConfigPrivate::hasNonDeletedEntries(). KConfig::hasGroupImpl() forwards
its argument to hasNonDeletedEntries() with the following comment:
// No need to look for the actual group entry anymore, or for subgroups:
// a group exists if it contains any non-deleted entry.
BUG: 384039
FIXED-IN: 5.90
|
|
|
|
|
|
use the CMake variable CMAKE_CROSSCOMPILING to detect when
cross-compiling instead of CMAKE_TOOLCHAIN_FILE.
CMAKE_TOOLCHAIN_FILE can be set when not cross-compiling
|
|
|
|
Both GCC and Clang don't require a const integral value to be captured
explicitly to be used in a lambda, but of course one compiler thinks
otherwise...
Thanks to Ömer Fadıl Usta for the heads up.
GIT_SILENT
|
|
This was built with:
-DQT_MAJOR_VERSION=6 \
-DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0 \
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055a00
Move the include(KDEInstallDirs) call before the first find_package(Qt*,
the former is what auto-detects the Qt version, and defaults to 5. This is
needed to be able to build against Qt5 by default.
All unit tests still pass.
|
|
NO_CHANGELOG
|
|
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"
|
|
|
|
The default group if "--group" is not specified is "KDE".
Trying to specify a null group name causes an assert in KConfigGroup::groupImpl().
Explicitly detect and give an error message for a null group name.
Mention in the help text that "<default>" can be used to specify the root group -
this string comes from KConfigGroupPrivate::name().
Add the missing parser.addHelpOption() for kreadconfig.
Update the help strings.
Apply clang-format changes.
I18N:
|
|
|
|
|
|
|
|
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"
|