[locale] Chase deprecations in Qt
This commit is contained in:
parent
fc7ea80d99
commit
ad868033f3
@ -225,7 +225,7 @@ void TimeZoneWidget::paintEvent( QPaintEvent* )
|
|||||||
painter.drawImage( point.x() - pin.width()/2, point.y() - pin.height()/2, pin );
|
painter.drawImage( point.x() - pin.width()/2, point.y() - pin.height()/2, pin );
|
||||||
|
|
||||||
// Draw text and box
|
// Draw text and box
|
||||||
const int textWidth = fontMetrics.width( LocaleGlobal::Location::pretty( currentLocation.zone ) );
|
const int textWidth = fontMetrics.horizontalAdvance( LocaleGlobal::Location::pretty( currentLocation.zone ) );
|
||||||
const int textHeight = fontMetrics.height();
|
const int textHeight = fontMetrics.height();
|
||||||
|
|
||||||
QRect rect = QRect( point.x() - textWidth/2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2 );
|
QRect rect = QRect( point.x() - textWidth/2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2 );
|
||||||
|
Loading…
Reference in New Issue
Block a user