Sort the items properly, according to the locale's settings

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842517
This commit is contained in:
Thiago Macieira 2008-08-05 13:03:12 +00:00
parent 37be252250
commit 6f34814460

View File

@ -131,7 +131,7 @@ bool DefaultItemFilterProxyModel::filterAcceptsRow(int sourceRow,
bool DefaultItemFilterProxyModel::lessThan(const QModelIndex &left, bool DefaultItemFilterProxyModel::lessThan(const QModelIndex &left,
const QModelIndex &right) const const QModelIndex &right) const
{ {
return sourceModel()->data(left).toString().compare(sourceModel()->data(right).toString(), sortCaseSensitivity()) < 0; return sourceModel()->data(left).toString().localeAwareCompare(sourceModel()->data(right).toString()) < 0;
} }
void DefaultItemFilterProxyModel::setSearch(const QString & pattern) void DefaultItemFilterProxyModel::setSearch(const QString & pattern)