summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtreewidget
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@gmail.com>2009-06-08 09:05:35 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-06-08 09:51:41 (GMT)
commitb5579e01a023800a6fd81193209db00e000a3620 (patch)
tree3e865551146846196e2aaa0f405d868e5900bfa7 /tests/auto/qtreewidget
parenteb8789ba06949974eb4108b115a30f96e1500a81 (diff)
downloadQt-b5579e01a023800a6fd81193209db00e000a3620.zip
Qt-b5579e01a023800a6fd81193209db00e000a3620.tar.gz
Qt-b5579e01a023800a6fd81193209db00e000a3620.tar.bz2
Made QTreeWidgetItem::operator<() check if the data is numerical when comparing.
More information in task 166873. Merge-request: 514 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'tests/auto/qtreewidget')
-rw-r--r--tests/auto/qtreewidget/tst_qtreewidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qtreewidget/tst_qtreewidget.cpp b/tests/auto/qtreewidget/tst_qtreewidget.cpp
index 906332c..32a2c40 100644
--- a/tests/auto/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/qtreewidget/tst_qtreewidget.cpp
@@ -2434,6 +2434,10 @@ void tst_QTreeWidget::itemOperatorLessThan()
item1.setText(0, "b");
item2.setText(0, "a");
QCOMPARE(item1 < item2, true);
+ tw.sortItems(0, Qt::AscendingOrder);
+ item1.setData(0, Qt::DisplayRole, 11);
+ item2.setData(0, Qt::DisplayRole, 2);
+ QCOMPARE(item1 < item2, false);
}
}