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);
|
||||
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");
|
||||
#endif
|
||||
qRegisterMetaType<Plasma::Service *>("Service");
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
qmlRegisterInterface<Plasma::ServiceJob>(uri, 1);
|
||||
#else
|
||||
qmlRegisterInterface<Plasma::ServiceJob>("ServiceJob");
|
||||
#endif
|
||||
qRegisterMetaType<Plasma::ServiceJob *>("ServiceJob");
|
||||
qmlRegisterType<ServiceOperationStatus>(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<IconItem>(uri, 2, 0, "IconItem");
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
qmlRegisterInterface<Plasma::DataSource>(uri, 1);
|
||||
#else
|
||||
qmlRegisterInterface<Plasma::DataSource>("DataSource");
|
||||
#endif
|
||||
qRegisterMetaType<Plasma::DataSource *>("DataSource");
|
||||
|
||||
qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 0, "WindowThumbnail");
|
||||
|
Loading…
Reference in New Issue
Block a user