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<T>("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 7c4f5c5f1e
.
This commit is contained in:
parent
71fd52c1ce
commit
f96f17c285
@ -96,17 +96,9 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
|
|||||||
qmlRegisterRevision<QQuickItem, 1>(uri, 2, 0);
|
qmlRegisterRevision<QQuickItem, 1>(uri, 2, 0);
|
||||||
qmlRegisterType<ToolTip>(uri, 2, 0, "ToolTipArea");
|
qmlRegisterType<ToolTip>(uri, 2, 0, "ToolTipArea");
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
qmlRegisterInterface<Plasma::Service>(uri, 1);
|
|
||||||
#else
|
|
||||||
qmlRegisterInterface<Plasma::Service>("Service");
|
qmlRegisterInterface<Plasma::Service>("Service");
|
||||||
#endif
|
|
||||||
qRegisterMetaType<Plasma::Service *>("Service");
|
qRegisterMetaType<Plasma::Service *>("Service");
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
qmlRegisterInterface<Plasma::ServiceJob>(uri, 1);
|
|
||||||
#else
|
|
||||||
qmlRegisterInterface<Plasma::ServiceJob>("ServiceJob");
|
qmlRegisterInterface<Plasma::ServiceJob>("ServiceJob");
|
||||||
#endif
|
|
||||||
qRegisterMetaType<Plasma::ServiceJob *>("ServiceJob");
|
qRegisterMetaType<Plasma::ServiceJob *>("ServiceJob");
|
||||||
qmlRegisterType<ServiceOperationStatus>(uri, 2, 0, "ServiceOperationStatus");
|
qmlRegisterType<ServiceOperationStatus>(uri, 2, 0, "ServiceOperationStatus");
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
@ -122,11 +114,7 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
|
|||||||
#endif
|
#endif
|
||||||
qmlRegisterType<IconItem>(uri, 2, 0, "IconItem");
|
qmlRegisterType<IconItem>(uri, 2, 0, "IconItem");
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
qmlRegisterInterface<Plasma::DataSource>(uri, 1);
|
|
||||||
#else
|
|
||||||
qmlRegisterInterface<Plasma::DataSource>("DataSource");
|
qmlRegisterInterface<Plasma::DataSource>("DataSource");
|
||||||
#endif
|
|
||||||
qRegisterMetaType<Plasma::DataSource *>("DataSource");
|
qRegisterMetaType<Plasma::DataSource *>("DataSource");
|
||||||
|
|
||||||
qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 0, "WindowThumbnail");
|
qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 0, "WindowThumbnail");
|
||||||
|
Loading…
Reference in New Issue
Block a user