From f96f17c28540d4f205ab3bd71ee6201e2495a8c1 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 1 Jul 2020 12:30:27 +0200 Subject: [PATCH] Revert "Port away from deprecated qmlRegisterInterface<>() overload" This changed the name of the types for which the classes where registered from unnamespaced "Service", "ServiceJob", "DataSource" to the fully namespaced "Plasma::Service", "Plasma::ServiceJob", "Plasma::DataSource", so making the old names no longer known to the system and thus breaking support for any invokable methods which use the unnamespaced type name. And not only that, qmlRegisterInterface("Name") also registered the classes' pointer counterparts T* by the name "Name*", so here "Service*", "ServiceJob*", "DataSource*". While the new again instead does this with the fully namespaced names "Plasma::Service*", "Plasma::ServiceJob*", "Plasma::DataSource*", so also breaking support here. This reverts commit 7c4f5c5f1ef120df70f1bc7f206d79aecdbcee92. --- src/declarativeimports/core/corebindingsplugin.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/declarativeimports/core/corebindingsplugin.cpp b/src/declarativeimports/core/corebindingsplugin.cpp index 9a7886db7..4cd4f6b30 100644 --- a/src/declarativeimports/core/corebindingsplugin.cpp +++ b/src/declarativeimports/core/corebindingsplugin.cpp @@ -96,17 +96,9 @@ void CoreBindingsPlugin::registerTypes(const char *uri) qmlRegisterRevision(uri, 2, 0); qmlRegisterType(uri, 2, 0, "ToolTipArea"); -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - qmlRegisterInterface(uri, 1); -#else qmlRegisterInterface("Service"); -#endif qRegisterMetaType("Service"); -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - qmlRegisterInterface(uri, 1); -#else qmlRegisterInterface("ServiceJob"); -#endif qRegisterMetaType("ServiceJob"); qmlRegisterType(uri, 2, 0, "ServiceOperationStatus"); #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) @@ -122,11 +114,7 @@ void CoreBindingsPlugin::registerTypes(const char *uri) #endif qmlRegisterType(uri, 2, 0, "IconItem"); -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - qmlRegisterInterface(uri, 1); -#else qmlRegisterInterface("DataSource"); -#endif qRegisterMetaType("DataSource"); qmlRegisterType(uri, 2, 0, "WindowThumbnail");