Commit 37025865 authored by hjk's avatar hjk Committed by Joerg Bornemann
Browse files

Re-arrange Ctrl-C stub argument passing.



Change-Id: I59b96446c5430b96a6daf05aa785f4c0e7e4a42b
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent cd821488
...@@ -699,17 +699,19 @@ void QtcProcess::start() ...@@ -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."));
......
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