forked from qt-creator/qt-creator
Clang: Fix heap-use-after-free in ClangCurrentDocumentFilter
...when closing editors fast (e.g. holding Ctrl+W). Due to the queued connection the slot was invoked after the deletion of the editor. There is no point in having a queued connection here, so remove it. Task-number: QTCREATORBUG-20191 Change-Id: I3872f8046b56f93c9aac832feccfd911d39e5995 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -59,11 +59,9 @@ ClangCurrentDocumentFilter::ClangCurrentDocumentFilter()
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
connect(editorManager, &Core::EditorManager::currentEditorChanged,
|
||||
this, &ClangCurrentDocumentFilter::onCurrentEditorChanged,
|
||||
Qt::QueuedConnection);
|
||||
this, &ClangCurrentDocumentFilter::onCurrentEditorChanged);
|
||||
connect(editorManager, &Core::EditorManager::editorAboutToClose,
|
||||
this, &ClangCurrentDocumentFilter::onEditorAboutToClose,
|
||||
Qt::QueuedConnection);
|
||||
this, &ClangCurrentDocumentFilter::onEditorAboutToClose);
|
||||
}
|
||||
|
||||
static QString addType(const QString &signature, const ClangBackEnd::ExtraInfo &extraInfo)
|
||||
|
Reference in New Issue
Block a user