diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-27 16:35:42 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-28 08:50:45 (GMT) |
commit | e8019cf8feb402303e6d253f5ca58bebfda42679 (patch) | |
tree | cba9df8712260b31ceb08f90ca8a94e1f0ae76d2 /src/gui/styles/qcommonstyle.cpp | |
parent | 61c6d66b7efd8de4a83b021e7c4ef2b1a803ece2 (diff) | |
download | Qt-e8019cf8feb402303e6d253f5ca58bebfda42679.zip Qt-e8019cf8feb402303e6d253f5ca58bebfda42679.tar.gz Qt-e8019cf8feb402303e6d253f5ca58bebfda42679.tar.bz2 |
Fixes warnings about unused variables
Reviewed-by: jbache
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 8f99d6a..7944a0b 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -901,24 +901,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); @@ -936,8 +918,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; |