Utils: Use CommandLine in ShellCommand

... and adapt users.

Change-Id: I218523ffe34720d5fe199aa0ca6892a8dc2985fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2019-06-07 15:27:50 +02:00
parent 749eaaad81
commit 00b692e67e
29 changed files with 78 additions and 90 deletions

View File

@@ -46,7 +46,7 @@ QT_END_NAMESPACE
namespace Utils {
class FilePath;
class CommandLine;
namespace Internal { class ShellCommandPrivate; }
class QTCREATOR_UTILS_EXPORT ProgressParser
@@ -79,8 +79,7 @@ signals:
void append(const QString &text);
void appendSilently(const QString &text);
void appendError(const QString &text);
void appendCommand(const QString &workingDirectory, const Utils::FilePath &binary,
const QStringList &args);
void appendCommand(const QString &workingDirectory, const Utils::CommandLine &command);
void appendMessage(const QString &text);
};
@@ -112,10 +111,12 @@ public:
QString displayName() const;
void setDisplayName(const QString &name);
void addJob(const FilePath &binary, const QStringList &arguments,
const QString &workingDirectory = QString(), const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
void addJob(const FilePath &binary, const QStringList &arguments, int timeoutS,
const QString &workingDirectory = QString(), const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
void addJob(const CommandLine &command,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
void addJob(const CommandLine &command, int timeoutS,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
void execute(); // Execute tasks asynchronously!
void abort();
bool lastExecutionSuccess() const;
@@ -145,7 +146,7 @@ public:
// This is called once per job in a thread.
// When called from the UI thread it will execute fully synchronously, so no signals will
// be triggered!
virtual SynchronousProcessResponse runCommand(const FilePath &binary, const QStringList &arguments,
virtual SynchronousProcessResponse runCommand(const CommandLine &command,
int timeoutS,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);