From 61153ecc6e453a3576237cc1341e0d73fdb89176 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 4 Jun 2020 11:04:27 -0700 Subject: [PATCH] restore compatibility with older Qt versions Signed-off-by: Dirk Thomas --- .../view_controllers/view_controller_test_fixture.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rviz_default_plugins/test/rviz_default_plugins/view_controllers/view_controller_test_fixture.hpp b/rviz_default_plugins/test/rviz_default_plugins/view_controllers/view_controller_test_fixture.hpp index 1b2a0b4bc..5b997b8d0 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/view_controllers/view_controller_test_fixture.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/view_controllers/view_controller_test_fixture.hpp @@ -101,6 +101,7 @@ class ViewControllerTestFixture : public DisplayTestFixture auto global_point = QPointF(); auto pixel_delta = QPoint(); auto angle_delta = QPoint(delta, 0); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) auto mouseEvent = new QWheelEvent( point, global_point, @@ -110,6 +111,10 @@ class ViewControllerTestFixture : public DisplayTestFixture Qt::NoModifier, Qt::NoScrollPhase, false); +#else + auto mouseEvent = new QWheelEvent( + point, delta, Qt::NoButton, Qt::NoModifier, Qt::Orientation::Horizontal); +#endif return {render_panel_.get(), mouseEvent, 0, 0}; }