diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-03-19 13:38:56 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-03-21 10:41:29 +0100 |
commit | 8799d55d72e2d857f92b3b8cf1910d51b165b88f (patch) | |
tree | 0565811cfb4c9e5eac0d565cdf77e335cf280ba3 /src/qml | |
parent | 4566f5186196bcd04d4e468fe990b206dec350ef (diff) |
qmltyperegistrar: Restore QML.Root processing
The QML root type needs to have some particular transformations we
cannot properly encode in the metatypes:
1. It must not expose QObject's destroyed() signal
2. It must not expose QObject's deleteLater() method
3. It needs a synthetic toString() method
4. It needs a synthetic destroy() method with an optional int argument
Amends commit 687609f2f3a98ade4b8e074615c3d1db1228fce0 which dropped the
processing of QML.Root in favor of hardcoding QObject in the builtins
and a021bd427328c495cf9969be820a3cfbd41996c6 which dropped the
hardcoding without restoring the root type processing.
Notice that we don't need the QML.OmitFromQmlTypes flag anymore and drop
that in exchange for the re-introduction of QML.Root.
Pick-to: 6.7
Fixes: QTBUG-120267
Change-Id: Ie007b32c8a38f1134a51b355588cd47be5554de5
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qqmlbuiltins_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qqmlbuiltins_p.h b/src/qml/qqmlbuiltins_p.h index d92929cea1..45397b426d 100644 --- a/src/qml/qqmlbuiltins_p.h +++ b/src/qml/qqmlbuiltins_p.h @@ -72,6 +72,7 @@ struct QQmlQtObjectForeign QML_NAMED_ELEMENT(QtObject) QML_EXTENDED_JAVASCRIPT(Object) QML_FOREIGN(QObject) + Q_CLASSINFO("QML.Root", "true") }; struct QQmlIntForeign |