mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Replace QFontMetrics::width by QFontMetrics::horizontalAdvance (#3921)
QFontMetrics::width was deprecated. This patch replaces all usages by QFontMetrics::horizontalAdvance. It also replace three usages of QTextEdit::setTabStopWidth by QTestEdit::setTabStopDistance.
This commit is contained in:
@@ -73,7 +73,7 @@ int CodeEditor::lineNumberAreaWidth()
|
||||
++digits;
|
||||
}
|
||||
|
||||
int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits;
|
||||
int space = 3 + fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits;
|
||||
|
||||
return space;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user