diff options
author | hjk <hjk@qt.io> | 2019-06-07 15:27:50 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-06-11 11:01:16 +0000 |
commit | 00b692e67e5fcfb4946d1da8094b05c9bf5f35ad (patch) | |
tree | 0f426c84a628cc3474b8ac85ee8a74eb04cc8fff /src/libs/utils/shellcommand.h | |
parent | 749eaaad81145072181a42aaf007ada71816cf3b (diff) |
Utils: Use CommandLine in ShellCommand
... and adapt users.
Change-Id: I218523ffe34720d5fe199aa0ca6892a8dc2985fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/libs/utils/shellcommand.h')
-rw-r--r-- | src/libs/utils/shellcommand.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libs/utils/shellcommand.h b/src/libs/utils/shellcommand.h index a90b4fe70e..a54e8fb401 100644 --- a/src/libs/utils/shellcommand.h +++ b/src/libs/utils/shellcommand.h @@ -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); |