summaryrefslogtreecommitdiff
path: root/platform/qt/app/mapwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/app/mapwindow.cpp')
-rw-r--r--platform/qt/app/mapwindow.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp
index 536731929e..551af4630b 100644
--- a/platform/qt/app/mapwindow.cpp
+++ b/platform/qt/app/mapwindow.cpp
@@ -9,13 +9,8 @@
#include <QMouseEvent>
#include <QString>
-#if QT_VERSION >= 0x050000
-#include <QWindow>
-#endif
-
int kAnimationDuration = 10000;
-
MapWindow::MapWindow(const QMapboxGLSettings &settings)
: m_settings(settings)
{
@@ -45,13 +40,7 @@ void MapWindow::selfTest()
}
qreal MapWindow::pixelRatio() {
-#if QT_VERSION >= 0x050600
return devicePixelRatioF();
-#elif QT_VERSION >= 0x050000
- return devicePixelRatio();
-#else
- return 1;
-#endif
}
@@ -369,11 +358,7 @@ void MapWindow::keyPressEvent(QKeyEvent *ev)
void MapWindow::mousePressEvent(QMouseEvent *ev)
{
-#if QT_VERSION < 0x050000
- m_lastPos = ev->posF();
-#else
m_lastPos = ev->localPos();
-#endif
if (ev->type() == QEvent::MouseButtonPress) {
if (ev->buttons() == (Qt::LeftButton | Qt::RightButton)) {
@@ -394,11 +379,7 @@ void MapWindow::mousePressEvent(QMouseEvent *ev)
void MapWindow::mouseMoveEvent(QMouseEvent *ev)
{
-#if QT_VERSION < 0x050000
- QPointF delta = ev->posF() - m_lastPos;
-#else
QPointF delta = ev->localPos() - m_lastPos;
-#endif
if (!delta.isNull()) {
if (ev->buttons() == Qt::LeftButton && ev->modifiers() & Qt::ShiftModifier) {
@@ -406,19 +387,11 @@ void MapWindow::mouseMoveEvent(QMouseEvent *ev)
} else if (ev->buttons() == Qt::LeftButton) {
m_map->moveBy(delta);
} else if (ev->buttons() == Qt::RightButton) {
-#if QT_VERSION < 0x050000
- m_map->rotateBy(m_lastPos, ev->posF());
-#else
m_map->rotateBy(m_lastPos, ev->localPos());
-#endif
}
}
-#if QT_VERSION < 0x050000
- m_lastPos = ev->posF();
-#else
m_lastPos = ev->localPos();
-#endif
ev->accept();
}
@@ -464,8 +437,6 @@ void MapWindow::paintGL()
{
m_frameDraws++;
m_map->resize(size());
-#if QT_VERSION >= 0x050400
m_map->setFramebufferObject(defaultFramebufferObject(), size() * pixelRatio());
-#endif
m_map->render();
}