Mercurial > hg > svgui
comparison widgets/WindowShapePreview.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 | 6796afa25c88 |
children |
comparison
equal
deleted
inserted
replaced
1477:0769eaacc6bf | 1478:d39db4673676 |
---|---|
110 } | 110 } |
111 | 111 |
112 timePainter.setRenderHint(QPainter::Antialiasing, true); | 112 timePainter.setRenderHint(QPainter::Antialiasing, true); |
113 path.addRect(0, 0, w, h + 1); | 113 path.addRect(0, 0, w, h + 1); |
114 timePainter.drawPath(path); | 114 timePainter.drawPath(path); |
115 | |
116 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested | |
117 // replacement (horizontalAdvance) was only added in Qt 5.11 | |
118 // which is too new for us | |
119 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
115 | 120 |
116 QFont font; | 121 QFont font; |
117 font.setPixelSize(int(10 * scaleRatio)); | 122 font.setPixelSize(int(10 * scaleRatio)); |
118 font.setItalic(true); | 123 font.setItalic(true); |
119 timePainter.setFont(font); | 124 timePainter.setFont(font); |