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());
|
emit aboutToExecuteProject(runConfiguration->project());
|
||||||
|
|
||||||
RunControl *control = runControlFactory->create(runConfiguration, runMode);
|
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)
|
if (runMode == ProjectExplorer::Constants::RUNMODE)
|
||||||
d->m_outputPane->popup(false);
|
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 &)));
|
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 &)));
|
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 &)));
|
this, SLOT(addErrorToApplicationOutputWindow(RunControl *, const QString &)));
|
||||||
connect(control, SIGNAL(finished()),
|
connect(runControl, SIGNAL(finished()),
|
||||||
this, SLOT(runControlFinished()));
|
this, SLOT(runControlFinished()));
|
||||||
|
|
||||||
if (runMode == ProjectExplorer::Constants::DEBUGMODE)
|
if (runMode == ProjectExplorer::Constants::DEBUGMODE)
|
||||||
d->m_debuggingRunControl = control;
|
d->m_debuggingRunControl = runControl;
|
||||||
|
|
||||||
control->start();
|
runControl->start();
|
||||||
updateRunAction();
|
updateRunAction();
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorerPlugin::buildQueueFinished(bool success)
|
void ProjectExplorerPlugin::buildQueueFinished(bool success)
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user