aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-02-17 13:08:21 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-22 00:03:53 +0100
commitf60588237b230923c6a27f60669fa0230138f1ca (patch)
tree7fa24633c22c7aa06dcb395fab499c8abb8f9b6a /tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml
parenta73ad904c9a4ad188604de6c64a6c91cd514dc1b (diff)
Implement String.localeCompare() using QString::localeAwareCompare()
v8's localeCompare() implementation is not locale aware, so we use Qt's locale aware compare. Change-Id: Ia9092b3d6754545bb797adac26080ac7a29dcd92 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml')
-rw-r--r--tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml b/tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml
new file mode 100644
index 0000000000..6851af6ef9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelocale/data/localeCompare.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+
+QtObject {
+ property var string1: "a"
+ property var string2: "a"
+ property var comparison: string1.localeCompare(string2)
+}