diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 4 | ||||
-rw-r--r-- | src/qmltest/quicktestresult.cpp | 6 |
2 files changed, 10 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()); diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index dc6caf505b..c4fb2b0f5f 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -512,6 +512,12 @@ void QuickTestResult::stringify(QQmlV4Function *args) result = QString::fromLatin1("Qt.vector3d(%1, %2, %3)").arg(v3d.x()).arg(v3d.y()).arg(v3d.z()); break; } + case QVariant::Url: + { + QUrl url = v.value<QUrl>(); + result = QString::fromLatin1("Qt.url(%1)").arg(url.toString()); + break; + } default: result = v.toString(); } |