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 (m_editView3D) {
if (command.type() == QEvent::Wheel) { 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, command.buttons(), command.modifiers(), Qt::NoScrollPhase,
false); 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); QGuiApplication::postEvent(m_editView3D, we);
} else { } else {
auto me = new QMouseEvent(command.type(), command.pos(), command.button(), auto me = new QMouseEvent(command.type(), command.pos(), command.button(),

View File

@@ -49,6 +49,7 @@ INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/stateseditor
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/formeditor INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/formeditor
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/propertyeditor INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/propertyeditor
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/edit3d
INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty
include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri) include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri)