ProjectExplorer: Use Utils::FileName in ProcessParameters

For the command and the working directory.

Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-15 13:59:43 +02:00
parent d1f9e466da
commit 9433b8a7e7
29 changed files with 129 additions and 101 deletions

View File

@@ -70,6 +70,7 @@
#include <memory>
using namespace ProjectExplorer;
using namespace Utils;
using namespace Android::Internal;
namespace {
@@ -90,10 +91,10 @@ static void setupProcessParameters(ProcessParameters *pp,
const QString &command)
{
pp->setMacroExpander(bc->macroExpander());
pp->setWorkingDirectory(bc->buildDirectory().toString());
pp->setWorkingDirectory(bc->buildDirectory());
Utils::Environment env = bc->environment();
pp->setEnvironment(env);
pp->setCommand(command);
pp->setCommand(FileName::fromString(command));
pp->setArguments(Utils::QtcProcess::joinArgs(arguments));
pp->resolveAll();
}
@@ -279,7 +280,7 @@ bool AndroidBuildApkStep::init()
// Generate arguments with keystore password concealed
ProjectExplorer::ProcessParameters pp2;
setupProcessParameters(&pp2, bc, argumentsPasswordConcealed, command);
m_command = pp2.effectiveCommand();
m_command = pp2.effectiveCommand().toString();
m_argumentsPasswordConcealed = pp2.prettyArguments();
return true;

View File

@@ -72,8 +72,8 @@ bool AndroidPackageInstallationStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setWorkingDirectory(bc->buildDirectory().toString());
pp->setCommand(tc->makeCommand(bc->environment()).toString());
pp->setWorkingDirectory(bc->buildDirectory());
pp->setCommand(tc->makeCommand(bc->environment()));
Environment env = bc->environment();
Environment::setupEnglishOutput(&env);
pp->setEnvironment(env);