From 487d22bcde7e9d06162d44e7c5dca31d3afac694 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 22 Jul 2019 09:56:51 +0200 Subject: Remove module registration related Qt version #ifdefs Ahead of compiling declarative with a newer qtbase that bumps the Qt version to 6, we can already now remove the Qt 5 code paths related to type registrations as commit 8534634bd204ccdca3edcc244a35be6e81739fce implements those dependencies differently. This also required lowering the minimum minor version for the Instantiator to 1, as it was in the Qt 5 branch. Change-Id: Idd38c967eeb8423509237116803d292bba422f8b Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale Reviewed-by: Alexandru Croitor --- src/qml/qml/qqmlengine.cpp | 24 ------------------------ src/qml/qml/qqmlengine_p.h | 3 --- 2 files changed, 27 deletions(-) (limited to 'src/qml/qml') diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 00d2a6b502..43c312812c 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -220,30 +220,6 @@ void QQmlEnginePrivate::defineModule() #endif } -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -void QQmlEnginePrivate::registerQuickTypes() -{ - // Don't add anything here. These are only for backwards compatibility. - - const char uri[] = "QtQuick"; - - qmlRegisterType(uri, 2, 0, "Component"); - qmlRegisterType(uri, 2, 0, "QtObject"); - qmlRegisterType(uri, 2, 0, "Binding"); - qmlRegisterType(uri, 2, 8, "Binding"); - qmlRegisterCustomType(uri, 2, 0, "Connections", new QQmlConnectionsParser); - qmlRegisterCustomType(uri, 2, 7, "Connections", new QQmlConnectionsParser); -#if QT_CONFIG(qml_animation) - qmlRegisterType(uri, 2, 0,"Timer"); -#endif - qmlRegisterType(uri, 2, 8, "LoggingCategory"); - qmlRegisterType(uri, 2, 12, "LoggingCategory"); -#if QT_CONFIG(qml_locale) - qmlRegisterUncreatableType(uri, 2, 0, "Locale", QQmlEngine::tr("Locale cannot be instantiated. Use Qt.locale()")); -#endif -} -#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - bool QQmlEnginePrivate::designerMode() { return s_designerMode; diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 385ae02ce5..2c4bb36c8f 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -252,9 +252,6 @@ public: static QList qmlErrorFromDiagnostics(const QString &fileName, const QList &diagnosticMessages); static void defineModule(); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - static void registerQuickTypes(); -#endif static bool designerMode(); static void activateDesignerMode(); -- cgit v1.2.3