forked from qt-creator/qt-creator
Utils/ProjectExplorer: Use FilePath for Runnable::workingDirectory
... and in some using code. Change-Id: I231ea56628908f7d305d13f07eabe8803fe8a791 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -589,12 +589,20 @@ static QString quoteArgWin(const QString &arg)
|
||||
}
|
||||
|
||||
ProcessArgs ProcessArgs::prepareArgs(const QString &cmd, SplitError *err, OsType osType,
|
||||
const Environment *env, const QString *pwd, bool abortOnMeta)
|
||||
const Environment *env, const FilePath *pwd, bool abortOnMeta)
|
||||
{
|
||||
QString wdcopy;
|
||||
QString *wd = nullptr;
|
||||
if (pwd) {
|
||||
wdcopy = pwd->toString();
|
||||
wd = &wdcopy;
|
||||
}
|
||||
ProcessArgs res;
|
||||
if (osType == OsTypeWindows)
|
||||
return prepareArgsWin(cmd, err, env, pwd);
|
||||
res = prepareArgsWin(cmd, err, env, wd);
|
||||
else
|
||||
return createUnixArgs(splitArgs(cmd, osType, abortOnMeta, err, env, pwd));
|
||||
res = createUnixArgs(splitArgs(cmd, osType, abortOnMeta, err, env, wd));
|
||||
return res;
|
||||
}
|
||||
|
||||
QString ProcessArgs::quoteArg(const QString &arg, OsType osType)
|
||||
@@ -637,7 +645,7 @@ void ProcessArgs::addArgs(QString *args, const QStringList &inArgs)
|
||||
|
||||
bool ProcessArgs::prepareCommand(const QString &command, const QString &arguments,
|
||||
QString *outCmd, ProcessArgs *outArgs, OsType osType,
|
||||
const Environment *env, const QString *pwd)
|
||||
const Environment *env, const FilePath *pwd)
|
||||
{
|
||||
ProcessArgs::SplitError err;
|
||||
*outArgs = ProcessArgs::prepareArgs(arguments, &err, osType, env, pwd);
|
||||
|
||||
Reference in New Issue
Block a user