aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2012-10-22 16:59:25 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-29 16:07:44 +0100
commit55f6a109e99ea2eb3359fa941a1826d4b4e11bf8 (patch)
tree35517eeb69916fed3e8e803cf4bd190125f538b6 /tests
parent367cf77cd64f1b72496cde5484554ff7a8134f1d (diff)
Renamed QQuickItem::pos property to position
Abbreviated property names are less descriptive so we don't have many of them. Might as well be consistent. QWindow::pos was already renamed. Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp2
-rw-r--r--tests/auto/quick/qquickdrag/tst_qquickdrag.cpp30
-rw-r--r--tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp10
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp44
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp2
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp36
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp2
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp46
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp8
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp14
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp28
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp12
12 files changed, 117 insertions, 117 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index 37b036c7ec..81b1255ca5 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -136,7 +136,7 @@ void tst_qquickanimations::simpleProperty()
QTest::qWait(animation.duration());
QTIMED_COMPARE(rect.x(), 200.0);
- rect.setPos(QPointF(0,0));
+ rect.setPosition(QPointF(0,0));
animation.start();
QVERIFY(animation.isRunning());
animation.pause();
diff --git a/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp b/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp
index 562863b4f3..2159368ce8 100644
--- a/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp
+++ b/tests/auto/quick/qquickdrag/tst_qquickdrag.cpp
@@ -372,7 +372,7 @@ void tst_QQuickDrag::active()
QCOMPARE(dropTarget.enterEvents, 1); QCOMPARE(dropTarget.leaveEvents, 0); QCOMPARE(dropTarget.moveEvents, 0);
dropTarget.reset();
- item->setPos(QPointF(80, 80));
+ item->setPosition(QPointF(80, 80));
QCOMPARE(evaluate<bool>(item, "Drag.active"), true);
QCOMPARE(evaluate<bool>(item, "dragActive"), true);
QCOMPARE(dropTarget.enterEvents, 0); QCOMPARE(dropTarget.leaveEvents, 0); QCOMPARE(dropTarget.moveEvents, 0);
@@ -508,7 +508,7 @@ void tst_QQuickDrag::drop()
// Queued move event is delivered before a drop event.
innerTarget.reset(); outerTarget.reset();
evaluate<void>(item, "Drag.active = true");
- item->setPos(QPointF(80, 80));
+ item->setPosition(QPointF(80, 80));
evaluate<void>(item, "Drag.drop()");
QCOMPARE(evaluate<bool>(item, "Drag.active"), false);
QCOMPARE(evaluate<bool>(item, "dragActive"), false);
@@ -529,10 +529,10 @@ void tst_QQuickDrag::move()
TestDropTarget outerTarget(window.contentItem());
outerTarget.setSize(QSizeF(100, 100));
TestDropTarget leftTarget(&outerTarget);
- leftTarget.setPos(QPointF(0, 35));
+ leftTarget.setPosition(QPointF(0, 35));
leftTarget.setSize(QSizeF(30, 30));
TestDropTarget rightTarget(&outerTarget);
- rightTarget.setPos(QPointF(70, 35));
+ rightTarget.setPosition(QPointF(70, 35));
rightTarget.setSize(QSizeF(30, 30));
QQmlComponent component(&engine);
component.setData(
@@ -560,7 +560,7 @@ void tst_QQuickDrag::move()
// Move within the outer target.
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(60, 50));
+ item->setPosition(QPointF(60, 50));
// Move event is delivered in the event loop.
QCOMPARE(outerTarget.enterEvents, 0); QCOMPARE(outerTarget.leaveEvents, 0); QCOMPARE(outerTarget.moveEvents, 0);
QCOMPARE(leftTarget .enterEvents, 0); QCOMPARE(leftTarget .leaveEvents, 0); QCOMPARE(leftTarget .moveEvents, 0);
@@ -592,7 +592,7 @@ void tst_QQuickDrag::move()
// Move into the left target.
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(25, 50));
+ item->setPosition(QPointF(25, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&leftTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&leftTarget));
@@ -604,7 +604,7 @@ void tst_QQuickDrag::move()
// Move within the left target.
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(25, 40));
+ item->setPosition(QPointF(25, 40));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&leftTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&leftTarget));
@@ -616,7 +616,7 @@ void tst_QQuickDrag::move()
// Move out of all targets.
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(110, 50));
+ item->setPosition(QPointF(110, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(0));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(0));
@@ -628,7 +628,7 @@ void tst_QQuickDrag::move()
rightTarget.accept = false;
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(80, 50));
+ item->setPosition(QPointF(80, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&outerTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&outerTarget));
@@ -641,7 +641,7 @@ void tst_QQuickDrag::move()
outerTarget.accept = false;
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(60, 50));
+ item->setPosition(QPointF(60, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&outerTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&outerTarget));
@@ -654,7 +654,7 @@ void tst_QQuickDrag::move()
outerTarget.setFlags(QQuickItem::Flags());
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(40, 50));
+ item->setPosition(QPointF(40, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&outerTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&outerTarget));
@@ -667,7 +667,7 @@ void tst_QQuickDrag::move()
leftTarget.setFlags(QQuickItem::Flags());
outerTarget.reset(); leftTarget.reset(); rightTarget.reset();
- item->setPos(QPointF(25, 50));
+ item->setPosition(QPointF(25, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<QObject *>(item, "Drag.target"), static_cast<QObject *>(&outerTarget));
QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&outerTarget));
@@ -802,7 +802,7 @@ void tst_QQuickDrag::hotSpot()
QCOMPARE(dropTarget.position.x(), qreal(55));
QCOMPARE(dropTarget.position.y(), qreal(55));
- item->setPos(QPointF(30, 20));
+ item->setPosition(QPointF(30, 20));
QCoreApplication::processEvents();
QCOMPARE(dropTarget.position.x(), qreal(35));
QCOMPARE(dropTarget.position.y(), qreal(25));
@@ -820,7 +820,7 @@ void tst_QQuickDrag::hotSpot()
QCOMPARE(dropTarget.position.x(), qreal(40));
QCOMPARE(dropTarget.position.y(), qreal(30));
- item->setPos(QPointF(10, 20));
+ item->setPosition(QPointF(10, 20));
QCoreApplication::processEvents();
QCOMPARE(dropTarget.position.x(), qreal(20));
QCOMPARE(dropTarget.position.y(), qreal(30));
@@ -865,7 +865,7 @@ void tst_QQuickDrag::supportedActions()
evaluate<void>(item, "Drag.supportedActions = Qt.MoveAction");
QCOMPARE(evaluate<bool>(item, "Drag.supportedActions == Qt.MoveAction"), true);
QCOMPARE(evaluate<bool>(item, "supportedActions == Qt.MoveAction"), true);
- item->setPos(QPointF(60, 60));
+ item->setPosition(QPointF(60, 60));
QCOMPARE(dropTarget.supportedActions, Qt::CopyAction | Qt::MoveAction);
QCOMPARE(dropTarget.leaveEvents, 0);
QCOMPARE(dropTarget.enterEvents, 1);
diff --git a/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp b/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp
index 927a57b296..ef804a9fc6 100644
--- a/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp
+++ b/tests/auto/quick/qquickdroparea/tst_qquickdroparea.cpp
@@ -145,14 +145,14 @@ void tst_QQuickDropArea::containsDrag_internal()
evaluate<void>(dropArea, "{ enterEvents = 0; exitEvents = 0 }");
- dragItem->setPos(QPointF(150, 50));
+ dragItem->setPosition(QPointF(150, 50));
evaluate<void>(dragItem, "Drag.active = true");
QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), false);
QCOMPARE(evaluate<bool>(dropArea, "hasDrag"), false);
QCOMPARE(evaluate<int>(dropArea, "enterEvents"), 0);
QCOMPARE(evaluate<int>(dropArea, "exitEvents"), 0);
- dragItem->setPos(QPointF(50, 50));
+ dragItem->setPosition(QPointF(50, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), true);
QCOMPARE(evaluate<bool>(dropArea, "hasDrag"), true);
@@ -160,7 +160,7 @@ void tst_QQuickDropArea::containsDrag_internal()
QCOMPARE(evaluate<int>(dropArea, "exitEvents"), 0);
evaluate<void>(dropArea, "{ enterEvents = 0; exitEvents = 0 }");
- dragItem->setPos(QPointF(150, 50));
+ dragItem->setPosition(QPointF(150, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), false);
@@ -544,7 +544,7 @@ void tst_QQuickDropArea::position_internal()
QCOMPARE(evaluate<qreal>(dropArea, "eventY"), qreal(50));
evaluate<void>(dropArea, "{ enterEvents = 0; moveEvents = 0; eventX = -1; eventY = -1 }");
- dragItem->setPos(QPointF(40, 50));
+ dragItem->setPosition(QPointF(40, 50));
QCoreApplication::processEvents();
QCOMPARE(evaluate<int>(dropArea, "enterEvents"), 0);
QCOMPARE(evaluate<int>(dropArea, "moveEvents"), 1);
@@ -556,7 +556,7 @@ void tst_QQuickDropArea::position_internal()
QCOMPARE(evaluate<qreal>(dropArea, "eventY"), qreal(50));
evaluate<void>(dropArea, "{ enterEvents = 0; moveEvents = 0; eventX = -1; eventY = -1 }");
- dragItem->setPos(QPointF(75, 25));
+ dragItem->setPosition(QPointF(75, 25));
QCoreApplication::processEvents();
QCOMPARE(evaluate<int>(dropArea, "enterEvents"), 0);
QCOMPARE(evaluate<int>(dropArea, "moveEvents"), 1);
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index cdb17b3453..37d96f4950 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -542,7 +542,7 @@ void tst_QQuickGridView::inserted_defaultLayout(QQuickGridView::Flow flow,
firstPos.rx() = flow == QQuickGridView::FlowLeftToRight ? gridview->width() - gridview->cellWidth() : -gridview->cellWidth();
if (verticalLayout == QQuickItemView::BottomToTop)
firstPos.ry() -= gridview->cellHeight();
- QCOMPARE(item0->pos(), firstPos);
+ QCOMPARE(item0->position(), firstPos);
QList<QQuickItem*> items = findItems<QQuickItem>(contentItem, "wrapper");
int firstVisibleIndex = -1;
@@ -559,7 +559,7 @@ void tst_QQuickGridView::inserted_defaultLayout(QQuickGridView::Flow flow,
for (int i = firstVisibleIndex; i < model.count() && i < items.count(); ++i) {
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i);
QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i)));
- QCOMPARE(item->pos(), expectedItemPos(gridview, i, rowOffsetAfterMove));
+ QCOMPARE(item->position(), expectedItemPos(gridview, i, rowOffsetAfterMove));
QQuickText *name = findItem<QQuickText>(contentItem, "textName", i);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(i));
@@ -983,7 +983,7 @@ void tst_QQuickGridView::removed_defaultLayout(QQuickGridView::Flow flow,
for (int i = firstVisibleIndex; i < model.count() && i < items.count(); ++i) {
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i);
QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i)));
- QCOMPARE(item->pos(), expectedItemPos(gridview, i, rowOffsetAfterMove));
+ QCOMPARE(item->position(), expectedItemPos(gridview, i, rowOffsetAfterMove));
QQuickText *name = findItem<QQuickText>(contentItem, "textName", i);
QVERIFY(name != 0);
QTRY_COMPARE(name->text(), model.name(i));
@@ -1329,7 +1329,7 @@ void tst_QQuickGridView::moved_defaultLayout(QQuickGridView::Flow flow,
continue; // index has moved out of view
}
QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i)));
- QCOMPARE(item->pos(), expectedItemPos(gridview, i, rowOffsetAfterMove));
+ QCOMPARE(item->position(), expectedItemPos(gridview, i, rowOffsetAfterMove));
QQuickText *name = findItem<QQuickText>(contentItem, "textName", i);
QVERIFY(name != 0);
QTRY_COMPARE(name->text(), model.name(i));
@@ -3013,7 +3013,7 @@ void tst_QQuickGridView::footer()
QVERIFY(footer);
QVERIFY(footer == gridview->footerItem());
- QCOMPARE(footer->pos(), initialFooterPos);
+ QCOMPARE(footer->position(), initialFooterPos);
QCOMPARE(footer->width(), 100.);
QCOMPARE(footer->height(), 30.);
QCOMPARE(QPointF(gridview->contentX(), gridview->contentY()), initialContentPos);
@@ -3025,7 +3025,7 @@ void tst_QQuickGridView::footer()
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
if (flow == QQuickGridView::FlowLeftToRight) {
// shrink by one row
@@ -3056,12 +3056,12 @@ void tst_QQuickGridView::footer()
posWhenNoItems.setX(flow == QQuickGridView::FlowLeftToRight ? gridview->width() - footer->width() : -footer->width());
if (verticalLayoutDirection == QQuickItemView::BottomToTop)
posWhenNoItems.setY(-footer->height());
- QTRY_COMPARE(footer->pos(), posWhenNoItems);
+ QTRY_COMPARE(footer->position(), posWhenNoItems);
// if header is toggled, it shouldn't affect the footer position
window->rootObject()->setProperty("showHeader", true);
QVERIFY(findItem<QQuickItem>(contentItem, "header") != 0);
- QTRY_COMPARE(footer->pos(), posWhenNoItems);
+ QTRY_COMPARE(footer->position(), posWhenNoItems);
window->rootObject()->setProperty("showHeader", false);
// add 30 items
@@ -3079,7 +3079,7 @@ void tst_QQuickGridView::footer()
QVERIFY(footer);
QVERIFY(footer == gridview->footerItem());
- QCOMPARE(footer->pos(), changedFooterPos);
+ QCOMPARE(footer->position(), changedFooterPos);
QCOMPARE(footer->width(), 50.);
QCOMPARE(footer->height(), 20.);
@@ -3088,7 +3088,7 @@ void tst_QQuickGridView::footer()
item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
gridview->positionViewAtEnd();
footer->setHeight(10);
@@ -3247,7 +3247,7 @@ void tst_QQuickGridView::header()
QVERIFY(header);
QVERIFY(header == gridview->headerItem());
- QCOMPARE(header->pos(), initialHeaderPos);
+ QCOMPARE(header->position(), initialHeaderPos);
QCOMPARE(header->width(), 100.);
QCOMPARE(header->height(), 30.);
QCOMPARE(QPointF(gridview->contentX(), gridview->contentY()), initialContentPos);
@@ -3259,11 +3259,11 @@ void tst_QQuickGridView::header()
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
model.clear();
QTRY_COMPARE(QQuickItemPrivate::get(gridview)->polishScheduled, false);
- QCOMPARE(header->pos(), initialHeaderPos); // header should stay where it is
+ QCOMPARE(header->position(), initialHeaderPos); // header should stay where it is
if (flow == QQuickGridView::FlowLeftToRight)
QCOMPARE(gridview->contentHeight(), header->height());
else
@@ -3284,14 +3284,14 @@ void tst_QQuickGridView::header()
QVERIFY(header == gridview->headerItem());
- QCOMPARE(header->pos(), changedHeaderPos);
+ QCOMPARE(header->position(), changedHeaderPos);
QCOMPARE(header->width(), 50.);
QCOMPARE(header->height(), 20.);
QTRY_COMPARE(QPointF(gridview->contentX(), gridview->contentY()), changedContentPos);
item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
header->setHeight(10);
header->setWidth(40);
@@ -3319,7 +3319,7 @@ void tst_QQuickGridView::header()
gridview->setWidth(240);
gridview->setHeight(320);
- QTRY_COMPARE(gridview->headerItem()->pos(), initialHeaderPos);
+ QTRY_COMPARE(gridview->headerItem()->position(), initialHeaderPos);
QCOMPARE(QPointF(gridview->contentX(), gridview->contentY()), initialContentPos);
releaseView(window);
@@ -3467,11 +3467,11 @@ void tst_QQuickGridView::extents()
QQuickItem *header = findItem<QQuickItem>(contentItem, "header");
QVERIFY(header);
- QCOMPARE(header->pos(), headerPos);
+ QCOMPARE(header->position(), headerPos);
QQuickItem *footer = findItem<QQuickItem>(contentItem, "footer");
QVERIFY(footer);
- QCOMPARE(footer->pos(), footerPos);
+ QCOMPARE(footer->position(), footerPos);
QCOMPARE(static_cast<GVAccessor*>(gridview)->minX(), minPos.x());
QCOMPARE(static_cast<GVAccessor*>(gridview)->minY(), minPos.y());
@@ -3706,7 +3706,7 @@ void tst_QQuickGridView::resizeGrid()
QQuickItem *item0 = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item0);
- QCOMPARE(item0->pos(), firstItemPos);
+ QCOMPARE(item0->position(), firstItemPos);
// Confirm items positioned correctly and indexes correct
QList<QQuickItem*> items = findItems<QQuickItem>(contentItem, "wrapper");
@@ -3714,7 +3714,7 @@ void tst_QQuickGridView::resizeGrid()
for (int i = 0; i < model.count() && i < items.count(); ++i) {
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i);
QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i)));
- QCOMPARE(item->pos(), expectedItemPos(gridview, i, 0));
+ QCOMPARE(item->position(), expectedItemPos(gridview, i, 0));
QQuickText *name = findItem<QQuickText>(contentItem, "textName", i);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(i));
@@ -3730,7 +3730,7 @@ void tst_QQuickGridView::resizeGrid()
QCOMPARE(findItem<QQuickItem>(contentItem, "wrapper", 0), item0);
if (flow == QQuickGridView::FlowLeftToRight && layoutDirection == Qt::RightToLeft)
firstItemPos.rx() += 80;
- QCOMPARE(item0->pos(), firstItemPos);
+ QCOMPARE(item0->position(), firstItemPos);
QPointF newContentPos = initialContentPos;
if (flow == QQuickGridView::FlowTopToBottom && layoutDirection == Qt::RightToLeft)
@@ -3746,7 +3746,7 @@ void tst_QQuickGridView::resizeGrid()
for (int i = 0; i < model.count() && i < items.count(); ++i) {
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i);
QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i)));
- QCOMPARE(item->pos(), expectedItemPos(gridview, i, 0));
+ QCOMPARE(item->position(), expectedItemPos(gridview, i, 0));
QQuickText *name = findItem<QQuickText>(contentItem, "textName", i);
QVERIFY(name != 0);
QCOMPARE(name->text(), model.name(i));
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index 0cdf95cd69..6209f412c3 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -1519,7 +1519,7 @@ void tst_qquickitem::hoverEventInParent()
HoverItem *rightItem = new HoverItem(parentItem);
rightItem->setSize(QSizeF(100, 200));
- rightItem->setPos(QPointF(100, 0));
+ rightItem->setPosition(QPointF(100, 0));
rightItem->setAcceptHoverEvents(true);
const QPoint insideLeft(50, 100);
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 3bb4998347..af628dff63 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -3463,7 +3463,7 @@ void tst_QQuickListView::header()
QCOMPARE(header->width(), 100.);
QCOMPARE(header->height(), 30.);
- QCOMPARE(header->pos(), initialHeaderPos);
+ QCOMPARE(header->position(), initialHeaderPos);
QCOMPARE(QPointF(listview->contentX(), listview->contentY()), initialContentPos);
if (orientation == QQuickListView::Vertical)
@@ -3473,11 +3473,11 @@ void tst_QQuickListView::header()
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
model.clear();
QTRY_COMPARE(listview->count(), model.count());
- QCOMPARE(header->pos(), initialHeaderPos); // header should stay where it is
+ QCOMPARE(header->position(), initialHeaderPos); // header should stay where it is
if (orientation == QQuickListView::Vertical)
QCOMPARE(listview->contentHeight(), header->height());
else
@@ -3498,14 +3498,14 @@ void tst_QQuickListView::header()
QVERIFY(header == listview->headerItem());
- QCOMPARE(header->pos(), changedHeaderPos);
+ QCOMPARE(header->position(), changedHeaderPos);
QCOMPARE(header->width(), 50.);
QCOMPARE(header->height(), 20.);
QTRY_COMPARE(QPointF(listview->contentX(), listview->contentY()), changedContentPos);
item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
listview->positionViewAtBeginning();
header->setHeight(10);
@@ -3534,7 +3534,7 @@ void tst_QQuickListView::header()
listview->setWidth(240);
listview->setHeight(320);
- QTRY_COMPARE(listview->headerItem()->pos(), initialHeaderPos);
+ QTRY_COMPARE(listview->headerItem()->position(), initialHeaderPos);
QCOMPARE(QPointF(listview->contentX(), listview->contentY()), initialContentPos);
releaseView(window);
@@ -3671,7 +3671,7 @@ void tst_QQuickListView::footer()
QVERIFY(footer == listview->footerItem());
- QCOMPARE(footer->pos(), initialFooterPos);
+ QCOMPARE(footer->position(), initialFooterPos);
QCOMPARE(footer->width(), 100.);
QCOMPARE(footer->height(), 30.);
QCOMPARE(QPointF(listview->contentX(), listview->contentY()), initialContentPos);
@@ -3683,7 +3683,7 @@ void tst_QQuickListView::footer()
QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
// remove one item
model.removeItem(1);
@@ -3708,11 +3708,11 @@ void tst_QQuickListView::footer()
posWhenNoItems.setX(-100);
else if (orientation == QQuickListView::Vertical && verticalLayoutDirection == QQuickItemView::BottomToTop)
posWhenNoItems.setY(-30);
- QTRY_COMPARE(footer->pos(), posWhenNoItems);
+ QTRY_COMPARE(footer->position(), posWhenNoItems);
// if header is present, it's at a negative pos, so the footer should not move
window->rootObject()->setProperty("showHeader", true);
- QTRY_COMPARE(footer->pos(), posWhenNoItems);
+ QTRY_COMPARE(footer->position(), posWhenNoItems);
window->rootObject()->setProperty("showHeader", false);
// add 30 items
@@ -3731,14 +3731,14 @@ void tst_QQuickListView::footer()
QVERIFY(footer == listview->footerItem());
- QCOMPARE(footer->pos(), changedFooterPos);
+ QCOMPARE(footer->position(), changedFooterPos);
QCOMPARE(footer->width(), 50.);
QCOMPARE(footer->height(), 20.);
QTRY_COMPARE(QPointF(listview->contentX(), listview->contentY()), changedContentPos);
item = findItem<QQuickItem>(contentItem, "wrapper", 0);
QVERIFY(item);
- QCOMPARE(item->pos(), firstDelegatePos);
+ QCOMPARE(item->position(), firstDelegatePos);
listview->positionViewAtEnd();
footer->setHeight(10);
@@ -3856,11 +3856,11 @@ void tst_QQuickListView::extents()
QQuickItem *header = findItem<QQuickItem>(contentItem, "header");
QVERIFY(header);
- QCOMPARE(header->pos(), headerPos);
+ QCOMPARE(header->position(), headerPos);
QQuickItem *footer = findItem<QQuickItem>(contentItem, "footer");
QVERIFY(footer);
- QCOMPARE(footer->pos(), footerPos);
+ QCOMPARE(footer->position(), footerPos);
QCOMPARE(static_cast<LVAccessor*>(listview)->minX(), minPos.x());
QCOMPARE(static_cast<LVAccessor*>(listview)->minY(), minPos.y());
@@ -4313,7 +4313,7 @@ void tst_QQuickListView::repositionResizedDelegate()
QQuickItem *positioner = findItem<QQuickItem>(window->rootObject(), "positioner");
QVERIFY(positioner);
QTRY_COMPARE(positioner->boundingRect().size(), origPositionerRect.size());
- QTRY_COMPARE(positioner->pos(), origPositionerRect.topLeft());
+ QTRY_COMPARE(positioner->position(), origPositionerRect.topLeft());
QSignalSpy spy(listview, orientation == QQuickListView::Vertical ? SIGNAL(contentYChanged()) : SIGNAL(contentXChanged()));
int prevSpyCount = 0;
@@ -4327,14 +4327,14 @@ void tst_QQuickListView::repositionResizedDelegate()
prevSpyCount = spy.count();
QVERIFY(QMetaObject::invokeMethod(window->rootObject(), "incrementRepeater"));
QTRY_COMPARE(positioner->boundingRect().size(), resizedPositionerRect.size());
- QTRY_COMPARE(positioner->pos(), resizedPositionerRect.topLeft());
+ QTRY_COMPARE(positioner->position(), resizedPositionerRect.topLeft());
QCOMPARE(listview->contentX(), contentPos_itemFirstHalfVisible.x());
QCOMPARE(listview->contentY(), contentPos_itemFirstHalfVisible.y());
QCOMPARE(spy.count(), prevSpyCount);
QVERIFY(QMetaObject::invokeMethod(window->rootObject(), "decrementRepeater"));
QTRY_COMPARE(positioner->boundingRect().size(), origPositionerRect.size());
- QTRY_COMPARE(positioner->pos(), origPositionerRect.topLeft());
+ QTRY_COMPARE(positioner->position(), origPositionerRect.topLeft());
QCOMPARE(listview->contentX(), contentPos_itemFirstHalfVisible.x());
QCOMPARE(listview->contentY(), contentPos_itemFirstHalfVisible.y());
@@ -4346,7 +4346,7 @@ void tst_QQuickListView::repositionResizedDelegate()
QVERIFY(QMetaObject::invokeMethod(window->rootObject(), "incrementRepeater"));
positioner = findItem<QQuickItem>(window->rootObject(), "positioner");
QTRY_COMPARE(positioner->boundingRect().size(), resizedPositionerRect.size());
- QTRY_COMPARE(positioner->pos(), resizedPositionerRect.topLeft());
+ QTRY_COMPARE(positioner->position(), resizedPositionerRect.topLeft());
QCOMPARE(listview->contentX(), contentPos_itemSecondHalfVisible.x());
QCOMPARE(listview->contentY(), contentPos_itemSecondHalfVisible.y());
qApp->processEvents();
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index a4e93d5794..3c89ad4908 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -450,7 +450,7 @@ void tst_QQuickMouseArea::updateMouseAreaPosOnResize()
QCOMPARE(mouseRegion->mouseX(), 0.0);
QCOMPARE(mouseRegion->mouseY(), 0.0);
- QMouseEvent event(QEvent::MouseButtonPress, rect->pos().toPoint(), Qt::LeftButton, Qt::LeftButton, 0);
+ QMouseEvent event(QEvent::MouseButtonPress, rect->position().toPoint(), Qt::LeftButton, Qt::LeftButton, 0);
QGuiApplication::sendEvent(window, &event);
QVERIFY(!mouseRegion->property("emitPositionChanged").toBool());
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index f36849abd9..dc0f31d56a 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -236,7 +236,7 @@ void tst_QQuickPathView::items()
QPointF offset;
offset.setX(pathview->highlightItem()->width()/2);
offset.setY(pathview->highlightItem()->height()/2);
- QCOMPARE(pathview->highlightItem()->pos() + offset, start);
+ QCOMPARE(pathview->highlightItem()->position() + offset, start);
delete window;
}
@@ -896,19 +896,19 @@ void tst_QQuickPathView::pathMoved()
QPointF offset;//Center of item is at point, but pos is from corner
offset.setX(firstItem->width()/2);
offset.setY(firstItem->height()/2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
pathview->setOffset(1.0);
for (int i=0; i<model.count(); i++) {
QQuickRectangle *curItem = findItem<QQuickRectangle>(pathview, "wrapper", i);
QPointF itemPos(path->pointAt(0.25 + i*0.25));
- QCOMPARE(curItem->pos() + offset, QPointF(itemPos.x(), itemPos.y()));
+ QCOMPARE(curItem->position() + offset, QPointF(itemPos.x(), itemPos.y()));
}
QCOMPARE(pathview->currentIndex(), 3);
pathview->setOffset(0.0);
- QCOMPARE(firstItem->pos() + offset, start);
+ QCOMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentIndex(), 0);
// Change delegate size
@@ -917,13 +917,13 @@ void tst_QQuickPathView::pathMoved()
window->rootObject()->setProperty("delegateWidth", 30);
QCOMPARE(firstItem->width(), 30.0);
offset.setX(firstItem->width()/2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
// Change delegate scale
pathview->setOffset(0.1);
pathview->setOffset(0.0);
window->rootObject()->setProperty("delegateScale", 1.2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
delete window;
}
@@ -985,14 +985,14 @@ void tst_QQuickPathView::setCurrentIndex()
QPointF offset;//Center of item is at point, but pos is from corner
offset.setX(firstItem->width()/2);
offset.setY(firstItem->height()/2);
- QCOMPARE(firstItem->pos() + offset, start);
+ QCOMPARE(firstItem->position() + offset, start);
QCOMPARE(window->rootObject()->property("currentA").toInt(), 0);
QCOMPARE(window->rootObject()->property("currentB").toInt(), 0);
pathview->setCurrentIndex(2);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(window->rootObject()->property("currentA").toInt(), 2);
QCOMPARE(window->rootObject()->property("currentB").toInt(), 2);
QCOMPARE(pathview->currentItem(), firstItem);
@@ -1002,7 +1002,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 1);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 1);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1010,7 +1010,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 0);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 0);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1018,7 +1018,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 3);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 3);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1026,7 +1026,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 0);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 0);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1035,7 +1035,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 2);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 2);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1044,7 +1044,7 @@ void tst_QQuickPathView::setCurrentIndex()
QTRY_COMPARE(pathview->currentIndex(), 1);
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 1);
QVERIFY(firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
@@ -1056,7 +1056,7 @@ void tst_QQuickPathView::setCurrentIndex()
firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 3);
QVERIFY(firstItem);
QCOMPARE(pathview->currentItem(), firstItem);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
model.moveItem(3, 0);
pathview->setCurrentIndex(0);
pathview->setHighlightMoveDuration(300);
@@ -1565,12 +1565,12 @@ void tst_QQuickPathView::changePreferredHighlight()
QPointF offset;//Center of item is at point, but pos is from corner
offset.setX(firstItem->width()/2);
offset.setY(firstItem->height()/2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
pathview->setPreferredHighlightBegin(0.8);
pathview->setPreferredHighlightEnd(0.8);
start = path->pointAt(0.8);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
QCOMPARE(pathview->currentIndex(), 0);
delete window;
@@ -1627,7 +1627,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion()
QPointF offset;//Center of item is at point, but pos is from corner
offset.setX(item->width()/2);
offset.setY(item->height()/2);
- QCOMPARE(item->pos() + offset, start);
+ QCOMPARE(item->position() + offset, start);
QSignalSpy currentIndexSpy(pathview, SIGNAL(currentIndexChanged()));
@@ -1641,7 +1641,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion()
QVERIFY(item = findItem<QQuickRectangle>(pathview, "wrapper", 1));
// verify that current item (item 1) is still at offset 0.5
- QCOMPARE(item->pos() + offset, start);
+ QCOMPARE(item->position() + offset, start);
// insert another item at the beginning
model.insertItem(0, "item2", "2");
@@ -1653,7 +1653,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion()
QVERIFY(item = findItem<QQuickRectangle>(pathview, "wrapper", 2));
// verify that current item (item 2) is still at offset 0.5
- QCOMPARE(item->pos() + offset, start);
+ QCOMPARE(item->position() + offset, start);
// verify that remove before current maintains current item
model.removeItem(0);
@@ -1665,7 +1665,7 @@ void tst_QQuickPathView::currentOffsetOnInsertion()
QVERIFY(item = findItem<QQuickRectangle>(pathview, "wrapper", 1));
// verify that current item (item 1) is still at offset 0.5
- QCOMPARE(item->pos() + offset, start);
+ QCOMPARE(item->position() + offset, start);
delete window;
}
@@ -1714,13 +1714,13 @@ void tst_QQuickPathView::asynchronous()
QPointF offset;//Center of item is at point, but pos is from corner
offset.setX(firstItem->width()/2);
offset.setY(firstItem->height()/2);
- QTRY_COMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->position() + offset, start);
pathview->setOffset(1.0);
for (int i=0; i<5; i++) {
QQuickItem *curItem = findItem<QQuickItem>(pathview, "wrapper", i);
QPointF itemPos(path->pointAt(0.2 + i*0.2));
- QCOMPARE(curItem->pos() + offset, itemPos);
+ QCOMPARE(curItem->position() + offset, itemPos);
}
delete window;
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index 3966fff5ec..ea2ad71bfc 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -3226,7 +3226,7 @@ void tst_qquicktextedit::preeditCursorRectangle()
QCoreApplication::sendEvent(edit, &query);
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(edit->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QCOMPARE(currentRect, previousRect);
// Verify that the micro focus rect moves to the left as the cursor position
@@ -3240,7 +3240,7 @@ void tst_qquicktextedit::preeditCursorRectangle()
QCoreApplication::sendEvent(edit, &query);
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(edit->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QVERIFY(previousRect.left() < currentRect.left());
QCOMPARE(editSpy.count(), 1); editSpy.clear();
QCOMPARE(panelSpy.count(), 1); panelSpy.clear();
@@ -3257,7 +3257,7 @@ void tst_qquicktextedit::preeditCursorRectangle()
QCoreApplication::sendEvent(edit, &query);
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(edit->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QCOMPARE(editSpy.count(), 1);
QCOMPARE(panelSpy.count(), 1);
@@ -3270,7 +3270,7 @@ void tst_qquicktextedit::preeditCursorRectangle()
QCoreApplication::sendEvent(edit, &query);
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(edit->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QCOMPARE(currentRect, previousRect);
QCOMPARE(editSpy.count(), 1);
QCOMPARE(panelSpy.count(), 1);
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 49e72e40fd..7e45bd1f14 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -3224,7 +3224,7 @@ void tst_qquicktextinput::passwordEchoDelay()
QCOMPARE(input->displayText(), QString(4, fillChar));
QTest::keyPress(&window, '4');
QCOMPARE(input->displayText(), QString(4, fillChar) + QLatin1Char('4'));
- QCOMPARE(input->cursorRectangle().topLeft(), cursor->pos());
+ QCOMPARE(input->cursorRectangle().topLeft(), cursor->position());
// Verify the last character entered is replaced by the fill character after a delay.
// Also check the cursor position is updated to accomdate a size difference between
@@ -3233,7 +3233,7 @@ void tst_qquicktextinput::passwordEchoDelay()
QTest::qWait(maskDelay);
QTRY_COMPARE(input->displayText(), QString(5, fillChar));
QCOMPARE(cursorSpy.count(), 1);
- QCOMPARE(input->cursorRectangle().topLeft(), cursor->pos());
+ QCOMPARE(input->cursorRectangle().topLeft(), cursor->position());
QTest::keyPress(&window, '5');
QCOMPARE(input->displayText(), QString(5, fillChar) + QLatin1Char('5'));
@@ -3653,7 +3653,7 @@ void tst_qquicktextinput::preeditCursorRectangle()
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(currentRect, previousRect);
QCOMPARE(input->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QSignalSpy inputSpy(input, SIGNAL(cursorRectangleChanged()));
QSignalSpy panelSpy(qGuiApp->inputMethod(), SIGNAL(cursorRectangleChanged()));
@@ -3666,7 +3666,7 @@ void tst_qquicktextinput::preeditCursorRectangle()
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QVERIFY(previousRect.left() < currentRect.left());
QCOMPARE(input->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QVERIFY(inputSpy.count() > 0); inputSpy.clear();
QVERIFY(panelSpy.count() > 0); panelSpy.clear();
previousRect = currentRect;
@@ -3680,7 +3680,7 @@ void tst_qquicktextinput::preeditCursorRectangle()
QCoreApplication::sendEvent(input, &query);
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(input->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QCOMPARE(inputSpy.count(), 1);
QCOMPARE(panelSpy.count(), 1);
@@ -3694,7 +3694,7 @@ void tst_qquicktextinput::preeditCursorRectangle()
currentRect = query.value(Qt::ImCursorRectangle).toRectF();
QCOMPARE(currentRect, previousRect);
QCOMPARE(input->cursorRectangle(), currentRect);
- QCOMPARE(cursor->pos(), currentRect.topLeft());
+ QCOMPARE(cursor->position(), currentRect.topLeft());
QCOMPARE(inputSpy.count(), 1);
QCOMPARE(panelSpy.count(), 1);
}
@@ -3990,7 +3990,7 @@ void tst_qquicktextinput::tripleClickSelectsAll()
// Clicking on the same point inside TextInput three times in a row
// should trigger a triple click, thus selecting all the text.
- QPoint pointInside = input->pos().toPoint() + QPoint(2,2);
+ QPoint pointInside = input->position().toPoint() + QPoint(2,2);
QTest::mouseDClick(&view, Qt::LeftButton, 0, pointInside);
QTest::mouseClick(&view, Qt::LeftButton, 0, pointInside);
QGuiApplication::processEvents();
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 5cede36f7f..ec9d0e280e 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -349,12 +349,12 @@ void tst_qquickwindow::touchEvent_basic()
TestTouchItem *middleItem = new TestTouchItem(bottomItem);
middleItem->setObjectName("Middle Item");
- middleItem->setPos(QPointF(50, 50));
+ middleItem->setPosition(QPointF(50, 50));
middleItem->setSize(QSizeF(150, 150));
TestTouchItem *topItem = new TestTouchItem(middleItem);
topItem->setObjectName("Top Item");
- topItem->setPos(QPointF(50, 50));
+ topItem->setPosition(QPointF(50, 50));
topItem->setSize(QSizeF(150, 150));
QPointF pos(10, 10);
@@ -478,12 +478,12 @@ void tst_qquickwindow::touchEvent_propagation()
TestTouchItem *middleItem = new TestTouchItem(bottomItem);
middleItem->setObjectName("Middle Item");
- middleItem->setPos(QPointF(50, 50));
+ middleItem->setPosition(QPointF(50, 50));
middleItem->setSize(QSizeF(150, 150));
TestTouchItem *topItem = new TestTouchItem(middleItem);
topItem->setObjectName("Top Item");
- topItem->setPos(QPointF(50, 50));
+ topItem->setPosition(QPointF(50, 50));
topItem->setSize(QSizeF(150, 150));
QPointF pos(10, 10);
@@ -606,7 +606,7 @@ void tst_qquickwindow::touchEvent_cancel()
QVERIFY(QTest::qWaitForWindowExposed(window));
TestTouchItem *item = new TestTouchItem(window->contentItem());
- item->setPos(QPointF(50, 50));
+ item->setPosition(QPointF(50, 50));
item->setSize(QSizeF(150, 150));
QPointF pos(10, 10);
@@ -642,7 +642,7 @@ void tst_qquickwindow::touchEvent_reentrant()
item->spinLoopWhenPressed = true; // will call processEvents() from the touch handler
- item->setPos(QPointF(50, 50));
+ item->setPosition(QPointF(50, 50));
item->setSize(QSizeF(150, 150));
QPointF pos(60, 60);
@@ -677,7 +677,7 @@ void tst_qquickwindow::touchEvent_velocity()
QTest::qWait(10);
TestTouchItem *item = new TestTouchItem(window->contentItem());
- item->setPos(QPointF(50, 50));
+ item->setPosition(QPointF(50, 50));
item->setSize(QSizeF(150, 150));
QList<QWindowSystemInterface::TouchPoint> points;
@@ -733,7 +733,7 @@ void tst_qquickwindow::mouseFromTouch_basic()
QTest::qWait(10);
TestTouchItem *item = new TestTouchItem(window->contentItem());
- item->setPos(QPointF(50, 50));
+ item->setPosition(QPointF(50, 50));
item->setSize(QSizeF(150, 150));
item->acceptTouchEvents = false;
@@ -816,12 +816,12 @@ void tst_qquickwindow::mouseFiltering()
TestTouchItem *middleItem = new TestTouchItem(bottomItem);
middleItem->setObjectName("Middle Item");
- middleItem->setPos(QPointF(50, 50));
+ middleItem->setPosition(QPointF(50, 50));
middleItem->setSize(QSizeF(150, 150));
TestTouchItem *topItem = new TestTouchItem(middleItem);
topItem->setObjectName("Top Item");
- topItem->setPos(QPointF(50, 50));
+ topItem->setPosition(QPointF(50, 50));
topItem->setSize(QSizeF(150, 150));
QPoint pos(100, 100);
@@ -1077,23 +1077,23 @@ void tst_qquickwindow::cursor()
window.resize(320, 240);
QQuickItem parentItem;
- parentItem.setPos(QPointF(0, 0));
+ parentItem.setPosition(QPointF(0, 0));
parentItem.setSize(QSizeF(180, 180));
parentItem.setParentItem(window.contentItem());
QQuickItem childItem;
- childItem.setPos(QPointF(60, 90));
+ childItem.setPosition(QPointF(60, 90));
childItem.setSize(QSizeF(120, 120));
childItem.setParentItem(&parentItem);
QQuickItem clippingItem;
- clippingItem.setPos(QPointF(120, 120));
+ clippingItem.setPosition(QPointF(120, 120));
clippingItem.setSize(QSizeF(180, 180));
clippingItem.setClip(true);
clippingItem.setParentItem(window.contentItem());
QQuickItem clippedItem;
- clippedItem.setPos(QPointF(-30, -30));
+ clippedItem.setPosition(QPointF(-30, -30));
clippedItem.setSize(QSizeF(120, 120));
clippedItem.setParentItem(&clippingItem);
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index 0590bd89eb..1af70e3464 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -703,7 +703,7 @@ void tst_TouchMouse::pinchOnFlickable()
QVERIFY(flickable->contentX() == 0.0);
QPoint p = QPoint(100, 100);
QTest::touchEvent(window, device).press(0, p, window);
- QCOMPARE(rect->pos(), QPointF(200.0, 200.0));
+ QCOMPARE(rect->position(), QPointF(200.0, 200.0));
p -= QPoint(10, 0);
QTest::touchEvent(window, device).move(0, p, window);
p -= QPoint(10, 0);
@@ -770,7 +770,7 @@ void tst_TouchMouse::flickableOnPinch()
QVERIFY(flickable->contentX() == 0.0);
QPoint p = QPoint(100, 100);
QTest::touchEvent(window, device).press(0, p, window);
- QCOMPARE(rect->pos(), QPointF(200.0, 200.0));
+ QCOMPARE(rect->position(), QPointF(200.0, 200.0));
p -= QPoint(10, 0);
QTest::touchEvent(window, device).move(0, p, window);
p -= QPoint(10, 0);
@@ -785,7 +785,7 @@ void tst_TouchMouse::flickableOnPinch()
QTest::qWait(1000);
//QVERIFY(flickable->isMovingHorizontally());
- qDebug() << "Pos: " << rect->pos();
+ qDebug() << "Pos: " << rect->position();
// wait until flicking is done
QTRY_VERIFY(!flickable->isFlicking());
@@ -839,7 +839,7 @@ void tst_TouchMouse::mouseOnFlickableOnPinch()
QVERIFY(flickable->contentX() == 0.0);
QPoint p = QPoint(100, 100);
QTest::touchEvent(window, device).press(0, p, window);
- QCOMPARE(rect->pos(), QPointF(200.0, 200.0));
+ QCOMPARE(rect->position(), QPointF(200.0, 200.0));
p -= QPoint(10, 0);
QTest::touchEvent(window, device).move(0, p, window);
p -= QPoint(10, 0);
@@ -851,7 +851,7 @@ void tst_TouchMouse::mouseOnFlickableOnPinch()
QGuiApplication::processEvents();
//QVERIFY(flickable->isMovingHorizontally());
- qDebug() << "Pos: " << rect->pos();
+ qDebug() << "Pos: " << rect->position();
// pinch
QPoint p1 = QPoint(40, 20);
@@ -885,7 +885,7 @@ void tst_TouchMouse::mouseOnFlickableOnPinch()
flickable->setContentX(0.0);
p = QPoint(100, 100);
pinchSequence.press(0, p, window).commit();
- QCOMPARE(rect->pos(), QPointF(200.0, 200.0));
+ QCOMPARE(rect->position(), QPointF(200.0, 200.0));
p -= QPoint(10, 0);
pinchSequence.move(0, p, window).commit();
p -= QPoint(10, 0);