From 3ee612c2c7957c89042639d9f60914fb7639d5ff Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 9 Feb 2016 11:05:39 +0100 Subject: [PATCH] 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 --- src/plasmaquick/appletquickitem.cpp | 22 ++++----------------- src/plasmaquick/private/appletquickitem_p.h | 1 - 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/plasmaquick/appletquickitem.cpp b/src/plasmaquick/appletquickitem.cpp index 48e78cdac..28f1eb593 100644 --- a/src/plasmaquick/appletquickitem.cpp +++ b/src/plasmaquick/appletquickitem.cpp @@ -42,9 +42,6 @@ namespace PlasmaQuick QHash AppletQuickItemPrivate::s_rootObjects = QHash(); -//TODO: temporary -QSet AppletQuickItemPrivate::s_legacyApplets = QSet({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); } } diff --git a/src/plasmaquick/private/appletquickitem_p.h b/src/plasmaquick/private/appletquickitem_p.h index 94cfada95..1f99d2fc2 100644 --- a/src/plasmaquick/private/appletquickitem_p.h +++ b/src/plasmaquick/private/appletquickitem_p.h @@ -103,7 +103,6 @@ public: bool expanded : 1; static QHash s_rootObjects; - static QSet s_legacyApplets; }; }