summaryrefslogtreecommitdiffhomepage
path: root/spline
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-10-17 19:20:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-10-17 19:21:54 +0200
commit63a43fb7903b26f3d8bde5e32b38af9621994ff9 (patch)
tree07576073616da1323bbb4854620d96d7fdc39d23 /spline
parent53f16e314c38700439b5cf58b285b1ea27c4ed53 (diff)
opentrack, spline-widget: drop old Qt workarounds
Diffstat (limited to 'spline')
-rw-r--r--spline/spline-widget.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index 9df9b3be..514bbf7b 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -80,10 +80,6 @@ bool spline_widget::is_preview_only() const
return preview_only;
}
-#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
-# define OTR_OBSOLETE_QT_WORKAROUND
-#endif
-
void spline_widget::drawBackground()
{
QPainter painter(&background_img);
@@ -114,11 +110,7 @@ void spline_widget::drawBackground()
const double maxx = config->max_input();
const double maxy = config->max_output();
-#ifndef OTR_OBSOLETE_QT_WORKAROUND
double space_width = metrics.horizontalAdvance(' ');
-#else
- double space_width = metrics.averageCharWidth();
-#endif
painter.setPen(palette().text().color());
@@ -153,11 +145,7 @@ void spline_widget::drawBackground()
const QString text = QString::number(i);
QRectF rect = metrics.boundingRect(text);
-#ifndef OTR_OBSOLETE_QT_WORKAROUND
double advance = metrics.horizontalAdvance(text);
-#else
- double advance = rect.right();
-#endif
painter.drawText(QPointF(x - advance/2 - rect.left(),
pixel_bounds.bottom() + metrics.lineSpacing()),