Renamed QWindow::pos property to position
Abbreviated properties are to be avoided, and this is a new class so we have a good opportunity to avoid it before the release. Related to qtbase change I19c00b54b1d2712f9418e8bcf56e35a8008b89ef Change-Id: Ibd5cd10814c8cbd2b1f6e49b70782c7768d2366d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
2973dc4324
commit
e35c6a788a
|
@ -339,7 +339,7 @@ void tst_qquickwindow::touchEvent_basic()
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
|
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ void tst_qquickwindow::touchEvent_basic()
|
||||||
|
|
||||||
QVERIFY(middleItem->lastEvent.touchPoints.isEmpty());
|
QVERIFY(middleItem->lastEvent.touchPoints.isEmpty());
|
||||||
QVERIFY(bottomItem->lastEvent.touchPoints.isEmpty());
|
QVERIFY(bottomItem->lastEvent.touchPoints.isEmpty());
|
||||||
// At one point this was failing with kwin (KDE window manager) because window->setPos(100, 100)
|
// At one point this was failing with kwin (KDE window manager) because window->setPosition(100, 100)
|
||||||
// would put the decorated window at that position rather than the window itself.
|
// would put the decorated window at that position rather than the window itself.
|
||||||
COMPARE_TOUCH_DATA(topItem->lastEvent, makeTouchData(QEvent::TouchBegin, window, Qt::TouchPointPressed, makeTouchPoint(topItem, pos)));
|
COMPARE_TOUCH_DATA(topItem->lastEvent, makeTouchData(QEvent::TouchBegin, window, Qt::TouchPointPressed, makeTouchPoint(topItem, pos)));
|
||||||
topItem->reset();
|
topItem->reset();
|
||||||
|
@ -468,7 +468,7 @@ void tst_qquickwindow::touchEvent_propagation()
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
|
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ void tst_qquickwindow::touchEvent_cancel()
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
|
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ void tst_qquickwindow::touchEvent_reentrant()
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
|
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
|
@ -671,7 +671,7 @@ void tst_qquickwindow::touchEvent_velocity()
|
||||||
QQuickWindow *window = new QQuickWindow;
|
QQuickWindow *window = new QQuickWindow;
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
QTest::qWait(10);
|
QTest::qWait(10);
|
||||||
|
@ -727,7 +727,7 @@ void tst_qquickwindow::mouseFromTouch_basic()
|
||||||
QQuickWindow *window = new QQuickWindow;
|
QQuickWindow *window = new QQuickWindow;
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
QTest::qWait(10);
|
QTest::qWait(10);
|
||||||
|
@ -806,7 +806,7 @@ void tst_qquickwindow::mouseFiltering()
|
||||||
QQuickWindow *window = new QQuickWindow;
|
QQuickWindow *window = new QQuickWindow;
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ void tst_qquickwindow::clearColor()
|
||||||
QQuickWindow *window = new QQuickWindow;
|
QQuickWindow *window = new QQuickWindow;
|
||||||
QScopedPointer<QQuickWindow> cleanup(window);
|
QScopedPointer<QQuickWindow> cleanup(window);
|
||||||
window->resize(250, 250);
|
window->resize(250, 250);
|
||||||
window->setPos(100, 100);
|
window->setPosition(100, 100);
|
||||||
window->setColor(Qt::blue);
|
window->setColor(Qt::blue);
|
||||||
window->show();
|
window->show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(window));
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
@ -894,7 +894,7 @@ void tst_qquickwindow::multipleWindows()
|
||||||
QQuickWindow *c = new QQuickWindow();
|
QQuickWindow *c = new QQuickWindow();
|
||||||
c->setColor(Qt::GlobalColor(Qt::red + i));
|
c->setColor(Qt::GlobalColor(Qt::red + i));
|
||||||
c->resize(300, 200);
|
c->resize(300, 200);
|
||||||
c->setPos(100 + i * 30, 100 + i * 20);
|
c->setPosition(100 + i * 30, 100 + i * 20);
|
||||||
c->show();
|
c->show();
|
||||||
windows << c;
|
windows << c;
|
||||||
cleanup[i].reset(c);
|
cleanup[i].reset(c);
|
||||||
|
@ -904,7 +904,7 @@ void tst_qquickwindow::multipleWindows()
|
||||||
// move them
|
// move them
|
||||||
for (int i=0; i<windows.size(); ++i) {
|
for (int i=0; i<windows.size(); ++i) {
|
||||||
QQuickWindow *c = windows.at(i);
|
QQuickWindow *c = windows.at(i);
|
||||||
c->setPos(100 + i * 30, 100 + i * 20 + 100);
|
c->setPosition(100 + i * 30, 100 + i * 20 + 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// resize them
|
// resize them
|
||||||
|
|
|
@ -105,7 +105,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
void MainWindow::showQuickView()
|
void MainWindow::showQuickView()
|
||||||
{
|
{
|
||||||
const int margin = 16;
|
const int margin = 16;
|
||||||
quickView.setPos(pos() + QPoint(0, frameGeometry().height() + margin));
|
quickView.setPosition(pos() + QPoint(0, frameGeometry().height() + margin));
|
||||||
|
|
||||||
quickView.raise();
|
quickView.raise();
|
||||||
quickView.show();
|
quickView.show();
|
||||||
|
|
Loading…
Reference in New Issue