From 5e1a2785bcd623a13c7a1889deff6a28f3d2efea Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 13 Jul 2016 10:49:35 +0200 Subject: Fix quickcontrols test failure after tryCompare change One test also used tryCompare with indexes instead of property strings, so continue to allow that. Change-Id: If8bdb9935181666f975f02fd256734a9992d2b48 Reviewed-by: Mitch Curtis --- src/imports/testlib/TestCase.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/imports/testlib') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index cff265869d..d5e256a123 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -711,8 +711,8 @@ Item { \sa compare(), SignalSpy::wait() */ function tryCompare(obj, prop, value, timeout, msg) { - if (arguments.length == 1 || typeof(prop) != "string") { - qtest_results.fail("A property name as string is required for tryCompare", + if (arguments.length == 1 || (typeof(prop) != "string" && typeof(prop) != "number")) { + qtest_results.fail("A property name as string or index is required for tryCompare", util.callerFile(), util.callerLine()) throw new Error("QtQuickTest::fail") } -- cgit v1.2.3