diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-17 03:49:53 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-17 03:49:53 (GMT) |
commit | 815a5f08161f7add4a8b9d71f95bed0f45fbbe41 (patch) | |
tree | 33d2e68038826ea0f5fec402303a585403b0be21 /src/gui/itemviews/qtreeview.cpp | |
parent | 5872a38a2f2ccc67b590d580a258e110ee2d80dc (diff) | |
parent | 467face42d2db216860dade5f5d817a8cddb86f3 (diff) | |
download | Qt-815a5f08161f7add4a8b9d71f95bed0f45fbbe41.zip Qt-815a5f08161f7add4a8b9d71f95bed0f45fbbe41.tar.gz Qt-815a5f08161f7add4a8b9d71f95bed0f45fbbe41.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/itemviews/qtreeview.cpp')
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index cbe1d2a..539a642 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -2797,15 +2797,14 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const if (isRightToLeft()) { start = (start == -1 ? count - 1 : start); - end = (end == -1 ? 0 : end); + end = 0; } else { start = (start == -1 ? 0 : start); - end = (end == -1 ? count - 1 : end); + end = count - 1; } - int tmp = start; - start = qMin(start, end); - end = qMax(tmp, end); + if (end < start) + qSwap(end, start); int height = -1; QStyleOptionViewItemV4 option = d->viewOptionsV4(); |