remove the legacy applets filter
this list was done because some applets broke with the new shared engine stuff. since it's many workspace releases ago, unconditionally use the single engine now. REVIEW:126918
This commit is contained in:
parent
3c03c950d6
commit
3ee612c2c7
@ -42,9 +42,6 @@ namespace PlasmaQuick
|
|||||||
|
|
||||||
QHash<QObject *, AppletQuickItem *> AppletQuickItemPrivate::s_rootObjects = QHash<QObject *, AppletQuickItem *>();
|
QHash<QObject *, AppletQuickItem *> AppletQuickItemPrivate::s_rootObjects = QHash<QObject *, AppletQuickItem *>();
|
||||||
|
|
||||||
//TODO: temporary
|
|
||||||
QSet<QString> AppletQuickItemPrivate::s_legacyApplets = QSet<QString>({QStringLiteral("org.kde.plasma.bluetooth"), QStringLiteral("org.kde.plasma.pager"), QStringLiteral("org.kde.desktopcontainment"), QStringLiteral("org.kde.plasma.folder"), QStringLiteral("org.kde.panel"), QStringLiteral("org.kde.plasma.analogclock"), QStringLiteral("org.kde.plasma.battery"), QStringLiteral("org.kde.plasma.notifications"), QStringLiteral("org.kde.plasma.systemtray")});
|
|
||||||
|
|
||||||
|
|
||||||
AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickItem *item)
|
AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickItem *item)
|
||||||
: q(item),
|
: q(item),
|
||||||
@ -59,21 +56,10 @@ AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickIte
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: remove the legacy support at some point
|
qmlObject = new KDeclarative::QmlObjectSharedEngine(q);
|
||||||
//use the shared engine only for applets that are nt in the legacy list
|
if (!qmlObject->engine()->urlInterceptor()) {
|
||||||
//if they are, use the shared engine if their mayor version is at least 3
|
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(qmlObject->engine(), Plasma::Package());
|
||||||
const QStringList version = a->pluginInfo().version().split(".");
|
qmlObject->engine()->setUrlInterceptor(interceptor);
|
||||||
if (!AppletQuickItemPrivate::s_legacyApplets.contains(a->pluginInfo().pluginName()) ||
|
|
||||||
(!version.isEmpty() && version.first().toInt() >= 3)) {
|
|
||||||
|
|
||||||
qmlObject = new KDeclarative::QmlObjectSharedEngine(q);
|
|
||||||
if (!qmlObject->engine()->urlInterceptor()) {
|
|
||||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(qmlObject->engine(), Plasma::Package());
|
|
||||||
qmlObject->engine()->setUrlInterceptor(interceptor);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
qWarning() << "Falling back to legacy separed QQmlEngine for applet" << a->pluginInfo().pluginName();
|
|
||||||
qmlObject = new KDeclarative::QmlObject(q);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,6 @@ public:
|
|||||||
bool expanded : 1;
|
bool expanded : 1;
|
||||||
|
|
||||||
static QHash<QObject *, AppletQuickItem *> s_rootObjects;
|
static QHash<QObject *, AppletQuickItem *> s_rootObjects;
|
||||||
static QSet<QString> s_legacyApplets;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user