From 896da75550738a08f44dfeb72f09ace3a147b0ee Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Date: Thu, 4 Jun 2015 11:34:26 +0200
Subject: [PATCH] make the enums of QProcess known to the meta object system

This enables users to construct enum values from strings
and provides useful qDebug operators.

Task-number: QTBUG-10777
Change-Id: Ia3592f00d559b980b4875ee8fb5e8ffb4328d464
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
 src/corelib/io/qprocess.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 078217ea0b9..32fa4aa866a 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -104,15 +104,21 @@ public:
         WriteError,
         UnknownError
     };
+    Q_ENUM(ProcessError)
+
     enum ProcessState {
         NotRunning,
         Starting,
         Running
     };
+    Q_ENUM(ProcessState)
+
     enum ProcessChannel {
         StandardOutput,
         StandardError
     };
+    Q_ENUM(ProcessChannel)
+
     enum ProcessChannelMode {
         SeparateChannels,
         MergedChannels,
@@ -120,14 +126,19 @@ public:
         ForwardedOutputChannel,
         ForwardedErrorChannel
     };
+    Q_ENUM(ProcessChannelMode)
+
     enum InputChannelMode {
         ManagedInputChannel,
         ForwardedInputChannel
     };
+    Q_ENUM(InputChannelMode)
+
     enum ExitStatus {
         NormalExit,
         CrashExit
     };
+    Q_ENUM(ExitStatus)
 
     explicit QProcess(QObject *parent = 0);
     virtual ~QProcess();
-- 
GitLab