From 6ac416fc8174983acde36677ca2f1b8f6612dec2 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 25 Jun 2020 12:32:24 +0200 Subject: [PATCH] Target Selector: Do not repeat kit name in context menu Kit names can get rather unwieldy, and there is no point in repeating them in this particular context menu, where the user clicked pretty much right on the kit name. Fixes: QTCREATORBUG-24242 Change-Id: I04d96e53ece24fd6c54d8aa225d13a0c7354acd0 Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/targetsettingspanel.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index 9d3c1ee9d3a..5421a1f39f1 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -399,14 +399,14 @@ public: const QString kitName = kit->displayName(); const QString projectName = m_project->displayName(); - QAction *enableAction = menu->addAction(tr("Enable Kit \"%1\" for Project \"%2\"").arg(kitName, projectName)); + QAction *enableAction = menu->addAction(tr("Enable Kit for Project \"%2\"").arg(projectName)); enableAction->setEnabled(isSelectable && m_kitId.isValid() && !isEnabled()); QObject::connect(enableAction, &QAction::triggered, [this, kit] { m_project->addTargetForKit(kit); }); QAction * const enableForAllAction - = menu->addAction(tr("Enable Kit \"%1\" for All Projects").arg(kitName)); + = menu->addAction(tr("Enable Kit for All Projects")); enableForAllAction->setEnabled(isSelectable); QObject::connect(enableForAllAction, &QAction::triggered, [kit] { for (Project * const p : SessionManager::projects()) { @@ -415,7 +415,7 @@ public: } }); - QAction *disableAction = menu->addAction(tr("Disable Kit \"%1\" for Project \"%2\"").arg(kitName, projectName)); + QAction *disableAction = menu->addAction(tr("Disable Kit for Project \"%2\"").arg(projectName)); disableAction->setEnabled(isSelectable && m_kitId.isValid() && isEnabled()); QObject::connect(disableAction, &QAction::triggered, m_project, [this] { Target *t = target(); @@ -440,8 +440,7 @@ public: m_project->removeTarget(t); }); - QAction *disableForAllAction - = menu->addAction(tr("Disable Kit \"%1\" for All Projects").arg(kitName)); + QAction *disableForAllAction = menu->addAction(tr("Disable Kit for All Projects")); disableForAllAction->setEnabled(isSelectable); QObject::connect(disableForAllAction, &QAction::triggered, [kit] { for (Project * const p : SessionManager::projects()) {