Utils: Don't expose Utils::defaultExitCodeInterpreter

Instead, make its behavior implicit if none is given.

Change-Id: I3c1a054751a0afe22d0f40a2fed6dd00b5aef205
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-05-06 15:54:02 +02:00
parent ad5b34ab3e
commit 0c8d8c6b2a
8 changed files with 25 additions and 23 deletions

View File

@@ -108,10 +108,10 @@ public:
void addJob(const CommandLine &command,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
const ExitCodeInterpreter &interpreter = {});
void addJob(const CommandLine &command, int timeoutS,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
const ExitCodeInterpreter &interpreter = {});
void execute(); // Execute tasks asynchronously!
void abort();
bool lastExecutionSuccess() const;
@@ -145,7 +145,7 @@ public:
virtual SynchronousProcessResponse runCommand(const CommandLine &command,
int timeoutS,
const QString &workingDirectory = QString(),
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
const ExitCodeInterpreter &interpreter = {});
void cancel();
@@ -170,12 +170,12 @@ private:
SynchronousProcessResponse runFullySynchronous(const CommandLine &cmd,
QSharedPointer<OutputProxy> proxy,
int timeoutS, const QString &workingDirectory,
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
const ExitCodeInterpreter &interpreter = {});
// Run with an event loop. Signals will be delivered.
SynchronousProcessResponse runSynchronous(const CommandLine &cmd,
QSharedPointer<OutputProxy> proxy,
int timeoutS, const QString &workingDirectory,
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
const ExitCodeInterpreter &interpreter = {});
class Internal::ShellCommandPrivate *const d;
};