Replace QFontMetrics::width with horizontalAdvance, dark with darker, background() with window() and QString::null with QString()
This commit is contained in:
@@ -117,7 +117,7 @@ void QueuedItemDelegate::DrawBox(QPainter *painter, const QRect &line_rect, cons
|
||||
smaller.setPointSize(smaller.pointSize() - 1);
|
||||
smaller.setBold(true);
|
||||
|
||||
if (width == -1) width = QFontMetrics(font).width(text + " ");
|
||||
if (width == -1) width = QFontMetrics(font).horizontalAdvance(text + " ");
|
||||
|
||||
QRect rect(line_rect);
|
||||
rect.setLeft(rect.right() - width - kQueueBoxBorder);
|
||||
@@ -295,7 +295,7 @@ QString LengthItemDelegate::displayText(const QVariant &value, const QLocale&) c
|
||||
qint64 nanoseconds = value.toLongLong(&ok);
|
||||
|
||||
if (ok && nanoseconds > 0) return Utilities::PrettyTimeNanosec(nanoseconds);
|
||||
return QString::null;
|
||||
return QString();
|
||||
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ QString DateItemDelegate::displayText(const QVariant &value, const QLocale &loca
|
||||
int time = value.toInt(&ok);
|
||||
|
||||
if (!ok || time == -1)
|
||||
return QString::null;
|
||||
return QString();
|
||||
|
||||
return QDateTime::fromTime_t(time).toString(QLocale::system().dateTimeFormat(QLocale::ShortFormat));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user