summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-26 12:49:37 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-26 13:00:54 +0100
commit5c817bcfcdfb538d9e71ee8d7a71ad793842e43c (patch)
treebea5d1d18a1972d959828556cf8bbe1e2f464219
parentd1697d81866abaf217b6647b0f42a13fa974636b (diff)
downloadqtquickcontrols-5c817bcfcdfb538d9e71ee8d7a71ad793842e43c.tar.gz
Fix deprecation warning about qmlRegisterType()
Use qmlRegisterAnonymousType() instead, fixing: plugin.cpp:199:53: warning: 'int qmlRegisterType() [with T = QQuickControlsPrivate1Attached]' is deprecated: Use qmlRegisterAnonymousType instead [-Wdeprecated-declarations] Change-Id: I23e7559798c461fa9c3a3608b5a816d334fdd021 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/controls/plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 6d34f285..446357aa 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -196,7 +196,7 @@ void QtQuickControls1Plugin::registerTypes(const char *uri)
qmlRegisterSingletonType<QQuickControlSettings1>(private_uri, 1, 0, "Settings", QQuickControlsPrivate1::registerSettingsModule);
qmlRegisterUncreatableType<QQuickControlsPrivate1>(private_uri, 1, 0, "Controls", QLatin1String("Controls is an abstract type."));
- qmlRegisterType<QQuickControlsPrivate1Attached>();
+ qmlRegisterAnonymousType<QQuickControlsPrivate1Attached>(private_uri, 1);
qmlRegisterType<QQuickTreeModelAdaptor1>(private_uri, 1, 0, "TreeModelAdaptor");
qmlRegisterType<QQuickScenePosListener1>(private_uri, 1, 0, "ScenePosListener");