summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerrunner.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-25 11:35:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-25 11:35:44 +0200
commit978cf4bda8882ddf763e4a353f5cfee729a6d3b6 (patch)
treea4231cf285e618641587af139e2a9d4ab667f7e8 /src/plugins/debugger/debuggerrunner.cpp
parente7cef7ef227fb186ccac436413adead6d9e5aa75 (diff)
downloadqt-creator-978cf4bda8882ddf763e4a353f5cfee729a6d3b6.tar.gz
Rename IRunConfigurationRunner -> IRunControlFactory...
and ApplicationRunConfiguration to LocalApplicationRunConfiguration, preparing remote debugging. Change the interface canRun() to be const, run() to create() (since it does not run anything), use references to the QSharedPointer<Foo>. Introduce d-Pointer and remove unneeded headers from ProjectExplorerPlugin and add missing includes everywhere.
Diffstat (limited to 'src/plugins/debugger/debuggerrunner.cpp')
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index f64b54998b..dc622cf2e3 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -48,61 +48,61 @@ namespace Internal {
using ProjectExplorer::RunConfiguration;
using ProjectExplorer::RunControl;
-using ProjectExplorer::ApplicationRunConfiguration;
+using ProjectExplorer::LocalApplicationRunConfiguration;
-DefaultApplicationRunConfiguration::DefaultApplicationRunConfiguration(const QString &executable) :
- ProjectExplorer::ApplicationRunConfiguration(0),
+DefaultLocalApplicationRunConfiguration::DefaultLocalApplicationRunConfiguration(const QString &executable) :
+ ProjectExplorer::LocalApplicationRunConfiguration(0),
m_executable(executable)
{
}
////////////////////////////////////////////////////////////////////////
//
-// DebuggerRunner
+// DebuggerRunControlFactory
//
////////////////////////////////////////////////////////////////////////
// A factory to create DebuggerRunControls
-DebuggerRunner::DebuggerRunner(DebuggerManager *manager)
+DebuggerRunControlFactory::DebuggerRunControlFactory(DebuggerManager *manager)
: m_manager(manager)
{}
-bool DebuggerRunner::canRun(RunConfigurationPtr runConfiguration, const QString &mode)
+bool DebuggerRunControlFactory::canRun(const RunConfigurationPtr &runConfiguration, const QString &mode) const
{
return mode == ProjectExplorer::Constants::DEBUGMODE
- && !runConfiguration.objectCast<ApplicationRunConfiguration>().isNull();
+ && !runConfiguration.objectCast<LocalApplicationRunConfiguration>().isNull();
}
-QString DebuggerRunner::displayName() const
+QString DebuggerRunControlFactory::displayName() const
{
return tr("Debug");
}
-RunConfigurationPtr DebuggerRunner::createDefaultRunConfiguration(const QString &executable)
+RunConfigurationPtr DebuggerRunControlFactory::createDefaultRunConfiguration(const QString &executable)
{
- return RunConfigurationPtr(new DefaultApplicationRunConfiguration(executable));
+ return RunConfigurationPtr(new DefaultLocalApplicationRunConfiguration(executable));
}
-RunControl *DebuggerRunner::run(RunConfigurationPtr runConfiguration,
- const QString &mode,
- const DebuggerStartParametersPtr &sp)
+RunControl *DebuggerRunControlFactory::create(const RunConfigurationPtr &runConfiguration,
+ const QString &mode,
+ const DebuggerStartParametersPtr &sp)
{
QTC_ASSERT(mode == ProjectExplorer::Constants::DEBUGMODE, return 0);
- ApplicationRunConfigurationPtr rc =
- runConfiguration.objectCast<ApplicationRunConfiguration>();
+ LocalApplicationRunConfigurationPtr rc =
+ runConfiguration.objectCast<LocalApplicationRunConfiguration>();
QTC_ASSERT(!rc.isNull(), return 0);
return new DebuggerRunControl(m_manager, sp, rc);
}
-RunControl *DebuggerRunner::run(RunConfigurationPtr runConfiguration,
- const QString &mode)
+RunControl *DebuggerRunControlFactory::create(const RunConfigurationPtr &runConfiguration,
+ const QString &mode)
{
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
sp->startMode = StartInternal;
- return run(runConfiguration, mode, sp);
+ return create(runConfiguration, mode, sp);
}
-QWidget *DebuggerRunner::configurationWidget(RunConfigurationPtr runConfiguration)
+QWidget *DebuggerRunControlFactory::configurationWidget(const RunConfigurationPtr &runConfiguration)
{
// NBS TODO: Add GDB-specific configuration widget
Q_UNUSED(runConfiguration)
@@ -120,7 +120,7 @@ QWidget *DebuggerRunner::configurationWidget(RunConfigurationPtr runConfiguratio
DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
const DebuggerStartParametersPtr &startParameters,
- QSharedPointer<ApplicationRunConfiguration> runConfiguration)
+ QSharedPointer<LocalApplicationRunConfiguration> runConfiguration)
: RunControl(runConfiguration),
m_startParameters(startParameters),
m_manager(manager),
@@ -164,7 +164,7 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
project->buildDirectory(project->activeBuildConfiguration());
}
m_startParameters->useTerminal =
- runConfiguration->runMode() == ApplicationRunConfiguration::Console;
+ runConfiguration->runMode() == LocalApplicationRunConfiguration::Console;
m_startParameters->dumperLibrary =
runConfiguration->dumperLibrary();
m_startParameters->dumperLibraryLocations =