diff --git a/libnymea-app-core/vendorsproxy.cpp b/libnymea-app-core/vendorsproxy.cpp index 377de4d2..0f4b20a7 100644 --- a/libnymea-app-core/vendorsproxy.cpp +++ b/libnymea-app-core/vendorsproxy.cpp @@ -27,6 +27,7 @@ VendorsProxy::VendorsProxy(QObject *parent) : QSortFilterProxyModel(parent) { setSortRole(Vendors::RoleDisplayName); + setSortCaseSensitivity(Qt::CaseInsensitive); } Vendors *VendorsProxy::vendors() @@ -50,11 +51,4 @@ Vendor *VendorsProxy::get(int index) const return m_vendors->get(mapToSource(this->index(index, 0)).row()); } -bool VendorsProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const -{ - QVariant leftName = sourceModel()->data(left); - QVariant rightName = sourceModel()->data(right); - - return QString::localeAwareCompare(leftName.toString(), rightName.toString()) < 0; -} diff --git a/libnymea-app-core/vendorsproxy.h b/libnymea-app-core/vendorsproxy.h index 021713c1..9de1ff55 100644 --- a/libnymea-app-core/vendorsproxy.h +++ b/libnymea-app-core/vendorsproxy.h @@ -49,12 +49,6 @@ signals: private: Vendors *m_vendors; -protected: - bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; - - - -public slots: }; #endif // VENDORSPROXY_H