diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-19 12:23:04 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-22 08:38:32 +0000 |
commit | bc7e63385522c2020168cf367a8b3b1e6c6bc65e (patch) | |
tree | 1bf68bd1ba3e18039b11f8eb721bdc0fe9a5a94c /tests/auto/tools/moc/qmlmacro.h | |
parent | c265315931bc375235993f8513de21da24f6b5aa (diff) |
Amends 2d0c31e7d92a3e9df4ce2b9c1d41b94fb12735fc. We were using
MetaTypeDecay in qTryMetaTypeInterfaceForType; but that is not used by
moc when complete types are enforced. Change qt_metaTypeArray to also
use qTryMetaTypeInterfaceForType, so that the code path for "force
complete types"[0] and the normal one do not diverge.
[0] Most easily enabled by using one of the QML type registration
macros.
Fixes: QTBUG-106672
Change-Id: I9bf14873d1d0c4127a676643f7e8eb77f6e42dc8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a8ccd9cd848be9aafd2d07d83a8897dc8b2a0cb3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/tools/moc/qmlmacro.h')
-rw-r--r-- | tests/auto/tools/moc/qmlmacro.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/qmlmacro.h b/tests/auto/tools/moc/qmlmacro.h new file mode 100644 index 0000000000..cb3b291bf1 --- /dev/null +++ b/tests/auto/tools/moc/qmlmacro.h @@ -0,0 +1,19 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + + +#ifndef QMlMACRO_H +#define QMlMACRO_H + +#include <QObject> +#include <QByteArray> + +struct QmlMacro : QObject +{ + Q_OBJECT + Q_CLASSINFO("QML.Element", "auto") + + signals: + void f(QByteArray &b); +}; +#endif |