aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data
diff options
context:
space:
mode:
authorSemih Yavuz <semih.yavuz@qt.io>2023-02-15 13:25:25 +0100
committerSemih Yavuz <semih.yavuz@qt.io>2023-02-16 11:17:28 +0100
commit95228f0e66b9216a3c83f3a69a143b846c707583 (patch)
tree5b6d939bd126dc8a758c815ecde639d41b669043 /tests/auto/qml/qmlcppcodegen/data
parent3689e9cc4afc810731f67a8deead2b594dbf6b08 (diff)
qmlsc: Support equality operations for QUrl
Task-number: QTBUG-110983 Pick-to: 6.5 Change-Id: I9a664178c91bfa2962e2a5a3bf4bfa174a74a9d0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data')
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt1
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/equalityQUrl.qml16
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
index f80dac60fb..7f73fbbc9b 100644
--- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
+++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
@@ -93,6 +93,7 @@ set(qml_files
enumsInOtherObject.qml
enumsUser.qml
equalityQObjects.qml
+ equalityQUrl.qml
equalityVarAndNonStorable.qml
equalsUndefined.qml
excessiveParameters.qml
diff --git a/tests/auto/qml/qmlcppcodegen/data/equalityQUrl.qml b/tests/auto/qml/qmlcppcodegen/data/equalityQUrl.qml
new file mode 100644
index 0000000000..55ac68592c
--- /dev/null
+++ b/tests/auto/qml/qmlcppcodegen/data/equalityQUrl.qml
@@ -0,0 +1,16 @@
+pragma Strict
+import QtQuick
+
+Item {
+ property url emptyUrl: ""
+ property url sourceUrl: "some/path/file.png"
+
+ property bool emptyUrlStrict: emptyUrl === Qt.resolvedUrl("")
+ property bool emptyUrlWeak: emptyUrl == Qt.resolvedUrl("")
+
+ property bool sourceUrlStrict: sourceUrl === Qt.url("some/path/file.png");
+ property bool sourceUrlWeak: sourceUrl == Qt.url("some/path/file.png");
+
+ property bool sourceIsNotEmptyStrict: sourceUrl !== emptyUrl
+ property bool sourceIsNotEmptyWeak: sourceUrl != emptyUrl
+}