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:
@@ -112,7 +112,6 @@ Project::RestoreResult AutotoolsProject::fromMap(const QVariantMap &map, QString
|
||||
|
||||
void AutotoolsProject::loadProjectTree()
|
||||
{
|
||||
emitParsingStarted();
|
||||
if (m_makefileParserThread) {
|
||||
// The thread is still busy parsing a previus configuration.
|
||||
// Wait until the thread has been finished and delete it.
|
||||
@@ -125,7 +124,8 @@ void AutotoolsProject::loadProjectTree()
|
||||
}
|
||||
|
||||
// Parse the makefile asynchronously in a thread
|
||||
m_makefileParserThread = new MakefileParserThread(projectFilePath().toString());
|
||||
m_makefileParserThread = new MakefileParserThread(projectFilePath().toString(),
|
||||
guardParsingRun());
|
||||
|
||||
connect(m_makefileParserThread, &MakefileParserThread::started,
|
||||
this, &AutotoolsProject::makefileParsingStarted);
|
||||
@@ -212,8 +212,6 @@ void AutotoolsProject::makefileParsingFinished()
|
||||
|
||||
m_makefileParserThread->deleteLater();
|
||||
m_makefileParserThread = nullptr;
|
||||
|
||||
emitParsingFinished(true);
|
||||
}
|
||||
|
||||
void AutotoolsProject::onFileChanged(const QString &file)
|
||||
|
Reference in New Issue
Block a user