forked from qt-creator/qt-creator
CppTools: Cancel parsing if editor is closed
The m_parserFuture.cancel() in ~BuiltinEditorDocumentProcessor() did not cancel anything. Thus, closing a document while the parser was running led to a blocking UI thread. Now it cancels at the next include directive it encounters. Change-Id: I092fddbbd747e0bc95265b6e9b4fcc26b3f76cb3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
c8020af997
commit
ad49e64ff0
@@ -77,9 +77,16 @@ void BaseEditorDocumentParser::setConfiguration(const Configuration &configurati
|
||||
}
|
||||
|
||||
void BaseEditorDocumentParser::update(const WorkingCopy &workingCopy)
|
||||
{
|
||||
QFutureInterface<void> dummy;
|
||||
update(dummy, workingCopy);
|
||||
}
|
||||
|
||||
void BaseEditorDocumentParser::update(const QFutureInterface<void> &future,
|
||||
const WorkingCopy &workingCopy)
|
||||
{
|
||||
QMutexLocker locker(&m_updateIsRunning);
|
||||
updateHelper(workingCopy);
|
||||
updateHelper(future, workingCopy);
|
||||
}
|
||||
|
||||
BaseEditorDocumentParser::State BaseEditorDocumentParser::state() const
|
||||
|
||||
Reference in New Issue
Block a user