diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-13 09:23:09 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-14 10:55:14 +0000 |
commit | 99651acdf7f34ad976522f12eb89ea8fc19ee0a5 (patch) | |
tree | 6d51e3e0fbe9173d8fbd373e018af86a7fc73ed6 /src/imports | |
parent | 7c27955968bab135b0e0db3a5f707efa86e80464 (diff) |
qmltest: fix compare() for urls
url is object, but without any property.
Task-number: QTBUG-61297
Change-Id: I68b0523be54e4d42f57267205ba8d66ff4ac4e30
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 4 |
1 files changed, 4 insertions, 0 deletions
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()); |