diff --git a/src/plugins/debugger/cdb2/cdbengine2.cpp b/src/plugins/debugger/cdb2/cdbengine2.cpp index a737388589b7955b40596bd244db26e29c589ced..98d54a71be69edbdea7135b78f917e4b31a66d95 100644 --- a/src/plugins/debugger/cdb2/cdbengine2.cpp +++ b/src/plugins/debugger/cdb2/cdbengine2.cpp @@ -401,9 +401,7 @@ bool CdbEngine::doSetupEngine(QString *errorMessage) switch (sp.startMode) { case StartInternal: case StartExternal: - arguments << sp.executable; - foreach(const QString &arg, sp.processArgs) - arguments << arg; // @TODO quoting/env + arguments << QDir::toNativeSeparators(sp.executable); break; case AttachExternal: case AttachCrashedExternal: // @TODO: event handle for crashed? @@ -425,6 +423,10 @@ bool CdbEngine::doSetupEngine(QString *errorMessage) m_outputBuffer.clear(); m_process.setEnvironment(mergeEnvironment(sp.environment.toStringList(), extensionFi.absolutePath())); +#ifdef Q_OS_WIN + if (!sp.processArgs.isEmpty()) // Appends + m_process.setNativeArguments(sp.processArgs); +#endif m_process.start(executable, arguments); if (!m_process.waitForStarted()) { *errorMessage = QString::fromLatin1("Internal error: Cannot start process %1: %2").