aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/synchronousprocess.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-06-05 12:53:22 +0200
committerhjk <hjk@qt.io>2019-06-06 08:42:06 +0000
commit772b48797d308ce5833358abe1ea8b938c353a95 (patch)
treef95c5724a03d4abc524911772d3011f20d07b063 /src/libs/utils/synchronousprocess.h
parent046ab0b7a3485dfb005639403e4c3120b7b3fc0e (diff)
Utils: Add a CommandLine::splitArguments() convenience function
... and use it from within new SynchronousProcess functions taking CommandLine arguments. Change-Id: I5d7f83727cbb22f03b1a79b1645db95514c66033 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/utils/synchronousprocess.h')
-rw-r--r--src/libs/utils/synchronousprocess.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h
index d8e3275030b..f13a7e2db8b 100644
--- a/src/libs/utils/synchronousprocess.h
+++ b/src/libs/utils/synchronousprocess.h
@@ -38,6 +38,7 @@ QT_FORWARD_DECLARE_CLASS(QDebug)
namespace Utils {
class SynchronousProcessPrivate;
+class CommandLine;
/* Result of SynchronousProcess execution */
class QTCREATOR_UTILS_EXPORT SynchronousProcessResponse
@@ -126,10 +127,16 @@ public:
void setExitCodeInterpreter(const ExitCodeInterpreter &interpreter);
ExitCodeInterpreter exitCodeInterpreter() const;
- // Starts an nested event loop and runs the binary with the arguments
+ // Starts a nested event loop and runs the binary with the arguments
+ // FIXME: Use the CommandLine overload below.
SynchronousProcessResponse run(const QString &binary, const QStringList &args, const QByteArray &writeData = {});
+ // Starts a nested event loop and runs the command
+ SynchronousProcessResponse run(const CommandLine &cmd, const QByteArray &writeData = {});
// Starts the binary with the arguments blocking the UI fully
+ // FIXME: Use the CommandLine overload below.
SynchronousProcessResponse runBlocking(const QString &binary, const QStringList &args);
+ // Starts the command blocking the UI fully
+ SynchronousProcessResponse runBlocking(const CommandLine &cmd);
// Create a (derived) processes with flags applied.
static QSharedPointer<QProcess> createProcess(unsigned flags);