Commit 62afcd67 authored by hjk's avatar hjk Committed by hjk

ProjectExplorer: Add an option to pop up app outpuit pane when debugging

Task-number: QTCREATORBUG-6764
Change-Id: I24620c00220adccc39271a4d8c02cd0b6aec4b78
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 6aa06579
......@@ -935,6 +935,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
s->value(QLatin1String("ProjectExplorer/Settings/ShowCompilerOutput"), false).toBool();
d->m_projectExplorerSettings.showRunOutput =
s->value(QLatin1String("ProjectExplorer/Settings/ShowRunOutput"), true).toBool();
d->m_projectExplorerSettings.showDebugOutput =
s->value(QLatin1String("ProjectExplorer/Settings/ShowDebugOutput"), false).toBool();
d->m_projectExplorerSettings.cleanOldAppOutput =
s->value(QLatin1String("ProjectExplorer/Settings/CleanOldAppOutput"), false).toBool();
d->m_projectExplorerSettings.mergeStdErrAndStdOut =
......@@ -1262,6 +1264,7 @@ void ProjectExplorerPlugin::savePersistentSettings()
s->setValue(QLatin1String("ProjectExplorer/Settings/SaveBeforeBuild"), d->m_projectExplorerSettings.saveBeforeBuild);
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowCompilerOutput"), d->m_projectExplorerSettings.showCompilerOutput);
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowRunOutput"), d->m_projectExplorerSettings.showRunOutput);
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowDebugOutput"), d->m_projectExplorerSettings.showDebugOutput);
s->setValue(QLatin1String("ProjectExplorer/Settings/CleanOldAppOutput"), d->m_projectExplorerSettings.cleanOldAppOutput);
s->setValue(QLatin1String("ProjectExplorer/Settings/MergeStdErrAndStdOut"), d->m_projectExplorerSettings.mergeStdErrAndStdOut);
s->setValue(QLatin1String("ProjectExplorer/Settings/WrapAppOutput"), d->m_projectExplorerSettings.wrapAppOutput);
......@@ -1566,6 +1569,9 @@ void ProjectExplorerPlugin::startRunControl(RunControl *runControl, RunMode runM
d->m_outputPane->createNewOutputWindow(runControl);
if (runMode == NormalRunMode && d->m_projectExplorerSettings.showRunOutput)
d->m_outputPane->popup(false);
if ((runMode == DebugRunMode || runMode == DebugRunModeWithBreakOnMain)
&& d->m_projectExplorerSettings.showDebugOutput)
d->m_outputPane->popup(false);
d->m_outputPane->showTabFor(runControl);
connect(runControl, SIGNAL(finished()), this, SLOT(runControlFinished()));
runControl->start();
......
......@@ -43,7 +43,8 @@ struct ProjectExplorerSettings
ProjectExplorerSettings() :
buildBeforeDeploy(true), deployBeforeRun(true),
saveBeforeBuild(false), showCompilerOutput(false),
showRunOutput(true), cleanOldAppOutput(false), mergeStdErrAndStdOut(false),
showRunOutput(true), showDebugOutput(false),
cleanOldAppOutput(false), mergeStdErrAndStdOut(false),
wrapAppOutput(true), useJom(true),
autorestoreLastSession(false), prompToStopRunControl(false),
maxAppOutputLines(100000)
......@@ -54,6 +55,7 @@ struct ProjectExplorerSettings
bool saveBeforeBuild;
bool showCompilerOutput;
bool showRunOutput;
bool showDebugOutput;
bool cleanOldAppOutput;
bool mergeStdErrAndStdOut;
bool wrapAppOutput;
......@@ -75,6 +77,7 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS
&& p1.saveBeforeBuild == p2.saveBeforeBuild
&& p1.showCompilerOutput == p2.showCompilerOutput
&& p1.showRunOutput == p2.showRunOutput
&& p1.showDebugOutput == p2.showDebugOutput
&& p1.cleanOldAppOutput == p2.cleanOldAppOutput
&& p1.mergeStdErrAndStdOut == p2.mergeStdErrAndStdOut
&& p1.wrapAppOutput == p2.wrapAppOutput
......
......@@ -73,6 +73,7 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
pes.saveBeforeBuild = m_ui.saveAllFilesCheckBox->isChecked();
pes.showCompilerOutput = m_ui.showCompileOutputCheckBox->isChecked();
pes.showRunOutput = m_ui.showRunOutputCheckBox->isChecked();
pes.showDebugOutput = m_ui.showDebugOutputCheckBox->isChecked();
pes.cleanOldAppOutput = m_ui.cleanOldAppOutputCheckBox->isChecked();
pes.mergeStdErrAndStdOut = m_ui.mergeStdErrAndStdOutCheckBox->isChecked();
pes.wrapAppOutput = m_ui.wrapAppOutputCheckBox->isChecked();
......@@ -89,6 +90,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &
m_ui.saveAllFilesCheckBox->setChecked(pes.saveBeforeBuild);
m_ui.showCompileOutputCheckBox->setChecked(pes.showCompilerOutput);
m_ui.showRunOutputCheckBox->setChecked(pes.showRunOutput);
m_ui.showDebugOutputCheckBox->setChecked(pes.showDebugOutput);
m_ui.cleanOldAppOutputCheckBox->setChecked(pes.cleanOldAppOutput);
m_ui.mergeStdErrAndStdOutCheckBox->setChecked(pes.mergeStdErrAndStdOut);
m_ui.wrapAppOutputCheckBox->setChecked(pes.wrapAppOutput);
......
......@@ -44,7 +44,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="projectsDirectoryPathChooser"/>
<widget class="Utils::PathChooser" name="projectsDirectoryPathChooser" native="true"/>
</item>
</layout>
</widget>
......@@ -146,14 +146,7 @@
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="showRunOutputCheckBox">
<property name="text">
<string>Open application output pane when running</string>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="7" column="0">
<widget class="QCheckBox" name="promptToStopRunControlCheckBox">
<property name="toolTip">
<string>Ask before terminating the running application in response to clicking the stop button in Application Output.</string>
......@@ -163,7 +156,7 @@
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<item row="8" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
......@@ -196,21 +189,32 @@
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="showRunOutputCheckBox">
<property name="text">
<string>Open application output pane when running</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="showDebugOutputCheckBox">
<property name="text">
<string>Open application output pane when debugging</string>
</property>
</widget>
</item>
</layout>
<zorder>saveAllFilesCheckBox</zorder>
<zorder>buildProjectBeforeDeployCheckBox</zorder>
<zorder>deployProjectBeforeRunCheckBox</zorder>
<zorder>showCompileOutputCheckBox</zorder>
<zorder>showRunOutputCheckBox</zorder>
<zorder>cleanOldAppOutputCheckBox</zorder>
<zorder>mergeStdErrAndStdOutCheckBox</zorder>
<zorder>wrapAppOutputCheckBox</zorder>
<zorder>widget</zorder>
<zorder>promptToStopRunControlCheckBox</zorder>
<zorder>label</zorder>
<zorder>maxAppOutputBox</zorder>
<zorder>label_2</zorder>
<zorder>jomCheckbox</zorder>
<zorder>showRunOutputCheckBox</zorder>
<zorder>showDebugOutputCheckBox</zorder>
</widget>
</item>
<item>
......
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