forked from qt-creator/qt-creator
Meson: Convert to Tr::tr
Change-Id: I37e8a8c559464f7d55e17a5ca08e8d8d9760a4d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -47917,7 +47917,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonBuildSettingsWidget</name>
|
||||
<name>Meson</name>
|
||||
<message>
|
||||
<source>Apply Configuration Changes</source>
|
||||
<translation>Konfigurationsänderungen anwenden</translation>
|
||||
@@ -47926,9 +47926,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
<source>Filter</source>
|
||||
<translation>Filter</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonBuildStepConfigWidget</name>
|
||||
<message>
|
||||
<source>Tool arguments:</source>
|
||||
<translation>Toolparameter:</translation>
|
||||
@@ -48420,7 +48417,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonActionsManager</name>
|
||||
<name>Meson</name>
|
||||
<message>
|
||||
<source>Configure</source>
|
||||
<translation>Konfigurieren</translation>
|
||||
@@ -48433,24 +48430,15 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
<source>Build "%1"</source>
|
||||
<translation>"%1" erstellen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonBuildSettingsWidget</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonBuildStepConfigWidget</name>
|
||||
<message>
|
||||
<source>Build</source>
|
||||
<comment>MesonProjectManager::MesonBuildStepConfigWidget display name.</comment>
|
||||
<translation>Erstellen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::BuidOptionsModel</name>
|
||||
<message>
|
||||
<source>Key</source>
|
||||
<translation>Schlüssel</translation>
|
||||
@@ -48459,9 +48447,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
<source>Value</source>
|
||||
<translation>Wert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonProcess</name>
|
||||
<message>
|
||||
<source>Configuring "%1".</source>
|
||||
<translation>Konfiguriere "%1"</translation>
|
||||
@@ -48502,48 +48487,18 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
<source>Executable does not exist: %1</source>
|
||||
<translation>Ausführbare Datei existiert nicht: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonProject</name>
|
||||
<message>
|
||||
<source>No compilers set in kit.</source>
|
||||
<translation>Im Kit sind keine Compiler eingerichtet.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaBuildStep</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::GeneralSettingsPage</name>
|
||||
<message>
|
||||
<source>General</source>
|
||||
<translation>Allgemein</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonToolKitAspect</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>Nicht konfiguriert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaToolKitAspect</name>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>Nicht konfiguriert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolsSettingsPage</name>
|
||||
<message>
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
@@ -48573,13 +48528,6 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
||||
<translation>Kopie von %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::MesonToolManager</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Nim::NimToolChain</name>
|
||||
<message>
|
||||
|
@@ -45835,7 +45835,7 @@ Output:
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonBuildSettingsWidget</name>
|
||||
<name>Meson</name>
|
||||
<message>
|
||||
<source>Apply Configuration Changes</source>
|
||||
<translation>設定の変更を適用</translation>
|
||||
@@ -45844,9 +45844,6 @@ Output:
|
||||
<source>Filter</source>
|
||||
<translation>フィルタ</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolItemSettings</name>
|
||||
<message>
|
||||
<source>Name:</source>
|
||||
<translation>名前:</translation>
|
||||
@@ -45855,9 +45852,6 @@ Output:
|
||||
<source>Path:</source>
|
||||
<translation>パス:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolsSettingsWidget</name>
|
||||
<message>
|
||||
<source>Clone</source>
|
||||
<translation>複製</translation>
|
||||
@@ -49749,7 +49743,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonActionsManager</name>
|
||||
<name>Meson</name>
|
||||
<message>
|
||||
<source>Configure</source>
|
||||
<translation>設定する</translation>
|
||||
@@ -49762,16 +49756,10 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
||||
<source>Build "%1"</source>
|
||||
<translation>"%1" のビルド</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::BuidOptionsModel</name>
|
||||
<message>
|
||||
<source>Value</source>
|
||||
<translation>値</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonProcess</name>
|
||||
<message>
|
||||
<source>Process timed out.</source>
|
||||
<translation>プロセスがタイムアウトしました。</translation>
|
||||
@@ -49780,9 +49768,6 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
||||
<source>Executable does not exist: %1</source>
|
||||
<translation>実行ファイル が存在しません: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaBuildStep</name>
|
||||
<message>
|
||||
<source>Build</source>
|
||||
<comment>MesonProjectManager::MesonBuildStepConfigWidget display name.</comment>
|
||||
@@ -49796,30 +49781,14 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
||||
<source>Targets:</source>
|
||||
<translation>ターゲット:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::GeneralSettingsPage</name>
|
||||
<message>
|
||||
<source>General</source>
|
||||
<translation>一般</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonToolKitAspect</name>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>未設定</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaToolKitAspect</name>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>未設定</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolsSettingsPage</name>
|
||||
<message>
|
||||
<source>Name</source>
|
||||
<translation>名前</translation>
|
||||
|
@@ -26527,7 +26527,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonBuildStepConfigWidget</name>
|
||||
<name>Meson</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
@@ -26540,9 +26540,6 @@ Error: %5</translation>
|
||||
<source>Targets:</source>
|
||||
<translation>Цели:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::BuidOptionsModel</name>
|
||||
<message>
|
||||
<source>Key</source>
|
||||
<translation>Ключ</translation>
|
||||
@@ -26551,20 +26548,10 @@ Error: %5</translation>
|
||||
<source>Value</source>
|
||||
<translation>Значение</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::GeneralSettingsPage</name>
|
||||
<message>
|
||||
<source>General</source>
|
||||
<translation>Основное</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::GeneralSettingsWidget</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Automatically run Meson when needed.</source>
|
||||
<translation>Запускать Meson по необходимости.</translation>
|
||||
@@ -26581,9 +26568,6 @@ Error: %5</translation>
|
||||
<source>Ninja verbose mode</source>
|
||||
<translation>Ninja в подробном режиме</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonActionsManager</name>
|
||||
<message>
|
||||
<source>Configure</source>
|
||||
<translation>Configure</translation>
|
||||
@@ -26596,17 +26580,10 @@ Error: %5</translation>
|
||||
<source>Build "%1"</source>
|
||||
<translation>Сборка «%1»</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonBuildSettingsWidget</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Apply Configuration Changes</source>
|
||||
<translation>Применить изменения</translation>
|
||||
@@ -26625,17 +26602,11 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Filter</source>
|
||||
<translation>Фильтр</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonBuildStepConfigWidget</name>
|
||||
<message>
|
||||
<source>Build</source>
|
||||
<comment>MesonProjectManager::MesonBuildStepConfigWidget display name.</comment>
|
||||
<translation>Сборка</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonProcess</name>
|
||||
<message>
|
||||
<source>Configuring "%1".</source>
|
||||
<translation>Настройка «%1».</translation>
|
||||
@@ -26680,9 +26651,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Command is not executable: %1</source>
|
||||
<translation>Команда не запускается: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonProject</name>
|
||||
<message>
|
||||
<source>No Meson tool set.</source>
|
||||
<translation>Программа Meson не указана.</translation>
|
||||
@@ -26695,9 +26663,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>No compilers set in kit.</source>
|
||||
<translation>У комплекта не заданы компиляторы.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::MesonToolKitAspect</name>
|
||||
<message>
|
||||
<source>Meson Tool</source>
|
||||
<translation>Утилита Meson</translation>
|
||||
@@ -26710,28 +26675,14 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Cannot validate this meson executable.</source>
|
||||
<translation>Невозможно проверить эту программу Meson.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>Не настроено</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaBuildStep</name>
|
||||
<message>
|
||||
<source>Meson Build</source>
|
||||
<translation>Сборка Meson</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::NinjaToolKitAspect</name>
|
||||
<message>
|
||||
<source>Ninja Tool</source>
|
||||
<translation>Утилита Ninja</translation>
|
||||
@@ -26748,17 +26699,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Ninja</source>
|
||||
<translation>Ninja</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unconfigured</source>
|
||||
<translation>Не настроено</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolItemSettings</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Name:</source>
|
||||
<translation>Имя:</translation>
|
||||
@@ -26767,9 +26707,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Path:</source>
|
||||
<translation>Путь:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolTreeItem</name>
|
||||
<message>
|
||||
<source>Meson executable path does not exist.</source>
|
||||
<translation>Не найден путь к программе Meson.</translation>
|
||||
@@ -26782,9 +26719,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Meson executable path is not executable.</source>
|
||||
<translation>Путь к программе Meson не исполняемый.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolsSettingsPage</name>
|
||||
<message>
|
||||
<source>Name</source>
|
||||
<translation>Имя</translation>
|
||||
@@ -26821,13 +26755,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<source>Cannot get tool version.</source>
|
||||
<translation>Не удалось получить версию инструмента.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::Internal::ToolsSettingsWidget</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add</source>
|
||||
<translation>Добавить</translation>
|
||||
@@ -26849,13 +26776,6 @@ Useful if build directory is corrupted or when rebuilding with a newer version o
|
||||
<translation>Сделать по умолчанию</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MesonProjectManager::MesonToolManager</name>
|
||||
<message>
|
||||
<source>Meson</source>
|
||||
<translation>Meson</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MimeTypeDialog</name>
|
||||
<message>
|
||||
|
@@ -13,7 +13,6 @@ namespace Internal {
|
||||
|
||||
class RegexHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
const QRegularExpression m_regex{R"('([^']+)'+|([^', ]+)[, ]*)"};
|
||||
QTextCharFormat m_format;
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mesoninfoparser.h"
|
||||
#include "buildoptions.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/treemodel.h>
|
||||
@@ -66,6 +66,7 @@ public:
|
||||
}
|
||||
inline BuildOption::Type type() { return m_currentValue->type(); }
|
||||
};
|
||||
|
||||
using CancellableOptionsList = std::vector<std::unique_ptr<CancellableOption>>;
|
||||
class BuidOptionsModel final : public Utils::TreeModel<>
|
||||
{
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
#include "mesoninfo.h"
|
||||
#include "mesonpluginconstants.h"
|
||||
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <utils/parameteraction.h>
|
||||
|
||||
namespace MesonProjectManager {
|
||||
@@ -12,7 +14,8 @@ class MesonActionsManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Utils::ParameterAction buildTargetContextAction{
|
||||
tr("Build"), tr("Build \"%1\""), Utils::ParameterAction::AlwaysEnabled /*handled manually*/
|
||||
Tr::tr("Build"), Tr::tr("Build \"%1\""),
|
||||
Utils::ParameterAction::AlwaysEnabled /*handled manually*/
|
||||
};
|
||||
QAction configureActionMenu;
|
||||
QAction configureActionContextMenu;
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "mesonbuildconfiguration.h"
|
||||
#include "mesonbuildsystem.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <coreplugin/find/itemviewfind.h>
|
||||
|
||||
@@ -25,19 +26,19 @@ using namespace Utils;
|
||||
namespace MesonProjectManager::Internal {
|
||||
|
||||
MesonBuildSettingsWidget::MesonBuildSettingsWidget(MesonBuildConfiguration *buildCfg)
|
||||
: ProjectExplorer::NamedWidget{tr("Meson")}
|
||||
: ProjectExplorer::NamedWidget(Tr::tr("Meson"))
|
||||
, m_progressIndicator(ProgressIndicatorSize::Large)
|
||||
{
|
||||
auto configureButton = new QPushButton(tr("Apply Configuration Changes"));
|
||||
auto configureButton = new QPushButton(Tr::tr("Apply Configuration Changes"));
|
||||
configureButton->setEnabled(false);
|
||||
configureButton->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
|
||||
|
||||
auto wipeButton = new QPushButton(tr("Wipe Project"));
|
||||
auto wipeButton = new QPushButton(Tr::tr("Wipe Project"));
|
||||
wipeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
|
||||
wipeButton->setIcon(Utils::Icons::WARNING.icon());
|
||||
wipeButton->setToolTip(tr("Wipes build directory and reconfigures using previous command "
|
||||
"line options.\nUseful if build directory is corrupted or when "
|
||||
"rebuilding with a newer version of Meson."));
|
||||
wipeButton->setToolTip(Tr::tr("Wipes build directory and reconfigures using previous command "
|
||||
"line options.\nUseful if build directory is corrupted or when "
|
||||
"rebuilding with a newer version of Meson."));
|
||||
|
||||
auto container = new DetailsWidget;
|
||||
|
||||
@@ -62,7 +63,7 @@ MesonBuildSettingsWidget::MesonBuildSettingsWidget(MesonBuildConfiguration *buil
|
||||
using namespace Layouting;
|
||||
|
||||
Column {
|
||||
Form { tr("Parameters"), parametersLineEdit, br, },
|
||||
Form { Tr::tr("Parameters"), parametersLineEdit, br, },
|
||||
buildDirWidget,
|
||||
optionsFilterLineEdit,
|
||||
optionsTreeView,
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "kithelper.h"
|
||||
#include "machinefilemanager.h"
|
||||
#include "mesonbuildconfiguration.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "mesontoolkitaspect.h"
|
||||
#include "settings.h"
|
||||
|
||||
@@ -82,7 +83,7 @@ void MesonBuildSystem::parsingCompleted(bool success)
|
||||
UNLOCK(true);
|
||||
emitBuildSystemUpdated();
|
||||
} else {
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error, tr("Meson build: Parsing failed")));
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error, Tr::tr("Meson build: Parsing failed")));
|
||||
UNLOCK(false);
|
||||
emitBuildSystemUpdated();
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "mesonprocess.h"
|
||||
|
||||
#include "mesonoutputparser.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
@@ -44,7 +44,7 @@ bool MesonProcess::run(const Command &command,
|
||||
setupProcess(command, env, captureStdo);
|
||||
m_future.setProgressRange(0, 1);
|
||||
Core::ProgressManager::addTimedTask(m_future,
|
||||
tr("Configuring \"%1\".").arg(projectName),
|
||||
Tr::tr("Configuring \"%1\".").arg(projectName),
|
||||
"Meson.Configure",
|
||||
10);
|
||||
emit started();
|
||||
@@ -121,7 +121,7 @@ void MesonProcess::setupProcess(const Command &command,
|
||||
m_process->setWorkingDirectory(command.workDir());
|
||||
m_process->setEnvironment(env);
|
||||
Core::MessageManager::writeFlashing(
|
||||
tr("Running %1 in %2.").arg(command.toUserOutput()).arg(command.workDir().toUserOutput()));
|
||||
Tr::tr("Running %1 in %2.").arg(command.toUserOutput()).arg(command.workDir().toUserOutput()));
|
||||
m_process->setCommand(command.cmdLine());
|
||||
}
|
||||
|
||||
@@ -132,15 +132,15 @@ bool MesonProcess::sanityCheck(const Command &command) const
|
||||
//Should only reach this point if Meson exe is removed while a Meson project is opened
|
||||
ProjectExplorer::TaskHub::addTask(
|
||||
ProjectExplorer::BuildSystemTask{ProjectExplorer::Task::TaskType::Error,
|
||||
tr("Executable does not exist: %1")
|
||||
Tr::tr("Executable does not exist: %1")
|
||||
.arg(exe.toUserOutput())});
|
||||
return false;
|
||||
}
|
||||
if (!exe.toFileInfo().isExecutable()) {
|
||||
ProjectExplorer::TaskHub::addTask(
|
||||
ProjectExplorer::BuildSystemTask{ProjectExplorer::Task::TaskType::Error,
|
||||
tr("Command is not executable: %1")
|
||||
.arg(exe.toUserOutput())});
|
||||
Tr::tr("Command is not executable: %1")
|
||||
.arg(exe.toUserOutput())});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "mesonproject.h"
|
||||
|
||||
#include "mesonpluginconstants.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "mesontoolkitaspect.h"
|
||||
#include "ninjatoolkitaspect.h"
|
||||
|
||||
@@ -13,11 +14,13 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
MesonProject::MesonProject(const Utils::FilePath &path)
|
||||
: ProjectExplorer::Project{Constants::Project::MIMETYPE, path}
|
||||
: Project{Constants::Project::MIMETYPE, path}
|
||||
{
|
||||
setId(Constants::Project::ID);
|
||||
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
||||
@@ -26,33 +29,33 @@ MesonProject::MesonProject(const Utils::FilePath &path)
|
||||
setHasMakeInstallEquivalent(true);
|
||||
}
|
||||
|
||||
ProjectExplorer::Tasks MesonProject::projectIssues(const ProjectExplorer::Kit *k) const
|
||||
Tasks MesonProject::projectIssues(const Kit *k) const
|
||||
{
|
||||
ProjectExplorer::Tasks result = Project::projectIssues(k);
|
||||
Tasks result = Project::projectIssues(k);
|
||||
|
||||
if (!MesonToolKitAspect::isValid(k))
|
||||
result.append(
|
||||
createProjectTask(ProjectExplorer::Task::TaskType::Error, tr("No Meson tool set.")));
|
||||
createProjectTask(Task::TaskType::Error, Tr::tr("No Meson tool set.")));
|
||||
if (!NinjaToolKitAspect::isValid(k))
|
||||
result.append(
|
||||
createProjectTask(ProjectExplorer::Task::TaskType::Error, tr("No Ninja tool set.")));
|
||||
if (ProjectExplorer::ToolChainKitAspect::toolChains(k).isEmpty())
|
||||
result.append(createProjectTask(ProjectExplorer::Task::TaskType::Warning,
|
||||
tr("No compilers set in kit.")));
|
||||
createProjectTask(Task::TaskType::Error, Tr::tr("No Ninja tool set.")));
|
||||
if (ToolChainKitAspect::toolChains(k).isEmpty())
|
||||
result.append(createProjectTask(Task::TaskType::Warning,
|
||||
Tr::tr("No compilers set in kit.")));
|
||||
return result;
|
||||
}
|
||||
|
||||
ProjectExplorer::ProjectImporter *MesonProject::projectImporter() const
|
||||
ProjectImporter *MesonProject::projectImporter() const
|
||||
{
|
||||
if (m_projectImporter)
|
||||
m_projectImporter = std::make_unique<MesonProjectImporter>(projectFilePath());
|
||||
return m_projectImporter.get();
|
||||
}
|
||||
|
||||
ProjectExplorer::DeploymentKnowledge MesonProject::deploymentKnowledge() const
|
||||
DeploymentKnowledge MesonProject::deploymentKnowledge() const
|
||||
{
|
||||
// TODO in next releases
|
||||
return ProjectExplorer::DeploymentKnowledge::Bad;
|
||||
return DeploymentKnowledge::Bad;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -5,13 +5,11 @@
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
namespace {
|
||||
static Q_LOGGING_CATEGORY(mInputLog, "qtc.meson.import", QtWarningMsg);
|
||||
}
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
static Q_LOGGING_CATEGORY(mInputLog, "qtc.meson.import", QtWarningMsg);
|
||||
|
||||
MesonProjectImporter::MesonProjectImporter(const Utils::FilePath &path)
|
||||
: QtSupport::QtProjectImporter{path}
|
||||
{}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "mesontoolkitaspect.h"
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "toolkitaspectwidget.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -16,8 +17,8 @@ MesonToolKitAspect::MesonToolKitAspect()
|
||||
{
|
||||
setObjectName(QLatin1String("MesonKitAspect"));
|
||||
setId(TOOL_ID);
|
||||
setDisplayName(tr("Meson Tool"));
|
||||
setDescription(tr("The Meson tool to use when building a project with Meson.<br>"
|
||||
setDisplayName(Tr::tr("Meson Tool"));
|
||||
setDescription(Tr::tr("The Meson tool to use when building a project with Meson.<br>"
|
||||
"This setting is ignored when using other build systems."));
|
||||
setPriority(9000);
|
||||
}
|
||||
@@ -28,7 +29,7 @@ ProjectExplorer::Tasks MesonToolKitAspect::validate(const ProjectExplorer::Kit *
|
||||
const auto tool = mesonTool(k);
|
||||
if (tool && !tool->isValid())
|
||||
tasks << ProjectExplorer::BuildSystemTask{ProjectExplorer::Task::Warning,
|
||||
tr("Cannot validate this meson executable.")};
|
||||
Tr::tr("Cannot validate this meson executable.")};
|
||||
return tasks;
|
||||
}
|
||||
|
||||
@@ -52,8 +53,8 @@ ProjectExplorer::KitAspect::ItemList MesonToolKitAspect::toUserOutput(
|
||||
{
|
||||
const auto tool = mesonTool(k);
|
||||
if (tool)
|
||||
return {{tr("Meson"), tool->name()}};
|
||||
return {{tr("Meson"), tr("Unconfigured")}};
|
||||
return {{Tr::tr("Meson"), tool->name()}};
|
||||
return {{Tr::tr("Meson"), Tr::tr("Unconfigured")}};
|
||||
}
|
||||
|
||||
ProjectExplorer::KitAspectWidget *MesonToolKitAspect::createConfigWidget(ProjectExplorer::Kit *k) const
|
||||
|
@@ -13,8 +13,6 @@ namespace Internal {
|
||||
|
||||
class MesonToolKitAspect final : public ProjectExplorer::KitAspect
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::MesonToolKitAspect)
|
||||
|
||||
public:
|
||||
MesonToolKitAspect();
|
||||
|
||||
|
@@ -3,8 +3,6 @@
|
||||
|
||||
#include "nativefilegenerator.h"
|
||||
|
||||
#include "kithelper.h"
|
||||
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "mesonbuildconfiguration.h"
|
||||
#include "mesonbuildsystem.h"
|
||||
#include "mesonpluginconstants.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "mesonoutputparser.h"
|
||||
#include "ninjatoolkitaspect.h"
|
||||
#include "settings.h"
|
||||
@@ -32,8 +33,8 @@ namespace Internal {
|
||||
const char TARGETS_KEY[] = "MesonProjectManager.BuildStep.BuildTargets";
|
||||
const char TOOL_ARGUMENTS_KEY[] = "MesonProjectManager.BuildStep.AdditionalArguments";
|
||||
|
||||
NinjaBuildStep::NinjaBuildStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id)
|
||||
: ProjectExplorer::AbstractProcessStep{bsl, id}
|
||||
NinjaBuildStep::NinjaBuildStep(BuildStepList *bsl, Id id)
|
||||
: AbstractProcessStep{bsl, id}
|
||||
{
|
||||
if (m_targetName.isEmpty())
|
||||
setBuildTarget(defaultBuildTarget());
|
||||
@@ -43,16 +44,14 @@ NinjaBuildStep::NinjaBuildStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id
|
||||
setUseEnglishOutput();
|
||||
|
||||
connect(target(), &ProjectExplorer::Target::parsingFinished, this, &NinjaBuildStep::update);
|
||||
connect(&Settings::instance()->verboseNinja,
|
||||
&BaseAspect::changed,
|
||||
this,
|
||||
&NinjaBuildStep::commandChanged);
|
||||
connect(&Settings::instance()->verboseNinja, &BaseAspect::changed,
|
||||
this, &NinjaBuildStep::commandChanged);
|
||||
}
|
||||
|
||||
QWidget *NinjaBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new QWidget;
|
||||
setDisplayName(tr("Build", "MesonProjectManager::MesonBuildStepConfigWidget display name."));
|
||||
setDisplayName(Tr::tr("Build", "MesonProjectManager::MesonBuildStepConfigWidget display name."));
|
||||
|
||||
auto buildTargetsList = new QListWidget(widget);
|
||||
buildTargetsList->setMinimumHeight(200);
|
||||
@@ -67,8 +66,8 @@ QWidget *NinjaBuildStep::createConfigWidget()
|
||||
auto formLayout = new QFormLayout(widget);
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
formLayout->setContentsMargins(0, 0, 0, 0);
|
||||
formLayout->addRow(tr("Tool arguments:"), toolArguments);
|
||||
formLayout->addRow(tr("Targets:"), wrapper);
|
||||
formLayout->addRow(Tr::tr("Tool arguments:"), toolArguments);
|
||||
formLayout->addRow(Tr::tr("Targets:"), wrapper);
|
||||
|
||||
auto updateDetails = [this] {
|
||||
ProcessParameters param;
|
||||
@@ -188,7 +187,7 @@ MesonBuildStepFactory::MesonBuildStepFactory()
|
||||
{
|
||||
registerStep<NinjaBuildStep>(Constants::MESON_BUILD_STEP_ID);
|
||||
setSupportedProjectType(Constants::Project::ID);
|
||||
setDisplayName(NinjaBuildStep::tr("Meson Build"));
|
||||
setDisplayName(Tr::tr("Meson Build"));
|
||||
}
|
||||
|
||||
void MesonProjectManager::Internal::NinjaBuildStep::setBuildTarget(const QString &targetName)
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "ninjatoolkitaspect.h"
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "toolkitaspectwidget.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -16,9 +17,9 @@ NinjaToolKitAspect::NinjaToolKitAspect()
|
||||
{
|
||||
setObjectName(QLatin1String("NinjaKitAspect"));
|
||||
setId(TOOL_ID);
|
||||
setDisplayName(tr("Ninja Tool"));
|
||||
setDescription(tr("The Ninja tool to use when building a project with Meson.<br>"
|
||||
"This setting is ignored when using other build systems."));
|
||||
setDisplayName(Tr::tr("Ninja Tool"));
|
||||
setDescription(Tr::tr("The Ninja tool to use when building a project with Meson.<br>"
|
||||
"This setting is ignored when using other build systems."));
|
||||
setPriority(9000);
|
||||
}
|
||||
|
||||
@@ -28,7 +29,7 @@ ProjectExplorer::Tasks NinjaToolKitAspect::validate(const ProjectExplorer::Kit *
|
||||
const auto tool = ninjaTool(k);
|
||||
if (tool && !tool->isValid())
|
||||
tasks << ProjectExplorer::BuildSystemTask{ProjectExplorer::Task::Warning,
|
||||
tr("Cannot validate this Ninja executable.")};
|
||||
Tr::tr("Cannot validate this Ninja executable.")};
|
||||
return tasks;
|
||||
}
|
||||
|
||||
@@ -52,8 +53,8 @@ ProjectExplorer::KitAspect::ItemList NinjaToolKitAspect::toUserOutput(
|
||||
{
|
||||
const auto tool = ninjaTool(k);
|
||||
if (tool)
|
||||
return {{tr("Ninja"), tool->name()}};
|
||||
return {{tr("Ninja"), tr("Unconfigured")}};
|
||||
return {{Tr::tr("Ninja"), tool->name()}};
|
||||
return {{Tr::tr("Ninja"), Tr::tr("Unconfigured")}};
|
||||
}
|
||||
|
||||
ProjectExplorer::KitAspectWidget *NinjaToolKitAspect::createConfigWidget(ProjectExplorer::Kit *k) const
|
||||
|
@@ -13,8 +13,6 @@ namespace Internal {
|
||||
|
||||
class NinjaToolKitAspect final : public ProjectExplorer::KitAspect
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::NinjaToolKitAspect)
|
||||
|
||||
public:
|
||||
NinjaToolKitAspect();
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "settings.h"
|
||||
|
||||
#include "mesonpluginconstants.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
@@ -16,12 +17,12 @@ Settings::Settings()
|
||||
setAutoApply(false);
|
||||
|
||||
autorunMeson.setSettingsKey("meson.autorun");
|
||||
autorunMeson.setLabelText(tr("Autorun Meson"));
|
||||
autorunMeson.setToolTip(tr("Automatically run Meson when needed."));
|
||||
autorunMeson.setLabelText(Tr::tr("Autorun Meson"));
|
||||
autorunMeson.setToolTip(Tr::tr("Automatically run Meson when needed."));
|
||||
|
||||
verboseNinja.setSettingsKey("ninja.verbose");
|
||||
verboseNinja.setLabelText(tr("Ninja verbose mode"));
|
||||
verboseNinja.setToolTip(tr("Enables verbose mode by default when invoking Ninja."));
|
||||
verboseNinja.setLabelText(Tr::tr("Ninja verbose mode"));
|
||||
verboseNinja.setToolTip(Tr::tr("Enables verbose mode by default when invoking Ninja."));
|
||||
|
||||
registerAspect(&autorunMeson);
|
||||
registerAspect(&verboseNinja);
|
||||
@@ -36,7 +37,7 @@ Settings *Settings::instance()
|
||||
GeneralSettingsPage::GeneralSettingsPage()
|
||||
{
|
||||
setId(Constants::SettingsPage::GENERAL_ID);
|
||||
setDisplayName(tr("General"));
|
||||
setDisplayName(Tr::tr("General"));
|
||||
setDisplayCategory("Meson");
|
||||
setCategory(Constants::SettingsPage::CATEGORY);
|
||||
setCategoryIconPath(Constants::Icons::MESON_BW);
|
||||
|
@@ -12,8 +12,6 @@ namespace Internal {
|
||||
|
||||
class Settings : public Utils::AspectContainer
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::Settings)
|
||||
|
||||
public:
|
||||
Settings();
|
||||
|
||||
@@ -25,8 +23,6 @@ public:
|
||||
|
||||
class GeneralSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::GeneralSettingsPage)
|
||||
|
||||
public:
|
||||
GeneralSettingsPage();
|
||||
};
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "toolitemsettings.h"
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "tooltreeitem.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
@@ -26,8 +27,8 @@ ToolItemSettings::ToolItemSettings(QWidget *parent)
|
||||
using namespace Layouting;
|
||||
|
||||
Form {
|
||||
tr("Name:"), m_mesonNameLineEdit, br,
|
||||
tr("Path:"), m_mesonPathChooser, br,
|
||||
Tr::tr("Name:"), m_mesonNameLineEdit, br,
|
||||
Tr::tr("Path:"), m_mesonPathChooser, br,
|
||||
}.attachTo(this, WithoutMargins);
|
||||
|
||||
connect(m_mesonPathChooser, &PathChooser::rawPathChanged, this, &ToolItemSettings::store);
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "mesontoolkitaspect.h"
|
||||
#include "mesonwrapper.h"
|
||||
#include "ninjatoolkitaspect.h"
|
||||
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
@@ -18,7 +17,6 @@ namespace Internal {
|
||||
|
||||
class ToolKitAspectWidget final : public ProjectExplorer::KitAspectWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolKitAspect)
|
||||
public:
|
||||
enum class ToolType { Meson, Ninja };
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "toolsmodel.h"
|
||||
|
||||
#include "tooltreeitem.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "mesontools.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -15,7 +16,7 @@ namespace Internal {
|
||||
|
||||
ToolsModel::ToolsModel()
|
||||
{
|
||||
setHeader({tr("Name"), tr("Location")});
|
||||
setHeader({Tr::tr("Name"), Tr::tr("Location")});
|
||||
rootItem()->appendChild(
|
||||
new Utils::StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()},
|
||||
{ProjectExplorer::Constants::msgAutoDetectedToolTip()}));
|
||||
@@ -39,7 +40,7 @@ void ToolsModel::updateItem(const Utils::Id &itemId, const QString &name, const
|
||||
|
||||
void ToolsModel::addMesonTool()
|
||||
{
|
||||
manualGroup()->appendChild(new ToolTreeItem{uniqueName(tr("New Meson or Ninja tool"))});
|
||||
manualGroup()->appendChild(new ToolTreeItem{uniqueName(Tr::tr("New Meson or Ninja tool"))});
|
||||
}
|
||||
|
||||
void ToolsModel::removeMesonTool(ToolTreeItem *item)
|
||||
|
@@ -17,9 +17,9 @@ class ToolTreeItem;
|
||||
|
||||
class ToolsModel final : public Utils::TreeModel<Utils::TreeItem, Utils::TreeItem, ToolTreeItem>
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)
|
||||
public:
|
||||
ToolsModel();
|
||||
|
||||
ToolTreeItem *mesoneToolTreeItem(const QModelIndex &index) const;
|
||||
void updateItem(const Utils::Id &itemId, const QString &name, const Utils::FilePath &exe);
|
||||
void addMesonTool();
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "toolssettingsaccessor.h"
|
||||
|
||||
#include "mesonpluginconstants.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -18,18 +19,15 @@
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
inline QString entryName(int index)
|
||||
static QString entryName(int index)
|
||||
{
|
||||
using namespace Constants;
|
||||
return QString("%1%2").arg(ToolsSettings::ENTRY_KEY).arg(index);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
ToolsSettingsAccessor::ToolsSettingsAccessor()
|
||||
: UpgradingSettingsAccessor("QtCreatorMesonTools",
|
||||
QCoreApplication::translate("MesonProjectManager::MesonToolManager",
|
||||
"Meson"),
|
||||
Tr::tr("Meson"),
|
||||
Core::Constants::IDE_DISPLAY_NAME)
|
||||
{
|
||||
setBaseFilePath(Core::ICore::userResourcePath(Constants::ToolsSettings::FILENAME));
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "toolssettingspage.h"
|
||||
|
||||
#include "mesonpluginconstants.h"
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "toolssettingswidget.h"
|
||||
|
||||
namespace MesonProjectManager {
|
||||
@@ -12,7 +13,7 @@ namespace Internal {
|
||||
ToolsSettingsPage::ToolsSettingsPage()
|
||||
{
|
||||
setId(Constants::SettingsPage::TOOLS_ID);
|
||||
setDisplayName(tr("Tools"));
|
||||
setDisplayName(Tr::tr("Tools"));
|
||||
setCategory(Constants::SettingsPage::CATEGORY);
|
||||
setWidgetCreator([]() { return new ToolsSettingsWidget; });
|
||||
}
|
||||
|
@@ -5,17 +5,11 @@
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class MesonTools;
|
||||
|
||||
class ToolsSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)
|
||||
|
||||
public:
|
||||
ToolsSettingsPage();
|
||||
};
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "toolssettingswidget.h"
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
#include "toolsmodel.h"
|
||||
#include "tooltreeitem.h"
|
||||
|
||||
@@ -33,19 +34,19 @@ ToolsSettingsWidget::ToolsSettingsWidget()
|
||||
m_mesonDetails->setVisible(false);
|
||||
m_mesonDetails->setWidget(m_itemSettings);
|
||||
|
||||
auto addButton = new QPushButton(tr("Add"));
|
||||
auto addButton = new QPushButton(Tr::tr("Add"));
|
||||
|
||||
m_cloneButton = new QPushButton(tr("Clone"));
|
||||
m_cloneButton = new QPushButton(Tr::tr("Clone"));
|
||||
m_cloneButton->setEnabled(false);
|
||||
|
||||
m_removeButton = new QPushButton(tr("Remove"));
|
||||
m_removeButton = new QPushButton(Tr::tr("Remove"));
|
||||
m_removeButton->setEnabled(false);
|
||||
|
||||
auto makeDefaultButton = new QPushButton(tr("Make Default"));
|
||||
auto makeDefaultButton = new QPushButton(Tr::tr("Make Default"));
|
||||
makeDefaultButton->setEnabled(false);
|
||||
makeDefaultButton->setVisible(false);
|
||||
makeDefaultButton->setToolTip(tr("Set as the default Meson executable to use "
|
||||
"when creating a new kit or when no value is set."));
|
||||
makeDefaultButton->setToolTip(Tr::tr("Set as the default Meson executable to use "
|
||||
"when creating a new kit or when no value is set."));
|
||||
|
||||
using namespace Layouting;
|
||||
|
||||
|
@@ -8,23 +8,21 @@
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace Utils { class DetailsWidget; }
|
||||
|
||||
namespace MesonProjectManager::Internal {
|
||||
|
||||
class ToolTreeItem;
|
||||
|
||||
class ToolsSettingsWidget final : public Core::IOptionsPageWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsWidget)
|
||||
void apply() final;
|
||||
|
||||
public:
|
||||
explicit ToolsSettingsWidget();
|
||||
~ToolsSettingsWidget();
|
||||
|
||||
private:
|
||||
void apply() final;
|
||||
|
||||
void cloneMesonTool();
|
||||
void removeMesonTool();
|
||||
void currentMesonToolChanged(const QModelIndex &newCurrent);
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "tooltreeitem.h"
|
||||
|
||||
#include "mesonprojectmanagertr.h"
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
@@ -27,12 +29,12 @@ ToolTreeItem::ToolTreeItem(const MesonTools::Tool_t &tool)
|
||||
, m_autoDetected{tool->autoDetected()}
|
||||
, m_id{tool->id()}
|
||||
{
|
||||
m_tooltip = tr("Version: %1").arg(tool->version().toQString());
|
||||
m_tooltip = Tr::tr("Version: %1").arg(tool->version().toQString());
|
||||
self_check();
|
||||
}
|
||||
|
||||
ToolTreeItem::ToolTreeItem(const ToolTreeItem &other)
|
||||
: m_name{tr("Clone of %1").arg(other.m_name)}
|
||||
: m_name{Tr::tr("Clone of %1").arg(other.m_name)}
|
||||
, m_executable{other.m_executable}
|
||||
, m_autoDetected{false}
|
||||
, m_id{Utils::Id::fromString(QUuid::createUuid().toString())}
|
||||
@@ -63,14 +65,11 @@ QVariant ToolTreeItem::data(int column, int role) const
|
||||
}
|
||||
case Qt::ToolTipRole: {
|
||||
if (!m_pathExists)
|
||||
return QCoreApplication::translate("MesonProjectManager::Internal::ToolTreeItem",
|
||||
"Meson executable path does not exist.");
|
||||
return Tr::tr("Meson executable path does not exist.");
|
||||
if (!m_pathIsFile)
|
||||
return QCoreApplication::translate("MesonProjectManager::Internal::ToolTreeItem",
|
||||
"Meson executable path is not a file.");
|
||||
return Tr::tr("Meson executable path is not a file.");
|
||||
if (!m_pathIsExecutable)
|
||||
return QCoreApplication::translate("MesonProjectManager::Internal::ToolTreeItem",
|
||||
"Meson executable path is not executable.");
|
||||
return Tr::tr("Meson executable path is not executable.");
|
||||
return m_tooltip;
|
||||
}
|
||||
case Qt::DecorationRole: {
|
||||
@@ -103,9 +102,9 @@ void ToolTreeItem::self_check()
|
||||
void ToolTreeItem::update_tooltip(const Version &version)
|
||||
{
|
||||
if (version.isValid)
|
||||
m_tooltip = tr("Version: %1").arg(version.toQString());
|
||||
m_tooltip = Tr::tr("Version: %1").arg(version.toQString());
|
||||
else
|
||||
m_tooltip = tr("Cannot get tool version.");
|
||||
m_tooltip = Tr::tr("Cannot get tool version.");
|
||||
}
|
||||
|
||||
void ToolTreeItem::update_tooltip()
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "mesontools.h"
|
||||
#include "toolssettingspage.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/id.h>
|
||||
@@ -20,11 +19,11 @@ namespace Internal {
|
||||
|
||||
class ToolTreeItem final : public Utils::TreeItem
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)
|
||||
public:
|
||||
ToolTreeItem(const QString &name);
|
||||
ToolTreeItem(const MesonTools::Tool_t &tool);
|
||||
ToolTreeItem(const ToolTreeItem &other);
|
||||
|
||||
QVariant data(int column, int role) const override;
|
||||
inline bool isAutoDetected() const noexcept { return m_autoDetected; }
|
||||
inline QString name() const noexcept { return m_name; }
|
||||
|
Reference in New Issue
Block a user