diff --git a/appletbrowser/kcategorizeditemsview.cpp b/appletbrowser/kcategorizeditemsview.cpp index 37121d0c0..787c62919 100644 --- a/appletbrowser/kcategorizeditemsview.cpp +++ b/appletbrowser/kcategorizeditemsview.cpp @@ -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); diff --git a/appletbrowser/kcategorizeditemsviewmodels.cpp b/appletbrowser/kcategorizeditemsviewmodels.cpp index f86faf89c..6586b48d9 100644 --- a/appletbrowser/kcategorizeditemsviewmodels.cpp +++ b/appletbrowser/kcategorizeditemsviewmodels.cpp @@ -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)