diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-09-03 10:42:30 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-09-04 06:55:55 +0000 |
commit | f942a777f5a6ca241e4a804db518b5f4eb73dcc3 (patch) | |
tree | f94fc98d09cec550f3bc5e4a9748e20b543467a2 /tests/auto/qml/qqmltranslation | |
parent | e7899df08030030930a3e30f0c8947275328e4f0 (diff) |
Adjust to qtbase changes
- isQProperty has been renamed to bindable
- QNotifiedProperty is no more
- Bindable properties have a function to obtain the QBindable; store
that information in the qmltypes files.
Task-number: QTBUG-86434
Task-number: QTBUG-86435
Change-Id: I2ba593af1e197d04d2c30cfb9e6904a3d2059e4b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmltranslation')
-rw-r--r-- | tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp b/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp index bb5a5bf7e3..d4b65e1222 100644 --- a/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp +++ b/tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp @@ -170,7 +170,10 @@ class CppTranslationBase : public QQuickItem { Q_OBJECT QML_ELEMENT - Q_PROPERTY(QString qProperty) +public: + Q_PROPERTY(QString qProperty MEMBER qProperty BINDABLE bindableQProperty) + QBindable<QString> bindableQProperty() {return QBindable<QString>(&qProperty); } +private: QProperty<QString> qProperty; }; @@ -207,7 +210,7 @@ void tst_qqmltranslation::translationChange() QQmlComponent component(&engine, testFileUrl("translationChange.qml")); QScopedPointer<QObject> object(component.create()); - QVERIFY(!object.isNull()); + QVERIFY2(!object.isNull(), qPrintable(component.errorString())); QCOMPARE(object->property("baseProperty").toString(), QString::fromUtf8("do not translate")); QCOMPARE(object->property("text1").toString(), QString::fromUtf8("translate me")); |