1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLREGISTRATION_H
5#define QQMLREGISTRATION_H
6
7#include <QtCore/qglobal.h>
8#include <QtQmlIntegration/qqmlintegration.h>
9
10// satisfy configure, which warns about public headers not using those
11QT_BEGIN_NAMESPACE
12
13#define QML_FOREIGN(FOREIGN_TYPE) \
14 Q_CLASSINFO("QML.Foreign", #FOREIGN_TYPE) \
15 using QmlForeignType = FOREIGN_TYPE; \
16 template<class, class> friend struct QML_PRIVATE_NAMESPACE::QmlResolved; \
17 template<typename... Args> \
18 friend void QML_REGISTER_TYPES_AND_REVISIONS(const char *uri, int versionMajor, QList<int> *); \
19 inline constexpr void qt_qmlMarker_foreign() {}
20
21#define QML_FOREIGN_NAMESPACE(FOREIGN_NAMESPACE) \
22 Q_CLASSINFO("QML.Foreign", #FOREIGN_NAMESPACE)
23
24#define QML_CUSTOMPARSER Q_CLASSINFO("QML.HasCustomParser", "true")
25
26QT_END_NAMESPACE
27
28#endif // QQMLREGISTRATION_H
29

source code of qtdeclarative/src/qml/qml/qqmlregistration.h