aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlproperty
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-02-11 19:15:59 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-12 17:42:11 +0100
commita2b31f073530f61203fe0e9799ad158c4fe6b9f9 (patch)
tree4edd506b2acd258376b187ad4950154421126809 /tests/auto/qml/qqmlproperty
parentc70452a65af222343451f19ec62744314444c181 (diff)
Add a static variant of qmlRegisterInterface()
qmlRegisterInterface() should not be called procedurally, for the same reason that qmlRegisterType() should not be called procedurally. Also, add URI and major version parameters to qmlRegisterInterface(), and deprecate the typeName parameter. We want to identify which import an interface belongs to. Task-number: QTBUG-68796 Change-Id: Iba3d66e5ce6219b30aadba34396f12fca92f35a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlproperty')
-rw-r--r--tests/auto/qml/qqmlproperty/interfaces.h1
-rw-r--r--tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlproperty/interfaces.h b/tests/auto/qml/qqmlproperty/interfaces.h
index 191c3e84e8..2c06c5f594 100644
--- a/tests/auto/qml/qqmlproperty/interfaces.h
+++ b/tests/auto/qml/qqmlproperty/interfaces.h
@@ -56,6 +56,7 @@ class C : public QObject {
struct Interface2
{
Q_GADGET
+ QML_INTERFACE
};
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
index 1223c7cc07..166437c8de 100644
--- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
+++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
@@ -2100,8 +2100,6 @@ void tst_qqmlproperty::interfaceBinding()
qmlRegisterType<C>("io.qt.bugreports", 1, 0, "C");
qmlRegisterType<InterfaceConsumer>("io.qt.bugreports", 1, 0, "InterfaceConsumer");
- qmlRegisterInterface<Interface2>("Interface2");
-
const QVector<QUrl> urls = {
testFileUrl("interfaceBinding.qml"),
testFileUrl("interfaceBinding2.qml")