Bug 374418 - listAppletInfoForMimeType and potentially others broken after JSON migration
Summary: listAppletInfoForMimeType and potentially others broken after JSON migration
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-01 12:58 UTC by Kai Uwe Broulik
Modified: 2017-01-03 08:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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