Skip to content
Snippets Groups Projects
Commit 64c23b27 authored by dt's avatar dt
Browse files

Add a startRunControl() method.

For plugins that create runcontrols in unsual ways
parent 6c5cf1c3
No related branches found
No related tags found
No related merge requests found
...@@ -1230,29 +1230,34 @@ void ProjectExplorerPlugin::executeRunConfiguration(const QSharedPointer<RunConf ...@@ -1230,29 +1230,34 @@ void ProjectExplorerPlugin::executeRunConfiguration(const QSharedPointer<RunConf
emit aboutToExecuteProject(runConfiguration->project()); emit aboutToExecuteProject(runConfiguration->project());
RunControl *control = runControlFactory->create(runConfiguration, runMode); RunControl *control = runControlFactory->create(runConfiguration, runMode);
d->m_outputPane->createNewOutputWindow(control); startRunControl(control, runMode);
if (runMode == ProjectExplorer::Constants::RUNMODE)
d->m_outputPane->popup(false);
d->m_outputPane->showTabFor(control);
connect(control, SIGNAL(addToOutputWindow(RunControl *, const QString &)),
this, SLOT(addToApplicationOutputWindow(RunControl *, const QString &)));
connect(control, SIGNAL(addToOutputWindowInline(RunControl *, const QString &)),
this, SLOT(addToApplicationOutputWindowInline(RunControl *, const QString &)));
connect(control, SIGNAL(error(RunControl *, const QString &)),
this, SLOT(addErrorToApplicationOutputWindow(RunControl *, const QString &)));
connect(control, SIGNAL(finished()),
this, SLOT(runControlFinished()));
if (runMode == ProjectExplorer::Constants::DEBUGMODE)
d->m_debuggingRunControl = control;
control->start();
updateRunAction();
} }
} }
void ProjectExplorerPlugin::startRunControl(RunControl *runControl, const QString &runMode)
{
d->m_outputPane->createNewOutputWindow(runControl);
if (runMode == ProjectExplorer::Constants::RUNMODE)
d->m_outputPane->popup(false);
d->m_outputPane->showTabFor(runControl);
connect(runControl, SIGNAL(addToOutputWindow(RunControl *, const QString &)),
this, SLOT(addToApplicationOutputWindow(RunControl *, const QString &)));
connect(runControl, SIGNAL(addToOutputWindowInline(RunControl *, const QString &)),
this, SLOT(addToApplicationOutputWindowInline(RunControl *, const QString &)));
connect(runControl, SIGNAL(error(RunControl *, const QString &)),
this, SLOT(addErrorToApplicationOutputWindow(RunControl *, const QString &)));
connect(runControl, SIGNAL(finished()),
this, SLOT(runControlFinished()));
if (runMode == ProjectExplorer::Constants::DEBUGMODE)
d->m_debuggingRunControl = runControl;
runControl->start();
updateRunAction();
}
void ProjectExplorerPlugin::buildQueueFinished(bool success) void ProjectExplorerPlugin::buildQueueFinished(bool success)
{ {
if (debug) if (debug)
......
...@@ -184,9 +184,12 @@ private slots: ...@@ -184,9 +184,12 @@ private slots:
void loadProject(const QString &project) { openProject(project); } void loadProject(const QString &project) { openProject(project); }
void currentModeChanged(Core::IMode *mode); void currentModeChanged(Core::IMode *mode);
void ProjectExplorerPlugin::startRunControl(RunControl *runControl, const QString &mode);
private: private:
void runProjectImpl(Project *pro); void runProjectImpl(Project *pro);
void executeRunConfiguration(const QSharedPointer<RunConfiguration> &, const QString &mode); void executeRunConfiguration(const QSharedPointer<RunConfiguration> &, const QString &mode);
void setCurrent(Project *project, QString filePath, Node *node); void setCurrent(Project *project, QString filePath, Node *node);
QStringList allFilesWithDependencies(Project *pro); QStringList allFilesWithDependencies(Project *pro);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment