summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-18 03:11:11 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-18 03:11:11 (GMT)
commit0b8ae4978c460e75e5c96937ada2341fceac2ee2 (patch)
tree6e2d4e866d96f9d2446028a3646d9c67b6126b95 /tests/auto
parent300a259e13906e8dde204e3f33dab88ea80f8302 (diff)
parentc68c518d0e4823beaab7d3adf20044bc03446b46 (diff)
downloadQt-0b8ae4978c460e75e5c96937ada2341fceac2ee2.zip
Qt-0b8ae4978c460e75e5c96937ada2341fceac2ee2.tar.gz
Qt-0b8ae4978c460e75e5c96937ada2341fceac2ee2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml (renamed from tests/auto/declarative/qdeclarativelanguage/data/scriptString.3.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml (renamed from tests/auto/declarative/qdeclarativelanguage/data/scriptString.4.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml (renamed from tests/auto/declarative/qdeclarativelanguage/data/scriptString.5.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp2
12 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index 851460f..7f0e6c0 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -398,7 +398,7 @@ void tst_qdeclarativecontext::destruction()
QObject obj;
QDeclarativeEngine::setContextForObject(&obj, ctxt);
- QDeclarativeExpression expr(ctxt, "a", 0);
+ QDeclarativeExpression expr(ctxt, 0, "a");
QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj));
QCOMPARE(ctxt, expr.context());
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index 1381d57..7bb8a8e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -190,7 +190,7 @@ class MyExpression : public QDeclarativeExpression
Q_OBJECT
public:
MyExpression(QDeclarativeContext *ctxt, const QString &expr)
- : QDeclarativeExpression(ctxt, expr, 0), changed(false)
+ : QDeclarativeExpression(ctxt, 0, expr), changed(false)
{
QObject::connect(this, SIGNAL(valueChanged()), this, SLOT(expressionValueChanged()));
setNotifyOnValueChanged(true);
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 64e5b3f..0710e15 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -2083,10 +2083,9 @@ void tst_qdeclarativeecmascript::compiled()
QCOMPARE(object->property("test15").toBool(), false);
QCOMPARE(object->property("test16").toBool(), true);
- QCOMPARE(object->property("test17").toInt(), 4);
+ QCOMPARE(object->property("test17").toInt(), 5);
QCOMPARE(object->property("test18").toReal(), qreal(176));
- QEXPECT_FAIL("", "QTBUG-9538", Continue);
- QCOMPARE(object->property("test19").toInt(), 6);
+ QCOMPARE(object->property("test19").toInt(), 7);
QCOMPARE(object->property("test20").toReal(), qreal(6.7));
QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index e0143a6..720702a 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -400,7 +400,7 @@ T *tst_qdeclarativeimage::findItem(QGraphicsObject *parent, const QString &objec
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml
index 0de3667..0de3667 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml
index 0cd82ff..0cd82ff 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml
index 3e2f9a4..3e2f9a4 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 4434e46..b72c75f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -1122,16 +1122,17 @@ void tst_qdeclarativelanguage::scriptString()
}
{
- QDeclarativeComponent component(&engine, TEST_FILE("scriptString3.qml"));
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString2.qml"));
VERIFY_ERRORS(0);
MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
QVERIFY(object != 0);
+ QEXPECT_FAIL("", "Variant.asScript() returns incorrect value for string (bug pending)", Continue);
QCOMPARE(object->scriptProperty().script(), QString("\"hello world\""));
}
{
- QDeclarativeComponent component(&engine, TEST_FILE("scriptString4.qml"));
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString3.qml"));
VERIFY_ERRORS(0);
MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
@@ -1140,7 +1141,7 @@ void tst_qdeclarativelanguage::scriptString()
}
{
- QDeclarativeComponent component(&engine, TEST_FILE("scriptString5.qml"));
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString4.qml"));
VERIFY_ERRORS(0);
MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 26a12f0..be4ffe8 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -275,7 +275,7 @@ void tst_qdeclarativelistmodel::dynamic()
QDeclarativeListModel model;
QDeclarativeEngine::setContextForObject(&model,engine.rootContext());
engine.rootContext()->setContextObject(&model);
- QDeclarativeExpression e(engine.rootContext(), script, &model);
+ QDeclarativeExpression e(engine.rootContext(), &model, script);
if (!warning.isEmpty())
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1());
@@ -332,7 +332,7 @@ void tst_qdeclarativelistmodel::dynamic_worker()
Q_ARG(QVariant, operations.mid(0, operations.length()-1))));
waitForWorker(item);
- QDeclarativeExpression e(eng.rootContext(), operations.last().toString(), &model);
+ QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString());
if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
QVERIFY(e.evaluate().toInt() != result);
else
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index ec2afae..fde2e43 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -1550,7 +1550,7 @@ T *tst_QDeclarativeListView::findItem(QGraphicsObject *parent, const QString &ob
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 0e16f66..f32a6c7 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -760,7 +760,7 @@ T *tst_QDeclarativePathView::findItem(QGraphicsObject *parent, const QString &ob
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index c238ef9..8f3fb16 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -190,7 +190,7 @@ T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QStr
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {