Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
3057c6ec
Commit
3057c6ec
authored
Apr 16, 2010
by
Thorbjørn Lindeijer
Browse files
Offer to force quit an application when closing its output window
Reviewed-by: dt Task-number: QTCREATORBUG-1093
parent
70153d1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/outputwindow.cpp
View file @
3057c6ec
...
...
@@ -257,9 +257,19 @@ void OutputPane::closeTab(int index)
RunControl
*
rc
=
m_outputWindows
.
key
(
ow
);
if
(
rc
->
isRunning
())
{
QString
msg
=
tr
(
"The application is still running. Close it first."
);
QMessageBox
::
critical
(
0
,
tr
(
"Unable to close"
),
msg
);
return
;
QMessageBox
messageBox
(
QMessageBox
::
Warning
,
tr
(
"Unable to close"
),
tr
(
"The application is still running."
),
QMessageBox
::
Cancel
|
QMessageBox
::
Yes
,
ow
->
window
());
messageBox
.
setInformativeText
(
tr
(
"Force it to quit?"
));
messageBox
.
setDefaultButton
(
QMessageBox
::
Yes
);
messageBox
.
button
(
QMessageBox
::
Yes
)
->
setText
(
tr
(
"Force Quit"
));
if
(
messageBox
.
exec
()
!=
QMessageBox
::
Yes
)
return
;
rc
->
stop
();
}
m_tabWidget
->
removeTab
(
index
);
...
...
src/plugins/projectexplorer/runconfiguration.h
View file @
3057c6ec
...
...
@@ -162,7 +162,7 @@ public:
explicit
RunControl
(
RunConfiguration
*
runConfiguration
);
virtual
~
RunControl
();
virtual
void
start
()
=
0
;
virtual
void
stop
()
=
0
;
virtual
void
stop
()
=
0
;
// Warning: assumed to be synchroneous!
virtual
bool
isRunning
()
const
=
0
;
virtual
QString
displayName
()
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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