summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qstandarditemmodel.cpp
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@digia.com>2009-08-18 14:44:21 (GMT)
committerJanne Koskinen <janne.p.koskinen@digia.com>2009-08-18 14:44:21 (GMT)
commit3d6056dfe01116e34a2b47a70fb95e73753ef766 (patch)
treeee4e1430dc9f0b06ab89091682d5a60525eac560 /src/gui/itemviews/qstandarditemmodel.cpp
parent52e469a629d32b7f7e52518874dab13fcd4bb814 (diff)
parent69689f3527f373618a1f4adad543b60afea46c17 (diff)
downloadQt-3d6056dfe01116e34a2b47a70fb95e73753ef766.zip
Qt-3d6056dfe01116e34a2b47a70fb95e73753ef766.tar.gz
Qt-3d6056dfe01116e34a2b47a70fb95e73753ef766.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/gui/itemviews/qstandarditemmodel.cpp')
-rw-r--r--src/gui/itemviews/qstandarditemmodel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/itemviews/qstandarditemmodel.cpp b/src/gui/itemviews/qstandarditemmodel.cpp
index f2fc37e..9ae3214 100644
--- a/src/gui/itemviews/qstandarditemmodel.cpp
+++ b/src/gui/itemviews/qstandarditemmodel.cpp
@@ -1806,7 +1806,7 @@ bool QStandardItem::operator<(const QStandardItem &other) const
const int role = model() ? model()->sortRole() : Qt::DisplayRole;
const QVariant l = data(role), r = other.data(role);
// this code is copied from QSortFilterProxyModel::lessThan()
- switch (l.type()) {
+ switch (l.userType()) {
case QVariant::Invalid:
return (r.type() == QVariant::Invalid);
case QVariant::Int:
@@ -1817,6 +1817,8 @@ bool QStandardItem::operator<(const QStandardItem &other) const
return l.toLongLong() < r.toLongLong();
case QVariant::ULongLong:
return l.toULongLong() < r.toULongLong();
+ case QMetaType::Float:
+ return l.toFloat() < r.toFloat();
case QVariant::Double:
return l.toDouble() < r.toDouble();
case QVariant::Char: