mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-18 05:50:39 -04:00
fixed crazy cost of search in file list tree/flat mode using filterProxyModel instrinsic filter system
This commit is contained in:
parent
63359e0801
commit
1e6e9dfd12
4 changed files with 198 additions and 141 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue