summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-02 06:47:29 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-02 06:47:29 (GMT)
commitd073dfb82c02c1d0a9818525a2a4a4f1adbf44bf (patch)
treed0c1115d2adc9f002688406d6103a3579f2eb01e /tests
parent8c39a1ad27594e514afad12fd089ccd988bf4519 (diff)
downloadQt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.zip
Qt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.tar.gz
Qt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.tar.bz2
renaming QmlGraphicsRect -> QmlGraphicsRectangle
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/anchors/tst_anchors.cpp54
-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.cpp44
-rw-r--r--tests/auto/declarative/pathview/tst_pathview.cpp18
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp14
-rw-r--r--tests/auto/declarative/states/tst_states.cpp22
-rw-r--r--tests/benchmarks/qmlpainting/tst_qmlpainting.cpp6
8 files changed, 105 insertions, 105 deletions
diff --git a/tests/auto/declarative/anchors/tst_anchors.cpp b/tests/auto/declarative/anchors/tst_anchors.cpp
index 60c6b3d..2d81b21 100644
--- a/tests/auto/declarative/anchors/tst_anchors.cpp
+++ b/tests/auto/declarative/anchors/tst_anchors.cpp
@@ -95,41 +95,41 @@ void tst_anchors::basicAnchors()
qApp->processEvents();
//sibling horizontal
- 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);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect1"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect2"))->x(), 122.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect3"))->x(), 74.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect4"))->x(), 16.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect5"))->x(), 112.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect6"))->x(), 64.0);
//parent horizontal
- 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);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect7"))->x(), 0.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect8"))->x(), 240.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect9"))->x(), 120.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect10"))->x(), -10.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect11"))->x(), 230.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect12"))->x(), 110.0);
//vertical
- QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect13"))->y(), 20.0);
- QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect14"))->y(), 155.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect13"))->y(), 20.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect14"))->y(), 155.0);
//stretch
- 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);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect15"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect15"))->width(), 96.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect16"))->x(), 26.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect16"))->width(), 192.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect17"))->x(), -70.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect17"))->width(), 192.0);
//vertical stretch
- QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect18"))->y(), 20.0);
- QCOMPARE(findItem<QmlGraphicsRect>(view->root(), QLatin1String("Rect18"))->height(), 40.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect18"))->y(), 20.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect18"))->height(), 40.0);
//more parent horizontal
- 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);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect19"))->x(), 115.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect20"))->x(), 235.0);
+ QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("Rect21"))->x(), -5.0);
delete view;
}
@@ -173,7 +173,7 @@ void tst_anchors::illegalSets()
view->setUrl(QUrl("file://" SRCDIR "/data/illegal1.qml"));
- QString expect = "QML QmlGraphicsRect (" + view->url().toString() + ":7:5" + ") Can't specify left, right, and hcenter anchors.";
+ QString expect = "QML QmlGraphicsRectangle (" + view->url().toString() + ":7:5" + ") Can't specify left, right, and hcenter anchors.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
view->execute();
qApp->processEvents();
@@ -199,7 +199,7 @@ void tst_anchors::illegalSets()
view->setUrl(QUrl("file://" SRCDIR "/data/illegal3.qml"));
- QString expect = "QML QmlGraphicsRect (" + view->url().toString() + ":9:5" + ") Can't anchor to an item that isn't a parent or sibling.";
+ QString expect = "QML QmlGraphicsRectangle (" + 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();
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index 77a31e5..c0e26ca 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -72,7 +72,7 @@ private slots:
void tst_animations::simpleNumber()
{
- QmlGraphicsRect rect;
+ QmlGraphicsRectangle rect;
QmlNumberAnimation animation;
animation.setTarget(&rect);
animation.setProperty("x");
@@ -90,7 +90,7 @@ void tst_animations::simpleNumber()
void tst_animations::simpleColor()
{
- QmlGraphicsRect rect;
+ QmlGraphicsRectangle rect;
QmlColorAnimation animation;
animation.setTarget(&rect);
animation.setProperty("color");
@@ -108,7 +108,7 @@ void tst_animations::simpleColor()
void tst_animations::alwaysRunToEnd()
{
- QmlGraphicsRect rect;
+ QmlGraphicsRectangle rect;
QmlPropertyAnimation animation;
animation.setTarget(&rect);
animation.setProperty("x");
@@ -126,7 +126,7 @@ void tst_animations::alwaysRunToEnd()
void tst_animations::dotProperty()
{
- QmlGraphicsRect rect;
+ QmlGraphicsRectangle rect;
QmlNumberAnimation animation;
animation.setTarget(&rect);
animation.setProperty("border.width");
@@ -181,12 +181,12 @@ void tst_animations::badTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/badtype4.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(1000 + 50);
- QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRectangle *myRect = qobject_cast<QmlGraphicsRectangle*>(rect->QGraphicsObject::children().at(3)); //### not robust
QVERIFY(myRect);
QCOMPARE(myRect->x(),qreal(200));
}
@@ -198,7 +198,7 @@ void tst_animations::badProperties()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
QTest::ignoreMessage(QtWarningMsg, "QML QmlColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"pen.colr\"");
@@ -214,12 +214,12 @@ void tst_animations::mixedTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/mixedtype1.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(500);
- QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRectangle *myRect = qobject_cast<QmlGraphicsRectangle*>(rect->QGraphicsObject::children().at(3)); //### not robust
QVERIFY(myRect);
//rather inexact -- is there a better way?
@@ -230,12 +230,12 @@ void tst_animations::mixedTypes()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/mixedtype2.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("state1");
QTest::qWait(500);
- QmlGraphicsRect *myRect = qobject_cast<QmlGraphicsRect*>(rect->QGraphicsObject::children().at(3)); //### not robust
+ QmlGraphicsRectangle *myRect = qobject_cast<QmlGraphicsRectangle*>(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 aea5604..449deb9 100644
--- a/tests/auto/declarative/behaviors/tst_behaviors.cpp
+++ b/tests/auto/declarative/behaviors/tst_behaviors.cpp
@@ -66,12 +66,12 @@ void tst_behaviors::simpleBehavior()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/simple.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
@@ -79,12 +79,12 @@ void tst_behaviors::scriptTriggered()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/scripttrigger.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setColor(QColor("red"));
QTest::qWait(100);
- qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"))->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
}
@@ -92,10 +92,10 @@ void tst_behaviors::cppTriggered()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/cpptrigger.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
- QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"));
+ QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"));
QVERIFY(innerRect);
innerRect->setProperty("x", 200);
@@ -108,7 +108,7 @@ void tst_behaviors::loop()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/loop.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
//don't crash
@@ -119,12 +119,12 @@ void tst_behaviors::colorBehavior()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/color.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("red");
QTest::qWait(100);
- QColor color = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->color();
+ QColor color = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"))->color();
QVERIFY(color != QColor("red") && color != QColor("green")); //i.e. the behavior has been triggered
}
@@ -132,12 +132,12 @@ void tst_behaviors::replaceBinding()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/binding.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"));
+ QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"));
QVERIFY(innerRect);
qreal x = innerRect->x();
QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
@@ -167,24 +167,24 @@ void tst_behaviors::group()
{
QmlEngine engine;
QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/groupProperty.qml"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("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"));
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create());
QVERIFY(rect);
rect->setState("moved");
QTest::qWait(100);
- qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x();
+ qreal x = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("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 fbcc904..ab675b8 100644
--- a/tests/auto/declarative/layouts/tst_layouts.cpp
+++ b/tests/auto/declarative/layouts/tst_layouts.cpp
@@ -73,13 +73,13 @@ void tst_QmlGraphicsLayouts::test_horizontal()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -97,13 +97,13 @@ void tst_QmlGraphicsLayouts::test_horizontal_spacing()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -121,13 +121,13 @@ void tst_QmlGraphicsLayouts::test_vertical()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -145,13 +145,13 @@ void tst_QmlGraphicsLayouts::test_vertical_spacing()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
QCOMPARE(one->x(), 0.0);
@@ -169,15 +169,15 @@ void tst_QmlGraphicsLayouts::test_grid()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
- QmlGraphicsRect *four = canvas->root()->findChild<QmlGraphicsRect*>("four");
+ QmlGraphicsRectangle *four = canvas->root()->findChild<QmlGraphicsRectangle*>("four");
QVERIFY(four != 0);
- QmlGraphicsRect *five = canvas->root()->findChild<QmlGraphicsRect*>("five");
+ QmlGraphicsRectangle *five = canvas->root()->findChild<QmlGraphicsRectangle*>("five");
QVERIFY(five != 0);
QCOMPARE(one->x(), 0.0);
@@ -199,15 +199,15 @@ void tst_QmlGraphicsLayouts::test_grid_spacing()
canvas->execute();
qApp->processEvents();
- QmlGraphicsRect *one = canvas->root()->findChild<QmlGraphicsRect*>("one");
+ QmlGraphicsRectangle *one = canvas->root()->findChild<QmlGraphicsRectangle*>("one");
QVERIFY(one != 0);
- QmlGraphicsRect *two = canvas->root()->findChild<QmlGraphicsRect*>("two");
+ QmlGraphicsRectangle *two = canvas->root()->findChild<QmlGraphicsRectangle*>("two");
QVERIFY(two != 0);
- QmlGraphicsRect *three = canvas->root()->findChild<QmlGraphicsRect*>("three");
+ QmlGraphicsRectangle *three = canvas->root()->findChild<QmlGraphicsRectangle*>("three");
QVERIFY(three != 0);
- QmlGraphicsRect *four = canvas->root()->findChild<QmlGraphicsRect*>("four");
+ QmlGraphicsRectangle *four = canvas->root()->findChild<QmlGraphicsRectangle*>("four");
QVERIFY(four != 0);
- QmlGraphicsRect *five = canvas->root()->findChild<QmlGraphicsRect*>("five");
+ QmlGraphicsRectangle *five = canvas->root()->findChild<QmlGraphicsRectangle*>("five");
QVERIFY(five != 0);
QCOMPARE(one->x(), 0.0);
diff --git a/tests/auto/declarative/pathview/tst_pathview.cpp b/tests/auto/declarative/pathview/tst_pathview.cpp
index 41decb1..93e4754 100644
--- a/tests/auto/declarative/pathview/tst_pathview.cpp
+++ b/tests/auto/declarative/pathview/tst_pathview.cpp
@@ -190,7 +190,7 @@ void tst_QmlGraphicsPathView::pathMoved()
QmlGraphicsPathView *pathview = findItem<QmlGraphicsPathView>(canvas->root(), "view");
QVERIFY(pathview != 0);
- QmlGraphicsRect *firstItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 0);
+ QmlGraphicsRectangle *firstItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 0);
QVERIFY(firstItem);
QmlGraphicsPath *path = qobject_cast<QmlGraphicsPath*>(pathview->path());
QVERIFY(path);
@@ -203,7 +203,7 @@ void tst_QmlGraphicsPathView::pathMoved()
QTest::qWait(1000);//Moving is animated?
for(int i=0; i<model.count(); i++){
- QmlGraphicsRect *curItem = findItem<QmlGraphicsRect>(pathview, "wrapper", i);
+ QmlGraphicsRectangle *curItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", i);
QCOMPARE(curItem->pos() + offset, path->pointAt(0.1 + i*0.25));
}
@@ -234,22 +234,22 @@ void tst_QmlGraphicsPathView::limitedItems()
pathview->setPathItemCount(10);
QCOMPARE(pathview->pathItemCount(), 10);
- QmlGraphicsRect *testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 0);
+ QmlGraphicsRectangle *testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 0);
QVERIFY(testItem != 0);
- testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 9);
+ testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 9);
QVERIFY(testItem != 0);
- testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 10);
+ testItem = findItem<QmlGraphicsRectangle>(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<QmlGraphicsRect>(pathview, "wrapper", 0);
+ testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 0);
QVERIFY(testItem == 0);
- testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 1);
+ testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 1);
QVERIFY(testItem == 0);
- testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 9);
+ testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 9);
QVERIFY(testItem == 0);
- testItem = findItem<QmlGraphicsRect>(pathview, "wrapper", 50);
+ testItem = findItem<QmlGraphicsRectangle>(pathview, "wrapper", 50);
QVERIFY(testItem != 0);
}
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index 7dfb0ff..128fa87 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -987,11 +987,11 @@ void tst_qmllanguage::importsLocal_data()
QTest::newRow("local import")
<< "import \"subdir\"\n" // QT-613
"Test {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("local import as")
<< "import \"subdir\" as T\n"
"T.Test {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("wrong local import as")
<< "import \"subdir\" as T\n"
"Test {}"
@@ -1019,7 +1019,7 @@ void tst_qmllanguage::importsRemote_data()
+ QtNetworkSettings::serverName()
+ "/qtest/declarative/qmllanguage";
- QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QmlGraphicsRect";
+ QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QmlGraphicsRectangle";
QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QmlGraphicsText";
QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QmlGraphicsImage";
}
@@ -1042,7 +1042,7 @@ void tst_qmllanguage::importsInstalled_data()
QTest::newRow("installed import 1")
<< "import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("installed import 2")
<< "import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
@@ -1075,7 +1075,7 @@ void tst_qmllanguage::importsOrder_data()
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("installed import re-overrides 1") <<
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
@@ -1088,13 +1088,13 @@ void tst_qmllanguage::importsOrder_data()
"import com.nokia.installedtest 1.4\n"
"import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("installed import versus builtin 1") <<
"import com.nokia.installedtest 1.5\n"
"import Qt 4.6\n"
"Rectangle {}"
- << "QmlGraphicsRect";
+ << "QmlGraphicsRectangle";
QTest::newRow("installed import versus builtin 2") <<
"import Qt 4.6\n"
"import com.nokia.installedtest 1.5\n"
diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp
index 4425eac..e362050 100644
--- a/tests/auto/declarative/states/tst_states.cpp
+++ b/tests/auto/declarative/states/tst_states.cpp
@@ -62,7 +62,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -76,7 +76,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges2.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -96,7 +96,7 @@ void tst_states::basicChanges()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicChanges3.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -132,7 +132,7 @@ void tst_states::basicExtension()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicExtension.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -165,7 +165,7 @@ void tst_states::basicExtension()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/fakeExtension.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -196,7 +196,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -223,7 +223,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding2.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -253,7 +253,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding3.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -277,7 +277,7 @@ void tst_states::basicBinding()
{
QmlComponent rectComponent(&engine, SRCDIR "/data/basicBinding4.qml");
- QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(rectComponent.create());
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -303,7 +303,7 @@ void tst_states::basicBinding()
}
}
-class MyRect : public QmlGraphicsRect
+class MyRect : public QmlGraphicsRectangle
{
Q_OBJECT
public:
@@ -343,7 +343,7 @@ void tst_states::signalOverride()
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
- QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("extendedRect"));
+ QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("extendedRect"));
innerRect->setState("green");
rect->doSomething();
diff --git a/tests/benchmarks/qmlpainting/tst_qmlpainting.cpp b/tests/benchmarks/qmlpainting/tst_qmlpainting.cpp
index 0af4858..e268136 100644
--- a/tests/benchmarks/qmlpainting/tst_qmlpainting.cpp
+++ b/tests/benchmarks/qmlpainting/tst_qmlpainting.cpp
@@ -327,7 +327,7 @@ void tst_QmlPainting::drawTransformedImageRoundedRect()
surface.save("ti.png");
}
-//code from QmlGraphicsRect for drawing rounded rects
+//code from QmlGraphicsRectangle for drawing rounded rects
void tst_QmlPainting::drawScaleGridRoundedRect()
{
//setup image
@@ -422,7 +422,7 @@ void tst_QmlPainting::drawScaledScaleGridRoundedRect_data()
// QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied;
}
-//code from QmlGraphicsRect for drawing rounded rects
+//code from QmlGraphicsRectangle for drawing rounded rects
void tst_QmlPainting::drawScaledScaleGridRoundedRect()
{
QFETCH(float, scale);
@@ -522,7 +522,7 @@ void tst_QmlPainting::drawTransformedScaleGridRoundedRect_data()
}
-//code from QmlGraphicsRect for drawing rounded rects
+//code from QmlGraphicsRectangle for drawing rounded rects
void tst_QmlPainting::drawTransformedScaleGridRoundedRect()
{
QFETCH(QTransform, transform);