hack to fix crashes in network list

This commit is contained in:
csoler 2020-08-21 18:42:12 +02:00
parent 7c5bf22931
commit 335cd9a7c2

View File

@ -1094,9 +1094,15 @@ void NewFriendList::checkInternalData(bool force)
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);
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
mProxyModel->setSourceModel(mModel);
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
}
void NewFriendList::exportFriendlistClicked()