forked from qt-creator/qt-creator
LanguageClient: fix multiple crashes in languageClient
The temporary containers are needed in some places because the content of the containers change
while iterating over them.
partially reverts: cf010911f7
Change-Id: I4d6df987b9e5382b6b18fa659b1174ca6919a02e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -111,8 +111,9 @@ Client::~Client()
|
||||
using namespace TextEditor;
|
||||
// FIXME: instead of replacing the completion provider in the text document store the
|
||||
// completion provider as a prioritised list in the text document
|
||||
for (auto it = m_resetAssistProvider.cbegin(); it != m_resetAssistProvider.cend(); ++it)
|
||||
resetAssistProviders(it.key());
|
||||
// temporary container needed since m_resetAssistProvider is changed in resetAssistProviders
|
||||
for (TextDocument *document : m_resetAssistProvider.keys())
|
||||
resetAssistProviders(document);
|
||||
const QList<Core::IEditor *> &editors = Core::DocumentModel::editorsForOpenedDocuments();
|
||||
for (Core::IEditor *editor : editors) {
|
||||
if (auto textEditor = qobject_cast<BaseTextEditor *>(editor)) {
|
||||
|
||||
Reference in New Issue
Block a user