diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-04-25 10:20:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-04-25 19:39:48 +0200 |
commit | 762938aa5d7546fb097ca3799d97e3b826c7c0c8 (patch) | |
tree | f7495997067dbf126f6e8743dfe55d90f7373af6 /tests/auto/qml/qqmlecmascript | |
parent | 759090f59140d0b38c7bd57480ea6cd93d4cf0d3 (diff) |
Generalize QQmlAbstractBinding::isValueTypeProxy()
Instead of a bool we can just return an enum of the actual kind. This
way all the checks become more readable. Furthermore, we can eliminate a
dynamic_cast without sacrificing readability.
Change-Id: I8a38687f9b796cd47196a6ab0385624c737e4435
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 2a20e89e9a..2ff9a28ee0 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -9036,7 +9036,7 @@ void tst_qqmlecmascript::removeBindingsWithNoDependencies() QVERIFY(prop.isValid()); QQmlAbstractBinding *vtProxyBinding = QQmlPropertyPrivate::binding(object.data(), QQmlPropertyIndex(prop.propertyIndex())); QVERIFY(vtProxyBinding); - QVERIFY(vtProxyBinding->isValueTypeProxy()); + QVERIFY(vtProxyBinding->kind() == QQmlAbstractBinding::ValueTypeProxy); QQmlValueTypeProxyBinding *proxy = static_cast<QQmlValueTypeProxyBinding*>(vtProxyBinding); QVERIFY(!proxy->subBindings()); |