aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/targetsettingspanel.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-16 16:50:16 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-17 10:04:37 +0000
commitd2bb143552c4ce536fd198cae9d18618ea35e989 (patch)
tree7504a231b4b7967c19638c8d428a90dc23de2905 /src/plugins/projectexplorer/targetsettingspanel.cpp
parent3be770eeae49cedc14a6c94d22e608b77b749b42 (diff)
TargetSettingsPanel: Small cleanup
Change-Id: I39b75d3af36c5770c995f2923ac2e7e49b042850 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/targetsettingspanel.cpp')
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index 447ed76a9e..c75136fac9 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -330,10 +330,7 @@ void TargetSettingsPanelWidget::addActionTriggered(QAction *action)
Kit *k = KitManager::find(action->data().value<Id>());
QTC_ASSERT(!m_project->target(k), return);
- Target *target = m_project->createTarget(k);
- if (!target)
- return;
- m_project->addTarget(target);
+ m_project->addTarget(m_project->createTarget(k));
} else {
QTC_ASSERT(data.canConvert<IPotentialKit *>(), return);
IPotentialKit *potentialKit = data.value<IPotentialKit *>();
@@ -507,7 +504,6 @@ void TargetSettingsPanelWidget::removeTarget(Target *t)
}
m_project->removeTarget(t);
-
}
void TargetSettingsPanelWidget::showTargetToolTip(const QPoint &globalPos, int targetIndex)