Mercurial > hg > svgui
comparison widgets/TextAbbrev.cpp @ 1478:d39db4673676 by-id
Fix a number of Qt deprecation warnings
author | Chris Cannam |
---|---|
date | Wed, 03 Jul 2019 08:55:02 +0100 |
parents | 1a0dfcbffaf1 |
children |
comparison
equal
deleted
inserted
replaced
1477:0769eaacc6bf | 1478:d39db4673676 |
---|---|
36 } | 36 } |
37 | 37 |
38 int | 38 int |
39 TextAbbrev::getFuzzWidth(const QFontMetrics &metrics, QString ellipsis) | 39 TextAbbrev::getFuzzWidth(const QFontMetrics &metrics, QString ellipsis) |
40 { | 40 { |
41 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested | |
42 // replacement (horizontalAdvance) was only added in Qt 5.11 | |
43 // which is too new for us | |
44 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
45 | |
41 int width = metrics.width(ellipsis); | 46 int width = metrics.width(ellipsis); |
42 return width * 2; | 47 return width * 2; |
43 } | 48 } |
44 | 49 |
45 QString | 50 QString |