diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-07-20 13:44:47 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2016-07-21 12:53:36 +0000 |
commit | 1063ed3a4a7a789cd080bac7a2e28ae6285382c9 (patch) | |
tree | b351b790c49490310aa1e4cb8df1a6888f8b2db4 /src/libs/utils/synchronousprocess.h | |
parent | ff6251cbe2031370caff526f78a62144e17b6e8a (diff) |
SynchronousProcess: Small cleanups
* Use class, not struct, according to coding style
Change-Id: I3aa14eb9f480d7b07fb015b8694aae6fcc60c169
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/libs/utils/synchronousprocess.h')
-rw-r--r-- | src/libs/utils/synchronousprocess.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h index a8772233644..d14b0372b89 100644 --- a/src/libs/utils/synchronousprocess.h +++ b/src/libs/utils/synchronousprocess.h @@ -37,11 +37,12 @@ QT_FORWARD_DECLARE_CLASS(QDebug) namespace Utils { -struct SynchronousProcessPrivate; +class SynchronousProcessPrivate; /* Result of SynchronousProcess execution */ -struct QTCREATOR_UTILS_EXPORT SynchronousProcessResponse +class QTCREATOR_UTILS_EXPORT SynchronousProcessResponse { +public: enum Result { // Finished with return code 0 Finished, @@ -54,7 +55,6 @@ struct QTCREATOR_UTILS_EXPORT SynchronousProcessResponse // Hang, no output after time out Hang }; - SynchronousProcessResponse(); void clear(); // Helper to format an exit message. @@ -66,12 +66,12 @@ struct QTCREATOR_UTILS_EXPORT SynchronousProcessResponse QString stdOut() const; QString stdErr() const; - Result result; - int exitCode; + Result result = StartFailed; + int exitCode = -1; - QTextCodec *codec = nullptr; QByteArray rawStdOut; QByteArray rawStdErr; + QTextCodec *codec = nullptr; }; QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug str, const SynchronousProcessResponse &); |