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>
This commit is contained in:
Joerg Bornemann 2015-06-04 11:34:26 +02:00
parent 4bb00d9d06
commit 896da75550

View File

@ -104,15 +104,21 @@ public:
WriteError, WriteError,
UnknownError UnknownError
}; };
Q_ENUM(ProcessError)
enum ProcessState { enum ProcessState {
NotRunning, NotRunning,
Starting, Starting,
Running Running
}; };
Q_ENUM(ProcessState)
enum ProcessChannel { enum ProcessChannel {
StandardOutput, StandardOutput,
StandardError StandardError
}; };
Q_ENUM(ProcessChannel)
enum ProcessChannelMode { enum ProcessChannelMode {
SeparateChannels, SeparateChannels,
MergedChannels, MergedChannels,
@ -120,14 +126,19 @@ public:
ForwardedOutputChannel, ForwardedOutputChannel,
ForwardedErrorChannel ForwardedErrorChannel
}; };
Q_ENUM(ProcessChannelMode)
enum InputChannelMode { enum InputChannelMode {
ManagedInputChannel, ManagedInputChannel,
ForwardedInputChannel ForwardedInputChannel
}; };
Q_ENUM(InputChannelMode)
enum ExitStatus { enum ExitStatus {
NormalExit, NormalExit,
CrashExit CrashExit
}; };
Q_ENUM(ExitStatus)
explicit QProcess(QObject *parent = 0); explicit QProcess(QObject *parent = 0);
virtual ~QProcess(); virtual ~QProcess();