Summary: Ported away some classes, removes many unneeded casts that happen when starting.
Test Plan: Tests still pass, plasma starts properly
Reviewers: #frameworks, #plasma, mart
Reviewed By: #plasma, mart
Subscribers: davidedmundson, mart, plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6041
Summary:
set transient parent for popup menus created by appletinterface/
containmentinterface, it makes them appear at the proper coordinates
Test Plan: containment menus appear where the mouse was pressed
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5918
Summary:
There was an unidentified bug where when opening a context menu in
response to a mousePress event led to the next click events not being
registered. The mouse got grabbed by the item in the mousePressEvent,
but when we open a menu it didn't get released. The next click goes to
the currently grabbed item.
A workaround was added back in 2015 (and copied into various other parts
of Plasma) to ungrab the mouse after launching the context menu inside
our rightClickEvent. This doesn't work because qquickwindow code is
shuffled. It now sends the event and then grabs the mouse.
qquickwindow.cpp:653 on Qt5.8.0
Which means we're now trying to do the ungrab, before QWindow has set
our item as the grabber. That obviously doesn't work.
This real bug needs fixing in Qt, (I now know the root cause!)
but we have a workaround here already, we may as well make it work.
FWIW, the root cause of all of these bugs is:
The way it should work is:
QQuickItem is pressed
QtQuick internally says "this item has the mouse"
you release the mouse, that gets reset
you change window focus, that gets reset
In our case, we don't get either of the last two because:
We spawn a QMenu on mousePress; this takes focus and more importantly
does a mouse grab (a different type. At an X level, not in QtQuick) so
our QQuickWindow never gets a mouseReleaseEvent
Test Plan:
Had 1 reproducible case
Added this. No longer could reproduce
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5515
Summary:
This can happen if an applet has invalid metadata, it doesn't have a
script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
Having invalid metadata could come from the applet, or from the fallback applet
created in Containment::Private::createApplet.
We guard against it in appletAdded but not in appletRemoved, which is
inconsistent. We also apparently must have guards elsewhere otherwise
we'd see the crash more.
BUG: 377050
Test Plan: Had corrupt applet, used to crash, now doesn't
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5423
Summary:
used for opening the handles when the toolbox is open
or potentially other places
Test Plan: handles open
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5153
This way containment context menus and PlasmaComponents Menu get accelerators assigned to by default.
CHANGELOG: Most (context) menus have accelerators (Alt+letter shortcuts) now
BUG: 361915
Differential Revision: https://phabricator.kde.org/D5057
When pressing the "Menu" key, pretend a right-click happened and show the containment context menu.
Differential Revision: https://phabricator.kde.org/D4924
Summary:
add an optional menu parameter to processMimeData to mnually pass
an existing qmenu. folderview can use that to pass its own
filecopyjob drop qmenu to be populated with extra entries
Test Plan:
dropping a file on folderview will show a menu with
entries from both.
works both with folderview and desktop containments
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4576
Change-Id: Iae911d4e692f2e591358959758ca6ddd131379c0
Avoids creating a temporary list for no reason.
Also use value() which is always const compared to operator[]
Differential Revision: https://phabricator.kde.org/D4348
They are supposed to be lists. This fixes dropping folders on desktops to create a FolderView.
Dropping trash:/ also offers to create a trash applet again.
BUG: 374418
Differential Revision: https://phabricator.kde.org/D3902
Summary:
The fallback for toolTipMainText is showing the applet title.
When the applet title changes, it may result in a change of
toolTipMainText.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3760
When closing the launcher using Meta key, it pulls focus away and when
clicking the button to expand the applet, it won't get focus again.
BUG: 372476
REVIEW: 129404
doing setSource then immediately after rootContext()->setContextProperty
makes the property binding evaluated right at startup to be broken,
also fail any access to said contextproperty until the point of
Conponent.onCompleted
BUG:371763
Change-Id: Ie10afcf3c5b1693db49b5c240c9d2a4f3c47db21
The launcher applets couldn't be closed with Meta alone and on Wayland
in general by any global shortcut, since we used for that the focusOutEvent
triggered only on X and only on global shortcuts (on default Alt+F1).
This patch introduces the new bool activationTogglesExpanded, which allowes
QML applets to decide if they wish to use the activated signal also to end
their expanded state.
The default value is false, in order to not break any legacy applets.
REVIEW: 129204
BUG: 367685
This reverts commit acd7ab7815.
This broke the build for me and on CI:
/home/jenkins/sources/plasma-framework/kf5-qt5/src/declarativeimports/core/datamodel.cpp:214:9:
error: 'LOG_PLASMACORE' was not declared in this scope
CCMAIL:notmart@gmail.com
port every terminal output to appropriate QCdebug/QCwarning,
each different binary has its own logging category now, so
it's possible to enable/disable them selectively.
this should also make plasmashell a bit more quiet on
terminal by default
Change-Id: Ic0b26364f988935e990c6988f8f9375b7c9bf838
REVIEW:129210
Commit bb70febdbe changed the slot for
adding createApplet, turning the final argument from QPoint to QRect.
If the rectangle size is nothing, it acts like the original code.
Despite this being private API (ish) there is a hacks in plasma-
workspace that call methods on the view via QMetaObject invoke. This
obviously fails. As we need compatibility for Plasma/5.7 and earlier a
compatibility slot needs to stay.
REVIEW: 128640
applets will be deleted by the parent, as they are
acontainment's children. by not deleting them by hand
also every signal will be disconnected, not causing appletRemoved
to be emitted, so not causing removal of config
pieces at shutdown, this removes the need of the
explicit disconnect in aboutToQuit from contaiment interface
Change-Id: Iddf6ded60ae849ca03c363be6e736da496310b82
reviewed-by: David Edmundson
This is done by ContainmentInterface::mousePressEvent, but not in this
code path, which is hit for applet panel popups.
Folder View relies on this to update actions ahead of the menu being
opened.
BUG:366294
Even though QQuickItem only has a width and height accessor there is a
usable public setSize method.
This gets rid of a lot of potential re-evaluation as internal geometry
is updated before widthChanged is emitted.
REVIEW: 128316
Do to so means the System Tray applet ends up being placed inside the
system tray container, which ends up in a parent loop, causing a stack
overflow every time parent() is called recursively
This happens whenever one drags a sys tray on the desktop or simply adds
a new system tray whilst running.
BUG: 361777
We also need to do a hack for Plasma/5.7 in plasma-desktop somehow in
all cases where this is used.
ensure the scriptengine gets created also for c++ applets
that have a valid scriptengine, move the script init
out of applet::init that can be reimplemented.
remove the second appletscript constructor that is
not necessary anymore
REVIEWED-BY: Kai Uwe Broulik