From 9360ee160517403588ab62c353ad5b1afdbb2760 Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Thu, 8 Sep 2011 13:52:50 +0200 Subject: [PATCH] Disambiguated access to touch event API in QTestLib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 079ec157f82f79814bd70a1f8753daa37b8d5c3f overloads the touch event API in QTestLib so that QWindow * can be passed directly to certain functions. This fix disambiguates access to the new API by selecting the QWindow * versions. This assumes that the QWidget * versions are kept mostly for backwards compatibility. Change-Id: Ib6b33edc64d81f300d4109d59fd29f25ccd605db Reviewed-on: http://codereview.qt-project.org/4443 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- .../kernel/qtouchevent/tst_qtouchevent.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index f0347e39ff..401f79cbc2 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -1333,11 +1333,11 @@ void tst_QTouchEvent::crashInQGraphicsSceneAfterNotHandlingTouchBegin() QPoint centerPos = view.mapFromScene(rect->boundingRect().center()); // Touch the button - QTest::touchEvent(view.viewport()).press(0, centerPos); - QTest::touchEvent(view.viewport()).release(0, centerPos); + QTest::touchEvent(view.viewport()).press(0, centerPos, static_cast(0)); + QTest::touchEvent(view.viewport()).release(0, centerPos, static_cast(0)); // Touch outside of the button - QTest::touchEvent(view.viewport()).press(0, view.mapFromScene(QPoint(10, 10))); - QTest::touchEvent(view.viewport()).release(0, view.mapFromScene(QPoint(10, 10))); + QTest::touchEvent(view.viewport()).press(0, view.mapFromScene(QPoint(10, 10)), static_cast(0)); + QTest::touchEvent(view.viewport()).release(0, view.mapFromScene(QPoint(10, 10)), static_cast(0)); } void tst_QTouchEvent::touchBeginWithGraphicsWidget() @@ -1358,12 +1358,12 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget() QTest::qWaitForWindowShown(&view); view.fitInView(scene.sceneRect()); - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .press(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport()); - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .stationary(0) .press(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport()); - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .release(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport()) .release(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport()); @@ -1375,12 +1375,12 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget() root->reset(); glassWidget->setWindowFlags(Qt::Window); // make the glassWidget a panel - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .press(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport()); - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .stationary(0) .press(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport()); - QTest::touchEvent() + QTest::touchEvent(static_cast(0)) .release(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport()) .release(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());