QmlDesigner: Fix compile with Qt5.11 and building tests

Change-Id: I96dea7de0d185c67ea3a26a42de0805bd60dc1d1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Christian Stenger
2020-02-24 14:33:20 +01:00
parent 0e48783c03
commit 5d3e56b3b4
2 changed files with 10 additions and 1 deletions

View File

@@ -1185,9 +1185,17 @@ void Qt5InformationNodeInstanceServer::inputEvent(const InputEventCommand &comma
{
if (m_editView3D) {
if (command.type() == QEvent::Wheel) {
auto we = new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()},
QWheelEvent *we
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
= new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()},
command.buttons(), command.modifiers(), Qt::NoScrollPhase,
false);
#else
= new QWheelEvent(command.pos(), command.pos(), {0, 0}, {0, command.angleDelta()},
0, Qt::Horizontal, command.buttons(), command.modifiers(),
Qt::NoScrollPhase, Qt::MouseEventNotSynthesized);
#endif
QGuiApplication::postEvent(m_editView3D, we);
} else {
auto me = new QMouseEvent(command.type(), command.pos(), command.button(),