ShellCommand: Remove workingDir arg from 2 methods

Set a working directory for the process to run
before calling runFullySynchronous() or runSynchronous().
Make workDirectory() a private method.

Change-Id: I30f8354a3e409a06170f481cea4e97e3772da252
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-07-12 16:19:18 +02:00
parent 01e75d8b63
commit aebf6a9466
2 changed files with 11 additions and 15 deletions

View File

@@ -152,17 +152,17 @@ protected:
virtual Environment environment() const;
void setDisableUnixTerminal();
int timeoutS() const;
FilePath workDirectory(const FilePath &wd) const;
private:
virtual void addTask(QFuture<void> &future);
virtual void postRunCommand(const Utils::FilePath &workDirectory);
FilePath workDirectory(const FilePath &wd) const;
void run(QFutureInterface<void> &future);
// Run without a event loop in fully blocking mode. No signals will be delivered.
void runFullySynchronous(QtcProcess &proc, const FilePath &workingDirectory);
void runFullySynchronous(QtcProcess &proc);
// Run with an event loop. Signals will be delivered.
void runSynchronous(QtcProcess &proc, const FilePath &workingDirectory);
void runSynchronous(QtcProcess &proc);
class Internal::ShellCommandPrivate *const d;
};