diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index bdf86641..706985ae 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -126,7 +126,7 @@ QDeclarativeItem *tst_qdeclarativelistmodel::createWorkerTest(QDeclarativeEngine QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component->create()); QDeclarativeEngine::setContextForObject(model, eng->rootContext()); if (item) - item->setProperty("model", qVariantFromValue(model)); + item->setProperty("model", qVariantFromValue(model)); return item; } @@ -167,17 +167,17 @@ void tst_qdeclarativelistmodel::static_nestedElements() QFETCH(int, elementCount); QStringList elements; - for (int i=0; i<elementCount; i++) + for (int i=0; i<elementCount; i++) elements.append("ListElement { a: 1; b: 2 }"); QString elementsStr = elements.join(",\n") + "\n"; - QString componentStr = + QString componentStr = "import QtQuick 1.0\n" "ListModel {\n" " ListElement {\n" " attributes: [\n"; componentStr += elementsStr.toUtf8().constData(); - componentStr += + componentStr += " ]\n" " }\n" "}"; @@ -342,7 +342,7 @@ void tst_qdeclarativelistmodel::dynamic_worker() if (QByteArray(QTest::currentDataTag()).startsWith("nested")) return; - // This is same as dynamic() except it applies the test to a ListModel called + // This is same as dynamic() except it applies the test to a ListModel called // from a WorkerScript (i.e. testing the internal FlatListModel that is created // by the WorkerListModelAgent) @@ -393,7 +393,7 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() // This is the same as dynamic_worker() except that it executes a set of list operations // from the worker script, calls sync(), and tests the changes are reflected in the // list in the main thread - + QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); @@ -419,7 +419,7 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() if (QByteArray(QTest::currentDataTag()).startsWith("nested-set")) QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"); - QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); waitForWorker(item); @@ -709,12 +709,12 @@ void tst_qdeclarativelistmodel::set() sv.setProperty("test", QScriptValue(true)); model.set(0, sv); QCOMPARE(model.get(0).property("test").toBool(), true); // triggers creation of model cache - QCOMPARE(model.data(0, model.roles()[0]), qVariantFromValue(true)); + QCOMPARE(model.data(0, model.roles()[0]), qVariantFromValue(true)); sv.setProperty("test", QScriptValue(false)); model.set(0, sv); QCOMPARE(model.get(0).property("test").toBool(), false); // tests model cache is updated - QCOMPARE(model.data(0, model.roles()[0]), qVariantFromValue(false)); + QCOMPARE(model.data(0, model.roles()[0]), qVariantFromValue(false)); } /* @@ -761,8 +761,8 @@ void tst_qdeclarativelistmodel::get_data() QTest::addColumn<QString>("roleName"); QTest::addColumn<QVariant>("roleValue"); - QTest::newRow("simple value") << "get(0).roleA = 500" << 0 << "roleA" << QVariant(500); - QTest::newRow("simple value 2") << "get(1).roleB = 500" << 1 << "roleB" << QVariant(500); + QTest::newRow("simple value") << "get(0).roleA = 500" << 0 << "roleA" << QVariant(500); + QTest::newRow("simple value 2") << "get(1).roleB = 500" << 1 << "roleB" << QVariant(500); QVariantMap map; map["zzz"] = 123; |