From 7125dd7186c1a44fb9203b3c0193670462562051 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Wed, 9 Nov 2011 16:19:54 +1000 Subject: Propagate QTest::mouseEvent keyboard modifiers. The QWindowSystemInterface mouse functions now have keyboard modifiers parameter, make use of them. Task-number: QTBUG-21743 Change-Id: I65ba1095825b81d575d314c1de2a45cef28e697a Reviewed-by: Jason McDonald --- src/testlib/qtestmouse.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/testlib/qtestmouse.h') diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 7a928a0693..cc6b3de9a9 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -98,24 +98,24 @@ namespace QTest switch (action) { case MousePress: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); lastButton = button; break; case MouseRelease: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); lastButton = Qt::NoButton; break; case MouseDClick: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); qWait(10); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); qWait(20); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); qWait(10); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); break; case MouseMove: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),lastButton); + QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),lastButton,stateKey); //QCursor::setPos(window->mapToGlobal(pos)); #ifdef Q_OS_MAC QTest::qWait(20); -- cgit v1.2.3