summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle.cpp (renamed from src/declarative/graphicsitems/qmlgraphicsrect.cpp)74
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p.h (renamed from src/declarative/graphicsitems/qmlgraphicsrect_p.h)14
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h (renamed from src/declarative/graphicsitems/qmlgraphicsrect_p_p.h)14
-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
12 files changed, 159 insertions, 159 deletions
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index 8eac580..15d775c 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -28,8 +28,8 @@ HEADERS += \
graphicsitems/qmlgraphicspath_p_p.h \
graphicsitems/qmlgraphicspathview_p.h \
graphicsitems/qmlgraphicspathview_p_p.h \
- graphicsitems/qmlgraphicsrect_p.h \
- graphicsitems/qmlgraphicsrect_p_p.h \
+ graphicsitems/qmlgraphicsrectangle_p.h \
+ graphicsitems/qmlgraphicsrectangle_p_p.h \
graphicsitems/qmlgraphicsrepeater_p.h \
graphicsitems/qmlgraphicsrepeater_p_p.h \
graphicsitems/qmlgraphicsscalegrid_p_p.h \
@@ -64,7 +64,7 @@ SOURCES += \
graphicsitems/qmlgraphicsmouseregion.cpp \
graphicsitems/qmlgraphicspath.cpp \
graphicsitems/qmlgraphicspathview.cpp \
- graphicsitems/qmlgraphicsrect.cpp \
+ graphicsitems/qmlgraphicsrectangle.cpp \
graphicsitems/qmlgraphicsrepeater.cpp \
graphicsitems/qmlgraphicsscalegrid.cpp \
graphicsitems/qmlgraphicstextinput.cpp \
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
index 605e82c..8ae40b7 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qmlgraphicsrect_p.h"
-#include "qmlgraphicsrect_p_p.h"
+#include "qmlgraphicsrectangle_p.h"
+#include "qmlgraphicsrectangle_p_p.h"
#include <QPainter>
#include <QtCore/qmath.h>
@@ -149,10 +149,10 @@ void QmlGraphicsGradient::doUpdate()
emit updated();
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRect)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRectangle)
/*!
- \qmlclass Rectangle QmlGraphicsRect
+ \qmlclass Rectangle QmlGraphicsRectangle
\brief The Rectangle item allows you to add rectangles to a scene.
\inherits Item
@@ -175,28 +175,28 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRect)
/*!
\internal
- \class QmlGraphicsRect
- \brief The QmlGraphicsRect class provides a rectangle item that you can add to a QmlView.
+ \class QmlGraphicsRectangle
+ \brief The QmlGraphicsRectangle class provides a rectangle item that you can add to a QmlView.
*/
-QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsItem *parent)
- : QmlGraphicsItem(*(new QmlGraphicsRectPrivate), parent)
+QmlGraphicsRectangle::QmlGraphicsRectangle(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsRectanglePrivate), parent)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent)
+QmlGraphicsRectangle::QmlGraphicsRectangle(QmlGraphicsRectanglePrivate &dd, QmlGraphicsItem *parent)
: QmlGraphicsItem(dd, parent)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-void QmlGraphicsRect::doUpdate()
+void QmlGraphicsRectangle::doUpdate()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->rectImage = QPixmap();
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->setPaintMargin((pw+1)/2);
@@ -214,9 +214,9 @@ void QmlGraphicsRect::doUpdate()
To keep the border smooth (rather than blurry), odd widths cause the rectangle to be painted at
a half-pixel offset;
*/
-QmlGraphicsPen *QmlGraphicsRect::border()
+QmlGraphicsPen *QmlGraphicsRectangle::border()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
return d->getPen();
}
@@ -254,15 +254,15 @@ QmlGraphicsPen *QmlGraphicsRect::border()
\sa Gradient, color
*/
-QmlGraphicsGradient *QmlGraphicsRect::gradient() const
+QmlGraphicsGradient *QmlGraphicsRectangle::gradient() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->gradient;
}
-void QmlGraphicsRect::setGradient(QmlGraphicsGradient *gradient)
+void QmlGraphicsRectangle::setGradient(QmlGraphicsGradient *gradient)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->gradient == gradient)
return;
if (d->gradient)
@@ -282,15 +282,15 @@ void QmlGraphicsRect::setGradient(QmlGraphicsGradient *gradient)
painted as a normal rectangle. The same radius is used by all 4 corners; there is currently
no way to specify different radii for different corners.
*/
-qreal QmlGraphicsRect::radius() const
+qreal QmlGraphicsRectangle::radius() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->radius;
}
-void QmlGraphicsRect::setRadius(qreal radius)
+void QmlGraphicsRectangle::setRadius(qreal radius)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->radius == radius)
return;
@@ -316,15 +316,15 @@ void QmlGraphicsRect::setRadius(qreal radius)
If both a gradient and a color are specified, the gradient will be used.
*/
-QColor QmlGraphicsRect::color() const
+QColor QmlGraphicsRectangle::color() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->color;
}
-void QmlGraphicsRect::setColor(const QColor &c)
+void QmlGraphicsRectangle::setColor(const QColor &c)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->color == c)
return;
@@ -334,9 +334,9 @@ void QmlGraphicsRect::setColor(const QColor &c)
emit colorChanged();
}
-void QmlGraphicsRect::generateRoundedRect()
+void QmlGraphicsRectangle::generateRoundedRect()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
const int radius = qCeil(d->radius); //ensure odd numbered width/height so we get 1-pixel center
@@ -358,9 +358,9 @@ void QmlGraphicsRect::generateRoundedRect()
}
}
-void QmlGraphicsRect::generateBorderedRect()
+void QmlGraphicsRectangle::generateBorderedRect()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
@@ -382,9 +382,9 @@ void QmlGraphicsRect::generateBorderedRect()
}
}
-void QmlGraphicsRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->radius > 0 || (d->pen && d->pen->isValid())
|| (d->gradient && d->gradient->gradient()) ) {
drawRect(*p);
@@ -399,9 +399,9 @@ void QmlGraphicsRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidg
}
}
-void QmlGraphicsRect::drawRect(QPainter &p)
+void QmlGraphicsRectangle::drawRect(QPainter &p)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->gradient && d->gradient->gradient()) {
// XXX This path is still slower than the image path
// Image path won't work for gradients though
@@ -466,9 +466,9 @@ void QmlGraphicsRect::drawRect(QPainter &p)
\image rect-smooth.png
*/
-QRectF QmlGraphicsRect::boundingRect() const
+QRectF QmlGraphicsRectangle::boundingRect() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return QRectF(-d->paintmargin, -d->paintmargin, d->width+d->paintmargin*2, d->height+d->paintmargin*2);
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
index 97334fd..2a80619 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
@@ -130,8 +130,8 @@ private:
friend class QmlGraphicsGradientStop;
};
-class QmlGraphicsRectPrivate;
-class Q_DECLARATIVE_EXPORT QmlGraphicsRect : public QmlGraphicsItem
+class QmlGraphicsRectanglePrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsRectangle : public QmlGraphicsItem
{
Q_OBJECT
@@ -140,7 +140,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsRect : public QmlGraphicsItem
Q_PROPERTY(QmlGraphicsPen * border READ border CONSTANT)
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
public:
- QmlGraphicsRect(QmlGraphicsItem *parent=0);
+ QmlGraphicsRectangle(QmlGraphicsItem *parent=0);
QColor color() const;
void setColor(const QColor &);
@@ -170,11 +170,11 @@ private:
void drawRect(QPainter &painter);
protected:
- QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent);
+ QmlGraphicsRectangle(QmlGraphicsRectanglePrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QmlGraphicsRect)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRect)
+ Q_DISABLE_COPY(QmlGraphicsRectangle)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRectangle)
};
QT_END_NAMESPACE
@@ -182,7 +182,7 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsPen)
QML_DECLARE_TYPE(QmlGraphicsGradientStop)
QML_DECLARE_TYPE(QmlGraphicsGradient)
-QML_DECLARE_TYPE(QmlGraphicsRect)
+QML_DECLARE_TYPE(QmlGraphicsRectangle)
QT_END_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h
index f44e8de..cb914d6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h
@@ -58,18 +58,18 @@
QT_BEGIN_NAMESPACE
class QmlGraphicsGradient;
-class QmlGraphicsRect;
-class QmlGraphicsRectPrivate : public QmlGraphicsItemPrivate
+class QmlGraphicsRectangle;
+class QmlGraphicsRectanglePrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QmlGraphicsRect)
+ Q_DECLARE_PUBLIC(QmlGraphicsRectangle)
public:
- QmlGraphicsRectPrivate() :
+ QmlGraphicsRectanglePrivate() :
color(Qt::white), gradient(0), pen(0), radius(0), paintmargin(0)
{
}
- ~QmlGraphicsRectPrivate()
+ ~QmlGraphicsRectanglePrivate()
{
delete pen;
}
@@ -83,7 +83,7 @@ public:
QmlGraphicsGradient *gradient;
QmlGraphicsPen *getPen() {
if (!pen) {
- Q_Q(QmlGraphicsRect);
+ Q_Q(QmlGraphicsRectangle);
pen = new QmlGraphicsPen;
QObject::connect(pen, SIGNAL(penChanged()), q, SLOT(doUpdate()));
}
@@ -96,7 +96,7 @@ public:
void setPaintMargin(qreal margin)
{
- Q_Q(QmlGraphicsRect);
+ Q_Q(QmlGraphicsRectangle);
if (margin == paintmargin)
return;
q->prepareGeometryChange();
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);