Compare API dox of Q_DECLARE_METATYPE:
"
Some types are registered automatically and do not need this macro:
* Pointers to classes derived from QObject
* QPointer<T>, QSharedPointer<T>, QWeakPointer<T>,
where T is a class that derives from QObject
"
This is a ABI-compatible change, as this just replaces explicitly
defined template code (by the Q_DECLARE_METATYPE macro use) with the
generic predefined one picking up pointers to QObject subclasses.
So instead of the custom explicitly template overload
template <>
struct QMetaTypeId< TYPE >
{ /**/ static int qt_metatype_id() {/**/} };
the predefined template overload one is picked up via
template <typename T>
struct QMetaTypeId : public QMetaTypeIdQObject<T>
{ /**/ };
template <typename T, int =
QtPrivate::IsPointerToTypeDerivedFromQObject<T>::Value ?
QMetaType::PointerToQObject :
/**/ 0>
struct QMetaTypeIdQObject
{ /**/ };
template <typename T>
struct QMetaTypeIdQObject<T*, QMetaType::PointerToQObject>
{ /**/ static int qt_metatype_id() {/**/} };
And thus the constexpr code using QMetaTypeId<T>::qt_metatype_id(),
for which all this is done, evaluates as before.
GIT_SILENT
Summary:
Currently, when you have the desktop in the Desktop layout, if you drop 10 jpg files into the desktop, it creates 10 menus at the same position.
When you have the desktop in the Folder layout, if you drop 10 jpg files into the desktop, it calls `KIO::setApplicationActions()` 10 times.
What does this improve?
- Do not create KIO::MimetypeJob for each file
- Do not call `DropJob::setApplicationActions()` too many times/ create too many menus for each file.
My idea is that, when you drop files into the desktop:
- If they have the same `mimetype` -> we add actions support this `mimetype`.
- If not -> we only show the action from `KIO::DropJob` and only actions support different `mimetypes` at the same time like `Add icon`...
**Require:** D26484
CCBUG: 415917
Reviewers: #plasma, mart, broulik, #vdg, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, anthonyfieroni, #plasma, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26691
Summary:
- much improves discoverability of the ability to move added widgets without clicking and holding (I have seen people having trouble figuring it out)
- makes it more consistent with panel widget context menus
- allows easier access to the edit mode when the desktop is full of widgets
Test Plan: Open the context menu of a widget on the desktop.
Reviewers: #plasma, #vdg, mart, ngraham, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, ngraham, broulik, mart, #vdg, kde-frameworks-devel, #plasma
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26043
Summary:
KDeclarative::setupBindings() is deprecated, replaced calls with its
implementation (setupContext + static setupEngine call), but see comment
about whether we can be sure this is done only once per engine, as
requested by the setupEngine API. It's 100% equivalent to the old code
though, can't be worse.
KPackage::contentsHash is deprecated, replaced call with implementation.
Depends on D25433 for the KActionCollection::changed signal.
Test Plan: Builds
Reviewers: mart, davidedmundson, broulik, apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25434
Summary:
Applet is the more proper way to do it (and will make easier porting
to KF6) this also make it possible for the scripting interface to
access userBackgroundHints
Test Plan: everything behaves the same in plasmashell, the background button in the handle works
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25742
Summary:
add the ability for the user to override the background hints anddecide
about applets having background or a shadow
A new handle button will be added to manually enable/disable background for
plasmoids that support it
if they don't, the ImmutableBackground flag is set in the hints.
PlasmaCore.ColorScope has been expanded to work more like Kirigami.Theme (which will be replaced by) even if it's oòld behavior still works. This makes the complementary colorscope in applets with shadow actually work (and at the same time gives a clearer porting path for kf6)
Test Plan: Tested the functionality and correct save/restore
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, ndavis, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25590
Summary:
the wallpaperinterface instance already reacts to wallpaper package
change and loads the current one.
containemtninterface deleted it every time the wallpaper changed
and recreated, effectively loading the wallpaper two times every time
the plugin was changed
Test Plan: switching plugins still works, but it's actually visible faster on slow hardware
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25217
Summary:
- Move "Panel Options" context menu items out of submenu
- Rename "Configure Panel..." option
See M144, T10047, T10190. This makes the panel customization options much more discoverable.
Test Plan: Open the panel context menu.
Reviewers: #plasma, #vdg, mart
Reviewed By: #plasma, #vdg, mart
Subscribers: davidedmundson, ngraham, #vdg, kde-frameworks-devel, #plasma
Tags: #frameworks
Maniphest Tasks: T10190, T11094, T10402
Differential Revision: https://phabricator.kde.org/D23951
Summary:
The plans are to switch on/off the whole plasma shell into edit mode.
For this it needs to be a global corona property, rather then just
containmentInterface.
Plasmashell would expose a dbus call to set it from systemsettings
Test Plan: plasmoid.editMode=true still works
Reviewers: #plasma, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: ngraham, GB_2, broulik, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24239
Summary:
This is needed so that we don't remove the splash till the wallpaper is
loaded, but also allows doing this in a generic way.
Version 2 of the patch using a normal property.
We need to have the virtual so that the containment waits for the
wallpaper.
Test Plan:
Used with wallpaper patch
Added debug to ensure it happened after the stackview in the wallpaper
is pushed
Reviewers: #plasma
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22852
Don't pass objects to lambdas that get unused.
Don't connect to lambdas without specifying the target object, if an object
reference is passed to the lambda.
if the connect is done in containmentinterface only contaiments
will be able to see the rect changing, while applet would access it but
not be able to detect changes
Summary:
This signal is emitted just before showing the context menu to allow
lazy-loading expensive actions like hasAlternatives.
This emitted by our code whenever we show a context menu from an event
filter, however we want to use this code from a tooltip in D17410
Test Plan:
Hovered over some applets, they correctly enabled/disabled the
alternatives button
Reviewers: #plasma
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D20417
On plasmashell shutdown when the panels are destroyed, the available screen geometry changes.
When an applet then accesses screenGeometry in response to that change, it crashes because the corona is already gone.
availableScreenRegion() and availableScreenRect() already checked for this but screenGeometry() did not
Differential Revision: https://phabricator.kde.org/D20244
It is a remnant of the Plasma Active days and didn't even compile.
This patch only removes those ifdefs, it doesn't fix any issues I found during (e.g. double lookups or the fact
that KRun::autoDelete is the default now)
Differential Revision: https://phabricator.kde.org/D16295
Summary:
To explicitly confine Task Manager drops to Plasma and avoid accidental
drops on other apps, D13274 makes it store task launcher URLs in a special
internal MIME type instead of the generic text/url one. This change to
processMimeData() adds the necessary conversion back.
Reviewers: davidedmundson, Zren, mart
Subscribers: kde-frameworks-devel, plasma-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13275