forked from qt-creator/qt-creator
ProjectExplorer: Use RAII pattern for parsing start/stop signalling
Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -450,17 +450,18 @@ void CompilationDatabaseProject::reparseProject()
|
||||
if (m_parser) {
|
||||
QTC_CHECK(isParsing());
|
||||
m_parser->stop();
|
||||
emitParsingFinished(false);
|
||||
}
|
||||
m_parser = new CompilationDbParser(displayName(), projectFilePath(), rootPathFromSettings(),
|
||||
m_mimeBinaryCache, this);
|
||||
m_parser = new CompilationDbParser(displayName(),
|
||||
projectFilePath(),
|
||||
rootPathFromSettings(),
|
||||
m_mimeBinaryCache,
|
||||
guardParsingRun(),
|
||||
this);
|
||||
connect(m_parser, &CompilationDbParser::finished, this, [this](bool success) {
|
||||
if (success)
|
||||
buildTreeAndProjectParts();
|
||||
m_parser = nullptr;
|
||||
emitParsingFinished(success);
|
||||
});
|
||||
emitParsingStarted();
|
||||
m_parser->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user