From 8d3f4fccbd2c61e6a66b4270ea31f42a38e6e0b4 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 1 Jul 2020 15:04:44 +0200 Subject: [PATCH] Remove broken metatype registration for types missing the "*" in the name The old code calling qRegisterMetaType("T"); was broken, as it registered for the name "T", not the pointer type "T*". Things still work though as that registration is also covered due to qmlRegisterInterface("T"); internally also calling qRegisterMetaType("T*"); so that in the end "T*" was registered and mapped to the right type. --- src/declarativeimports/core/corebindingsplugin.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/declarativeimports/core/corebindingsplugin.cpp b/src/declarativeimports/core/corebindingsplugin.cpp index 4cd4f6b30..fc02f0300 100644 --- a/src/declarativeimports/core/corebindingsplugin.cpp +++ b/src/declarativeimports/core/corebindingsplugin.cpp @@ -97,9 +97,7 @@ void CoreBindingsPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 2, 0, "ToolTipArea"); qmlRegisterInterface("Service"); - qRegisterMetaType("Service"); qmlRegisterInterface("ServiceJob"); - qRegisterMetaType("ServiceJob"); qmlRegisterType(uri, 2, 0, "ServiceOperationStatus"); #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType(uri, 1); @@ -115,7 +113,6 @@ void CoreBindingsPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 2, 0, "IconItem"); qmlRegisterInterface("DataSource"); - qRegisterMetaType("DataSource"); qmlRegisterType(uri, 2, 0, "WindowThumbnail"); }