Refactor CProcessCtrl to start detached with or without console

QTBUG-53833 - which caused a console application to launch with a console
if it was started with QProcess::startDetached - is fixed in 5.8.0.
There were use cases for both options - with and without console -
but not offered by Qt API. Therefore CProcessCtrl is refactored  as a
wrapper to offer both options. If no console is required, it defaults to
QProcess::startDetached. Otherwise uses its own implementation.

refs #866
This commit is contained in:
Roland Winklmeier
2017-03-07 13:16:30 +01:00
committed by Mathew Sutcliffe
parent 5ab1ae7193
commit b80f204293
2 changed files with 21 additions and 12 deletions

View File

@@ -30,7 +30,7 @@ namespace BlackMisc
CProcessCtrl(QObject *parent = nullptr);
//! Start a programm detached and without any console window
static bool startDetachedWithoutConsole(const QString &program, const QStringList &arguments);
static bool startDetached(const QString &program, const QStringList &arguments, bool withConsoleWindow);
};
} // ns