[Windowed Widgets Runner] Fix check for whether applet is standalone-capable
ClosedPublic

Authored by broulik on Jan 4 2017, 3:12 PM.

Details

Summary

Fixes yet another KPluginMetadata regression.

Test Plan

I'm getting tired of this, really.

Does this need to go to 5.8 or master?

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 9709.Jan 4 2017, 3:12 PM
broulik retitled this revision from to [Windowed Widgets Runner] Fix check for whether applet is standalone-capable.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 4 2017, 3:12 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Master

and we need to be fixing KPluginMetaData::value() to return something for the bool case for Plamsa 5.8 or older
like I did for stringlists just now in https://git.reviewboard.kde.org/r/129770/

Return "true" and "false" strings maybe? I *think* QVariant is even smart enough to case those to the respective bool values

Seems it can:

inline bool qt_convertToBool(const QVariant::Private *const d)
{

TInput str = v_cast<TInput>(d)->toLower();
return !(str.isEmpty() || str == LiteralWrapper("0") || str == LiteralWrapper("false"));

}

I'll make the kcoreaddons change.

davidedmundson accepted this revision.Jan 4 2017, 3:31 PM
davidedmundson added a reviewer: davidedmundson.

https://git.reviewboard.kde.org/r/129771/

and lets ship this in master, as it's more correct than the current code.

This revision is now accepted and ready to land.Jan 4 2017, 3:31 PM
This revision was automatically updated to reflect the committed changes.