diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-11-23 18:38:23 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-11-24 07:34:19 +0000 |
commit | 5e5d412fc4f35e66b83f40e8746d7cbb1d8c33cc (patch) | |
tree | d026c257f3f3c7250da416354b981cdef9e9d579 /src/plugins/projectexplorer/gcctoolchain.cpp | |
parent | 706b0ff9eba7d40a3f9c1fac1a5f9784611b9461 (diff) | |
download | qt-creator-5e5d412fc4f35e66b83f40e8746d7cbb1d8c33cc.tar.gz |
GccToolChain: Create process on stack
Amends 948f0070fabef91c721a32fd4c1f1e9c0087e4d4
Change-Id: I67c537f19da6cd012d1d51d80f0b987dd2b1fede
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index bcf6cab5a2..d70ef54d0b 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1564,10 +1564,10 @@ bool ClangToolChain::matchesCompilerCommand(const FilePath &command) const m_resolvedCompilerCommand = FilePath(); if (HostOsInfo::isMacHost() && compilerCommand().parentDir() == FilePath::fromString("/usr/bin")) { - std::unique_ptr<QtcProcess> xcrun(new QtcProcess); - xcrun->setCommand({"/usr/bin/xcrun", {"-f", compilerCommand().fileName()}}); - xcrun->runBlocking(); - const FilePath output = FilePath::fromString(xcrun->cleanedStdOut().trimmed()); + QtcProcess xcrun; + xcrun.setCommand({"/usr/bin/xcrun", {"-f", compilerCommand().fileName()}}); + xcrun.runBlocking(); + const FilePath output = FilePath::fromString(xcrun.cleanedStdOut().trimmed()); if (output.isExecutableFile() && output != compilerCommand()) m_resolvedCompilerCommand = output; } |