Debugger: Unexport DebuggerRunControlFactory

Change-Id: I0d7c3ba312f7242d14b9c7cf4fe7174325b518ca
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-05-27 16:09:43 +02:00
parent 6eada122a3
commit f5548f4018
3 changed files with 37 additions and 44 deletions

View File

@@ -279,6 +279,26 @@ void DebuggerRunControl::abortDebugger()
//
////////////////////////////////////////////////////////////////////////
namespace Internal {
class DebuggerRunControlFactory
: public ProjectExplorer::IRunControlFactory
{
public:
explicit DebuggerRunControlFactory(QObject *parent);
ProjectExplorer::RunControl *create(
ProjectExplorer::RunConfiguration *runConfig,
ProjectExplorer::RunMode mode,
QString *errorMessage);
bool canRun(ProjectExplorer::RunConfiguration *runConfig,
ProjectExplorer::RunMode mode) const;
ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect(
ProjectExplorer::RunConfiguration *rc);
};
DebuggerRunControlFactory::DebuggerRunControlFactory(QObject *parent)
: IRunControlFactory(parent)
{}
@@ -289,8 +309,6 @@ bool DebuggerRunControlFactory::canRun(RunConfiguration *runConfig, RunMode mode
&& qobject_cast<LocalApplicationRunConfiguration *>(runConfig);
}
namespace Internal {
bool fillParametersFromLocalRunConfiguration
(DebuggerRunParameters *sp, const RunConfiguration *runConfig, QString *errorMessage)
{
@@ -362,8 +380,6 @@ bool fillParametersFromLocalRunConfiguration
return true;
}
} // namespace Internal
RunControl *DebuggerRunControlFactory::create
(RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
{
@@ -382,7 +398,7 @@ RunControl *DebuggerRunControlFactory::create
sp.breakOnMain = true;
sp.runConfiguration = runConfiguration;
return doCreate(sp, errorMessage);
return createDebuggerRunControl(sp, errorMessage);
}
IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)
@@ -390,13 +406,14 @@ IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect
return new DebuggerRunConfigurationAspect(rc);
}
DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp, QString *errorMessage)
QObject *createDebuggerRunControlFactory(QObject *parent)
{
return DebuggerRunControlFactory::doCreate(sp, errorMessage);
return new DebuggerRunControlFactory(parent);
}
DebuggerRunControl *DebuggerRunControlFactory::doCreate
(const DebuggerStartParameters &sp, QString *errorMessage)
} // namespace Internal
DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp, QString *errorMessage)
{
TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);