From 1757a7b7e1edb41e94087b6348967095fea15562 Mon Sep 17 00:00:00 2001 From: felisucoibi Date: Wed, 16 Nov 2016 12:02:54 +0100 Subject: [PATCH 1/3] fix sorting crashing with qt5 in shared files of friends --- retroshare-gui/src/gui/SharedFilesDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index 13094f87a..92f625a5a 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -183,8 +183,8 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD // 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. - //tree_proxyModel->setDynamicSortFilter(true); - //flat_proxyModel->setDynamicSortFilter(true); + tree_proxyModel->setDynamicSortFilter(false); + flat_proxyModel->setDynamicSortFilter(false); connect(ui.filterClearButton, SIGNAL(clicked()), this, SLOT(clearFilter())); connect(ui.filterStartButton, SIGNAL(clicked()), this, SLOT(startFilter())); From ee23c42db8fa10d79b24888ca3442b5316fb4659 Mon Sep 17 00:00:00 2001 From: felisucoibi Date: Wed, 16 Nov 2016 12:05:05 +0100 Subject: [PATCH 2/3] fix sorting crashing with qt5 in shared files of friends rev2 --- retroshare-gui/src/gui/SharedFilesDialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index 92f625a5a..16c77692f 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -183,6 +183,7 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD // 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. + //set false because by default in qt5 is true and makes rs crash when sorting tree_proxyModel->setDynamicSortFilter(false); flat_proxyModel->setDynamicSortFilter(false); From 999ab0b98ad53b8d48ee0a01b46d2d0a2cf78eb7 Mon Sep 17 00:00:00 2001 From: felisucoibi Date: Wed, 16 Nov 2016 12:07:38 +0100 Subject: [PATCH 3/3] fix sorting crashing with qt5 in shared files of friends rev3 --- retroshare-gui/src/gui/SharedFilesDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index 16c77692f..78ac47a3f 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -183,7 +183,7 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD // 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. - //set false because by default in qt5 is true and makes rs crash when sorting + //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);