Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
92d05ed8
Commit
92d05ed8
authored
Apr 16, 2010
by
Erik Verbruggen
Browse files
Add option to clear the "Application Output" on a new run.
Reviewed-by: Thorbjorn Lindeijer
parent
44c02264
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/outputwindow.cpp
View file @
92d05ed8
...
...
@@ -29,6 +29,8 @@
#include "outputwindow.h"
#include "projectexplorerconstants.h"
#include "projectexplorer.h"
#include "projectexplorersettings.h"
#include "runconfiguration.h"
#include <coreplugin/actionmanager/actionmanager.h>
...
...
@@ -235,7 +237,10 @@ void OutputPane::reRunRunControl()
int
index
=
m_tabWidget
->
currentIndex
();
RunControl
*
rc
=
runControlForTab
(
index
);
OutputWindow
*
ow
=
static_cast
<
OutputWindow
*>
(
m_tabWidget
->
widget
(
index
));
ow
->
grayOutOldContent
();
if
(
ProjectExplorerPlugin
::
instance
()
->
projectExplorerSettings
().
cleanOldAppOutput
)
ow
->
clear
();
else
ow
->
grayOutOldContent
();
ow
->
verticalScrollBar
()
->
setValue
(
ow
->
verticalScrollBar
()
->
maximum
());
rc
->
start
();
}
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
92d05ed8
...
...
@@ -746,6 +746,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d
->
m_projectExplorerSettings
.
buildBeforeRun
=
s
->
value
(
"ProjectExplorer/Settings/BuildBeforeRun"
,
true
).
toBool
();
d
->
m_projectExplorerSettings
.
saveBeforeBuild
=
s
->
value
(
"ProjectExplorer/Settings/SaveBeforeBuild"
,
false
).
toBool
();
d
->
m_projectExplorerSettings
.
showCompilerOutput
=
s
->
value
(
"ProjectExplorer/Settings/ShowCompilerOutput"
,
false
).
toBool
();
d
->
m_projectExplorerSettings
.
cleanOldAppOutput
=
s
->
value
(
"ProjectExplorer/Settings/CleanOldAppOutput"
,
false
).
toBool
();
d
->
m_projectExplorerSettings
.
useJom
=
s
->
value
(
"ProjectExplorer/Settings/UseJom"
,
true
).
toBool
();
}
...
...
@@ -990,6 +991,7 @@ void ProjectExplorerPlugin::savePersistentSettings()
s
->
setValue
(
"ProjectExplorer/Settings/BuildBeforeRun"
,
d
->
m_projectExplorerSettings
.
buildBeforeRun
);
s
->
setValue
(
"ProjectExplorer/Settings/SaveBeforeBuild"
,
d
->
m_projectExplorerSettings
.
saveBeforeBuild
);
s
->
setValue
(
"ProjectExplorer/Settings/ShowCompilerOutput"
,
d
->
m_projectExplorerSettings
.
showCompilerOutput
);
s
->
setValue
(
"ProjectExplorer/Settings/CleanOldAppOutput"
,
d
->
m_projectExplorerSettings
.
cleanOldAppOutput
);
s
->
setValue
(
"ProjectExplorer/Settings/UseJom"
,
d
->
m_projectExplorerSettings
.
useJom
);
}
}
...
...
@@ -1268,6 +1270,8 @@ void ProjectExplorerPlugin::startRunControl(RunControl *runControl, const QStrin
if
(
runMode
==
ProjectExplorer
::
Constants
::
RUNMODE
)
d
->
m_outputPane
->
popup
(
false
);
d
->
m_outputPane
->
showTabFor
(
runControl
);
if
(
projectExplorerSettings
().
cleanOldAppOutput
)
d
->
m_outputPane
->
clearContents
();
connect
(
runControl
,
SIGNAL
(
addToOutputWindow
(
RunControl
*
,
const
QString
&
)),
this
,
SLOT
(
addToApplicationOutputWindow
(
RunControl
*
,
const
QString
&
)));
...
...
src/plugins/projectexplorer/projectexplorersettings.h
View file @
92d05ed8
...
...
@@ -36,11 +36,13 @@ namespace Internal {
struct
ProjectExplorerSettings
{
ProjectExplorerSettings
()
:
buildBeforeRun
(
true
),
saveBeforeBuild
(
false
),
showCompilerOutput
(
false
),
useJom
(
true
)
{}
showCompilerOutput
(
false
),
cleanOldAppOutput
(
false
),
useJom
(
true
)
{}
bool
buildBeforeRun
;
bool
saveBeforeBuild
;
bool
showCompilerOutput
;
bool
cleanOldAppOutput
;
bool
useJom
;
};
...
...
@@ -49,6 +51,7 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS
return
p1
.
buildBeforeRun
==
p2
.
buildBeforeRun
&&
p1
.
saveBeforeBuild
==
p2
.
saveBeforeBuild
&&
p1
.
showCompilerOutput
==
p2
.
showCompilerOutput
&&
p1
.
cleanOldAppOutput
==
p2
.
cleanOldAppOutput
&&
p1
.
useJom
==
p2
.
useJom
;
}
...
...
src/plugins/projectexplorer/projectexplorersettingspage.cpp
View file @
92d05ed8
...
...
@@ -67,6 +67,7 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
pes
.
buildBeforeRun
=
m_ui
.
buildProjectBeforeRunCheckBox
->
isChecked
();
pes
.
saveBeforeBuild
=
m_ui
.
saveAllFilesCheckBox
->
isChecked
();
pes
.
showCompilerOutput
=
m_ui
.
showCompileOutputCheckBox
->
isChecked
();
pes
.
cleanOldAppOutput
=
m_ui
.
cleanOldAppOutputCheckBox
->
isChecked
();
pes
.
useJom
=
m_ui
.
jomCheckbox
->
isChecked
();
return
pes
;
}
...
...
@@ -76,6 +77,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &
m_ui
.
buildProjectBeforeRunCheckBox
->
setChecked
(
pes
.
buildBeforeRun
);
m_ui
.
saveAllFilesCheckBox
->
setChecked
(
pes
.
saveBeforeBuild
);
m_ui
.
showCompileOutputCheckBox
->
setChecked
(
pes
.
showCompilerOutput
);
m_ui
.
cleanOldAppOutputCheckBox
->
setChecked
(
pes
.
cleanOldAppOutput
);
m_ui
.
jomCheckbox
->
setChecked
(
pes
.
useJom
);
}
...
...
src/plugins/projectexplorer/projectexplorersettingspage.ui
View file @
92d05ed8
...
...
@@ -21,7 +21,7 @@
<enum>
QFormLayout::ExpandingFieldsGrow
</enum>
</property>
<item
row=
"1"
column=
"1"
>
<widget
class=
"Utils::PathChooser"
name=
"projectsDirectoryPathChooser"
/>
<widget
class=
"Utils::PathChooser"
name=
"projectsDirectoryPathChooser"
native=
"true"
/>
</item>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QRadioButton"
name=
"currentDirectoryRadioButton"
>
...
...
@@ -58,21 +58,28 @@
<item>
<widget
class=
"QCheckBox"
name=
"saveAllFilesCheckBox"
>
<property
name=
"text"
>
<string>
Save all files before
B
uild
</string>
<string>
Save all files before
b
uild
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"buildProjectBeforeRunCheckBox"
>
<property
name=
"text"
>
<string>
Always build
P
roject before
R
unning
</string>
<string>
Always build
p
roject before
r
unning
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"showCompileOutputCheckBox"
>
<property
name=
"text"
>
<string>
Show Compiler Output on building
</string>
<string>
Show compiler output on building
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"cleanOldAppOutputCheckBox"
>
<property
name=
"text"
>
<string>
Clear old appliction output
</string>
</property>
</widget>
</item>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment