Share "auto-detected" UI string and add tool tip

No need to have the same translatable string repeated at all these
places.
Also add tooltip to expand a bit on what "auto-detected" actually means.

Task-number: QTCREATORBUG-25291
Change-Id: I25d43486758ba17256cf7e1ea2eea0ec3d567b62
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2021-01-29 10:01:03 +01:00
parent aae3ce15aa
commit c245a642f2
15 changed files with 102 additions and 13 deletions

View File

@@ -28,6 +28,7 @@
#include "tooltreeitem.h"
#include "exewrappers/mesontools.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
@@ -37,8 +38,10 @@ namespace Internal {
ToolsModel::ToolsModel()
{
setHeader({tr("Name"), tr("Location")});
rootItem()->appendChild(new Utils::StaticTreeItem(tr("Auto-detected")));
rootItem()->appendChild(new Utils::StaticTreeItem(tr("Manual")));
rootItem()->appendChild(
new Utils::StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()},
{ProjectExplorer::Constants::msgAutoDetectedToolTip()}));
rootItem()->appendChild(new Utils::StaticTreeItem(ProjectExplorer::Constants::msgManual()));
for (const auto &tool : MesonTools::tools()) {
addMesonTool(tool);
}