Teach ContainmentInterface::processMimeData how to handle Task Manager drops
ClosedPublic

Authored by hein on Jun 1 2018, 9:03 PM.

Details

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.

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
hein created this revision.Jun 1 2018, 9:03 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 1 2018, 9:03 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
hein requested review of this revision.Jun 1 2018, 9:03 PM
zzag added a subscriber: zzag.Jun 1 2018, 10:51 PM
ngraham added a subscriber: ngraham.Jun 2 2018, 5:41 AM

Hmm, this doesn't build for me (Neon dev unstable, deps built from source):

/home/dev/repos/plasma-framework/src/scriptengines/qml/plasmoid/containmentinterface.cpp: In member function 'void ContainmentInterface::processMimeData(QMimeData*, int, int, KIO::DropJob*)':
/home/dev/repos/plasma-framework/src/scriptengines/qml/plasmoid/containmentinterface.cpp:455:52: error: 'mimeCopy' was not declared in this scope
         QList<QUrl> urls = {QUrl(QString::fromUtf8(mimeCopy->data(QStringLiteral("text/x-orgkd
                                                    ^
/home/dev/repos/plasma-framework/src/scriptengines/qml/plasmoid/containmentinterface.cpp:455:126: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'QList<QUrl>'
 QString::fromUtf8(mimeCopy->data(QStringLiteral("text/x-orgkdeplasmataskmanager_taskurl"))))};
hein updated this revision to Diff 35463.Jun 3 2018, 3:53 PM

Fix last minute build error.

davidedmundson accepted this revision.Jun 5 2018, 1:12 PM
This revision is now accepted and ready to land.Jun 5 2018, 1:12 PM
This revision was automatically updated to reflect the committed changes.