From 8ac67dd1b7bb9a36f427aff65fdc640ef421d9db Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 17 Jun 2021 12:55:30 +0200 Subject: [PATCH] QMake: Use local paths in interfacing ProFileReader There are some internal hard asserts on that. Change-Id: I93bbdff0c9625d42d5f9da3f12219ad90c478d5d Reviewed-by: Christian Stenger --- src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp | 5 ++++- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 76f3a08e3af..f7d03e0a3c3 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1355,7 +1355,10 @@ static bool evaluateOne(const QmakeEvalInput &input, ProFile *pro, // We don't increase/decrease m_qmakeGlobalsRefCnt here, because the outer profilereaders keep m_qmakeGlobals alive anyway auto bpReader = new QtSupport::ProFileReader(input.qmakeGlobals, input.qmakeVfs); // needs to access m_qmakeGlobals, m_qmakeVfs - bpReader->setOutputDir(input.buildDirectory.toString()); + + // FIXME: Currently intentional. + // Core parts of the ProParser hard-assert on non-local items. + bpReader->setOutputDir(input.buildDirectory.path()); bpReader->setCumulative(cumulative); bpReader->setExtraVars(basevars); bpReader->setExtraConfigs(basecfgs); diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 212748af514..3babadd0dc7 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -857,7 +857,9 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi auto reader = new QtSupport::ProFileReader(m_qmakeGlobals.get(), m_qmakeVfs); - reader->setOutputDir(buildDir(qmakeProFile->filePath()).toString()); + // FIXME: Currently intentional. + // Core parts of the ProParser hard-assert on non-local items + reader->setOutputDir(buildDir(qmakeProFile->filePath()).path()); return reader; }