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
435339f2
Commit
435339f2
authored
Feb 24, 2010
by
Tobias Hunger
Browse files
Ask before removing targets
Reviewed-by: Robert Loehning
parent
025ba126
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/targetsettingspanel.cpp
View file @
435339f2
...
...
@@ -41,6 +41,7 @@
#include
<QtCore/QCoreApplication>
#include
<QtGui/QLabel>
#include
<QtGui/QMessageBox>
#include
<QtGui/QVBoxLayout>
using
namespace
ProjectExplorer
;
...
...
@@ -249,8 +250,13 @@ void TargetSettingsPanelWidget::removeTarget()
{
int
index
=
m_selector
->
currentIndex
();
Target
*
t
=
m_targets
.
at
(
index
);
// TODO: Ask before removal?
m_project
->
removeTarget
(
t
);
int
ret
=
QMessageBox
::
warning
(
this
,
tr
(
"Qt Creator"
),
tr
(
"Do you really want to remove the
\n
"
"
\"
%1
\"
target?"
).
arg
(
t
->
displayName
()),
QMessageBox
::
Yes
|
QMessageBox
::
No
,
QMessageBox
::
No
);
if
(
ret
==
QMessageBox
::
Yes
)
m_project
->
removeTarget
(
t
);
}
void
TargetSettingsPanelWidget
::
targetAdded
(
ProjectExplorer
::
Target
*
target
)
...
...
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