diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2012-07-26 18:48:56 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-02 17:25:37 +0200 |
commit | 5ac4a1304b44283bb0ddf593b08e7e44ed9a107f (patch) | |
tree | 632ffbe48e35227ca25faa6797f2e75901e673e6 /src/testlib/qtestmouse.h | |
parent | 4c4ba15a409737abe7cc07bdc452d556ec9ecbdc (diff) |
Make tests compile without gui-private
Add new qt_handleXXX functions that forward to the QWindowSystemInterface
functions, and use those in the testlib inline functions. Remove use of
struct QWindowSystemInterface::TouchPoint from the testlib header files
(requiring some slight increase in ugliness in the two tests that use
that struct).
Also remove the qmake hack that adds private headers to all tests
Change-Id: Iec23537e55a44802f6e9cd463f7a0f82007c5250
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Diffstat (limited to 'src/testlib/qtestmouse.h')
-rw-r--r-- | src/testlib/qtestmouse.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 515c2593b9..fa50466d28 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -54,7 +54,6 @@ #include <QtCore/qpoint.h> #include <QtCore/qstring.h> #include <QtGui/qevent.h> -#include <QtGui/qwindowsysteminterface.h> #ifdef QT_WIDGETS_LIB #include <QtWidgets/qapplication.h> @@ -65,6 +64,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier); namespace QTest { @@ -108,24 +108,24 @@ namespace QTest switch (action) { case MousePress: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); lastButton = button; break; case MouseRelease: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); lastButton = Qt::NoButton; break; case MouseDClick: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); qWait(10); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); qWait(20); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),button,stateKey); qWait(10); - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),Qt::NoButton,stateKey); break; case MouseMove: - QWindowSystemInterface::handleMouseEvent(window,pos,window->mapToGlobal(pos),lastButton,stateKey); + qt_handleMouseEvent(window,pos,window->mapToGlobal(pos),lastButton,stateKey); // No QCursor::setPos() call here. That could potentially result in mouse events sent by the windowing system // which is highly undesired here. Tests must avoid relying on QCursor. break; |