aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-11-19 15:36:03 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-23 09:06:06 +0000
commit62625e243558d9f4203596dad1c01b6a65cf7e8f (patch)
tree123291f58d259b14603372fede1afc06c1c1ae28 /src/qml/qml
parentea55537d8153195cfd11fd510abce4584c599db0 (diff)
qqml.h: Add QML_IMPLEMENTS_INTERFACES
Needed in order to allow for the declarative registration of classes implementing interfaces. Fixes: QTBUG-88623 Change-Id: Id9c1ae92774dd9c316ceaa737cb48ef28f56545c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 87533900738d65ad278722b292852c998e987c10) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqml.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index 7f0c81c514..bac8039251 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -151,6 +151,10 @@
template<typename T, typename... Args> \
friend void QML_REGISTER_TYPES_AND_REVISIONS(const char *uri, int versionMajor, QList<int> *);
+#define QML_IMPLEMENTS_INTERFACES(INTERFACES) \
+ Q_INTERFACES(INTERFACES) \
+ enum class QmlIsInterface {yes = false};
+
#define QML_UNAVAILABLE \
QML_FOREIGN(QQmlTypeNotAvailable)