summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-03-31 08:07:45 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-03-31 08:07:45 (GMT)
commit5dff3bc6869a14cd422d2682687b44a53a790ea7 (patch)
tree0f6897eec6ef5b20c599b3646b8c0c959a5f915b
parentc24ae6602b0d01cb629e17c4789cecf8c15bd048 (diff)
[Windowed Widgets Runner] Fix mimeDataForMatch
This fixes dragging a windowed widgets runner result on the desktop or panel to create an applet. Differential Revision: https://phabricator.kde.org/D5257
-rw-r--r--runners/windowedwidgets/windowedwidgetsrunner.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/runners/windowedwidgets/windowedwidgetsrunner.cpp b/runners/windowedwidgets/windowedwidgetsrunner.cpp
index fc97358..ba19406 100644
--- a/runners/windowedwidgets/windowedwidgetsrunner.cpp
+++ b/runners/windowedwidgets/windowedwidgetsrunner.cpp
@@ -110,22 +110,14 @@ void WindowedWidgetsRunner::setupMatch(const KPluginMetaData &md, Plasma::QueryM
match.setText(md.name());
match.setSubtext(md.description());
match.setIconName(md.iconName());
- match.setData(md.metaDataFileName());
+ match.setData(md.pluginId());
}
QMimeData * WindowedWidgetsRunner::mimeDataForMatch(const Plasma::QueryMatch &match)
{
- KService::Ptr service = KService::serviceByStorageId(match.data().toString());
- if (service) {
-
- QMimeData *data = new QMimeData();
- data->setData(QStringLiteral("text/x-plasmoidservicename"),
- service->property(QStringLiteral("X-KDE-PluginInfo-Name"), QVariant::String).toString().toUtf8());
- return data;
-
- }
-
- return 0;
+ QMimeData *data = new QMimeData();
+ data->setData(QStringLiteral("text/x-plasmoidservicename"), match.data().toString().toUtf8());
+ return data;
}