`void *` casts into anything but `QVariant::value()` (most of the time)
does a metatype check which needs to match.
Also, we need to unwrap the `QPointer`.
BUG: 453301
Kolourpaint has hidden "Tools" menu, which would show up in
global menu otherwise.
Moreover, don't `void*` cast so QML can access the `QAction`
BUG: 443505
There's no need to reconstruct the entire menu, when it exists already.
Also shows correct behavior on Wayland because the imported menues have
correct parents compared to the new one.
BUG:438467
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
Summary:
This patch ports the appmenu applet to use
libtaskmanager.
Test Plan: Ensure that there aren't any regressions.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28146
Summary:
--when the user has enabled PLASMA_USE_QT_SCALING
under X11 environment the screen and window geometries
can not be trusted for comparison before window
geometries have been adjusted properly
BUG: 404500
FIXED-IN: 5.15.2
Test Plan: check that global menu still works properly
Reviewers: #plasma, davidedmundson, broulik
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19126
Summary:
--when the user has enabled PLASMA_USE_QT_SCALING
under X11 environment the screen and window geometries
can not be trusted for comparison. In such case
the global menu should be always visible
BUG: 404500
Test Plan: check that global menu still works properly
Reviewers: #plasma, davidedmundson, broulik
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19126
Summary:
--as @mart requested we can rename "menuHidden" property
to "visible" in order to follow Qt naming
Test Plan:
--check that global menu applet is functioning the same
way as when using removed menuHidden property
Reviewers: #plasma, mart, davidedmundson
Reviewed By: #plasma, mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17107
Summary:
--a new screenGeometry property is added in the
AppMenuModel in order to be used for filtering
windows based on their geometry.
BUG: 384895, 395853
Test Plan:
--validate that when moving a window between different screens the global menu applet is updated accordingly
--checkout that nothing has broke because of this new behavior
Reviewers: #plasma, broulik, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: mart, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16768
Always redirect to the ones in m_menu in case they get deleted or otherwise altered.
Also emit dataChanged when an action changes and reset the model when it gets deleted.
This fixes the menu getting confused in LibreOffice 6 with gmenu-dbusmenu-proxy.
CCBUG: 391868
Differential Revision: https://phabricator.kde.org/D11350
In case the application sets the menu after the window is shown like is the case with Firefox.
Differential Revision: https://phabricator.kde.org/D9635
Summary:
QDBusConnection::serviceOwnerChanged is deprecated, with the intended
replacement being QDBusServiceWatcher. QDBusServiceWatcher only creates
a match rule for the relevant services, resulting in less noise and
wakeups.
(practically this has no impact as the the system tray also connects to
watch every service change, and that runs in the same process)
Test Plan:
Ran appmenu
Had dolphin open showing the menu
Closed dolphin
menu immediately closed
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7611
Summary:
This can happen without a focus change if focus is changed to a window
that doesn't claim the menu, for example the desktop.
It could also happen if an application does something weird, like
release
its service name.
BUG: 374995
Test Plan:
Ran "sleep 10; killall kate"
Then selected kate then the desktop
Kate remained showing for 10 seconds then closed
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4177
Summary:
We only want to set the menu to unavailable when we've searched all the
transient windows and found there is no menu, not whilst we are looping.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4176
Summary:
We still call aboutToShow on them inside libdbusmenu-qt and update the
menu whilst it's showing, but having it pre-populated makes it look a
bit faster.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4163