Utils: Use Utils::CommandLine as input for ProcessArgs::prepareCommand

Change-Id: Ib5878a159bda0e6b6253f1f4e1abc1acb5ecb573
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2021-08-02 18:39:02 +02:00
parent 4a42bcd4e8
commit 0567f35e21
3 changed files with 13 additions and 16 deletions

View File

@@ -35,6 +35,7 @@
namespace Utils {
class AbstractMacroExpander;
class CommandLine;
class Environment;
class QTCREATOR_UTILS_EXPORT ProcessArgs
@@ -67,8 +68,7 @@ public:
const Environment *env = nullptr, const FilePath *pwd = nullptr,
bool abortOnMeta = true);
//! Prepare a shell command for feeding into QProcess
static bool prepareCommand(const QString &command, const QString &arguments,
QString *outCmd, ProcessArgs *outArgs, OsType osType = HostOsInfo::hostOs(),
static bool prepareCommand(const CommandLine &cmdLine, QString *outCmd, ProcessArgs *outArgs,
const Environment *env = nullptr, const FilePath *pwd = nullptr);
//! Quote and append each argument to a shell command
static void addArgs(QString *args, const QStringList &inArgs);