forked from qt-creator/qt-creator
Re-arrange Ctrl-C stub argument passing.
Change-Id: I59b96446c5430b96a6daf05aa785f4c0e7e4a42b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
@@ -699,17 +699,19 @@ void QtcProcess::start()
|
|||||||
QtcProcess::Arguments arguments;
|
QtcProcess::Arguments arguments;
|
||||||
bool success = prepareCommand(m_command, m_arguments, &command, &arguments, osType, &env, &workDir);
|
bool success = prepareCommand(m_command, m_arguments, &command, &arguments, osType, &env, &workDir);
|
||||||
if (osType == OsTypeWindows) {
|
if (osType == OsTypeWindows) {
|
||||||
QString args = arguments.toWindowsArgs();
|
QString args;
|
||||||
|
if (m_useCtrlCStub) {
|
||||||
|
args = QtcProcess::quoteArg(QDir::toNativeSeparators(command));
|
||||||
|
command = QCoreApplication::applicationDirPath()
|
||||||
|
+ QLatin1String("/qtcreator_ctrlc_stub.exe");
|
||||||
|
}
|
||||||
|
QtcProcess::addArgs(&args, arguments.toWindowsArgs());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
setNativeArguments(args);
|
setNativeArguments(args);
|
||||||
#endif
|
#endif
|
||||||
if (m_useCtrlCStub) {
|
// Note: Arguments set with setNativeArgs will be appended to the ones
|
||||||
args = QDir::toNativeSeparators(command);
|
// passed with start() below.
|
||||||
command = QCoreApplication::applicationDirPath() + QLatin1String("/qtcreator_ctrlc_stub.exe");
|
QProcess::start(command, QStringList());
|
||||||
} else {
|
|
||||||
args.clear();
|
|
||||||
}
|
|
||||||
QProcess::start(command, QStringList(args));
|
|
||||||
} else {
|
} else {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
setErrorString(tr("Error in command line."));
|
setErrorString(tr("Error in command line."));
|
||||||
|
|||||||
Reference in New Issue
Block a user