diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-13 10:49:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-07-13 10:42:32 +0000 |
commit | 5e1a2785bcd623a13c7a1889deff6a28f3d2efea (patch) | |
tree | b39421103e69029c9eac7eb8077615a726270b5f /src/imports | |
parent | 9109d15398f8c869e401aa9aacc578c96200e217 (diff) |
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 <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 4 |
1 files changed, 2 insertions, 2 deletions
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") } |