forked from qt-creator/qt-creator
ProjectExplorer: Delay project parsing until it's part of the session
E.g. code model logic relies on the session manager knowing about the project currently being parsed. Fixes: QTCREATORBUG-26987 Change-Id: I4d9a1c21ab8474f7ac21edaeebe667fc4f3a6c4e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "projectexplorer.h"
|
||||
#include "runconfiguration.h"
|
||||
#include "runcontrol.h"
|
||||
#include "session.h"
|
||||
#include "target.h"
|
||||
|
||||
#include <coreplugin/messagemanager.h>
|
||||
@@ -77,7 +78,13 @@ BuildSystem::BuildSystem(Target *target)
|
||||
// Timer:
|
||||
d->m_delayedParsingTimer.setSingleShot(true);
|
||||
|
||||
connect(&d->m_delayedParsingTimer, &QTimer::timeout, this, &BuildSystem::triggerParsing);
|
||||
connect(&d->m_delayedParsingTimer, &QTimer::timeout, this,
|
||||
[this] {
|
||||
if (SessionManager::hasProject(project()))
|
||||
triggerParsing();
|
||||
else
|
||||
requestDelayedParse();
|
||||
});
|
||||
}
|
||||
|
||||
BuildSystem::~BuildSystem()
|
||||
|
Reference in New Issue
Block a user