summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-04-23 05:42:13 (GMT)
committerIan Walters <ian.walters@nokia.com>2009-04-23 05:42:13 (GMT)
commit0af965285378ae51ac98dfade94f216761449459 (patch)
tree63284a53d9932b1202cad495c5e1bd2ebec208ae /tests/auto
parent6f089aec4e6c396ce45dcab0bd58e2dda23adce1 (diff)
parent2595bf1dd0252027ebba409f8f81d906ab9c099c (diff)
downloadQt-0af965285378ae51ac98dfade94f216761449459.zip
Qt-0af965285378ae51ac98dfade94f216761449459.tar.gz
Qt-0af965285378ae51ac98dfade94f216761449459.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/listview/tst_listview.cpp8
-rw-r--r--tests/auto/declarative/pathview/tst_pathview.cpp6
-rw-r--r--tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp2
-rw-r--r--tests/auto/declarative/qfxtext/tst_qfxtext.cpp18
-rw-r--r--tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp12
5 files changed, 23 insertions, 23 deletions
diff --git a/tests/auto/declarative/listview/tst_listview.cpp b/tests/auto/declarative/listview/tst_listview.cpp
index 5dd94a2..681af57 100644
--- a/tests/auto/declarative/listview/tst_listview.cpp
+++ b/tests/auto/declarative/listview/tst_listview.cpp
@@ -177,7 +177,7 @@ void tst_QFxListView::items()
model.addItem("Bob", "54321");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
@@ -213,7 +213,7 @@ void tst_QFxListView::changed()
model.addItem("Bob", "54321");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
@@ -246,7 +246,7 @@ void tst_QFxListView::inserted()
model.addItem("Bob", "54321");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
@@ -312,7 +312,7 @@ void tst_QFxListView::removed()
model.addItem("Item" + QString::number(i), "");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
diff --git a/tests/auto/declarative/pathview/tst_pathview.cpp b/tests/auto/declarative/pathview/tst_pathview.cpp
index 4d58e57..110d129 100644
--- a/tests/auto/declarative/pathview/tst_pathview.cpp
+++ b/tests/auto/declarative/pathview/tst_pathview.cpp
@@ -109,7 +109,7 @@ void tst_QFxPathView::items()
model.addItem("Bob", "54321");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
@@ -142,7 +142,7 @@ void tst_QFxPathView::pathMoved()
model.addItem("Bill", "4321");
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
@@ -183,7 +183,7 @@ void tst_QFxPathView::limitedItems()
model.addItem("Bob", QString::number(i));
QmlContext *ctxt = canvas->rootContext();
- ctxt->setProperty("testModel", &model);
+ ctxt->setContextProperty("testModel", &model);
canvas->execute();
qApp->processEvents();
diff --git a/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp b/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
index 9519382..da58857 100644
--- a/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
+++ b/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
@@ -58,7 +58,7 @@ void tst_QBindableMap::changed()
//make changes in QML
QmlEngine engine;
QmlContext *ctxt = engine.rootContext();
- ctxt->setProperty("data", &map);
+ ctxt->setContextProperty(QLatin1String("data"), &map);
QmlComponent component(&engine, "<Script script=\"data.key1 = 'Hello World';\"/>");
component.create();
QCOMPARE(spy.count(), 1);
diff --git a/tests/auto/declarative/qfxtext/tst_qfxtext.cpp b/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
index 2448898..ee74040 100644
--- a/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
+++ b/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
@@ -134,7 +134,7 @@ void tst_qfxtext::width()
QmlComponent textComponent(&engine, "<Text text=\"\"/>");
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 0);
+ QCOMPARE(textObject->width(), 0.);
}
for (int i = 0; i < standard.size(); i++)
@@ -147,7 +147,7 @@ void tst_qfxtext::width()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), metricWidth);
+ QCOMPARE(textObject->width(), qreal(metricWidth));
}
for (int i = 0; i < richText.size(); i++)
@@ -162,7 +162,7 @@ void tst_qfxtext::width()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), documentWidth);
+ QCOMPARE(textObject->width(), qreal(documentWidth));
}
}
@@ -175,7 +175,7 @@ void tst_qfxtext::wrap()
QmlComponent textComponent(&engine, "<Text text=\"\" wrap=\"true\" width=\"300\"/>");
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
for (int i = 0; i < standard.size(); i++)
@@ -184,7 +184,7 @@ void tst_qfxtext::wrap()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
for (int i = 0; i < richText.size(); i++)
@@ -193,7 +193,7 @@ void tst_qfxtext::wrap()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
}
@@ -210,7 +210,7 @@ void tst_qfxtext::elide()
QmlComponent textComponent(&engine, ("<Text text=\"\" "+elide+" width=\"300\"/>").toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
for (int i = 0; i < standard.size(); i++)
@@ -219,7 +219,7 @@ void tst_qfxtext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
// richtext - does nothing
@@ -229,7 +229,7 @@ void tst_qfxtext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1());
QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
- QCOMPARE(textObject->width(), 300);
+ QCOMPARE(textObject->width(), 300.);
}
}
}
diff --git a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
index e988918..8baef3d 100644
--- a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
+++ b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
@@ -124,7 +124,7 @@ void tst_qfxtextedit::width()
QmlComponent texteditComponent(&engine, "<TextEdit text=\"\"/>");
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), 0);
+ QCOMPARE(textEditObject->width(), 0.);
}
for (int i = 0; i < standard.size(); i++)
@@ -137,7 +137,7 @@ void tst_qfxtextedit::width()
QmlComponent texteditComponent(&engine, componentStr.toLatin1());
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), metricWidth);
+ QCOMPARE(textEditObject->width(), qreal(metricWidth));
}
for (int i = 0; i < richText.size(); i++)
@@ -152,7 +152,7 @@ void tst_qfxtextedit::width()
QmlComponent texteditComponent(&engine, componentStr.toLatin1());
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), documentWidth);
+ QCOMPARE(textEditObject->width(), qreal(documentWidth));
}
}
@@ -163,7 +163,7 @@ void tst_qfxtextedit::wrap()
QmlComponent texteditComponent(&engine, "<TextEdit text=\"\" wrap=\"true\" width=\"300\"/>");
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), 300);
+ QCOMPARE(textEditObject->width(), 300.);
}
for (int i = 0; i < standard.size(); i++)
@@ -172,7 +172,7 @@ void tst_qfxtextedit::wrap()
QmlComponent texteditComponent(&engine, componentStr.toLatin1());
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), 300);
+ QCOMPARE(textEditObject->width(), 300.);
}
for (int i = 0; i < richText.size(); i++)
@@ -181,7 +181,7 @@ void tst_qfxtextedit::wrap()
QmlComponent texteditComponent(&engine, componentStr.toLatin1());
QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
- QCOMPARE(textEditObject->width(), 300);
+ QCOMPARE(textEditObject->width(), 300.);
}
}