From 762938aa5d7546fb097ca3799d97e3b826c7c0c8 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 25 Apr 2022 10:20:22 +0200 Subject: 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 --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlecmascript') 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(vtProxyBinding); QVERIFY(!proxy->subBindings()); -- cgit v1.2.3