mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-24 13:59:29 -04:00
moved calls to setDynamicSortFilter(false) into constructors of sort proxy models
This commit is contained in:
parent
95e1073b8a
commit
d4141c493d
5 changed files with 21 additions and 14 deletions
|
@ -99,6 +99,12 @@ public:
|
|||
SFDSortFilterProxyModel(RetroshareDirModel *dirModel, QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
m_dirModel = dirModel;
|
||||
|
||||
// Mr.Alice: I removed this because it causes a crash for some obscur reason. Apparently when the model is changed, the proxy model cannot
|
||||
// deal with the change by itself. Should I call something specific? I've no idea. Removing this does not seem to cause any harm either.
|
||||
//Ghibli: set false because by default in qt5 is true and makes rs crash when sorting, all this decided by Cyril not me :D it works
|
||||
|
||||
setDynamicSortFilter(false);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -193,12 +199,6 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
|
|||
flat_proxyModel->setFilterRole(RetroshareDirModel::FilterRole);
|
||||
flat_proxyModel->setFilterRegExp(QRegExp(QString(RETROSHARE_DIR_MODEL_FILTER_STRING))) ;
|
||||
|
||||
// Mr.Alice: I removed this because it causes a crash for some obscur reason. Apparently when the model is changed, the proxy model cannot
|
||||
// deal with the change by itself. Should I call something specific? I've no idea. Removing this does not seem to cause any harm either.
|
||||
//Ghibli: set false because by default in qt5 is true and makes rs crash when sorting, all this decided by Cyril not me :D it works
|
||||
tree_proxyModel->setDynamicSortFilter(false);
|
||||
flat_proxyModel->setDynamicSortFilter(false);
|
||||
|
||||
connect(ui.filterClearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui.filterStartButton, SIGNAL(clicked()), this, SLOT(startFilter()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(returnPressed()), this, SLOT(startFilter()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue