Sort the applets alphabetically to make it easier to find the right applet
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=740196
This commit is contained in:
parent
72a3b2b68b
commit
e4765f3dcd
@ -96,6 +96,8 @@ void KCategorizedItemsView::setItemModel(QStandardItemModel * model)
|
||||
|
||||
m_modelItems = model;
|
||||
m_modelFilterItems->setSourceModel(m_modelItems);
|
||||
m_modelFilterItems->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
m_modelFilterItems->sort(0);
|
||||
|
||||
itemsView->setModel(m_modelFilterItems);
|
||||
|
||||
|
@ -120,7 +120,7 @@ bool DefaultItemFilterProxyModel::filterAcceptsRow(int sourceRow,
|
||||
bool DefaultItemFilterProxyModel::lessThan(const QModelIndex &left,
|
||||
const QModelIndex &right) const
|
||||
{
|
||||
return (sourceModel()->data(left).toString() < sourceModel()->data(right).toString());
|
||||
return sourceModel()->data(left).toString().compare(sourceModel()->data(right).toString(), sortCaseSensitivity()) < 0;
|
||||
}
|
||||
|
||||
void DefaultItemFilterProxyModel::setSearch(const QString & pattern)
|
||||
|
Loading…
Reference in New Issue
Block a user