Mercurial > hg > svgui
comparison layer/HorizontalFrequencyScale.cpp @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | f2525e6cbdf1 |
children |
comparison
equal
deleted
inserted
replaced
1468:de41a11cabc2 | 1486:ac0a8addabcf |
---|---|
54 n = int(ticks.size()); | 54 n = int(ticks.size()); |
55 | 55 |
56 int marginx = -1; | 56 int marginx = -1; |
57 | 57 |
58 for (int i = 0; i < n; ++i) { | 58 for (int i = 0; i < n; ++i) { |
59 | |
60 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested | |
61 // replacement (horizontalAdvance) was only added in Qt 5.11 | |
62 // which is too new for us | |
63 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
59 | 64 |
60 double val = ticks[i].value; | 65 double val = ticks[i].value; |
61 QString label = QString::fromStdString(ticks[i].label); | 66 QString label = QString::fromStdString(ticks[i].label); |
62 int tw = paint.fontMetrics().width(label); | 67 int tw = paint.fontMetrics().width(label); |
63 | 68 |