Another attempt to fix wxUIActionSimulator compilation in wxQt
Pass QWindow to {mouse,key}Event() functions for Qt 5.3+, apparently Qt documentation is wrong and simply wasn't updated since Qt4.
This commit is contained in:
@@ -27,14 +27,14 @@
|
|||||||
using namespace Qt;
|
using namespace Qt;
|
||||||
using namespace QTest;
|
using namespace QTest;
|
||||||
|
|
||||||
// Apparently {mouse,key}Event() functions signature has changed somewhere
|
// Apparently {mouse,key}Event() functions signature has changed from QWidget
|
||||||
// between Qt 5.3 and 5.5 as they're documented to take QWidget in the latter
|
// to QWindow at some time during Qt5, but we don't know when exactly. We do
|
||||||
// but actually take QWindow in the former, so use this helper to hide the
|
// know that they take QWindow for 5.3 and, presumably, later versions (but not
|
||||||
// difference.
|
// for whichever version this code was originally written for).
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
|
||||||
inline QWidget* argForEvents(QWidget* w) { return w; }
|
|
||||||
#else
|
|
||||||
inline QWindow* argForEvents(QWidget* w) { return w->windowHandle(); }
|
inline QWindow* argForEvents(QWidget* w) { return w->windowHandle(); }
|
||||||
|
#else
|
||||||
|
inline QWidget* argForEvents(QWidget* w) { return w; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static MouseButton ConvertMouseButton( int button )
|
static MouseButton ConvertMouseButton( int button )
|
||||||
|
Reference in New Issue
Block a user