Commit f5548f40 authored by hjk's avatar hjk

Debugger: Unexport DebuggerRunControlFactory

Change-Id: I0d7c3ba312f7242d14b9c7cf4fe7174325b518ca
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 6eada122
......@@ -416,6 +416,7 @@ namespace Internal {
void addCdbOptionPages(QList<IOptionsPage*> *opts);
void addGdbOptionPages(QList<IOptionsPage*> *opts);
QObject *createDebuggerRunControlFactory(QObject *parent);
static QToolButton *toolButton(QAction *action)
{
......@@ -954,7 +955,6 @@ public slots:
public:
DebuggerMainWindow *m_mainWindow;
DebuggerRunControlFactory *m_debuggerRunControlFactory;
Id m_previousMode;
QList<DebuggerRunParameters> m_scheduledStarts;
......@@ -2597,9 +2597,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
m_mainWindow->addStagedMenuEntries();
// Register factory of DebuggerRunControl.
m_debuggerRunControlFactory = new DebuggerRunControlFactory(m_plugin);
m_plugin->addAutoReleasedObject(m_debuggerRunControlFactory);
m_plugin->addAutoReleasedObject(createDebuggerRunControlFactory(m_plugin));
// The main "Start Debugging" action.
act = m_startAction = new QAction(this);
......
......@@ -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);
......
......@@ -36,17 +36,16 @@
#include <projectexplorer/runconfiguration.h>
namespace ProjectExplorer { class Kit; }
namespace Debugger {
class RemoteSetupResult;
class DebuggerStartParameters;
class DebuggerRunControl;
namespace Internal {
class DebuggerEngine;
class DebuggerRunParameters;
}
DEBUGGER_EXPORT DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp,
QString *errorMessage);
namespace Internal { class DebuggerEngine; }
class DEBUGGER_EXPORT DebuggerRunControl
: public ProjectExplorer::RunControl
......@@ -83,7 +82,10 @@ signals:
private:
void handleFinished();
friend class DebuggerRunControlFactory;
friend DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp,
QString *errorMessage);
DebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
Internal::DebuggerEngine *engine);
......@@ -91,30 +93,6 @@ private:
bool m_running;
};
class DEBUGGER_EXPORT DebuggerRunControlFactory
: public ProjectExplorer::IRunControlFactory
{
public:
explicit DebuggerRunControlFactory(QObject *parent);
// FIXME: Used by qmljsinspector.cpp:469
ProjectExplorer::RunControl *create(
ProjectExplorer::RunConfiguration *runConfig,
ProjectExplorer::RunMode mode,
QString *errorMessage);
bool canRun(ProjectExplorer::RunConfiguration *runConfig,
ProjectExplorer::RunMode mode) const;
static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp, QString *errorMessage);
ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect(
ProjectExplorer::RunConfiguration *rc);
};
DEBUGGER_EXPORT DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp,
QString *errorMessage);
} // namespace Debugger
#endif // DEBUGGERRUNCONTROL_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment