From 0a8e2c0b215af1287f1d250a7f48fa2852e75610 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Sat, 3 Oct 2015 00:07:08 -0500 Subject: [PATCH] Fix building OpenCS with Qt 5. --- apps/opencs/view/render/worldspacewidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/opencs/view/render/worldspacewidget.cpp b/apps/opencs/view/render/worldspacewidget.cpp index 2789cd9d5..75dd800eb 100644 --- a/apps/opencs/view/render/worldspacewidget.cpp +++ b/apps/opencs/view/render/worldspacewidget.cpp @@ -528,8 +528,13 @@ void CSVRender::WorldspaceWidget::mouseMoveEvent (QMouseEvent *event) if (mDragging) { +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + mDragX = event->localPos().x(); + mDragY = height() - event->localPos().y(); +#else mDragX = event->posF().x(); mDragY = height() - event->posF().y(); +#endif } } }