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

More layer updates
author Chris Cannam
date Mon, 01 Jul 2019 14:17:13 +0100
parents 11a150e65ee1
children 886c1cd48f9d
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp	Fri Jun 28 17:37:22 2019 +0100
+++ b/layer/Colour3DPlotRenderer.cpp	Mon Jul 01 14:17:13 2019 +0100
@@ -531,6 +531,11 @@
         int rw = rx1 - rx0;
         if (rw < 1) rw = 1;
 
+        // 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"
+        
         bool showLabel = (rw > 10 &&
                           paint.fontMetrics().width("0.000000") < rw - 3 &&
                           paint.fontMetrics().height() < (h / sh));