diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-08 11:05:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-08 13:21:37 +0000 |
commit | 12829b50fc85587c9c08c834efd63ebe8ccbbcd2 (patch) | |
tree | b11c01184d57fed8d34510464ea30ec307c4fa07 /src/qml | |
parent | fd6321c03e2d63997078bfa41332dbddefbb86b0 (diff) |
Register QObject along with QQmlComponent as basic type of the language
Apparently we need it somewhere. Before the restructuring of imports all
QtQml types were automatically registered on QQmlEnginePrivate::init().
We don't do this anymore, so we need to register the basic building
blocks of the language separately now.
Fixes: QTBUG-75645
Change-Id: I77fe23f709304586cd16986650b0056ea87bcd45
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 8bdbe0fc47..ea639d870b 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -944,7 +944,11 @@ void QQmlEnginePrivate::init() Q_Q(QQmlEngine); if (baseModulesUninitialized) { - qmlRegisterType<QQmlComponent>("QML", 1, 0, "Component"); // required for the Compiler. + + // required for the Compiler. + qmlRegisterType<QObject>("QML", 1, 0, "QtObject"); + qmlRegisterType<QQmlComponent>("QML", 1, 0, "Component"); + QQmlData::init(); baseModulesUninitialized = false; } |