From 9f7725da97aae7ea755bb4d57f61e763c5bee180 Mon Sep 17 00:00:00 2001 From: hjk <hjk@theqtcompany.com> Date: Mon, 8 Jun 2015 08:21:13 +0200 Subject: [PATCH] Debugger: Code cosmetics Namespace, override, re-shuffle. Change-Id: I6327b032707294b680a5411a652970a5f9b38c75 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> --- src/plugins/debugger/debuggerruncontrol.cpp | 41 ++++++++------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index b569dbb35da..23912cc6169 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -281,34 +281,28 @@ void DebuggerRunControl::abortDebugger() namespace Internal { -class DebuggerRunControlFactory - : public ProjectExplorer::IRunControlFactory +class DebuggerRunControlFactory : public IRunControlFactory { public: - explicit DebuggerRunControlFactory(QObject *parent); + explicit DebuggerRunControlFactory(QObject *parent) + : IRunControlFactory(parent) + {} - ProjectExplorer::RunControl *create( - ProjectExplorer::RunConfiguration *runConfig, - ProjectExplorer::RunMode mode, - QString *errorMessage); + RunControl *create(RunConfiguration *runConfig, + RunMode mode, QString *errorMessage) override; - bool canRun(ProjectExplorer::RunConfiguration *runConfig, - ProjectExplorer::RunMode mode) const; + bool canRun(RunConfiguration *runConfig, RunMode mode) const override + { + return (mode == DebugRunMode || mode == DebugRunModeWithBreakOnMain) + && qobject_cast<LocalApplicationRunConfiguration *>(runConfig); + } - ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect( - ProjectExplorer::RunConfiguration *rc); + IRunConfigurationAspect *createRunConfigurationAspect(RunConfiguration *rc) override + { + return new DebuggerRunConfigurationAspect(rc); + } }; -DebuggerRunControlFactory::DebuggerRunControlFactory(QObject *parent) - : IRunControlFactory(parent) -{} - -bool DebuggerRunControlFactory::canRun(RunConfiguration *runConfig, RunMode mode) const -{ - return (mode == DebugRunMode || mode == DebugRunModeWithBreakOnMain) - && qobject_cast<LocalApplicationRunConfiguration *>(runConfig); -} - bool fillParametersFromLocalRunConfiguration (DebuggerRunParameters *sp, const RunConfiguration *runConfig, QString *errorMessage) { @@ -401,11 +395,6 @@ RunControl *DebuggerRunControlFactory::create return createDebuggerRunControl(sp, errorMessage); } -IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc) -{ - return new DebuggerRunConfigurationAspect(rc); -} - QObject *createDebuggerRunControlFactory(QObject *parent) { return new DebuggerRunControlFactory(parent); -- GitLab