Use correct signature for Qt mouseEvent and keyEvent

This commit is contained in:
Maarten Bent
2018-09-18 19:12:42 +02:00
parent a02df37fb8
commit 4a93c99aeb

View File

@@ -31,9 +31,9 @@ using namespace QTest;
// Apparently {mouse,key}Event() functions signature has changed from QWidget
// to QWindow at some time during Qt5, but we don't know when exactly. We do
// know that they take QWindow for 5.3 and, presumably, later versions (but not
// know that they take QWindow for 5.2 and, presumably, later versions (but not
// for whichever version this code was originally written for).
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
inline QWindow* argForEvents(QWidget* w) { return w->windowHandle(); }
#else
inline QWidget* argForEvents(QWidget* w) { return w; }