Age | Commit message (Collapse) | Author |
|
In general actions need to start with verbs so that the user knows what
will happen. Changing "Actual Size" to "Zoom to Actual Size" makes the
action compliant with this rule, and also makes it clear that this is a
zoom action, so anywhere the user searches for the word "zoom", they
will find it.
|
|
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.
|
|
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
|
|
|
|
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
|
|
So that #include <kconfig_version.h> still works after changing its
location in the previous commit.
NO_CHANGELOG
|
|
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
|
|
BUG: 441537
FIXED-IN: 5.86
|
|
Now that KF requires Qt 5.15.2; this basically reverts commit 2e8742e64fc0
with some trivial changes.
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
QStringView has some bits of API that were only added in 5.15.2, whereas KF
requires 5.15.0.
This reverts commit 1780fb2a237af80ddc1f9cfb70cb892b53b91990.
|
|
The symbol export/visibility attribute is not standardized so far and
needs to be set by language extension attribute declaration at least
with clang & MSVC, who both support that when it appears before the
standard attribute declaration.
NO_CHANGELOG
|
|
A window that is maximized does not really have a position on screen
other then the fact that it's maximized, and writing out position data
in this case anyway will only serve to mis-position the window once
da-maximized, should KWin ever stop remembering de-maximized window
positions internally.
CCBUG: 434116
|
|
NO_CHANGELOG
|
|
Some methods in ConfigLoaderHandler always returned true, change them to return
void instead. Also port them to take a QStringView instead of QStringRef, this
doesn't require a lot of changes because a QStringView can be constructed from
a QStringRef.
QXmlStreamAttribute methods like value() and name() return QStringRef in Qt5
and QStringView in Qt6, "fix" the issue by using auto keyword, which works
in both cases.
QStringView::toInt() isn't efficient in Qt5 so make the build conditional.
NO_CHANGELOG
|
|
|
|
All named authors from copyright statements confirmed this change
(confirmations at sysadmins' longterm archive). From the git history
check, relicensecheck tells:
- lgplv2+: mdawson pandom79@gmail.com
mdawson ( 6 LOC): 0005ba7
pandom79@gmail.com ( 4 LOC): eeb2bbe
Whereas pandom79 does not posses a KDE contributor account but also
confirmed via private mail (confirmation mail also in sysadmins'
archive).
Change 0005ba7 is a syntactical replacement of QT_TRANSLATE_NOOP with
QT_TRANSLATE_NOOP3 and thus can be assumed to not by copyrightable.
|
|
All named authors from copyright statements confirmed this change
(confirmations at sysadmins' longterm archive). From the git history
check, relicensecheck tells:
- lgplv2+: pandom79@gmail.com
pandom79@gmail.com ( 7 LOC): eeb2bbe
Whereas pandom79 does not posses a KDE contributor account but also
confirmed via private mail (confirmation mail also in sysadmins'
archive).
|
|
- Use QString::arg(Args...) instead of .arg().arg()
- Use QLatin1String for string comparisons, should be faster
- Use QLatin1String::arg() for better readability
- Add the comment dfaure suggested in the MR, to explain why it's '2%'
then '%1' in a QString().arg().arg()
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
GIT_SILENT
|
|
We have a fallback string that gets searched for in the KCM, but that
fallback itself should not have a fallback, or else we always use that
second fallback and the window gets positioned incorrectly the first
time it's opened. So let's replace the second fallback with -1.
BUG: 432661
FIXED-IN: 5.79
|
|
- Use a global var for a QString that's used many times
- Break up long-all-cap variable names, it makes it harder to read (and
I've fixed one typo in one of those ALLCAPS)
- Fix some clazy warnings, make global QString objects in unit tests
static (so that the compiler doesn't create symbols for them, it doesn't
matter in a unit test but KF code acts as a reference sometimes that
others copy from, tip from dfaure)
- Add TODO note about changing kconfig_compiler to generate C++ code that
uses multi-arg QString::arg(QString, QString, QString) instead of
QString::arg().arg()
- More const; more QString::at() instead of operator[] where appropriate
- Use a ternary where it makes the code more readable (and uses less lines :))
NO_CHANGELOG
|
|
This commit refactors the code a bit to define the window geometry
strings in one place and uses a common method to read and write them.
This makes future changes much less fragile and fixes a pre-existing bug
that had gone un-noticed which caused window positions to not be saved
on a per-resolution basis in addition to a per-display-arrangement
basis. Old strings are used if available to that people don't lose their
saved position data the first time they upgrade to KF 5.79.
|
|
The maximization string was being saved to the config file including
the connected screens, but the code to read it was not, and was also
looking for the old incorrect format. This could have resulted in old
config values being used forever, and the window always being opened
in a maximized state.
BUG: 430521
FIXED-IN: 5.79
|
|
Frameworks will be Frameworks 6 at some point and there is no good reason to have the major version in the variable name.
Given this is purely internal we can to this now, making it a bit more future-proof
GIT_SILENT
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
|
|
The latter breaks with Qt6
|
|
When a window is closed while maximized, we write a special string to
the config file so that it gets restored in its maximized state. But we
don't ever delete that thing when the window is un-maximized and closed
again, causing the window to always be maximized when launched.
BUG: 426813
FIXED-IN: 5.78
|
|
All other resolutions are stored in the form of width x height, but a
silly transposition error had the maximized strong being height x width.
That's fixed now.
|
|
The feature to make windows remember their sizes and positions across
screen layouts relied on calling QScreen::name() to identify screens.
Unfortunately this function returns garbage on Windows; see
https://bugreports.qt.io/browse/QTBUG-74317
So on Windows, let's identify displays by serial number as a workaround.
BUG: 429943
FIXED-IN: 5.78
|
|
No caller cares for success flag, so this just has confused human code
readers for now.
NO_CHANGELOG
|
|
genshortcutents.cpp disappeared from kdoctools during preparations
of kdelibs for KDE Frameworks
(commits.kde.org/kdelibs/64537ae5bf1a4e91ba99befc016e67e8e0c9dff0)
Cmp. also http://lists.kde.org/?t=137113303000003&r=1&w=2
|
|
It doesn't need to be public since it's just an internal convenience
function. So let's make it static.
BUG: 425953
|
|
|
|
GIT_SILENT
|
|
Needs to be added at end of list for ABI reasons.
GIT_SILENT
|
|
|
|
This is done for window positions, so it should also be done for
window sizes. The combination of both should substantially improve the
use case of maintaining a consistent window arrangement for multiple
display setups (e.g. laptop and laptop + external screen).
|
|
Right now it's duplicated twice, and once we add per-screen-arrangement
memory for window sizes as well, it will be duplicated four times unless
we put it into a function.
|
|
We have a huge amount of standard shortcuts. By adding the ability to divide
them into categories, they can be presented to the user in a way that enables
them to easier find the shortcut that they want. Internally some shortcuts were
already grouped but that seems to have stopped for the later additions. (The
related standard actions from KConfigWidgets also seem to have this not exposed
internal grouping.)
See plasma-desktop!26
|
|
These functions allow an application to save and restore the positions
of its windows. Positions are stored on a per-screen-arrangement basis.
For example with a single screen connected, the config file would have
entries like this in it:
eDP-1 XPosition=140
eDP-1 YPosition=340
When a second screen is connected, the following gets saved:
eDP-1 HDMI-1 XPosition=3878
eDP-1 HDMI-1 YPosition=29
This ensures that each separate screen arrangement can have its own
saved window position, which is handy for the use case where you have a
laptop that you plug into an external screen some of the time. It also
allows the position to get restored to the correct screen when there are
multiple screens.
This is a necessary first step to getting KDE apps to save their window
positions on X11 The next step would be calling the new functions from
KXMLGui and Kirigami apps, and then porting all apps that manually invoke
KWindowConfig::saveWindowSize() and KWindowConfig::restoreWindowSize()
to also invoke KWindowConfig::saveWindowPosition() and
KWindowConfig::restoreWindowPosition() in the same places.
The functions only work on X11 or other non-Wayland platforms. On
Wayland, the compositor has sole dominion over window positioning so a
compositor-specific solution much be adopted instead, such as
https://bugs.kde.org/show_bug.cgi?id=15329.
CCBUG: 415150
|
|
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.
|