Qbs: fix build clang, mingw

This commit is contained in:
Jakub Melka
2021-12-14 19:28:38 +01:00
parent 0a35c95aa7
commit 92f4055d05
34 changed files with 81 additions and 82 deletions

View File

@@ -308,6 +308,8 @@ QVariant InkCoverageStatisticsModel::data(const QModelIndex& index, int role) co
Q_ASSERT(false);
break;
}
break;
}
case Qt::BackgroundColorRole:

View File

@@ -355,7 +355,7 @@ void OutputPreviewWidget::paintEvent(QPaintEvent* event)
QString textCoverage = QString("%1 %").arg(locale.toString(coverage * 100.0, 'f', 2));
const int textRight = triangleLeft - rowHeight / 4;
const int textWidth = painter.fontMetrics().width(textCoverage);
const int textWidth = painter.fontMetrics().horizontalAdvance(textCoverage);
const int textStart = textRight - textWidth;
QRect textRect(textStart, yCoordinate - halfHeight, textWidth + 1, rowHeight);