forked from qt-creator/qt-creator
Plugin view: Fix sorting
Broke after moving to Utils::TreeModel. Use QSortFilterProxyModel on top of TreeModel (can later be used for filtering as well). Additionally we need to make sure to report changes only for the changed column now, because otherwise QSortFilterProxyModel thinks that the change could make re-sorting necessary, and does that in a non-stable way. Change-Id: I9fd12c55a45aba4c05f8e318ae8ea9a4ab9f3310 Task-number: QTCREATORBUG-14107 Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
#include <QSet>
|
||||
#include <QHash>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSortFilterProxyModel;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
class TreeItem;
|
||||
class TreeModel;
|
||||
@@ -71,6 +75,7 @@ private:
|
||||
|
||||
Utils::TreeView *m_categoryView;
|
||||
Utils::TreeModel *m_model;
|
||||
QSortFilterProxyModel *m_sortModel;
|
||||
|
||||
friend class CollectionItem;
|
||||
friend class PluginItem;
|
||||
|
||||
Reference in New Issue
Block a user