diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-27 18:35:42 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:51 +0200 |
commit | 138cf4373b093e42c9bc9a713a34bc14a9776c5b (patch) | |
tree | cb4e0ba01916be7d6a098662c217ffa2ef24b96f /src/gui/styles/qcommonstyle.cpp | |
parent | c6e1ee2b283336e6a4599857542dd838bb372eb1 (diff) |
Fixes warnings about unused variables
Reviewed-by: jbache
(cherry picked from commit e8019cf8feb402303e6d253f5ca58bebfda42679)
Diffstat (limited to 'src/gui/styles/qcommonstyle.cpp')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 3d04c9a897..2534d3e840 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -898,24 +898,6 @@ QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItemV4 *option, in return QSize(0, 0); } -static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth) -{ - qreal height = 0; - qreal widthUsed = 0; - textLayout.beginLayout(); - while (true) { - QTextLine line = textLayout.createLine(); - if (!line.isValid()) - break; - line.setLineWidth(lineWidth); - line.setPosition(QPointF(0, height)); - height += line.height(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - } - textLayout.endLayout(); - return QSizeF(widthUsed, height); -} - void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewItemV4 *option, const QRect &rect) const { Q_Q(const QCommonStyle); @@ -933,8 +915,6 @@ void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewIt textLayout.setFont(option->font); textLayout.setText(option->text); - QSizeF textLayoutSize = viewItemTextLayout(textLayout, textRect.width()); - QString elidedText; qreal height = 0; qreal width = 0; |