From 5c817bcfcdfb538d9e71ee8d7a71ad793842e43c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 Nov 2019 12:49:37 +0100 Subject: 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 --- src/controls/plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(private_uri, 1, 0, "Settings", QQuickControlsPrivate1::registerSettingsModule); qmlRegisterUncreatableType(private_uri, 1, 0, "Controls", QLatin1String("Controls is an abstract type.")); - qmlRegisterType(); + qmlRegisterAnonymousType(private_uri, 1); qmlRegisterType(private_uri, 1, 0, "TreeModelAdaptor"); qmlRegisterType(private_uri, 1, 0, "ScenePosListener"); -- cgit v1.2.1