From 40dd86b672eadc2a3363cb22cd9d6dd2badcda5e Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Fri, 26 Nov 2010 11:10:03 +0100 Subject: [PATCH] debugger: remove unneeded declarations --- src/plugins/debugger/debuggerrunner.cpp | 33 +++++++++++-------------- src/plugins/debugger/debuggerrunner.h | 5 ---- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 9d2c7efef15..7b7841f40fa 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -220,18 +220,16 @@ RunControl *DebuggerRunControlFactory::create return create(sp, runConfiguration); } -DebuggerRunControl *DebuggerRunControlFactory::create( - const DebuggerStartParameters &sp, - RunConfiguration *runConfiguration) +DebuggerRunControl *DebuggerRunControlFactory::create + (const DebuggerStartParameters &sp, RunConfiguration *runConfiguration) { DebuggerRunControl *runControl = new DebuggerRunControl(runConfiguration, m_enabledEngines, sp); - if (!runControl->engine()) { - qDebug() << "FAILED TO CREATE ENGINE"; - delete runControl; - return 0; - } - return runControl; + if (runControl->engine()) + return runControl; + qDebug() << "FAILED TO CREATE ENGINE"; + delete runControl; + return 0; } QWidget *DebuggerRunControlFactory::createConfigurationWidget @@ -522,11 +520,10 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams break; case CdbEngineType: // Try new engine, fall back to old. - if (Debugger::Cdb::isCdbEngineEnabled()) { - d->m_engine = Debugger::Cdb::createCdbEngine(sp, &d->m_errorMessage); - } else { - d->m_engine = Debugger::Internal::createCdbEngine(sp, &d->m_errorMessage); - } + if (Cdb::isCdbEngineEnabled()) + d->m_engine = Cdb::createCdbEngine(sp, &d->m_errorMessage); + else + d->m_engine = Internal::createCdbEngine(sp, &d->m_errorMessage); break; case PdbEngineType: d->m_engine = createPdbEngine(sp); @@ -555,12 +552,12 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams if (!d->m_engine) { // Could not find anything suitable. debuggingFinished(); - // Create Message box with possibility to go to settings + // Create Message box with possibility to go to settings. const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3") - .arg(sp.executable, toolChainName(sp.toolChainType), d->m_errorMessage); + .arg(sp.executable, toolChainName(sp.toolChainType), d->m_errorMessage); Core::ICore::instance()->showWarningWithOptions(tr("Warning"), - msg, QString(), QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY), - d->m_settingsIdHint); + msg, QString(), QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY), + d->m_settingsIdHint); } } diff --git a/src/plugins/debugger/debuggerrunner.h b/src/plugins/debugger/debuggerrunner.h index 05071434542..86c5efa0dde 100644 --- a/src/plugins/debugger/debuggerrunner.h +++ b/src/plugins/debugger/debuggerrunner.h @@ -47,11 +47,6 @@ class DebuggerRunControl; class DebuggerRunControlPrivate; class DebuggerStartParameters; -namespace Internal { -class GdbEngine; -class AbstractGdbAdapter; -} - class DEBUGGER_EXPORT DebuggerRunControlFactory : public ProjectExplorer::IRunControlFactory { -- GitLab