aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-06-24 17:03:08 -0700
committerOleg Shparber <trollixx@gmail.com>2014-06-25 17:31:47 +0200
commit435fb273355566c2888f8f685a369ce689869a14 (patch)
tree30ab03d005681f9a7666d5e76ad98bb419905263 /tests
parent57e3ef14fdcf6ae337075b68d374827b12397a7d (diff)
Allow integer values to be assigned QList<qreal> properties
Before this patch it was not possible to assign an integer value to QList<qreal> property, while it worked for non-list properties. Change-Id: Iab00288f7d78f4f76056ab4291700d7f51626de4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp8
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml
index be283fdda1..027fdbdfcb 100644
--- a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml
+++ b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.1.qml
@@ -3,7 +3,7 @@ import Qt.test 1.0
MySequenceConversionObject {
intListProperty: [1, 2]
- qrealListProperty: [1.1, 2.2]
+ qrealListProperty: [1.1, 2.2, 3]
boolListProperty: [false, true]
urlListProperty: [ "http://www.example1.com", "http://www.example2.com" ]
stringListProperty: [ "one", "two" ]
diff --git a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml
index ad8a92e317..e486feb96c 100644
--- a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml
+++ b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.3.qml
@@ -3,7 +3,7 @@ import Qt.test 1.0
MySequenceConversionObject {
intListProperty: 1
- qrealListProperty: 1.1
+ qrealListProperty: 1
boolListProperty: false
urlListProperty: Qt.resolvedUrl("example.html")
}
diff --git a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml
index a9f2e642d1..10e49af8e0 100644
--- a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml
+++ b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.4.qml
@@ -4,7 +4,7 @@ import Qt.test 1.0
MySequenceConversionObject {
Component.onCompleted: {
intListProperty = [1, 2]
- qrealListProperty = [1.1, 2.2]
+ qrealListProperty = [1.1, 2.2, 3]
boolListProperty = [false, true]
urlListProperty = [ "http://www.example1.com", "http://www.example2.com" ]
stringListProperty = [ "one", "two" ]
diff --git a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml
index 7a794eb694..bc72b78af7 100644
--- a/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml
+++ b/tests/auto/qml/qqmlecmascript/data/assignSequenceTypes.6.qml
@@ -4,7 +4,7 @@ import Qt.test 1.0
MySequenceConversionObject {
Component.onCompleted: {
intListProperty = 1;
- qrealListProperty = 1.1;
+ qrealListProperty = 1;
boolListProperty = false;
urlListProperty = Qt.resolvedUrl("example.html");
}
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 770d6b8197..35fb42f02d 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -5548,7 +5548,7 @@ void tst_qqmlecmascript::assignSequenceTypes()
MySequenceConversionObject *object = qobject_cast<MySequenceConversionObject *>(component.create());
QVERIFY(object != 0);
QCOMPARE(object->intListProperty(), (QList<int>() << 1 << 2));
- QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1 << 2.2));
+ QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1 << 2.2 << 3));
QCOMPARE(object->boolListProperty(), (QList<bool>() << false << true));
QCOMPARE(object->urlListProperty(), (QList<QUrl>() << QUrl("http://www.example1.com") << QUrl("http://www.example2.com")));
QCOMPARE(object->stringListProperty(), (QList<QString>() << QLatin1String("one") << QLatin1String("two")));
@@ -5576,7 +5576,7 @@ void tst_qqmlecmascript::assignSequenceTypes()
MySequenceConversionObject *object = qobject_cast<MySequenceConversionObject *>(component.create());
QVERIFY(object != 0);
QCOMPARE(object->intListProperty(), (QList<int>() << 1));
- QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1));
+ QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1));
QCOMPARE(object->boolListProperty(), (QList<bool>() << false));
QCOMPARE(object->urlListProperty(), (QList<QUrl>() << QUrl(testFileUrl("example.html"))));
delete object;
@@ -5588,7 +5588,7 @@ void tst_qqmlecmascript::assignSequenceTypes()
MySequenceConversionObject *object = qobject_cast<MySequenceConversionObject *>(component.create());
QVERIFY(object != 0);
QCOMPARE(object->intListProperty(), (QList<int>() << 1 << 2));
- QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1 << 2.2));
+ QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1 << 2.2 << 3));
QCOMPARE(object->boolListProperty(), (QList<bool>() << false << true));
QCOMPARE(object->urlListProperty(), (QList<QUrl>() << QUrl("http://www.example1.com") << QUrl("http://www.example2.com")));
QCOMPARE(object->stringListProperty(), (QList<QString>() << QLatin1String("one") << QLatin1String("two")));
@@ -5616,7 +5616,7 @@ void tst_qqmlecmascript::assignSequenceTypes()
MySequenceConversionObject *object = qobject_cast<MySequenceConversionObject *>(component.create());
QVERIFY(object != 0);
QCOMPARE(object->intListProperty(), (QList<int>() << 1));
- QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1.1));
+ QCOMPARE(object->qrealListProperty(), (QList<qreal>() << 1));
QCOMPARE(object->boolListProperty(), (QList<bool>() << false));
QCOMPARE(object->urlListProperty(), (QList<QUrl>() << QUrl(testFileUrl("example.html"))));
delete object;