Bug 374418

Summary: listAppletInfoForMimeType and potentially others broken after JSON migration
Product: [Frameworks and Libraries] libplasma Reporter: Kai Uwe Broulik <kde>
Component: libplasmaAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: notmart
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kai Uwe Broulik 2017-01-01 12:58:26 UTC
Since the migration to JSON metadata listAppletInfoForMimeType and potentially other list things that rely on string lists are broken.

The current code does:
md.value(QStringLiteral("X-Plasma-DropMimeTypes")).contains(mimeType)

but should be doing:
KPluginMetaData::readStringList(md.rawData(), QStringLiteral("X-Plasma-DropMimeTypes")).contains(mimeType);

If you drop a folder on the desktop you just get an icon widget rather than the offer to create a Folder View.
Comment 1 Marco Martin 2017-01-02 16:12:00 UTC
this is for entries that are marked to be a list right? (so for strings one would still access as md.value(key)?)
Comment 2 Kai Uwe Broulik 2017-01-02 16:13:57 UTC
Yes
Comment 3 Marco Martin 2017-01-02 16:33:06 UTC
patch on the way
Comment 4 Kai Uwe Broulik 2017-01-02 16:36:06 UTC
https://phabricator.kde.org/D3902

Dunno if that fixes all though
Comment 5 Marco Martin 2017-01-02 16:43:12 UTC
can you push it? mine was fixing some other supposed-to-be-list cases, so I will rebase on top
Comment 6 Kai Uwe Broulik 2017-01-03 08:32:47 UTC
Git commit a0f3d2429d0ae42d9026f5973b6a3479706d4d41 by Kai Uwe Broulik.
Committed on 03/01/2017 at 08:31.
Pushed by broulik into branch 'master'.

Fix X-Plasma-Drop* types

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.

Differential Revision: https://phabricator.kde.org/D3902

M  +4    -4    src/plasma/pluginloader.cpp
M  +1    -1    src/scriptengines/qml/plasmoid/wallpaperinterface.cpp

https://commits.kde.org/plasma-framework/a0f3d2429d0ae42d9026f5973b6a3479706d4d41