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:
Marco Martin 2016-02-09 11:05:39 +01:00
parent 3c03c950d6
commit 3ee612c2c7
2 changed files with 4 additions and 19 deletions

View File

@ -42,9 +42,6 @@ namespace PlasmaQuick
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)
: q(item),
@ -59,21 +56,10 @@ AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickIte
return;
}
//TODO: remove the legacy support at some point
//use the shared engine only for applets that are nt in the legacy list
//if they are, use the shared engine if their mayor version is at least 3
const QStringList version = a->pluginInfo().version().split(".");
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);
qmlObject = new KDeclarative::QmlObjectSharedEngine(q);
if (!qmlObject->engine()->urlInterceptor()) {
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(qmlObject->engine(), Plasma::Package());
qmlObject->engine()->setUrlInterceptor(interceptor);
}
}

View File

@ -103,7 +103,6 @@ public:
bool expanded : 1;
static QHash<QObject *, AppletQuickItem *> s_rootObjects;
static QSet<QString> s_legacyApplets;
};
}