Commit dd4e185e authored by Ulf Hermann's avatar Ulf Hermann

Utils: Register metatypes for QProcess enums

Apparently they aren't automatically registered on Qt 5.5

Change-Id: I0932cc7c5f56019300380ebb905d67d99eb8e9d0
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent 59adfb10
......@@ -667,6 +667,17 @@ bool QtcProcess::prepareCommand(const QString &command, const QString &arguments
return true;
}
QtcProcess::QtcProcess(QObject *parent)
: QProcess(parent),
m_haveEnv(false),
m_useCtrlCStub(false)
{
static int qProcessExitStatusMeta = qRegisterMetaType<QProcess::ExitStatus>();
static int qProcessProcessErrorMeta = qRegisterMetaType<QProcess::ProcessError>();
Q_UNUSED(qProcessExitStatusMeta);
Q_UNUSED(qProcessProcessErrorMeta);
}
void QtcProcess::setUseCtrlCStub(bool enabled)
{
// Do not use the stub in debug mode. Activating the stub will shut down
......
......@@ -37,11 +37,7 @@ class QTCREATOR_UTILS_EXPORT QtcProcess : public QProcess
Q_OBJECT
public:
QtcProcess(QObject *parent = 0)
: QProcess(parent),
m_haveEnv(false)
, m_useCtrlCStub(false)
{}
QtcProcess(QObject *parent = 0);
void setEnvironment(const Environment &env)
{ m_environment = env; m_haveEnv = true; }
void setCommand(const QString &command, const QString &arguments)
......@@ -152,3 +148,6 @@ private:
};
} // namespace Utils
Q_DECLARE_METATYPE(QProcess::ExitStatus);
Q_DECLARE_METATYPE(QProcess::ProcessError);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment