diff layer/LinearNumericalScale.cpp @ 1471:f2525e6cbdf1 by-id

More layer updates
author Chris Cannam
date Mon, 01 Jul 2019 14:17:13 +0100
parents fc9d9f1103fa
children
line wrap: on
line diff
--- a/layer/LinearNumericalScale.cpp	Fri Jun 28 17:37:22 2019 +0100
+++ b/layer/LinearNumericalScale.cpp	Mon Jul 01 14:17:13 2019 +0100
@@ -27,6 +27,11 @@
 LinearNumericalScale::getWidth(LayerGeometryProvider *,
                                    QPainter &paint)
 {
+    // Qt 5.13 deprecates QFontMetrics::width(), but its suggested
+    // replacement (horizontalAdvance) was only added in Qt 5.11
+    // which is too new for us
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
     return paint.fontMetrics().width("-000.00") + 10;
 }