Remove dead code "< QT_VERSION_CHECK(5, 14, 0)"

Qt Creator required Qt 5.14 or higher. Let's removed the #idef-ed code
for building against lower Qt versions.

Add a comment in porting.h where we still need such code for sdktool.

Change-Id: Ib330275208eec4a2f285b4b9f480530c171f538a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2021-03-09 16:56:25 +01:00
parent e960062b80
commit 93fbd5be02
25 changed files with 5 additions and 159 deletions

View File

@@ -209,13 +209,8 @@ void TimelineRenderer::wheelEvent(QWheelEvent *event)
int degrees = (event->angleDelta().x() + event->angleDelta().y()) / 8;
const qint64 circle = 360;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
qint64 mouseTime = event->pos().x() * zoom->windowDuration() / width() +
zoom->windowStart();
#else
qint64 mouseTime = event->position().toPoint().x() * zoom->windowDuration() / width() +
zoom->windowStart();
#endif
qint64 beforeMouse = (mouseTime - zoom->rangeStart()) * (circle - degrees) / circle;
qint64 afterMouse = (zoom->rangeEnd() - mouseTime) * (circle - degrees) / circle;