debugger: merge a few #ifdef Q_OS_WIN's

This commit is contained in:
hjk
2011-02-17 15:21:35 +01:00
parent 0639d60fc9
commit c9826c1b4e
4 changed files with 6 additions and 12 deletions

View File

@@ -37,9 +37,7 @@
#include "abstractgdbprocess.h"
#include <utils/qtcassert.h>
#ifdef Q_OS_WIN
#include <utils/qtcprocess.h>
#endif
#include <QtCore/QProcess>
@@ -82,9 +80,9 @@ bool AbstractGdbAdapter::isTrkAdapter() const
return false;
}
#ifdef Q_OS_WIN
bool AbstractGdbAdapter::prepareWinCommand()
bool AbstractGdbAdapter::prepareCommand()
{
#ifdef Q_OS_WIN
Utils::QtcProcess::SplitError perr;
startParameters().processArgs = Utils::QtcProcess::prepareArgs(
startParameters().processArgs, &perr,
@@ -96,9 +94,9 @@ bool AbstractGdbAdapter::prepareWinCommand()
"Debugging complex command lines is currently not supported under Windows"), QString());
return false;
}
#endif
return true;
}
#endif
QString AbstractGdbAdapter::msgGdbStopFailed(const QString &why)
{

View File

@@ -102,9 +102,7 @@ protected:
const DebuggerStartParameters &startParameters() const;
DebuggerStartParameters &startParameters();
void showMessage(const QString &msg, int channel = LogDebug, int timeout = 1);
#ifdef Q_OS_WIN
bool prepareWinCommand();
#endif
bool prepareCommand();
GdbEngine * const m_engine;
};

View File

@@ -77,10 +77,8 @@ void LocalPlainGdbAdapter::startAdapter()
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
showMessage(_("TRYING TO START ADAPTER"));
#ifdef Q_OS_WIN
if (!prepareWinCommand())
if (!prepareCommand())
return;
#endif
QStringList gdbArgs;

View File

@@ -103,7 +103,7 @@ void TermGdbAdapter::startAdapter()
// m_stubProc.blockSignals(false);
#ifdef Q_OS_WIN
if (!prepareWinCommand())
if (!prepareCommand())
return;
#endif