forked from qt-creator/qt-creator
Add a startRunControl() method.
For plugins that create runcontrols in unsual ways
This commit is contained in:
@@ -1230,27 +1230,32 @@ void ProjectExplorerPlugin::executeRunConfiguration(const QSharedPointer<RunConf
|
||||
emit aboutToExecuteProject(runConfiguration->project());
|
||||
|
||||
RunControl *control = runControlFactory->create(runConfiguration, runMode);
|
||||
d->m_outputPane->createNewOutputWindow(control);
|
||||
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(control);
|
||||
d->m_outputPane->showTabFor(runControl);
|
||||
|
||||
connect(control, SIGNAL(addToOutputWindow(RunControl *, const QString &)),
|
||||
connect(runControl, SIGNAL(addToOutputWindow(RunControl *, const QString &)),
|
||||
this, SLOT(addToApplicationOutputWindow(RunControl *, const QString &)));
|
||||
connect(control, SIGNAL(addToOutputWindowInline(RunControl *, const QString &)),
|
||||
connect(runControl, SIGNAL(addToOutputWindowInline(RunControl *, const QString &)),
|
||||
this, SLOT(addToApplicationOutputWindowInline(RunControl *, const QString &)));
|
||||
connect(control, SIGNAL(error(RunControl *, const QString &)),
|
||||
connect(runControl, SIGNAL(error(RunControl *, const QString &)),
|
||||
this, SLOT(addErrorToApplicationOutputWindow(RunControl *, const QString &)));
|
||||
connect(control, SIGNAL(finished()),
|
||||
connect(runControl, SIGNAL(finished()),
|
||||
this, SLOT(runControlFinished()));
|
||||
|
||||
if (runMode == ProjectExplorer::Constants::DEBUGMODE)
|
||||
d->m_debuggingRunControl = control;
|
||||
d->m_debuggingRunControl = runControl;
|
||||
|
||||
control->start();
|
||||
runControl->start();
|
||||
updateRunAction();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ProjectExplorerPlugin::buildQueueFinished(bool success)
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user