fixed crazy cost of search in file list tree/flat mode using filterProxyModel instrinsic filter system

This commit is contained in:
csoler 2018-04-22 17:15:40 +02:00
parent 63359e0801
commit 1e6e9dfd12
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
4 changed files with 198 additions and 141 deletions

View file

@ -77,7 +77,7 @@ private slots:
void indicatorChanged(int index);
void onFilterTextEdited();
void filterRegExpChanged();
//void filterRegExpChanged();
void clearFilter();
void startFilter();
@ -97,6 +97,8 @@ protected:
void recursSaveExpandedItems(const QModelIndex& index, const std::string &path, std::set<std::string> &exp,std::set<std::string>& vis, std::set<std::string>& sel);
void saveExpandedPathsAndSelection(std::set<std::string>& paths,std::set<std::string>& visible_indexes, std::set<std::string>& selected_indexes) ;
void restoreExpandedPathsAndSelection(const std::set<std::string>& paths,const std::set<std::string>& visible_indexes, const std::set<std::string>& selected_indexes) ;
void recursExpandAll(const QModelIndex& index);
void expandAll();
protected:
//now context menu are created again every time theu are called ( in some
@ -113,8 +115,6 @@ protected:
bool tree_FilterItem(const QModelIndex &index, const QString &text, int level);
bool flat_FilterItem(const QModelIndex &index, const QString &text, int level);
void restoreInvisibleItems();
QModelIndexList getSelected();
/** Defines the actions for the context menu for QTreeWidget */
@ -142,8 +142,6 @@ protected:
QString lastFilterString;
QString mLastFilterText ;
RsProtectedTimer* mFilterTimer;
QList<QModelIndex> mHiddenIndexes;
};
class LocalSharedFilesDialog : public SharedFilesDialog