diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-05-18 01:42:46 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-05-18 02:29:06 (GMT) |
commit | 54c6a0101ba2bf3910126c53738e337712e5bb9a (patch) | |
tree | b7aa9899ced985de5e89d3f70b4ef79abb3c61f4 /tests | |
parent | 96d5029126707771a3b956e6db0391ae7d619853 (diff) | |
download | Qt-54c6a0101ba2bf3910126c53738e337712e5bb9a.zip Qt-54c6a0101ba2bf3910126c53738e337712e5bb9a.tar.gz Qt-54c6a0101ba2bf3910126c53738e337712e5bb9a.tar.bz2 |
Add parent parameter to QDeclarativeExpression constructor.
Also rearrange the parameter order to be more clear.
Diffstat (limited to 'tests')
7 files changed, 8 insertions, 8 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/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/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 { |