From 99651acdf7f34ad976522f12eb89ea8fc19ee0a5 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 13 Jun 2017 09:23:09 +0200 Subject: qmltest: fix compare() for urls url is object, but without any property. Task-number: QTBUG-61297 Change-Id: I68b0523be54e4d42f57267205ba8d66ff4ac4e30 Reviewed-by: Edward Welbourne --- src/imports/testlib/TestCase.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/imports') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 18c70e1169..82211b5192 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -753,6 +753,10 @@ Item { bProperties.push(i); // collect exp's properties } + if (aProperties.length == 0 && bProperties.length == 0) { // at least a special case for QUrl + return eq && (JSON.stringify(act) == JSON.stringify(exp)); + } + // Ensures identical properties name return eq && qtest_compareInternal(aProperties.sort(), bProperties.sort()); -- cgit v1.2.3