aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-11-19 15:36:03 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2020-11-23 08:39:03 +0100
commit87533900738d65ad278722b292852c998e987c10 (patch)
treebf95d71cd36de269252f4606f03cce33bb3f47cd /src
parentbc4be3f98169d7d4ed74d7539299924b57b89bd1 (diff)
qqml.h: Add QML_IMPLEMENTS_INTERFACES
Needed in order to allow for the declarative registration of classes implementing interfaces. Fixes: QTBUG-88623 Pick-to: 6.0 Change-Id: Id9c1ae92774dd9c316ceaa737cb48ef28f56545c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-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)