[PluginLoader] Use operator<< for finalArgs instead of initializer list
When appending a list to an existing list using append or operator<< each item in the list is added individually whereas with initializer list it just adds the entire list as one entry. This caused the applet args to never be empty usually and resulted in externalData being emitted in init() with a QVariantList as argument. While this didn't do much for most applets it did break FolderView (and potentially others) which updates its URL in response to this signal and stored the "data" it got in plasmoid.configuration.url. FolderView's model did not accept this broken data [1] so the folder would still work initially. On next startup, however, it loaded said value from config and just went blank. [1] "file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderViewLayer.qml:202:14: Unable to assign QJSValue to QString" REVIEW: 129158
This commit is contained in:
parent
b0a5bc09ef
commit
e7e0344d35
@ -234,7 +234,8 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
||||
if (!applet) {
|
||||
//qCDebug(LOG_PLASMA) << name << "not a C++ applet: Falling back to an empty one";
|
||||
|
||||
QVariantList allArgs = { p.metadata().fileName(), appletId, args };
|
||||
QVariantList allArgs;
|
||||
allArgs << p.metadata().fileName() << appletId << args;
|
||||
|
||||
if (p.metadata().serviceTypes().contains(QStringLiteral("Plasma/Containment"))) {
|
||||
return new Containment(0, allArgs);
|
||||
|
Loading…
Reference in New Issue
Block a user