summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qlistwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qlistwidget.cpp')
-rw-r--r--src/gui/itemviews/qlistwidget.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index 2792bbd..a1f8288 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -708,9 +708,7 @@ QVariant QListWidgetItem::data(int role) const
bool QListWidgetItem::operator<(const QListWidgetItem &other) const
{
const QVariant v1 = data(Qt::DisplayRole), v2 = other.data(Qt::DisplayRole);
- if (QAbstractItemModelPrivate::canConvertToDouble(v1) && QAbstractItemModelPrivate::canConvertToDouble(v2))
- return v1.toDouble() < v2.toDouble();
- return v1.toString() < v2.toString();
+ return QAbstractItemModelPrivate::variantLessThan(v1, v2);
}
#ifndef QT_NO_DATASTREAM