forked from qt-creator/qt-creator
Utils: Register metatypes for QProcess enums
Apparently they aren't automatically registered on Qt 5.5 Change-Id: I0932cc7c5f56019300380ebb905d67d99eb8e9d0 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user