summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/repeater
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-30 04:15:22 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-30 04:15:22 (GMT)
commit45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c (patch)
tree9bbf0cca7e26abfab486c658cc6d4005fd4e74b8 /tests/auto/declarative/repeater
parentf37e9d787bd418d8f75997a8d46c1c42e842c673 (diff)
downloadQt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.zip
Qt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.tar.gz
Qt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.tar.bz2
Rename QFx classes to QmlGraphics
Diffstat (limited to 'tests/auto/declarative/repeater')
-rw-r--r--tests/auto/declarative/repeater/tst_repeater.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/declarative/repeater/tst_repeater.cpp b/tests/auto/declarative/repeater/tst_repeater.cpp
index 68007a6..0622028 100644
--- a/tests/auto/declarative/repeater/tst_repeater.cpp
+++ b/tests/auto/declarative/repeater/tst_repeater.cpp
@@ -5,11 +5,11 @@
#include <qfxtext.h>
#include <qmlcontext.h>
-class tst_QFxRepeater : public QObject
+class tst_QmlGraphicsRepeater : public QObject
{
Q_OBJECT
public:
- tst_QFxRepeater();
+ tst_QmlGraphicsRepeater();
private slots:
void stringList();
@@ -20,7 +20,7 @@ private:
T *findItem(QObject *parent, const QString &id);
};
-tst_QFxRepeater::tst_QFxRepeater()
+tst_QmlGraphicsRepeater::tst_QmlGraphicsRepeater()
{
}
@@ -29,7 +29,7 @@ The Repeater element creates children at its own position in its parent's
stacking order. In this test we insert a repeater between two other Text
elements to test this.
*/
-void tst_QFxRepeater::stringList()
+void tst_QmlGraphicsRepeater::stringList()
{
QmlView *canvas = createView(SRCDIR "/data/repeater.qml");
@@ -45,10 +45,10 @@ void tst_QFxRepeater::stringList()
canvas->execute();
qApp->processEvents();
- QFxRepeater *repeater = findItem<QFxRepeater>(canvas->root(), "repeater");
+ QmlGraphicsRepeater *repeater = findItem<QmlGraphicsRepeater>(canvas->root(), "repeater");
QVERIFY(repeater != 0);
- QFxItem *container = findItem<QFxItem>(canvas->root(), "container");
+ QmlGraphicsItem *container = findItem<QmlGraphicsItem>(canvas->root(), "container");
QVERIFY(container != 0);
QCOMPARE(container->childItems().count(), data.count() + 3);
@@ -57,21 +57,21 @@ void tst_QFxRepeater::stringList()
for (int i = 0; i < container->childItems().count(); ++i) {
if (i == 0) {
- QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
+ QmlGraphicsText *name = qobject_cast<QmlGraphicsText*>(container->childItems().at(i));
QVERIFY(name != 0);
QCOMPARE(name->text(), QLatin1String("Zero"));
} else if (i == container->childItems().count() - 2) {
// The repeater itself
- QFxRepeater *rep = qobject_cast<QFxRepeater*>(container->childItems().at(i));
+ QmlGraphicsRepeater *rep = qobject_cast<QmlGraphicsRepeater*>(container->childItems().at(i));
QCOMPARE(rep, repeater);
saw_repeater = true;
continue;
} else if (i == container->childItems().count() - 1) {
- QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
+ QmlGraphicsText *name = qobject_cast<QmlGraphicsText*>(container->childItems().at(i));
QVERIFY(name != 0);
QCOMPARE(name->text(), QLatin1String("Last"));
} else {
- QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
+ QmlGraphicsText *name = qobject_cast<QmlGraphicsText*>(container->childItems().at(i));
QVERIFY(name != 0);
QCOMPARE(name->text(), data.at(i-1));
}
@@ -82,7 +82,7 @@ void tst_QFxRepeater::stringList()
}
-QmlView *tst_QFxRepeater::createView(const QString &filename)
+QmlView *tst_QmlGraphicsRepeater::createView(const QString &filename)
{
QmlView *canvas = new QmlView(0);
canvas->setFixedSize(240,320);
@@ -96,13 +96,13 @@ QmlView *tst_QFxRepeater::createView(const QString &filename)
}
template<typename T>
-T *tst_QFxRepeater::findItem(QObject *parent, const QString &objectName)
+T *tst_QmlGraphicsRepeater::findItem(QObject *parent, const QString &objectName)
{
const QMetaObject &mo = T::staticMetaObject;
if (mo.cast(parent) && (objectName.isEmpty() || parent->objectName() == objectName))
return static_cast<T*>(parent);
for (int i = 0; i < parent->children().count(); ++i) {
- QFxItem *item = findItem<T>(parent->children().at(i), objectName);
+ QmlGraphicsItem *item = findItem<T>(parent->children().at(i), objectName);
if (item)
return static_cast<T*>(item);
}
@@ -110,6 +110,6 @@ T *tst_QFxRepeater::findItem(QObject *parent, const QString &objectName)
return 0;
}
-QTEST_MAIN(tst_QFxRepeater)
+QTEST_MAIN(tst_QmlGraphicsRepeater)
#include "tst_repeater.moc"