Merge #16758: qt: Replace QFontMetrics::width() with TextWidth()
8b6f5aabb9
qt: Replace QFontMetrics::width() with TextWidth() (Hennadii Stepanov) Pull request description: Compiling master (d8fc997913
) on macOS Catalina (with a patch from #16720) reveals one more instance of `QFontMetrics::width()` which is supposed to be replaced with `TextWidth()` in the merged #16701. Sorry for incomplete solution provided in #16701. It’s especially sad that the line I missed lies in only 7 lines from the code touched in #16701. ACKs for top commit: fanquake: ACK8b6f5aabb9
Tree-SHA512: 65cd8bea550150e5ee47c1e906d8c2393547cf4feba3701a933a4f24fad5ecdb552ac2de4e1200ed14efaa0df0480150dd58fccbddc3b902f6c2141603874902
This commit is contained in:
commit
f5db3f2128
1 changed files with 1 additions and 1 deletions
|
@ -947,7 +947,7 @@ void PolishProgressDialog(QProgressDialog* dialog)
|
|||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// Workaround for macOS-only Qt bug; see: QTBUG-65750, QTBUG-70357.
|
||||
const int margin = dialog->fontMetrics().width("X");
|
||||
const int margin = TextWidth(dialog->fontMetrics(), ("X"));
|
||||
dialog->resize(dialog->width() + 2 * margin, dialog->height());
|
||||
dialog->show();
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue