forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/9.0'"
This commit is contained in:
@@ -60,6 +60,8 @@ void MesonProcess::handleProcessDone()
|
||||
void MesonProcess::setupProcess(const Command &command, const Environment &env,
|
||||
const QString &projectName, bool captureStdo)
|
||||
{
|
||||
if (m_process)
|
||||
m_process.release()->deleteLater();
|
||||
m_process.reset(new QtcProcess);
|
||||
connect(m_process.get(), &QtcProcess::done, this, &MesonProcess::handleProcessDone);
|
||||
if (!captureStdo) {
|
||||
|
||||
@@ -196,20 +196,18 @@ QList<ProjectExplorer::BuildTargetInfo> MesonProjectParser::appsTargets() const
|
||||
}
|
||||
return apps;
|
||||
}
|
||||
|
||||
bool MesonProjectParser::startParser()
|
||||
{
|
||||
m_parserFutureResult = Utils::runAsync(
|
||||
ProjectExplorer::ProjectExplorerPlugin::sharedThreadPool(),
|
||||
[process = &m_process,
|
||||
introType = m_introType,
|
||||
buildDir = m_buildDir.toString(),
|
||||
srcDir = m_srcDir]() {
|
||||
if (introType == IntroDataType::file) {
|
||||
return extractParserResults(srcDir, MesonInfoParser::parse(buildDir));
|
||||
} else {
|
||||
return extractParserResults(srcDir, MesonInfoParser::parse(process->stdOut()));
|
||||
}
|
||||
});
|
||||
ProjectExplorer::ProjectExplorerPlugin::sharedThreadPool(),
|
||||
[processOutput = m_process.stdOut(), introType = m_introType,
|
||||
buildDir = m_buildDir.toString(), srcDir = m_srcDir] {
|
||||
if (introType == IntroDataType::file)
|
||||
return extractParserResults(srcDir, MesonInfoParser::parse(buildDir));
|
||||
else
|
||||
return extractParserResults(srcDir, MesonInfoParser::parse(processOutput));
|
||||
});
|
||||
|
||||
Utils::onFinished(m_parserFutureResult, this, &MesonProjectParser::update);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user