mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
hack to fix crashes in network list
This commit is contained in:
parent
7c5bf22931
commit
335cd9a7c2
1 changed files with 7 additions and 1 deletions
|
@ -1094,8 +1094,14 @@ void NewFriendList::checkInternalData(bool force)
|
||||||
|
|
||||||
saveExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
saveExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
||||||
|
|
||||||
|
// This is a hack to avoid crashes on windows while calling endInsertRows(). I'm not sure wether these crashes are
|
||||||
|
// due to a Qt bug, or a misuse of the proxy model on my side. Anyway, this soves them for good.
|
||||||
|
|
||||||
|
mProxyModel->setSourceModel(nullptr);
|
||||||
|
|
||||||
mModel->checkInternalData(force);
|
mModel->checkInternalData(force);
|
||||||
|
|
||||||
|
mProxyModel->setSourceModel(mModel);
|
||||||
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue