summaryrefslogtreecommitdiffstats
path: root/tests/auto
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
parentf37e9d787bd418d8f75997a8d46c1c42e842c673 (diff)
downloadQt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.zip
Qt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.tar.gz
Qt-45cc1ea534640cb492bd00405bf8fcd5dbfbcf5c.tar.bz2
Rename QFx classes to QmlGraphics
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/anchors/tst_anchors.cpp84
-rw-r--r--tests/auto/declarative/animatedimage/tst_animatedimage.cpp8
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp22
-rw-r--r--tests/auto/declarative/behaviors/tst_behaviors.cpp30
-rw-r--r--tests/auto/declarative/layouts/tst_layouts.cpp66
-rw-r--r--tests/auto/declarative/listview/tst_listview.cpp108
-rw-r--r--tests/auto/declarative/pathview/tst_pathview.cpp52
-rw-r--r--tests/auto/declarative/qfxloader/tst_qfxloader.cpp16
-rw-r--r--tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp22
-rw-r--r--tests/auto/declarative/qfxtext/tst_qfxtext.cpp62
-rw-r--r--tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp52
-rw-r--r--tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp42
-rw-r--r--tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp4
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp28
-rw-r--r--tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp2
-rw-r--r--tests/auto/declarative/repeater/tst_repeater.cpp28
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
-rw-r--r--tests/auto/declarative/states/tst_states.cpp22
18 files changed, 325 insertions, 325 deletions
diff --git a/tests/auto/declarative/anchors/tst_anchors.cpp b/tests/auto/declarative/anchors/tst_anchors.cpp
index ec977da..fea6ef3 100644
--- a/tests/auto/declarative/anchors/tst_anchors.cpp
+++ b/tests/auto/declarative/anchors/tst_anchors.cpp
@@ -13,7 +13,7 @@ public:
tst_anchors() {}
template<typename T>
- T *findItem(QFxItem *parent, const QString &id);
+ T *findItem(QmlGraphicsItem *parent, const QString &id);
private slots:
void basicAnchors();
@@ -27,12 +27,12 @@ private slots:
Find an item with the specified id.
*/
template<typename T>
-T *tst_anchors::findItem(QFxItem *parent, const QString &objectName)
+T *tst_anchors::findItem(QmlGraphicsItem *parent, const QString &objectName)
{
const QMetaObject &mo = T::staticMetaObject;
QList<QGraphicsItem *> children = parent->childItems();
for (int i = 0; i < children.count(); ++i) {
- QFxItem *item = qobject_cast<QFxItem *>(children.at(i)->toGraphicsObject());
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(children.at(i)->toGraphicsObject());
if (item) {
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
return static_cast<T*>(item);
@@ -55,41 +55,41 @@ void tst_anchors::basicAnchors()
qApp->processEvents();
//sibling horizontal
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect1"))->x(), 26.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect2"))->x(), 122.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect3"))->x(), 74.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect4"))->x(), 16.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect5"))->x(), 112.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect6"))->x(), 64.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect1"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect2"))->x(), 122.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect3"))->x(), 74.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect4"))->x(), 16.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect5"))->x(), 112.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect6"))->x(), 64.0);
//parent horizontal
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect7"))->x(), 0.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect8"))->x(), 240.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect9"))->x(), 120.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect10"))->x(), -10.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect11"))->x(), 230.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect12"))->x(), 110.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect7"))->x(), 0.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect8"))->x(), 240.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect9"))->x(), 120.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect10"))->x(), -10.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect11"))->x(), 230.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect12"))->x(), 110.0);
//vertical
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect13"))->y(), 20.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect14"))->y(), 155.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect13"))->y(), 20.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect14"))->y(), 155.0);
//stretch
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect15"))->x(), 26.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect15"))->width(), 96.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect16"))->x(), 26.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect16"))->width(), 192.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect17"))->x(), -70.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect17"))->width(), 192.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect15"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect15"))->width(), 96.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect16"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect16"))->width(), 192.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect17"))->x(), -70.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect17"))->width(), 192.0);
//vertical stretch
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect18"))->y(), 20.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect18"))->height(), 40.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect18"))->y(), 20.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect18"))->height(), 40.0);
//more parent horizontal
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect19"))->x(), 115.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect20"))->x(), 235.0);
- QCOMPARE(findItem<QFxRect>(view->root(), QLatin1String("Rect21"))->x(), -5.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect19"))->x(), 115.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect20"))->x(), 235.0);
+ QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect21"))->x(), -5.0);
delete view;
}
@@ -102,7 +102,7 @@ void tst_anchors::loops()
view->setUrl(QUrl("file://" SRCDIR "/data/loop1.qml"));
- QString expect = "QML QFxText (" + view->url().toString() + ":7:5" + ") Possible anchor loop detected on horizontal anchor.";
+ QString expect = "QML QmlGraphicsText (" + view->url().toString() + ":7:5" + ") Possible anchor loop detected on horizontal anchor.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
@@ -117,7 +117,7 @@ void tst_anchors::loops()
view->setUrl(QUrl("file://" SRCDIR "/data/loop2.qml"));
- QString expect = "QML QFxImage (" + view->url().toString() + ":14:3" + ") Possible anchor loop detected on horizontal anchor.";
+ QString expect = "QML QmlGraphicsImage (" + view->url().toString() + ":14:3" + ") Possible anchor loop detected on horizontal anchor.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
view->execute();
qApp->processEvents();
@@ -133,7 +133,7 @@ void tst_anchors::illegalSets()
view->setUrl(QUrl("file://" SRCDIR "/data/illegal1.qml"));
- QString expect = "QML QFxRect (" + view->url().toString() + ":7:5" + ") Can't specify left, right, and hcenter anchors.";
+ QString expect = "QML QmlGraphicsRect (" + view->url().toString() + ":7:5" + ") Can't specify left, right, and hcenter anchors.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
view->execute();
qApp->processEvents();
@@ -146,7 +146,7 @@ void tst_anchors::illegalSets()
view->setUrl(QUrl("file://" SRCDIR "/data/illegal2.qml"));
- QString expect = "QML QFxText (" + view->url().toString() + ":7:5" + ") Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors.";
+ QString expect = "QML QmlGraphicsText (" + view->url().toString() + ":7:5" + ") Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
view->execute();
//qApp->processEvents();
@@ -159,7 +159,7 @@ void tst_anchors::illegalSets()
view->setUrl(QUrl("file://" SRCDIR "/data/illegal3.qml"));
- QString expect = "QML QFxRect (" + view->url().toString() + ":9:5" + ") Can't anchor to an item that isn't a parent or sibling.";
+ QString expect = "QML QmlGraphicsRect (" + view->url().toString() + ":9:5" + ") Can't anchor to an item that isn't a parent or sibling.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
view->execute();
//qApp->processEvents();
@@ -170,25 +170,25 @@ void tst_anchors::illegalSets()
void tst_anchors::reset()
{
- QFxItem *aItem = new QFxItem;
- QFxAnchorLine anchor;
+ QmlGraphicsItem *aItem = new QmlGraphicsItem;
+ QmlGraphicsAnchorLine anchor;
anchor.item = aItem;
- anchor.anchorLine = QFxAnchorLine::Top;
+ anchor.anchorLine = QmlGraphicsAnchorLine::Top;
- QFxItem *item = new QFxItem;
+ QmlGraphicsItem *item = new QmlGraphicsItem;
item->anchors()->setBottom(anchor);
- QCOMPARE(item->anchors()->usedAnchors().testFlag(QFxAnchors::HasBottomAnchor), true);
+ QCOMPARE(item->anchors()->usedAnchors().testFlag(QmlGraphicsAnchors::HasBottomAnchor), true);
item->anchors()->resetBottom();
- QCOMPARE(item->anchors()->usedAnchors().testFlag(QFxAnchors::HasBottomAnchor), false);
+ QCOMPARE(item->anchors()->usedAnchors().testFlag(QmlGraphicsAnchors::HasBottomAnchor), false);
}
void tst_anchors::nullItem()
{
- QFxAnchorLine anchor;
+ QmlGraphicsAnchorLine anchor;
- QTest::ignoreMessage(QtWarningMsg, "QML QFxItem (unknown location) Can't anchor to a null item.");
- QFxItem *item = new QFxItem;
+ QTest::ignoreMessage(QtWarningMsg, "QML QmlGraphicsItem (unknown location) Can't anchor to a null item.");
+ QmlGraphicsItem *item = new QmlGraphicsItem;
item->anchors()->setBottom(anchor);
}
diff --git a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp
index 5c71731..46c953d 100644
--- a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp
+++ b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp
@@ -21,14 +21,14 @@ private slots:
void tst_animatedimage::play()
{
- QFxAnimatedImageItem anim;
+ QmlGraphicsAnimatedImageItem anim;
anim.setSource(QUrl("file://" SRCDIR "/data/stickman.gif"));
QVERIFY(anim.isPlaying());
}
void tst_animatedimage::pause()
{
- QFxAnimatedImageItem anim;
+ QmlGraphicsAnimatedImageItem anim;
anim.setSource(QUrl("file://" SRCDIR "/data/stickman.gif"));
anim.setPaused(true);
QVERIFY(!anim.isPlaying());
@@ -36,7 +36,7 @@ void tst_animatedimage::pause()
void tst_animatedimage::setFrame()
{
- QFxAnimatedImageItem anim;
+ QmlGraphicsAnimatedImageItem anim;
anim.setSource(QUrl("file://" SRCDIR "/data/stickman.gif"));
anim.setPaused(true);
QVERIFY(!anim.isPlaying());
@@ -46,7 +46,7 @@ void tst_animatedimage::setFrame()
void tst_animatedimage::frameCount()
{
- QFxAnimatedImageItem anim;
+ QmlGraphicsAnimatedImageItem anim;
anim.setSource(QUrl("file://" SRCDIR "/data/stickman.gif"));
QCOMPARE(anim.frameCount(), 299);
}
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index a6f67b8..b5cc9d4 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -32,7 +32,7 @@ private slots:
void tst_animations::simpleNumber()
{
- QFxRect rect;
+ QmlGraphicsRect rect;
QmlNumberAnimation animation;
animation.setTarget(&rect);
animation.setProperty("x");
@@ -50,7 +50,7 @@ void tst_animations::simpleNumber()
void tst_animations::simpleColor()
{
- QFxRect rect;
+ QmlGraphicsRect rect;
QmlColorAnimation animation;
animation.setTarget(&rect);
animation.setProperty("color");
@@ -68,7 +68,7 @@ void tst_animations::simpleColor()
void tst_animations::alwaysRunToEnd()
{
- QFxRect rect;
+ QmlGraphicsRect rect;
QmlPropertyAnimation animation;
animation.setTarget(&rect);
animation.setProperty("x");
@@ -86,7 +86,7 @@ void tst_animations::alwaysRunToEnd()
void tst_animations::dotProperty()
{
- QFxRect rect;
+ QmlGraphicsRect rect;
QmlNumberAnimation animation;
animation.setTarget(&rect);
animation.setProperty("border.width");
@@ -141,12 +141,12 @@ void tst_animations::badTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/badtype4.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(1000 + 50);
- QFxRect *myRect = qobject_cast<QFxRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
QVERIFY(myRect);
QCOMPARE(myRect->x(),qreal(200));
}
@@ -158,7 +158,7 @@ void tst_animations::badProperties()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
QTest::ignoreMessage(QtWarningMsg, "QML QmlColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"pen.colr\"");
@@ -174,12 +174,12 @@ void tst_animations::mixedTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/mixedtype1.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(500);
- QFxRect *myRect = qobject_cast<QFxRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
QVERIFY(myRect);
//rather inexact -- is there a better way?
@@ -190,12 +190,12 @@ void tst_animations::mixedTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/mixedtype2.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(500);
- QFxRect *myRect = qobject_cast<QFxRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
QVERIFY(myRect);
//rather inexact -- is there a better way?
diff --git a/tests/auto/declarative/behaviors/tst_behaviors.cpp b/tests/auto/declarative/behaviors/tst_behaviors.cpp
index 7bfadf6..079e2e7 100644
--- a/tests/auto/declarative/behaviors/tst_behaviors.cpp
+++ b/tests/auto/declarative/behaviors/tst_behaviors.cpp
@@ -26,12 +26,12 @@ void tst_behaviors::simpleBehavior()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/simple.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
@@ -39,12 +39,12 @@ void tst_behaviors::scriptTriggered()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/scripttrigger.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setColor(QColor("red"));
QTest::qWait(100);
- qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
@@ -52,10 +52,10 @@ void tst_behaviors::cppTriggered()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/cpptrigger.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
- QFxRect *innerRect = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"));
+ QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"));
QVERIFY(innerRect);
innerRect->setProperty("x", 200);
@@ -68,7 +68,7 @@ void tst_behaviors::loop()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/loop.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
//don't crash
@@ -79,12 +79,12 @@ void tst_behaviors::colorBehavior()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/color.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("red");
QTest::qWait(100);
- QColor color = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->color();
+ QColor color = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->color();
QVERIFY(color != QColor("red") && color != QColor("green")); //i.e. the behavior has been triggered
}
@@ -92,12 +92,12 @@ void tst_behaviors::replaceBinding()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/binding.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- QFxRect *innerRect = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"));
+ QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"));
QVERIFY(innerRect);
qreal x = innerRect->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
@@ -127,24 +127,24 @@ void tst_behaviors::group()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/groupProperty.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/groupProperty2.qml"));
- QFxRect *rect = qobject_cast<QFxRect*>(c.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
}
diff --git a/tests/auto/declarative/layouts/tst_layouts.cpp b/tests/auto/declarative/layouts/tst_layouts.cpp
index d1e6aab..70755ff 100644
--- a/tests/auto/declarative/layouts/tst_layouts.cpp
+++ b/tests/auto/declarative/layouts/tst_layouts.cpp
@@ -4,11 +4,11 @@
#include <qfxrect.h>
#include <qmlexpression.h>
-class tst_QFxLayouts : public QObject
+class tst_QmlGraphicsLayouts : public QObject
{
Q_OBJECT
public:
- tst_QFxLayouts();
+ tst_QmlGraphicsLayouts();
private slots:
void test_horizontal();
@@ -22,24 +22,24 @@ private:
QmlView *createView(const QString &filename);
};
-tst_QFxLayouts::tst_QFxLayouts()
+tst_QmlGraphicsLayouts::tst_QmlGraphicsLayouts()
{
}
-void tst_QFxLayouts::test_horizontal()
+void tst_QmlGraphicsLayouts::test_horizontal()
{
QmlView *canvas = createView(SRCDIR "/data/horizontal.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -50,20 +50,20 @@ void tst_QFxLayouts::test_horizontal()
QCOMPARE(three->y(), 0.0);
}
-void tst_QFxLayouts::test_horizontal_spacing()
+void tst_QmlGraphicsLayouts::test_horizontal_spacing()
{
QmlView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -74,20 +74,20 @@ void tst_QFxLayouts::test_horizontal_spacing()
QCOMPARE(three->y(), 0.0);
}
-void tst_QFxLayouts::test_vertical()
+void tst_QmlGraphicsLayouts::test_vertical()
{
QmlView *canvas = createView(SRCDIR "/data/vertical.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -98,20 +98,20 @@ void tst_QFxLayouts::test_vertical()
QCOMPARE(three->y(), 60.0);
}
-void tst_QFxLayouts::test_vertical_spacing()
+void tst_QmlGraphicsLayouts::test_vertical_spacing()
{
QmlView *canvas = createView(SRCDIR "/data/vertical-spacing.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -122,22 +122,22 @@ void tst_QFxLayouts::test_vertical_spacing()
QCOMPARE(three->y(), 80.0);
}
-void tst_QFxLayouts::test_grid()
+void tst_QmlGraphicsLayouts::test_grid()
{
QmlView *canvas = createView("data/grid.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
- QFxRect *four = canvas->root()->findChild<QFxRect*>("four");
+ QmlGraphicsRect *four = canvas->root()->findChild<QmlGraphicsRect*>("four");
QVERIFY(four != 0);
- QFxRect *five = canvas->root()->findChild<QFxRect*>("five");
+ QmlGraphicsRect *five = canvas->root()->findChild<QmlGraphicsRect*>("five");
QVERIFY(five != 0);
QCOMPARE(one->x(), 0.0);
@@ -152,22 +152,22 @@ void tst_QFxLayouts::test_grid()
QCOMPARE(five->y(), 50.0);
}
-void tst_QFxLayouts::test_grid_spacing()
+void tst_QmlGraphicsLayouts::test_grid_spacing()
{
QmlView *canvas = createView("data/grid-spacing.qml");
canvas->execute();
qApp->processEvents();
- QFxRect *one = canvas->root()->findChild<QFxRect*>("one");
+ QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
QVERIFY(one != 0);
- QFxRect *two = canvas->root()->findChild<QFxRect*>("two");
+ QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
QVERIFY(two != 0);
- QFxRect *three = canvas->root()->findChild<QFxRect*>("three");
+ QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
QVERIFY(three != 0);
- QFxRect *four = canvas->root()->findChild<QFxRect*>("four");
+ QmlGraphicsRect *four = canvas->root()->findChild<QmlGraphicsRect*>("four");
QVERIFY(four != 0);
- QFxRect *five = canvas->root()->findChild<QFxRect*>("five");
+ QmlGraphicsRect *five = canvas->root()->findChild<QmlGraphicsRect*>("five");
QVERIFY(five != 0);
QCOMPARE(one->x(), 0.0);
@@ -182,7 +182,7 @@ void tst_QFxLayouts::test_grid_spacing()
QCOMPARE(five->y(), 54.0);
}
-QmlView *tst_QFxLayouts::createView(const QString &filename)
+QmlView *tst_QmlGraphicsLayouts::createView(const QString &filename)
{
QmlView *canvas = new QmlView(0);
@@ -195,6 +195,6 @@ QmlView *tst_QFxLayouts::createView(const QString &filename)
}
-QTEST_MAIN(tst_QFxLayouts)
+QTEST_MAIN(tst_QmlGraphicsLayouts)
#include "tst_layouts.moc"
diff --git a/tests/auto/declarative/listview/tst_listview.cpp b/tests/auto/declarative/listview/tst_listview.cpp
index 1875836..be65338 100644
--- a/tests/auto/declarative/listview/tst_listview.cpp
+++ b/tests/auto/declarative/listview/tst_listview.cpp
@@ -6,11 +6,11 @@
#include <qmlcontext.h>
#include <qmlexpression.h>
-class tst_QFxListView : public QObject
+class tst_QmlGraphicsListView : public QObject
{
Q_OBJECT
public:
- tst_QFxListView();
+ tst_QmlGraphicsListView();
private slots:
// Test both QListModelInterface and QAbstractItemModel model types
@@ -33,9 +33,9 @@ private:
template <class T> void removed();
QmlView *createView(const QString &filename);
template<typename T>
- T *findItem(QFxItem *parent, const QString &id, int index=-1);
+ T *findItem(QmlGraphicsItem *parent, const QString &id, int index=-1);
template<typename T>
- QList<T*> findItems(QFxItem *parent, const QString &objectName);
+ QList<T*> findItems(QmlGraphicsItem *parent, const QString &objectName);
};
class TestModel : public QListModelInterface
@@ -164,12 +164,12 @@ private:
QList<QPair<QString,QString> > list;
};
-tst_QFxListView::tst_QFxListView()
+tst_QmlGraphicsListView::tst_QmlGraphicsListView()
{
}
template <class T>
-void tst_QFxListView::items()
+void tst_QmlGraphicsListView::items()
{
QmlView *canvas = createView(SRCDIR "/data/listview.qml");
@@ -184,19 +184,19 @@ void tst_QFxListView::items()
canvas->execute();
qApp->processEvents();
- QFxFlickable *listview = findItem<QFxFlickable>(canvas->root(), "list");
+ QmlGraphicsFlickable *listview = findItem<QmlGraphicsFlickable>(canvas->root(), "list");
QVERIFY(listview != 0);
- QFxItem *viewport = listview->viewport();
+ QmlGraphicsItem *viewport = listview->viewport();
QVERIFY(viewport != 0);
QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
for (int i = 0; i < model.count(); ++i) {
- QFxText *name = findItem<QFxText>(viewport, "textName", i);
+ QmlGraphicsText *name = findItem<QmlGraphicsText>(viewport, "textName", i);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(i));
- QFxText *number = findItem<QFxText>(viewport, "textNumber", i);
+ QmlGraphicsText *number = findItem<QmlGraphicsText>(viewport, "textNumber", i);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(i));
}
@@ -205,7 +205,7 @@ void tst_QFxListView::items()
}
template <class T>
-void tst_QFxListView::changed()
+void tst_QmlGraphicsListView::changed()
{
QmlView *canvas = createView(SRCDIR "/data/listview.qml");
@@ -220,17 +220,17 @@ void tst_QFxListView::changed()
canvas->execute();
qApp->processEvents();
- QFxFlickable *listview = findItem<QFxFlickable>(canvas->root(), "list");
+ QmlGraphicsFlickable *listview = findItem<QmlGraphicsFlickable>(canvas->root(), "list");
QVERIFY(listview != 0);
- QFxItem *viewport = listview->viewport();
+ QmlGraphicsItem *viewport = listview->viewport();
QVERIFY(viewport != 0);
model.modifyItem(1, "Will", "9876");
- QFxText *name = findItem<QFxText>(viewport, "textName", 1);
+ QmlGraphicsText *name = findItem<QmlGraphicsText>(viewport, "textName", 1);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(1));
- QFxText *number = findItem<QFxText>(viewport, "textNumber", 1);
+ QmlGraphicsText *number = findItem<QmlGraphicsText>(viewport, "textNumber", 1);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(1));
@@ -238,7 +238,7 @@ void tst_QFxListView::changed()
}
template <class T>
-void tst_QFxListView::inserted()
+void tst_QmlGraphicsListView::inserted()
{
QmlView *canvas = createView(SRCDIR "/data/listview.qml");
@@ -253,10 +253,10 @@ void tst_QFxListView::inserted()
canvas->execute();
qApp->processEvents();
- QFxListView *listview = findItem<QFxListView>(canvas->root(), "list");
+ QmlGraphicsListView *listview = findItem<QmlGraphicsListView>(canvas->root(), "list");
QVERIFY(listview != 0);
- QFxItem *viewport = listview->viewport();
+ QmlGraphicsItem *viewport = listview->viewport();
QVERIFY(viewport != 0);
model.insertItem(1, "Will", "9876");
@@ -266,16 +266,16 @@ void tst_QFxListView::inserted()
QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
- QFxText *name = findItem<QFxText>(viewport, "textName", 1);
+ QmlGraphicsText *name = findItem<QmlGraphicsText>(viewport, "textName", 1);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(1));
- QFxText *number = findItem<QFxText>(viewport, "textNumber", 1);
+ QmlGraphicsText *number = findItem<QmlGraphicsText>(viewport, "textNumber", 1);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(1));
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
QVERIFY(item->y() == i*20);
}
@@ -286,10 +286,10 @@ void tst_QFxListView::inserted()
QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
- name = findItem<QFxText>(viewport, "textName", 0);
+ name = findItem<QmlGraphicsText>(viewport, "textName", 0);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(0));
- number = findItem<QFxText>(viewport, "textNumber", 0);
+ number = findItem<QmlGraphicsText>(viewport, "textNumber", 0);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(0));
@@ -297,7 +297,7 @@ void tst_QFxListView::inserted()
// Confirm items positioned correctly
for (int i = 0; i < model.count(); ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
QVERIFY(item->y() == i*20);
}
@@ -305,7 +305,7 @@ void tst_QFxListView::inserted()
}
template <class T>
-void tst_QFxListView::removed()
+void tst_QmlGraphicsListView::removed()
{
QmlView *canvas = createView(SRCDIR "/data/listview.qml");
@@ -319,10 +319,10 @@ void tst_QFxListView::removed()
canvas->execute();
qApp->processEvents();
- QFxListView *listview = findItem<QFxListView>(canvas->root(), "list");
+ QmlGraphicsListView *listview = findItem<QmlGraphicsListView>(canvas->root(), "list");
QVERIFY(listview != 0);
- QFxItem *viewport = listview->viewport();
+ QmlGraphicsItem *viewport = listview->viewport();
QVERIFY(viewport != 0);
model.removeItem(1);
@@ -330,17 +330,17 @@ void tst_QFxListView::removed()
// let transitions settle.
QTest::qWait(1000);
- QFxText *name = findItem<QFxText>(viewport, "textName", 1);
+ QmlGraphicsText *name = findItem<QmlGraphicsText>(viewport, "textName", 1);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(1));
- QFxText *number = findItem<QFxText>(viewport, "textNumber", 1);
+ QmlGraphicsText *number = findItem<QmlGraphicsText>(viewport, "textNumber", 1);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(1));
// Confirm items positioned correctly
- int itemCount = findItems<QFxItem>(viewport, "wrapper").count();
+ int itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QVERIFY(item);
QVERIFY(item->y() == i*20);
@@ -352,17 +352,17 @@ void tst_QFxListView::removed()
// let transitions settle.
QTest::qWait(1000);
- name = findItem<QFxText>(viewport, "textName", 0);
+ name = findItem<QmlGraphicsText>(viewport, "textName", 0);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(0));
- number = findItem<QFxText>(viewport, "textNumber", 0);
+ number = findItem<QmlGraphicsText>(viewport, "textNumber", 0);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(0));
// Confirm items positioned correctly
- itemCount = findItems<QFxItem>(viewport, "wrapper").count();
+ itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QVERIFY(item);
QCOMPARE(item->y(),i*20.0 + 20.0);
@@ -374,9 +374,9 @@ void tst_QFxListView::removed()
QTest::qWait(1000);
// Confirm items positioned correctly
- itemCount = findItems<QFxItem>(viewport, "wrapper").count();
+ itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QVERIFY(item);
QCOMPARE(item->y(),i*20.0+20.0);
@@ -392,7 +392,7 @@ void tst_QFxListView::removed()
// Confirm items positioned correctly
for (int i = 2; i < 18; ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QVERIFY(item);
QCOMPARE(item->y(),40+i*20.0);
@@ -403,9 +403,9 @@ void tst_QFxListView::removed()
QTest::qWait(1000);
// Confirm items positioned correctly
- itemCount = findItems<QFxItem>(viewport, "wrapper").count();
+ itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count();
for (int i = 0; i < model.count() && i < itemCount; ++i) {
- QFxItem *item = findItem<QFxItem>(viewport, "wrapper", i);
+ QmlGraphicsItem *item = findItem<QmlGraphicsItem>(viewport, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QVERIFY(item);
QCOMPARE(item->y(),40+i*20.0);
@@ -414,47 +414,47 @@ void tst_QFxListView::removed()
delete canvas;
}
-void tst_QFxListView::qListModelInterface_items()
+void tst_QmlGraphicsListView::qListModelInterface_items()
{
items<TestModel>();
}
-void tst_QFxListView::qAbstractItemModel_items()
+void tst_QmlGraphicsListView::qAbstractItemModel_items()
{
items<TestModel2>();
}
-void tst_QFxListView::qListModelInterface_changed()
+void tst_QmlGraphicsListView::qListModelInterface_changed()
{
changed<TestModel>();
}
-void tst_QFxListView::qAbstractItemModel_changed()
+void tst_QmlGraphicsListView::qAbstractItemModel_changed()
{
changed<TestModel2>();
}
-void tst_QFxListView::qListModelInterface_inserted()
+void tst_QmlGraphicsListView::qListModelInterface_inserted()
{
inserted<TestModel>();
}
-void tst_QFxListView::qAbstractItemModel_inserted()
+void tst_QmlGraphicsListView::qAbstractItemModel_inserted()
{
inserted<TestModel2>();
}
-void tst_QFxListView::qListModelInterface_removed()
+void tst_QmlGraphicsListView::qListModelInterface_removed()
{
removed<TestModel>();
}
-void tst_QFxListView::qAbstractItemModel_removed()
+void tst_QmlGraphicsListView::qAbstractItemModel_removed()
{
removed<TestModel2>();
}
-QmlView *tst_QFxListView::createView(const QString &filename)
+QmlView *tst_QmlGraphicsListView::createView(const QString &filename)
{
QmlView *canvas = new QmlView(0);
canvas->setFixedSize(240,320);
@@ -472,12 +472,12 @@ QmlView *tst_QFxListView::createView(const QString &filename)
item must also evaluate the {index} expression equal to index
*/
template<typename T>
-T *tst_QFxListView::findItem(QFxItem *parent, const QString &objectName, int index)
+T *tst_QmlGraphicsListView::findItem(QmlGraphicsItem *parent, const QString &objectName, int index)
{
const QMetaObject &mo = T::staticMetaObject;
//qDebug() << parent->QGraphicsObject::children().count() << "children";
for (int i = 0; i < parent->QGraphicsObject::children().count(); ++i) {
- QFxItem *item = qobject_cast<QFxItem*>(parent->QGraphicsObject::children().at(i));
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(parent->QGraphicsObject::children().at(i));
if(!item)
continue;
//qDebug() << "try" << item;
@@ -500,13 +500,13 @@ T *tst_QFxListView::findItem(QFxItem *parent, const QString &objectName, int ind
}
template<typename T>
-QList<T*> tst_QFxListView::findItems(QFxItem *parent, const QString &objectName)
+QList<T*> tst_QmlGraphicsListView::findItems(QmlGraphicsItem *parent, const QString &objectName)
{
QList<T*> items;
const QMetaObject &mo = T::staticMetaObject;
//qDebug() << parent->QGraphicsObject::children().count() << "children";
for (int i = 0; i < parent->QGraphicsObject::children().count(); ++i) {
- QFxItem *item = qobject_cast<QFxItem*>(parent->QGraphicsObject::children().at(i));
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(parent->QGraphicsObject::children().at(i));
if(!item)
continue;
//qDebug() << "try" << item;
@@ -519,6 +519,6 @@ QList<T*> tst_QFxListView::findItems(QFxItem *parent, const QString &objectName)
}
-QTEST_MAIN(tst_QFxListView)
+QTEST_MAIN(tst_QmlGraphicsListView)
#include "tst_listview.moc"
diff --git a/tests/auto/declarative/pathview/tst_pathview.cpp b/tests/auto/declarative/pathview/tst_pathview.cpp
index 6e670bf..d5b922a 100644
--- a/tests/auto/declarative/pathview/tst_pathview.cpp
+++ b/tests/auto/declarative/pathview/tst_pathview.cpp
@@ -7,11 +7,11 @@
#include <qmlcontext.h>
#include <qmlexpression.h>
-class tst_QFxPathView : public QObject
+class tst_QmlGraphicsPathView : public QObject
{
Q_OBJECT
public:
- tst_QFxPathView();
+ tst_QmlGraphicsPathView();
private slots:
void items();
@@ -21,7 +21,7 @@ private slots:
private:
QmlView *createView(const QString &filename);
template<typename T>
- T *findItem(QFxItem *parent, const QString &id, int index=-1);
+ T *findItem(QmlGraphicsItem *parent, const QString &id, int index=-1);
};
class TestModel : public QListModelInterface
@@ -95,11 +95,11 @@ private:
QList<QPair<QString,QString> > list;
};
-tst_QFxPathView::tst_QFxPathView()
+tst_QmlGraphicsPathView::tst_QmlGraphicsPathView()
{
}
-void tst_QFxPathView::items()
+void tst_QmlGraphicsPathView::items()
{
QmlView *canvas = createView(SRCDIR "/data/pathview.qml");
@@ -114,16 +114,16 @@ void tst_QFxPathView::items()
canvas->execute();
qApp->processEvents();
- QFxPathView *pathview = findItem<QFxPathView>(canvas->root(), "view");
+ QmlGraphicsPathView *pathview = findItem<QmlGraphicsPathView>(canvas->root(), "view");
QVERIFY(pathview != 0);
QCOMPARE(pathview->childItems().count(), model.count()); // assumes all are visible
for (int i = 0; i < model.count(); ++i) {
- QFxText *name = findItem<QFxText>(pathview, "textName", i);
+ QmlGraphicsText *name = findItem<QmlGraphicsText>(pathview, "textName", i);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(i));
- QFxText *number = findItem<QFxText>(pathview, "textNumber", i);
+ QmlGraphicsText *number = findItem<QmlGraphicsText>(pathview, "textNumber", i);
QVERIFY(number != 0);
QCOMPARE(number->text(), model.number(i));
}
@@ -131,7 +131,7 @@ void tst_QFxPathView::items()
delete canvas;
}
-void tst_QFxPathView::pathMoved()
+void tst_QmlGraphicsPathView::pathMoved()
{
QmlView *canvas = createView(SRCDIR "/data/pathview.qml");
@@ -147,12 +147,12 @@ void tst_QFxPathView::pathMoved()
canvas->execute();
qApp->processEvents();
- QFxPathView *pathview = findItem<QFxPathView>(canvas->root(), "view");
+ QmlGraphicsPathView *pathview = findItem<QmlGraphicsPathView>(canvas->root(), "view");
QVERIFY(pathview != 0);
- QFxRect *firstItem = findItem<QFxRect>(pathview, "wrapper", 0);
+ QmlGraphicsRect *firstItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 0);
QVERIFY(firstItem);
- QFxPath *path = qobject_cast<QFxPath*>(pathview->path());
+ QmlGraphicsPath *path = qobject_cast<QmlGraphicsPath*>(pathview->path());
QVERIFY(path);
QPointF start = path->pointAt(0.0);
QPointF offset;//Center of item is at point, but pos is from corner
@@ -163,7 +163,7 @@ void tst_QFxPathView::pathMoved()
QTest::qWait(1000);//Moving is animated?
for(int i=0; i<model.count(); i++){
- QFxRect *curItem = findItem<QFxRect>(pathview, "wrapper", i);
+ QmlGraphicsRect *curItem = findItem<QmlGraphicsRect>(pathview, "wrapper", i);
QCOMPARE(curItem->pos() + offset, path->pointAt(0.1 + i*0.25));
}
@@ -174,7 +174,7 @@ void tst_QFxPathView::pathMoved()
delete canvas;
}
-void tst_QFxPathView::limitedItems()
+void tst_QmlGraphicsPathView::limitedItems()
{
QmlView *canvas = createView(SRCDIR "/data/pathview.qml");
@@ -188,32 +188,32 @@ void tst_QFxPathView::limitedItems()
canvas->execute();
qApp->processEvents();
- QFxPathView *pathview = findItem<QFxPathView>(canvas->root(), "view");
+ QmlGraphicsPathView *pathview = findItem<QmlGraphicsPathView>(canvas->root(), "view");
QVERIFY(pathview != 0);
pathview->setPathItemCount(10);
QCOMPARE(pathview->pathItemCount(), 10);
- QFxRect *testItem = findItem<QFxRect>(pathview, "wrapper", 0);
+ QmlGraphicsRect *testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 0);
QVERIFY(testItem != 0);
- testItem = findItem<QFxRect>(pathview, "wrapper", 9);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 9);
QVERIFY(testItem != 0);
- testItem = findItem<QFxRect>(pathview, "wrapper", 10);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 10);
QVERIFY(testItem == 0);
pathview->setCurrentIndex(50);
QTest::qWait(5100);//Moving is animated and it's travelling far - should be reconsidered.
- testItem = findItem<QFxRect>(pathview, "wrapper", 0);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 0);
QVERIFY(testItem == 0);
- testItem = findItem<QFxRect>(pathview, "wrapper", 1);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 1);
QVERIFY(testItem == 0);
- testItem = findItem<QFxRect>(pathview, "wrapper", 9);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 9);
QVERIFY(testItem == 0);
- testItem = findItem<QFxRect>(pathview, "wrapper", 50);
+ testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 50);
QVERIFY(testItem != 0);
}
-QmlView *tst_QFxPathView::createView(const QString &filename)
+QmlView *tst_QmlGraphicsPathView::createView(const QString &filename)
{
QmlView *canvas = new QmlView(0);
canvas->setFixedSize(240,320);
@@ -231,11 +231,11 @@ QmlView *tst_QFxPathView::createView(const QString &filename)
item must also evaluate the {index} expression equal to index
*/
template<typename T>
-T *tst_QFxPathView::findItem(QFxItem *parent, const QString &objectName, int index)
+T *tst_QmlGraphicsPathView::findItem(QmlGraphicsItem *parent, const QString &objectName, int index)
{
const QMetaObject &mo = T::staticMetaObject;
for (int i = 0; i < parent->children().count(); ++i) {
- QFxItem *item = qobject_cast<QFxItem*>(parent->children().at(i));
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(parent->children().at(i));
if(!item)
continue;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
@@ -256,6 +256,6 @@ T *tst_QFxPathView::findItem(QFxItem *parent, const QString &objectName, int ind
return 0;
}
-QTEST_MAIN(tst_QFxPathView)
+QTEST_MAIN(tst_QmlGraphicsPathView)
#include "tst_pathview.moc"
diff --git a/tests/auto/declarative/qfxloader/tst_qfxloader.cpp b/tests/auto/declarative/qfxloader/tst_qfxloader.cpp
index 2109898..99fecc3 100644
--- a/tests/auto/declarative/qfxloader/tst_qfxloader.cpp
+++ b/tests/auto/declarative/qfxloader/tst_qfxloader.cpp
@@ -41,7 +41,7 @@ tst_qfxloader::tst_qfxloader()
void tst_qfxloader::url()
{
QmlComponent component(&engine, QByteArray("import Qt 4.6\nLoader { source: \"Rect120x60.qml\" }"), QUrl("file://" SRCDIR "/"));
- QFxLoader *loader = qobject_cast<QFxLoader*>(component.create());
+ QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item());
QCOMPARE(loader->progress(), 1.0);
@@ -51,10 +51,10 @@ void tst_qfxloader::url()
void tst_qfxloader::component()
{
QmlComponent component(&engine, QUrl("file://" SRCDIR "/SetSourceComponent.qml"));
- QFxItem *item = qobject_cast<QFxItem*>(component.create());
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(component.create());
QVERIFY(item);
- QFxLoader *loader = qobject_cast<QFxLoader*>(item->QGraphicsObject::children().at(1));
+ QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(item->QGraphicsObject::children().at(1));
QVERIFY(loader);
QVERIFY(loader->item());
QCOMPARE(loader->progress(), 1.0);
@@ -64,7 +64,7 @@ void tst_qfxloader::component()
void tst_qfxloader::sizeLoaderToItem()
{
QmlComponent component(&engine, QUrl("file://" SRCDIR "/SizeToItem.qml"));
- QFxLoader *loader = qobject_cast<QFxLoader*>(component.create());
+ QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(component.create());
QVERIFY(loader != 0);
QCOMPARE(loader->width(), 120.0);
QCOMPARE(loader->height(), 60.0);
@@ -73,12 +73,12 @@ void tst_qfxloader::sizeLoaderToItem()
void tst_qfxloader::sizeItemToLoader()
{
QmlComponent component(&engine, QUrl("file://" SRCDIR "/SizeToLoader.qml"));
- QFxLoader *loader = qobject_cast<QFxLoader*>(component.create());
+ QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(component.create());
QVERIFY(loader != 0);
QCOMPARE(loader->width(), 200.0);
QCOMPARE(loader->height(), 80.0);
- QFxItem *rect = loader->item();
+ QmlGraphicsItem *rect = loader->item();
QVERIFY(rect);
QCOMPARE(rect->width(), 200.0);
QCOMPARE(rect->height(), 80.0);
@@ -87,12 +87,12 @@ void tst_qfxloader::sizeItemToLoader()
void tst_qfxloader::noResize()
{
QmlComponent component(&engine, QUrl("file://" SRCDIR "/NoResize.qml"));
- QFxLoader *loader = qobject_cast<QFxLoader*>(component.create());
+ QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(component.create());
QVERIFY(loader != 0);
QCOMPARE(loader->width(), 200.0);
QCOMPARE(loader->height(), 80.0);
- QFxItem *rect = loader->item();
+ QmlGraphicsItem *rect = loader->item();
QVERIFY(rect);
QCOMPARE(rect->width(), 120.0);
QCOMPARE(rect->height(), 60.0);
diff --git a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
index 5e24831..e735066 100644
--- a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
+++ b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
@@ -59,7 +59,7 @@ static const bool localfile_optimized = false;
void tst_qfxpixmapcache::single_data()
{
- // Note, since QFxPixmapCache is shared, tests affect each other!
+ // Note, since QmlGraphicsPixmapCache is shared, tests affect each other!
// so use different files fore all test functions.
QTest::addColumn<QUrl>("target");
@@ -90,7 +90,7 @@ void tst_qfxpixmapcache::single()
QPixmap pixmap;
QVERIFY(pixmap.width() <= 0); // Check Qt assumption
- QNetworkReply *reply= QFxPixmapCache::get(&engine, target, &pixmap);
+ QNetworkReply *reply= QmlGraphicsPixmapCache::get(&engine, target, &pixmap);
if (incache) {
QVERIFY(!reply);
@@ -108,20 +108,20 @@ void tst_qfxpixmapcache::single()
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(getter.gotslot);
if (exists) {
- QVERIFY(QFxPixmapCache::find(target, &pixmap));
+ QVERIFY(QmlGraphicsPixmapCache::find(target, &pixmap));
QVERIFY(pixmap.width() > 0);
} else {
- QVERIFY(!QFxPixmapCache::find(target, &pixmap));
+ QVERIFY(!QmlGraphicsPixmapCache::find(target, &pixmap));
QVERIFY(pixmap.width() <= 0);
}
}
- QCOMPARE(QFxPixmapCache::pendingRequests(), 0);
+ QCOMPARE(QmlGraphicsPixmapCache::pendingRequests(), 0);
}
void tst_qfxpixmapcache::parallel_data()
{
- // Note, since QFxPixmapCache is shared, tests affect each other!
+ // Note, since QmlGraphicsPixmapCache is shared, tests affect each other!
// so use different files fore all test functions.
QTest::addColumn<QUrl>("target1");
@@ -187,7 +187,7 @@ void tst_qfxpixmapcache::parallel()
for (int i=0; i<targets.count(); ++i) {
QUrl target = targets.at(i);
QPixmap pixmap;
- QNetworkReply *reply = QFxPixmapCache::get(&engine, target, &pixmap);
+ QNetworkReply *reply = QmlGraphicsPixmapCache::get(&engine, target, &pixmap);
replies.append(reply);
if (!reply) {
QVERIFY(pixmap.width() > 0);
@@ -200,10 +200,10 @@ void tst_qfxpixmapcache::parallel()
}
QCOMPARE(incache+slotters, targets.count());
- QCOMPARE(QFxPixmapCache::pendingRequests(), requests);
+ QCOMPARE(QmlGraphicsPixmapCache::pendingRequests(), requests);
if (cancel >= 0) {
- QFxPixmapCache::cancelGet(targets.at(cancel), getters[cancel]);
+ QmlGraphicsPixmapCache::cancelGet(targets.at(cancel), getters[cancel]);
slotters--;
}
@@ -220,14 +220,14 @@ void tst_qfxpixmapcache::parallel()
} else {
QVERIFY(getters[i]->gotslot);
QPixmap pixmap;
- QVERIFY(QFxPixmapCache::find(targets[i], &pixmap));
+ QVERIFY(QmlGraphicsPixmapCache::find(targets[i], &pixmap));
QVERIFY(pixmap.width() > 0);
}
delete getters[i];
}
}
- QCOMPARE(QFxPixmapCache::pendingRequests(), 0);
+ QCOMPARE(QmlGraphicsPixmapCache::pendingRequests(), 0);
}
QTEST_MAIN(tst_qfxpixmapcache)
diff --git a/tests/auto/declarative/qfxtext/tst_qfxtext.cpp b/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
index cae85a4..12cac68 100644
--- a/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
+++ b/tests/auto/declarative/qfxtext/tst_qfxtext.cpp
@@ -36,7 +36,7 @@ private:
QList<Qt::Alignment> horizontalAlignmentments;
QStringList styleStrings;
- QList<QFxText::TextStyle> styles;
+ QList<QmlGraphicsText::TextStyle> styles;
QStringList colorStrings;
@@ -72,10 +72,10 @@ tst_qfxtext::tst_qfxtext()
<< "Raised"
<< "Sunken";
- styles << QFxText::Normal
- << QFxText::Outline
- << QFxText::Raised
- << QFxText::Sunken;
+ styles << QmlGraphicsText::Normal
+ << QmlGraphicsText::Outline
+ << QmlGraphicsText::Raised
+ << QmlGraphicsText::Sunken;
colorStrings << "aliceblue"
<< "antiquewhite"
@@ -100,7 +100,7 @@ void tst_qfxtext::text()
{
{
QmlComponent textComponent(&engine, "import Qt 4.6\nText { text: \"\" }", QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QVERIFY(textObject != 0);
QCOMPARE(textObject->text(), QString(""));
@@ -110,7 +110,7 @@ void tst_qfxtext::text()
{
QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QVERIFY(textObject != 0);
QCOMPARE(textObject->text(), standard.at(i));
@@ -120,7 +120,7 @@ void tst_qfxtext::text()
{
QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QVERIFY(textObject != 0);
QString expected = richText.at(i);
@@ -133,7 +133,7 @@ void tst_qfxtext::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QmlComponent textComponent(&engine, "import Qt 4.6\nText { text: \"\" }", QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 0.);
}
@@ -146,7 +146,7 @@ void tst_qfxtext::width()
QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), qreal(metricWidth));
}
@@ -161,7 +161,7 @@ void tst_qfxtext::width()
QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), qreal(documentWidth));
}
@@ -174,7 +174,7 @@ void tst_qfxtext::wrap()
// for specified width and wrap set true
{
QmlComponent textComponent(&engine, "import Qt 4.6\nText { text: \"\"; wrap: true; width: 300 }", QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -183,7 +183,7 @@ void tst_qfxtext::wrap()
{
QString componentStr = "import Qt 4.6\nText { wrap: true; width: 300; text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -192,7 +192,7 @@ void tst_qfxtext::wrap()
{
QString componentStr = "import Qt 4.6\nText { wrap: true; width: 300; text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -209,7 +209,7 @@ void tst_qfxtext::elide()
{
QmlComponent textComponent(&engine, ("import Qt 4.6\nText { text: \"\"; "+elide+" width: 300 }").toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -218,7 +218,7 @@ void tst_qfxtext::elide()
{
QString componentStr = "import Qt 4.6\nText { "+elide+" width: 300; text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -228,7 +228,7 @@ void tst_qfxtext::elide()
{
QString componentStr = "import Qt 4.6\nText { "+elide+" width: 300; text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->width(), 300.);
}
@@ -246,7 +246,7 @@ void tst_qfxtext::horizontalAlignment()
{
QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE((int)textObject->hAlign(), (int)horizontalAlignmentments.at(j));
}
@@ -258,7 +258,7 @@ void tst_qfxtext::horizontalAlignment()
{
QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE((int)textObject->hAlign(), (int)horizontalAlignmentments.at(j));
}
@@ -276,7 +276,7 @@ void tst_qfxtext::verticalAlignment()
{
QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE((int)textObject->vAlign(), (int)verticalAlignmentments.at(j));
}
@@ -288,7 +288,7 @@ void tst_qfxtext::verticalAlignment()
{
QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE((int)textObject->vAlign(), (int)verticalAlignmentments.at(j));
}
@@ -302,7 +302,7 @@ void tst_qfxtext::font()
{
QString componentStr = "import Qt 4.6\nText { font.pointSize: 40; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->font().pointSize(), 40);
QCOMPARE(textObject->font().bold(), false);
@@ -312,7 +312,7 @@ void tst_qfxtext::font()
{
QString componentStr = "import Qt 4.6\nText { font.bold: true; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->font().bold(), true);
QCOMPARE(textObject->font().italic(), false);
@@ -321,7 +321,7 @@ void tst_qfxtext::font()
{
QString componentStr = "import Qt 4.6\nText { font.italic: true; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->font().italic(), true);
QCOMPARE(textObject->font().bold(), false);
@@ -330,7 +330,7 @@ void tst_qfxtext::font()
{
QString componentStr = "import Qt 4.6\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->font().family(), QString("Helvetica"));
QCOMPARE(textObject->font().bold(), false);
@@ -340,7 +340,7 @@ void tst_qfxtext::font()
{
QString componentStr = "import Qt 4.6\nText { font.family: \"\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->font().family(), QString(""));
}
@@ -353,7 +353,7 @@ void tst_qfxtext::style()
{
QString componentStr = "import Qt 4.6\nText { style: \"" + styleStrings.at(i) + "\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE((int)textObject->style(), (int)styles.at(i));
QCOMPARE(textObject->styleColor(), QColor());
@@ -367,7 +367,7 @@ void tst_qfxtext::color()
{
QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->color(), QColor(colorStrings.at(i)));
QCOMPARE(textObject->styleColor(), QColor());
@@ -377,7 +377,7 @@ void tst_qfxtext::color()
{
QString componentStr = "import Qt 4.6\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->styleColor(), QColor(colorStrings.at(i)));
// default color to black?
@@ -390,7 +390,7 @@ void tst_qfxtext::color()
{
QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->color(), QColor(colorStrings.at(i)));
QCOMPARE(textObject->styleColor(), QColor(colorStrings.at(j)));
@@ -403,7 +403,7 @@ void tst_qfxtext::color()
QString componentStr = "import Qt 4.6\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
- QFxText *textObject = qobject_cast<QFxText*>(textComponent.create());
+ QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
QCOMPARE(textObject->color(), testColor);
}
diff --git a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
index f78e564..0565fd4 100644
--- a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
+++ b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp
@@ -97,7 +97,7 @@ void tst_qfxtextedit::text()
{
{
QmlComponent texteditComponent(&engine, "import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->text(), QString(""));
@@ -107,7 +107,7 @@ void tst_qfxtextedit::text()
{
QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->text(), standard.at(i));
@@ -117,7 +117,7 @@ void tst_qfxtextedit::text()
{
QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QString actual = textEditObject->text();
@@ -134,7 +134,7 @@ void tst_qfxtextedit::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QmlComponent texteditComponent(&engine, "import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), 1.);//+1 for cursor
@@ -148,7 +148,7 @@ void tst_qfxtextedit::width()
QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), qreal(metricWidth + 1 + 3));//+3 is the current way of accounting for space between cursor and last character.
@@ -164,7 +164,7 @@ void tst_qfxtextedit::width()
QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), qreal(documentWidth + 1 + 3));
@@ -176,7 +176,7 @@ void tst_qfxtextedit::wrap()
// for specified width and wrap set true
{
QmlComponent texteditComponent(&engine, "import Qt 4.6\nTextEdit { text: \"\"; wrap: true; width: 300 }", QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), 300.);
@@ -186,7 +186,7 @@ void tst_qfxtextedit::wrap()
{
QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + standard.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), 300.);
@@ -196,7 +196,7 @@ void tst_qfxtextedit::wrap()
{
QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + richText.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->width(), 300.);
@@ -215,7 +215,7 @@ void tst_qfxtextedit::hAlign()
{
QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE((int)textEditObject->hAlign(), (int)hAlignments.at(j));
@@ -228,7 +228,7 @@ void tst_qfxtextedit::hAlign()
{
QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE((int)textEditObject->hAlign(), (int)hAlignments.at(j));
@@ -247,7 +247,7 @@ void tst_qfxtextedit::vAlign()
{
QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE((int)textEditObject->vAlign(), (int)vAlignments.at(j));
@@ -260,7 +260,7 @@ void tst_qfxtextedit::vAlign()
{
QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE((int)textEditObject->vAlign(), (int)vAlignments.at(j));
@@ -275,7 +275,7 @@ void tst_qfxtextedit::font()
{
QString componentStr = "import Qt 4.6\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->font().pointSize(), 40);
@@ -286,7 +286,7 @@ void tst_qfxtextedit::font()
{
QString componentStr = "import Qt 4.6\nTextEdit { font.bold: true; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->font().bold(), true);
@@ -296,7 +296,7 @@ void tst_qfxtextedit::font()
{
QString componentStr = "import Qt 4.6\nTextEdit { font.italic: true; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->font().italic(), true);
@@ -306,7 +306,7 @@ void tst_qfxtextedit::font()
{
QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->font().family(), QString("Helvetica"));
@@ -317,7 +317,7 @@ void tst_qfxtextedit::font()
{
QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->font().family(), QString(""));
@@ -331,7 +331,7 @@ void tst_qfxtextedit::color()
{
QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
//qDebug() << "textEditObject: " << textEditObject->color() << "vs. " << QColor(colorStrings.at(i));
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->color(), QColor(colorStrings.at(i)));
@@ -344,7 +344,7 @@ void tst_qfxtextedit::color()
QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
QCOMPARE(textEditObject->color(), testColor);
@@ -356,7 +356,7 @@ void tst_qfxtextedit::selection()
QString testStr = standard[0];//TODO: What should happen for multiline/rich text?
QString componentStr = "import Qt 4.6\nTextEdit { text: \""+ testStr +"\"; }";
QmlComponent texteditComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create());
+ QmlGraphicsTextEdit *textEditObject = qobject_cast<QmlGraphicsTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -437,12 +437,12 @@ void tst_qfxtextedit::cursorDelegate()
view->execute();
view->show();
view->setFocus();
- QFxTextEdit *textEditObject = view->root()->findChild<QFxTextEdit*>("textEditObject");
+ QmlGraphicsTextEdit *textEditObject = view->root()->findChild<QmlGraphicsTextEdit*>("textEditObject");
QVERIFY(textEditObject != 0);
- QVERIFY(textEditObject->findChild<QFxItem*>("cursorInstance"));
+ QVERIFY(textEditObject->findChild<QmlGraphicsItem*>("cursorInstance"));
//Test Delegate gets created
textEditObject->setFocus(true);
- QFxItem* delegateObject = textEditObject->findChild<QFxItem*>("cursorInstance");
+ QmlGraphicsItem* delegateObject = textEditObject->findChild<QmlGraphicsItem*>("cursorInstance");
QVERIFY(delegateObject);
//Test Delegate gets moved
for(int i=0; i<= textEditObject->text().length(); i++){
@@ -455,7 +455,7 @@ void tst_qfxtextedit::cursorDelegate()
QCOMPARE(textEditObject->cursorRect().y(), qRound(delegateObject->y()));
//Test Delegate gets deleted
textEditObject->setCursorDelegate(0);
- QVERIFY(!textEditObject->findChild<QFxItem*>("cursorInstance"));
+ QVERIFY(!textEditObject->findChild<QmlGraphicsItem*>("cursorInstance"));
}
/*
@@ -471,7 +471,7 @@ void tst_qfxtextedit::navigation()
QVERIFY(canvas->root() != 0);
- QFxItem *input = qobject_cast<QFxItem *>(qvariant_cast<QObject *>(canvas->root()->property("myInput")));
+ QmlGraphicsItem *input = qobject_cast<QmlGraphicsItem *>(qvariant_cast<QObject *>(canvas->root()->property("myInput")));
QVERIFY(input != 0);
QTRY_VERIFY(input->hasFocus() == true);
diff --git a/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp b/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp
index 069574c..e4930f6 100644
--- a/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp
+++ b/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp
@@ -3,7 +3,7 @@
#include <QtDeclarative/qmlengine.h>
#include <QFile>
#include <QtDeclarative/qmlview.h>
-#include <QFxTextInput>
+#include <QmlGraphicsTextInput>
#include <QDebug>
class tst_qfxtextinput : public QObject
@@ -60,7 +60,7 @@ void tst_qfxtextinput::text()
{
{
QmlComponent textinputComponent(&engine, "import Qt 4.6\nTextInput { text: \"\" }", QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->text(), QString(""));
@@ -70,7 +70,7 @@ void tst_qfxtextinput::text()
{
QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->text(), standard.at(i));
@@ -83,7 +83,7 @@ void tst_qfxtextinput::width()
// uses Font metrics to find the width for standard
{
QmlComponent textinputComponent(&engine, "import Qt 4.6\nTextInput { text: \"\" }", QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->width(), 1.);//1 for the cursor
@@ -97,7 +97,7 @@ void tst_qfxtextinput::width()
QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->width(), qreal(metricWidth) + 1.);//1 for the cursor
@@ -110,7 +110,7 @@ void tst_qfxtextinput::font()
{
QString componentStr = "import Qt 4.6\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().pointSize(), 40);
@@ -121,7 +121,7 @@ void tst_qfxtextinput::font()
{
QString componentStr = "import Qt 4.6\nTextInput { font.bold: true; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().bold(), true);
@@ -131,7 +131,7 @@ void tst_qfxtextinput::font()
{
QString componentStr = "import Qt 4.6\nTextInput { font.italic: true; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().italic(), true);
@@ -141,7 +141,7 @@ void tst_qfxtextinput::font()
{
QString componentStr = "import Qt 4.6\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().family(), QString("Helvetica"));
@@ -152,7 +152,7 @@ void tst_qfxtextinput::font()
{
QString componentStr = "import Qt 4.6\nTextInput { font.family: \"\"; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->font().family(), QString(""));
@@ -166,7 +166,7 @@ void tst_qfxtextinput::color()
{
QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
//qDebug() << "textinputObject: " << textinputObject->color() << "vs. " << QColor(colorStrings.at(i));
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->color(), QColor(colorStrings.at(i)));
@@ -179,7 +179,7 @@ void tst_qfxtextinput::color()
QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QCOMPARE(textinputObject->color(), testColor);
@@ -191,7 +191,7 @@ void tst_qfxtextinput::selection()
QString testStr = standard[0];
QString componentStr = "import Qt 4.6\nTextInput { text: \""+ testStr +"\"; }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
@@ -270,7 +270,7 @@ void tst_qfxtextinput::maxLength()
{
QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
QVERIFY(textinputObject->text().isEmpty());
foreach(const QString &str, standard){
@@ -285,7 +285,7 @@ void tst_qfxtextinput::masks()
{
QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
//TODO: Me
@@ -295,7 +295,7 @@ void tst_qfxtextinput::validators()
{
QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
QmlComponent textinputComponent(&engine, componentStr.toLatin1(), QUrl());
- QFxTextInput *textinputObject = qobject_cast<QFxTextInput*>(textinputComponent.create());
+ QmlGraphicsTextInput *textinputObject = qobject_cast<QmlGraphicsTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
//TODO: Me
@@ -314,7 +314,7 @@ void tst_qfxtextinput::navigation()
QVERIFY(canvas->root() != 0);
- QFxItem *input = qobject_cast<QFxItem *>(qvariant_cast<QObject *>(canvas->root()->property("myInput")));
+ QmlGraphicsItem *input = qobject_cast<QmlGraphicsItem *>(qvariant_cast<QObject *>(canvas->root()->property("myInput")));
QVERIFY(input != 0);
QTRY_VERIFY(input->hasFocus() == true);
@@ -334,12 +334,12 @@ void tst_qfxtextinput::cursorDelegate()
view->execute();
view->show();
view->setFocus();
- QFxTextInput *textInputObject = view->root()->findChild<QFxTextInput*>("textInputObject");
+ QmlGraphicsTextInput *textInputObject = view->root()->findChild<QmlGraphicsTextInput*>("textInputObject");
QVERIFY(textInputObject != 0);
- QVERIFY(textInputObject->findChild<QFxItem*>("cursorInstance"));
+ QVERIFY(textInputObject->findChild<QmlGraphicsItem*>("cursorInstance"));
//Test Delegate gets created
textInputObject->setFocus(true);
- QFxItem* delegateObject = textInputObject->findChild<QFxItem*>("cursorInstance");
+ QmlGraphicsItem* delegateObject = textInputObject->findChild<QmlGraphicsItem*>("cursorInstance");
QVERIFY(delegateObject);
//Test Delegate gets moved
for(int i=0; i<= textInputObject->text().length(); i++){
@@ -353,7 +353,7 @@ void tst_qfxtextinput::cursorDelegate()
QCOMPARE(textInputObject->cursorRect().y(), qRound(delegateObject->y()));
//Test Delegate gets deleted
textInputObject->setCursorDelegate(0);
- QVERIFY(!textInputObject->findChild<QFxItem*>("cursorInstance"));
+ QVERIFY(!textInputObject->findChild<QmlGraphicsItem*>("cursorInstance"));
}
void tst_qfxtextinput::simulateKey(QmlView *view, int key)
diff --git a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
index dc124ce..6e3336c 100644
--- a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
+++ b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
@@ -68,7 +68,7 @@ void tst_qfxwebview::testBasicProperties()
checkNoErrors(component);
QWebSettings::enablePersistentStorage(tmpDir());
- QFxWebView *wv = qobject_cast<QFxWebView*>(component.create());
+ QmlGraphicsWebView *wv = qobject_cast<QmlGraphicsWebView*>(component.create());
QVERIFY(wv != 0);
QTRY_COMPARE(wv->progress(), 1.0);
QCOMPARE(wv->title(),QString("Basic"));
@@ -87,7 +87,7 @@ void tst_qfxwebview::testBasicProperties()
QCOMPARE(wv->preferredWidth(), 0);
QCOMPARE(wv->zoomFactor(), 1.0);
QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
- QCOMPARE(wv->status(), QFxWebView::Ready);
+ QCOMPARE(wv->status(), QmlGraphicsWebView::Ready);
QVERIFY(wv->reloadAction());
QVERIFY(wv->reloadAction()->isEnabled());
QVERIFY(wv->backAction());
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index 6494c40..e2a4142 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -947,11 +947,11 @@ void tst_qmllanguage::importsLocal_data()
QTest::newRow("local import")
<< "import \"subdir\"\n" // QT-613
"Test {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("local import as")
<< "import \"subdir\" as T\n"
"T.Test {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("wrong local import as")
<< "import \"subdir\" as T\n"
"Test {}"
@@ -979,9 +979,9 @@ void tst_qmllanguage::importsRemote_data()
+ QtNetworkSettings::serverName()
+ "/qtest/declarative/qmllanguage";
- QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QFxRect";
- QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QFxText";
- QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QFxImage";
+ QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QmlGraphicsRect";
+ QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QmlGraphicsText";
+ QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QmlGraphicsImage";
}
void tst_qmllanguage::importsRemote()
@@ -1002,11 +1002,11 @@ void tst_qmllanguage::importsInstalled_data()
QTest::newRow("installed import 1")
<< "import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("installed import 2")
<< "import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QFxText";
+ << "QmlGraphicsText";
QTest::newRow("installed import visibility") // QT-614
<< "import com.nokia.installedtest 1.4\n"
"PrivateType {}"
@@ -1030,36 +1030,36 @@ void tst_qmllanguage::importsOrder_data()
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QFxText";
+ << "QmlGraphicsText";
QTest::newRow("installed import overrides 2") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("installed import re-overrides 1") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
- << "QFxText";
+ << "QmlGraphicsText";
QTest::newRow("installed import re-overrides 2") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("installed import versus builtin 1") <<
"import com.nokia.installedtest 1.5\n"
"import Qt 4.6\n"
"Rectangle {}"
- << "QFxRect";
+ << "QmlGraphicsRect";
QTest::newRow("installed import versus builtin 2") <<
"import Qt 4.6\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle {}"
- << "QFxText";
+ << "QmlGraphicsText";
QTest::newRow("namespaces cannot be overridden by types 1") <<
"import Qt 4.6 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
@@ -1069,7 +1069,7 @@ void tst_qmllanguage::importsOrder_data()
"import Qt 4.6 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle.Image {}"
- << "QFxImage";
+ << "QmlGraphicsImage";
}
void tst_qmllanguage::importsOrder()
diff --git a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
index 7d3cc43..d11771c 100644
--- a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
+++ b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
@@ -79,7 +79,7 @@ void tst_QmlPropertyMap::changed()
QmlComponent component(&engine, "import Qt 4.6\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
QUrl("file://"));
QVERIFY(component.isReady());
- QFxText *txt = qobject_cast<QFxText*>(component.create());
+ QmlGraphicsText *txt = qobject_cast<QmlGraphicsText*>(component.create());
QVERIFY(txt);
QCOMPARE(txt->text(), QString('X'));
QCOMPARE(spy.count(), 1);
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"
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index 0ebdccd..e938ee4 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -157,7 +157,7 @@ void tst_sql::testQml()
engine->setOfflineStoragePath(dbDir());
QmlComponent component(engine, qml.toUtf8(), QUrl::fromLocalFile(SRCDIR "/empty.qml")); // just a file for relative local imports
- QFxText *text = qobject_cast<QFxText*>(component.create());
+ QmlGraphicsText *text = qobject_cast<QmlGraphicsText*>(component.create());
QVERIFY(text != 0);
QCOMPARE(text->text(),result);
QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), databases*2); // *2 = .ini file + .sqlite file
diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp
index b2532a2..91b6d0b 100644
--- a/tests/auto/declarative/states/tst_states.cpp
+++ b/tests/auto/declarative/states/tst_states.cpp
@@ -22,7 +22,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -36,7 +36,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges2.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -56,7 +56,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges3.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -92,7 +92,7 @@ void tst_states::basicExtension()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicExtension.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -125,7 +125,7 @@ void tst_states::basicExtension()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/fakeExtension.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -156,7 +156,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -183,7 +183,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding2.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -213,7 +213,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding3.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -237,7 +237,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding4.qml");
- QFxRect *rect = qobject_cast<QFxRect*>(rectComponent.create());
+ QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -263,7 +263,7 @@ void tst_states::basicBinding()
}
}
-class MyRect : public QFxRect
+class MyRect : public QmlGraphicsRect
{
Q_OBJECT
public:
@@ -303,7 +303,7 @@ void tst_states::signalOverride()
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
- QFxRect *innerRect = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("extendedRect"));
+ QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("extendedRect"));
innerRect->setState("green");
rect->doSomething();