Add a startRunControl() method.

For plugins that create runcontrols in unsual ways
This commit is contained in:
dt
2009-10-08 16:30:17 +02:00
parent 6c5cf1c32a
commit 64c23b271c
2 changed files with 27 additions and 19 deletions

View File

@@ -1230,29 +1230,34 @@ void ProjectExplorerPlugin::executeRunConfiguration(const QSharedPointer<RunConf
emit aboutToExecuteProject(runConfiguration->project());
RunControl *control = runControlFactory->create(runConfiguration, runMode);
d->m_outputPane->createNewOutputWindow(control);
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();
startRunControl(control, runMode);
}
}
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)
{
if (debug)

View File

@@ -184,9 +184,12 @@ private slots:
void loadProject(const QString &project) { openProject(project); }
void currentModeChanged(Core::IMode *mode);
void ProjectExplorerPlugin::startRunControl(RunControl *runControl, const QString &mode);
private:
void runProjectImpl(Project *pro);
void executeRunConfiguration(const QSharedPointer<RunConfiguration> &, const QString &mode);
void setCurrent(Project *project, QString filePath, Node *node);
QStringList allFilesWithDependencies(Project *pro);