Fixed most Qt 5.14 deprecation warnings

This commit is contained in:
Mat Sutcliffe
2019-12-31 00:38:59 +00:00
parent 010aaf58b5
commit 4a0d8e9864
40 changed files with 110 additions and 107 deletions

View File

@@ -829,7 +829,7 @@ namespace BlackGui
label->setToolTip(longText);
const QFontMetrics metrics(label->font());
const int width = qMax(label->width() - 2, 0);
const int wl = metrics.width(longText);
const int wl = metrics.horizontalAdvance(longText);
if (wl >= width) { label->setText(longText); return; }
if (qRound(wl * 0.85) > wl)
{