diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2009-10-14 09:30:43 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2009-10-14 09:35:25 (GMT) |
commit | f151424797794cba5a3fdaf628eabaa75a5e7801 (patch) | |
tree | 119a58e279f4866ede9f63e5b8947cc01068a737 /src/gui/itemviews/qtablewidget.cpp | |
parent | 4ee954db7f99ba7021b4b825852fe56c3bcb022c (diff) | |
download | Qt-f151424797794cba5a3fdaf628eabaa75a5e7801.zip Qt-f151424797794cba5a3fdaf628eabaa75a5e7801.tar.gz Qt-f151424797794cba5a3fdaf628eabaa75a5e7801.tar.bz2 |
Make the autotest pass for descending order in QTableWidget
It failed after this commit:
19030e2af098e319e3c3f3883c51e28364bf3ccf
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/itemviews/qtablewidget.cpp')
-rw-r--r-- | src/gui/itemviews/qtablewidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp index 65758b8..21c4e0a 100644 --- a/src/gui/itemviews/qtablewidget.cpp +++ b/src/gui/itemviews/qtablewidget.cpp @@ -571,7 +571,7 @@ void QTableModel::ensureSorted(int column, Qt::SortOrder order, colItems.remove(oldRow); vit = sortedInsertionIterator(vit, colItems.end(), order, item); int newRow = qMax((int)(vit - colItems.begin()), 0); - if ((newRow < oldRow) && !(*item < *colItems.at(oldRow - 1))) + if ((newRow < oldRow) && !(*item < *colItems.at(oldRow - 1)) && !(*colItems.at(oldRow - 1) < *item)) newRow = oldRow; vit = colItems.insert(vit, item); if (newRow != oldRow) { |