forked from qt-creator/qt-creator
McuSupport: Tr::tr
Change-Id: Ia2f0e523a378bea82887bdb212acfdab47b408e9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -44895,7 +44895,7 @@ Do you want to display them anyway?</source>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>McuSupport::Internal::McuSupportDevice</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
<message>
|
||||||
<source>MCU Device</source>
|
<source>MCU Device</source>
|
||||||
<translation>MCU-Gerät</translation>
|
<translation>MCU-Gerät</translation>
|
||||||
@@ -53030,7 +53030,7 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>McuSupport::Internal::McuDependenciesKitAspect</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
<message>
|
||||||
<source>MCU Dependencies</source>
|
<source>MCU Dependencies</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53051,9 +53051,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>CMake variable %1: path %2 does not exist.</source>
|
<source>CMake variable %1: path %2 does not exist.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>::McuSupport</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Warning for target %1: invalid toolchain path (%2). Update the toolchain in Edit > Preferences > Kits.</source>
|
<source>Warning for target %1: invalid toolchain path (%2). Update the toolchain in Edit > Preferences > Kits.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53083,9 +53080,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
%1</source>
|
%1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuTarget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Warning for target %1: missing CMake toolchain file expected at %2.</source>
|
<source>Warning for target %1: missing CMake toolchain file expected at %2.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53126,9 +53120,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>Warning creating kit for target %1, package %2: %3</source>
|
<source>Warning creating kit for target %1, package %2: %3</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuPackage</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Path %1 exists, but does not contain %2.</source>
|
<source>Path %1 exists, but does not contain %2.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53233,9 +53224,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>Toolchain description for "%1" is invalid because %2 in file "%3".</source>
|
<source>Toolchain description for "%1" is invalid because %2 in file "%3".</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptions</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs Demos</source>
|
<source>Qt for MCUs Demos</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53260,9 +53248,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>New version of Qt for MCUs detected. Upgrade existing kits?</source>
|
<source>New version of Qt for MCUs detected. Upgrade existing kits?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptionsWidget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs SDK</source>
|
<source>Qt for MCUs SDK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53291,10 +53276,6 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>Update Kit</source>
|
<source>Update Kit</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>No valid kit descriptions found at %1.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>A kit for the selected target and SDK version already exists.</source>
|
<source>A kit for the selected target and SDK version already exists.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53311,16 +53292,10 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>MCU</source>
|
<source>MCU</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QtForMCUs</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs: %1</source>
|
<source>Qt for MCUs: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportPlugin</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Create Kits for Qt for MCUs? To do it later, select Edit > Preferences > Devices > MCU.</source>
|
<source>Create Kits for Qt for MCUs? To do it later, select Edit > Preferences > Devices > MCU.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -53345,16 +53320,10 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
|
|||||||
<source>Proceed</source>
|
<source>Proceed</source>
|
||||||
<translation type="unfinished">Weiter</translation>
|
<translation type="unfinished">Weiter</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::FlashAndRunConfiguration</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Flash and run CMake parameters:</source>
|
<source>Flash and run CMake parameters:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>Tr</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Parsing error: the type entry in JSON kit files must be a string, defaulting to "path"</source>
|
<source>Parsing error: the type entry in JSON kit files must be a string, defaulting to "path"</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@@ -46029,14 +46029,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>McuSupport::Internal::McuPackage</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
|
||||||
<source>Path %1 exists, but does not contain %2.</source>
|
|
||||||
<translation type="unfinished">パス %1 は存在しますが、%2 を含んでいません。</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptions</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs Demos</source>
|
<source>Qt for MCUs Demos</source>
|
||||||
<translation>Qt for MCUs のデモ</translation>
|
<translation>Qt for MCUs のデモ</translation>
|
||||||
@@ -46061,9 +46054,6 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
|||||||
<source>No CMake tool was detected. Add a CMake tool in Tools > Options > Kits > CMake.</source>
|
<source>No CMake tool was detected. Add a CMake tool in Tools > Options > Kits > CMake.</source>
|
||||||
<translation>CMake ツールが検出されませんでした。「ツール」→「オプション」→「キット」→「 CMake 」で CMake ツールを追加してください。</translation>
|
<translation>CMake ツールが検出されませんでした。「ツール」→「オプション」→「キット」→「 CMake 」で CMake ツールを追加してください。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuTarget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Warning for target %1: missing CMake Toolchain File expected at %2.</source>
|
<source>Warning for target %1: missing CMake Toolchain File expected at %2.</source>
|
||||||
<translation>ターゲット %1 に対する警告: CMake Toolchain ファイルが %2 で見つかりませんでした。</translation>
|
<translation>ターゲット %1 に対する警告: CMake Toolchain ファイルが %2 で見つかりませんでした。</translation>
|
||||||
@@ -46076,24 +46066,14 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
|||||||
<source>Skipped %1 - Unsupported version "%2" (should be >= %3)</source>
|
<source>Skipped %1 - Unsupported version "%2" (should be >= %3)</source>
|
||||||
<translation>%1をスキップしました - サポート対象外のバージョン "%2" (%3 以上である必要があります)</translation>
|
<translation>%1をスキップしました - サポート対象外のバージョン "%2" (%3 以上である必要があります)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>No valid kit descriptions found at %1.</source>
|
|
||||||
<translation>%1で有効なキットの説明が見つかりませんでした。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Skipped creating fallback desktop kit: Could not find any of %1.</source>
|
<source>Skipped creating fallback desktop kit: Could not find any of %1.</source>
|
||||||
<translation>予備のデスクトップ・キットの作成をスキップしました。%1 のいずれも見つかりませんでした。</translation>
|
<translation>予備のデスクトップ・キットの作成をスキップしました。%1 のいずれも見つかりませんでした。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QtForMCUs</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs: %1</source>
|
<source>Qt for MCUs: %1</source>
|
||||||
<translation>Qt for MCUs: %1</translation>
|
<translation>Qt for MCUs: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptionsWidget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Remove Kit</source>
|
<source>Remove Kit</source>
|
||||||
<translation>キットを削除する</translation>
|
<translation>キットを削除する</translation>
|
||||||
|
@@ -24664,7 +24664,7 @@ Error: %5</translation>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>McuSupport::Internal::FlashAndRunConfiguration</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Flash and run CMake parameters:</source>
|
<source>Flash and run CMake parameters:</source>
|
||||||
<translation>Параметры CMake для прошивки и запуска:</translation>
|
<translation>Параметры CMake для прошивки и запуска:</translation>
|
||||||
@@ -24673,9 +24673,6 @@ Error: %5</translation>
|
|||||||
<source>Flash and run</source>
|
<source>Flash and run</source>
|
||||||
<translation>Прошивка и запуск</translation>
|
<translation>Прошивка и запуск</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuPackage</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Download from "%1"</source>
|
<source>Download from "%1"</source>
|
||||||
<translation>Загрузить «%1»</translation>
|
<translation>Загрузить «%1»</translation>
|
||||||
@@ -24708,16 +24705,10 @@ Error: %5</translation>
|
|||||||
<source>STM32CubeProgrammer</source>
|
<source>STM32CubeProgrammer</source>
|
||||||
<translation>STM32CubeProgrammer</translation>
|
<translation>STM32CubeProgrammer</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportDevice</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>MCU Device</source>
|
<source>MCU Device</source>
|
||||||
<translation>Микроконтроллер</translation>
|
<translation>Микроконтроллер</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptionsWidget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Targets supported by the %1</source>
|
<source>Targets supported by the %1</source>
|
||||||
<translation>Поддерживаемые %1 цели</translation>
|
<translation>Поддерживаемые %1 цели</translation>
|
||||||
@@ -24750,9 +24741,6 @@ Error: %5</translation>
|
|||||||
<source>MCU</source>
|
<source>MCU</source>
|
||||||
<translation>Микроконтроллер</translation>
|
<translation>Микроконтроллер</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportPlugin</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Create Kits for Qt for MCUs? To do it later, select Options > Devices > MCU.</source>
|
<source>Create Kits for Qt for MCUs? To do it later, select Options > Devices > MCU.</source>
|
||||||
<translation>Создать комплекты для Qt для микроконтроллеров? Можно сделать позже через Параметры > Устройства > Микроконтроллер.</translation>
|
<translation>Создать комплекты для Qt для микроконтроллеров? Можно сделать позже через Параметры > Устройства > Микроконтроллер.</translation>
|
||||||
|
@@ -24249,14 +24249,11 @@ Error: %5</source>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>McuSupport::Internal::FlashAndRunConfiguration</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Flash and run CMake parameters:</source>
|
<source>Flash and run CMake parameters:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuDependenciesKitAspect</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>MCU Dependencies</source>
|
<source>MCU Dependencies</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24277,9 +24274,6 @@ Error: %5</source>
|
|||||||
<source>CMake variable %1: path %2 does not exist.</source>
|
<source>CMake variable %1: path %2 does not exist.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuPackage</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Path %1 exists, but does not contain %2.</source>
|
<source>Path %1 exists, but does not contain %2.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24356,16 +24350,10 @@ Error: %5</source>
|
|||||||
<source>STM32CubeProgrammer</source>
|
<source>STM32CubeProgrammer</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportDevice</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>MCU Device</source>
|
<source>MCU Device</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptions</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs Demos</source>
|
<source>Qt for MCUs Demos</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24390,9 +24378,6 @@ Error: %5</source>
|
|||||||
<source>New version of Qt for MCUs detected. Upgrade existing kits?</source>
|
<source>New version of Qt for MCUs detected. Upgrade existing kits?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportOptionsWidget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs SDK</source>
|
<source>Qt for MCUs SDK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24441,9 +24426,6 @@ Error: %5</source>
|
|||||||
<source>MCU</source>
|
<source>MCU</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuSupportPlugin</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Create Kits for Qt for MCUs? To do it later, select Edit > Preferences > Devices > MCU.</source>
|
<source>Create Kits for Qt for MCUs? To do it later, select Edit > Preferences > Devices > MCU.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24468,9 +24450,6 @@ Error: %5</source>
|
|||||||
<source>Proceed</source>
|
<source>Proceed</source>
|
||||||
<translation type="unfinished">继续</translation>
|
<translation type="unfinished">继续</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>McuSupport::Internal::McuTarget</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Warning for target %1: missing CMake toolchain file expected at %2.</source>
|
<source>Warning for target %1: missing CMake toolchain file expected at %2.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -24499,10 +24478,6 @@ Error: %5</source>
|
|||||||
<source>Skipped %1. %2 Qt for MCUs version >= %3 required.</source>
|
<source>Skipped %1. %2 Qt for MCUs version >= %3 required.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>No valid kit descriptions found at %1.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kit for %1 created.</source>
|
<source>Kit for %1 created.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -38294,7 +38269,7 @@ For more details, see /etc/sysctl.d/10-ptrace.conf
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>QtForMCUs</name>
|
<name>::McuSupport</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs: %1</source>
|
<source>Qt for MCUs: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mcukitinformation.h"
|
#include "mcukitinformation.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
|
|
||||||
#include <cmakeprojectmanager/cmakekitinformation.h>
|
#include <cmakeprojectmanager/cmakekitinformation.h>
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -33,8 +34,8 @@ McuDependenciesKitAspect::McuDependenciesKitAspect()
|
|||||||
{
|
{
|
||||||
setObjectName(QLatin1String("McuDependenciesKitAspect"));
|
setObjectName(QLatin1String("McuDependenciesKitAspect"));
|
||||||
setId(McuDependenciesKitAspect::id());
|
setId(McuDependenciesKitAspect::id());
|
||||||
setDisplayName(tr("MCU Dependencies"));
|
setDisplayName(Tr::tr("MCU Dependencies"));
|
||||||
setDescription(tr("Paths to 3rd party dependencies"));
|
setDescription(Tr::tr("Paths to 3rd party dependencies"));
|
||||||
setPriority(28500);
|
setPriority(28500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ Tasks McuDependenciesKitAspect::validate(const Kit *kit) const
|
|||||||
if (!checkFormat.isValid() || checkFormat.isNull())
|
if (!checkFormat.isValid() || checkFormat.isNull())
|
||||||
return result;
|
return result;
|
||||||
if (!checkFormat.canConvert(QVariant::List))
|
if (!checkFormat.canConvert(QVariant::List))
|
||||||
return {BuildSystemTask(Task::Error, tr("The MCU dependencies setting value is invalid."))};
|
return {BuildSystemTask(Task::Error, Tr::tr("The MCU dependencies setting value is invalid."))};
|
||||||
|
|
||||||
// check paths defined in cmake variables for given dependencies exist
|
// check paths defined in cmake variables for given dependencies exist
|
||||||
const auto cMakeEntries = Utils::NameValueDictionary(configuration(kit));
|
const auto cMakeEntries = Utils::NameValueDictionary(configuration(kit));
|
||||||
@@ -56,12 +57,12 @@ Tasks McuDependenciesKitAspect::validate(const Kit *kit) const
|
|||||||
auto givenPath = Utils::FilePath::fromUserInput(cMakeEntries.value(dependency.name));
|
auto givenPath = Utils::FilePath::fromUserInput(cMakeEntries.value(dependency.name));
|
||||||
if (givenPath.isEmpty()) {
|
if (givenPath.isEmpty()) {
|
||||||
result << BuildSystemTask(Task::Warning,
|
result << BuildSystemTask(Task::Warning,
|
||||||
tr("CMake variable %1 not defined.").arg(dependency.name));
|
Tr::tr("CMake variable %1 not defined.").arg(dependency.name));
|
||||||
} else {
|
} else {
|
||||||
const auto detectionPath = givenPath.resolvePath(dependency.value);
|
const auto detectionPath = givenPath.resolvePath(dependency.value);
|
||||||
if (!detectionPath.exists()) {
|
if (!detectionPath.exists()) {
|
||||||
result << BuildSystemTask(Task::Warning,
|
result << BuildSystemTask(Task::Warning,
|
||||||
tr("CMake variable %1: path %2 does not exist.")
|
Tr::tr("CMake variable %1: path %2 does not exist.")
|
||||||
.arg(dependency.name, detectionPath.toUserOutput()));
|
.arg(dependency.name, detectionPath.toUserOutput()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -288,7 +288,7 @@ public:
|
|||||||
cMakeToolchainFile.toString().toUtf8());
|
cMakeToolchainFile.toString().toUtf8());
|
||||||
if (!cMakeToolchainFile.exists()) {
|
if (!cMakeToolchainFile.exists()) {
|
||||||
printMessage(
|
printMessage(
|
||||||
McuTarget::tr(
|
Tr::tr(
|
||||||
"Warning for target %1: missing CMake toolchain file expected at %2.")
|
"Warning for target %1: missing CMake toolchain file expected at %2.")
|
||||||
.arg(generateKitNameFromTarget(mcuTarget),
|
.arg(generateKitNameFromTarget(mcuTarget),
|
||||||
cMakeToolchainFile.toUserOutput()),
|
cMakeToolchainFile.toUserOutput()),
|
||||||
@@ -300,7 +300,7 @@ public:
|
|||||||
"/lib/cmake/Qul/QulGenerators.cmake");
|
"/lib/cmake/Qul/QulGenerators.cmake");
|
||||||
configMap.insert("QUL_GENERATORS", generatorsPath.toString().toUtf8());
|
configMap.insert("QUL_GENERATORS", generatorsPath.toString().toUtf8());
|
||||||
if (!generatorsPath.exists()) {
|
if (!generatorsPath.exists()) {
|
||||||
printMessage(McuTarget::tr(
|
printMessage(Tr::tr(
|
||||||
"Warning for target %1: missing QulGenerators expected at %2.")
|
"Warning for target %1: missing QulGenerators expected at %2.")
|
||||||
.arg(generateKitNameFromTarget(mcuTarget),
|
.arg(generateKitNameFromTarget(mcuTarget),
|
||||||
generatorsPath.toUserOutput()),
|
generatorsPath.toUserOutput()),
|
||||||
@@ -493,14 +493,14 @@ void createAutomaticKits(const SettingsHandler::Ptr &settingsHandler)
|
|||||||
if (!qtForMCUsPackage->isValidStatus()) {
|
if (!qtForMCUsPackage->isValidStatus()) {
|
||||||
switch (qtForMCUsPackage->status()) {
|
switch (qtForMCUsPackage->status()) {
|
||||||
case McuAbstractPackage::Status::ValidPathInvalidPackage: {
|
case McuAbstractPackage::Status::ValidPathInvalidPackage: {
|
||||||
printMessage(McuPackage::tr("Path %1 exists, but does not contain %2.")
|
printMessage(Tr::tr("Path %1 exists, but does not contain %2.")
|
||||||
.arg(qtForMCUsPackage->path().toUserOutput(),
|
.arg(qtForMCUsPackage->path().toUserOutput(),
|
||||||
qtForMCUsPackage->detectionPath().toUserOutput()),
|
qtForMCUsPackage->detectionPath().toUserOutput()),
|
||||||
true);
|
true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case McuAbstractPackage::Status::InvalidPath: {
|
case McuAbstractPackage::Status::InvalidPath: {
|
||||||
printMessage(McuPackage::tr(
|
printMessage(Tr::tr(
|
||||||
"Path %1 does not exist. Add the path in Edit > Preferences > "
|
"Path %1 does not exist. Add the path in Edit > Preferences > "
|
||||||
"Devices > MCU.")
|
"Devices > MCU.")
|
||||||
.arg(qtForMCUsPackage->path().toUserOutput()),
|
.arg(qtForMCUsPackage->path().toUserOutput()),
|
||||||
@@ -509,7 +509,7 @@ void createAutomaticKits(const SettingsHandler::Ptr &settingsHandler)
|
|||||||
}
|
}
|
||||||
case McuAbstractPackage::Status::EmptyPath: {
|
case McuAbstractPackage::Status::EmptyPath: {
|
||||||
printMessage(
|
printMessage(
|
||||||
McuPackage::tr(
|
Tr::tr(
|
||||||
"Missing %1. Add the path in Edit > Preferences > Devices > MCU.")
|
"Missing %1. Add the path in Edit > Preferences > Devices > MCU.")
|
||||||
.arg(qtForMCUsPackage->detectionPath().toUserOutput()),
|
.arg(qtForMCUsPackage->detectionPath().toUserOutput()),
|
||||||
true);
|
true);
|
||||||
@@ -523,7 +523,7 @@ void createAutomaticKits(const SettingsHandler::Ptr &settingsHandler)
|
|||||||
|
|
||||||
if (CMakeProjectManager::CMakeToolManager::cmakeTools().isEmpty()) {
|
if (CMakeProjectManager::CMakeToolManager::cmakeTools().isEmpty()) {
|
||||||
printMessage(
|
printMessage(
|
||||||
McuPackage::tr(
|
Tr::tr(
|
||||||
"No CMake tool was detected. Add a CMake tool in Edit > Preferences > "
|
"No CMake tool was detected. Add a CMake tool in Edit > Preferences > "
|
||||||
"Kits > CMake."),
|
"Kits > CMake."),
|
||||||
true);
|
true);
|
||||||
|
@@ -183,7 +183,7 @@ void McuPackage::updateStatusUi()
|
|||||||
QString McuPackage::statusText() const
|
QString McuPackage::statusText() const
|
||||||
{
|
{
|
||||||
const QString displayPackagePath = m_path.toUserOutput();
|
const QString displayPackagePath = m_path.toUserOutput();
|
||||||
const QString displayVersions = m_versions.join(tr(" or "));
|
const QString displayVersions = m_versions.join(Tr::tr(" or "));
|
||||||
const QString outDetectionPath = m_detectionPath.toUserOutput();
|
const QString outDetectionPath = m_detectionPath.toUserOutput();
|
||||||
const QString displayRequiredPath = m_versions.empty() ? outDetectionPath
|
const QString displayRequiredPath = m_versions.empty() ? outDetectionPath
|
||||||
: QString("%1 %2").arg(outDetectionPath,
|
: QString("%1 %2").arg(outDetectionPath,
|
||||||
@@ -198,35 +198,35 @@ QString McuPackage::statusText() const
|
|||||||
case Status::ValidPackage:
|
case Status::ValidPackage:
|
||||||
response = m_detectionPath.isEmpty()
|
response = m_detectionPath.isEmpty()
|
||||||
? (m_detectedVersion.isEmpty()
|
? (m_detectedVersion.isEmpty()
|
||||||
? tr("Path %1 exists.").arg(displayPackagePath)
|
? Tr::tr("Path %1 exists.").arg(displayPackagePath)
|
||||||
: tr("Path %1 exists. Version %2 was found.")
|
: Tr::tr("Path %1 exists. Version %2 was found.")
|
||||||
.arg(displayPackagePath, m_detectedVersion))
|
.arg(displayPackagePath, m_detectedVersion))
|
||||||
: tr("Path %1 is valid, %2 was found.")
|
: Tr::tr("Path %1 is valid, %2 was found.")
|
||||||
.arg(displayPackagePath, displayDetectedPath);
|
.arg(displayPackagePath, displayDetectedPath);
|
||||||
break;
|
break;
|
||||||
case Status::ValidPackageMismatchedVersion: {
|
case Status::ValidPackageMismatchedVersion: {
|
||||||
const QString versionWarning
|
const QString versionWarning
|
||||||
= m_versions.size() == 1
|
= m_versions.size() == 1
|
||||||
? tr("but only version %1 is supported").arg(m_versions.first())
|
? Tr::tr("but only version %1 is supported").arg(m_versions.first())
|
||||||
: tr("but only versions %1 are supported").arg(displayVersions);
|
: Tr::tr("but only versions %1 are supported").arg(displayVersions);
|
||||||
response = tr("Path %1 is valid, %2 was found, %3.")
|
response = Tr::tr("Path %1 is valid, %2 was found, %3.")
|
||||||
.arg(displayPackagePath, displayDetectedPath, versionWarning);
|
.arg(displayPackagePath, displayDetectedPath, versionWarning);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Status::ValidPathInvalidPackage:
|
case Status::ValidPathInvalidPackage:
|
||||||
response = tr("Path %1 exists, but does not contain %2.")
|
response = Tr::tr("Path %1 exists, but does not contain %2.")
|
||||||
.arg(displayPackagePath, displayRequiredPath);
|
.arg(displayPackagePath, displayRequiredPath);
|
||||||
break;
|
break;
|
||||||
case Status::InvalidPath:
|
case Status::InvalidPath:
|
||||||
response = tr("Path %1 does not exist.").arg(displayPackagePath);
|
response = Tr::tr("Path %1 does not exist.").arg(displayPackagePath);
|
||||||
break;
|
break;
|
||||||
case Status::EmptyPath:
|
case Status::EmptyPath:
|
||||||
response = m_detectionPath.isEmpty()
|
response = m_detectionPath.isEmpty()
|
||||||
? tr("Path is empty.")
|
? Tr::tr("Path is empty.")
|
||||||
: tr("Path is empty, %1 not found.").arg(displayRequiredPath);
|
: Tr::tr("Path is empty, %1 not found.").arg(displayRequiredPath);
|
||||||
break;
|
break;
|
||||||
case Status::ValidPackageVersionNotDetected:
|
case Status::ValidPackageVersionNotDetected:
|
||||||
response = tr("Path %1 exists, but version %2 could not be detected.")
|
response = Tr::tr("Path %1 exists, but version %2 could not be detected.")
|
||||||
.arg(displayPackagePath, displayVersions);
|
.arg(displayPackagePath, displayVersions);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -262,7 +262,7 @@ QWidget *McuPackage::widget()
|
|||||||
if (!m_downloadUrl.isEmpty()) {
|
if (!m_downloadUrl.isEmpty()) {
|
||||||
auto downLoadButton = new QToolButton(widget);
|
auto downLoadButton = new QToolButton(widget);
|
||||||
downLoadButton->setIcon(Icons::ONLINE.icon());
|
downLoadButton->setIcon(Icons::ONLINE.icon());
|
||||||
downLoadButton->setToolTip(tr("Download from \"%1\"").arg(m_downloadUrl));
|
downLoadButton->setToolTip(Tr::tr("Download from \"%1\"").arg(m_downloadUrl));
|
||||||
QObject::connect(downLoadButton, &QToolButton::pressed, this, [this] {
|
QObject::connect(downLoadButton, &QToolButton::pressed, this, [this] {
|
||||||
QDesktopServices::openUrl(m_downloadUrl);
|
QDesktopServices::openUrl(m_downloadUrl);
|
||||||
});
|
});
|
||||||
@@ -531,7 +531,7 @@ QVariant McuToolChainPackage::debuggerId() const
|
|||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case ToolChainType::ArmGcc: {
|
case ToolChainType::ArmGcc: {
|
||||||
sub = QString::fromLatin1("bin/arm-none-eabi-gdb-py");
|
sub = QString::fromLatin1("bin/arm-none-eabi-gdb-py");
|
||||||
displayName = McuPackage::tr("Arm GDB at %1");
|
displayName = Tr::tr("Arm GDB at %1");
|
||||||
engineType = Debugger::GdbEngineType;
|
engineType = Debugger::GdbEngineType;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "mcusupportdevice.h"
|
#include "mcusupportdevice.h"
|
||||||
#include "mcusupportconstants.h"
|
#include "mcusupportconstants.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -14,7 +15,7 @@ McuSupportDevice::McuSupportDevice()
|
|||||||
{
|
{
|
||||||
setupId(IDevice::AutoDetected, Constants::DEVICE_ID);
|
setupId(IDevice::AutoDetected, Constants::DEVICE_ID);
|
||||||
setType(Constants::DEVICE_TYPE);
|
setType(Constants::DEVICE_TYPE);
|
||||||
const QString displayNameAndType = tr("MCU Device");
|
const QString displayNameAndType = Tr::tr("MCU Device");
|
||||||
setDefaultDisplayName(displayNameAndType);
|
setDefaultDisplayName(displayNameAndType);
|
||||||
setDisplayType(displayNameAndType);
|
setDisplayType(displayNameAndType);
|
||||||
setDeviceState(IDevice::DeviceStateUnknown);
|
setDeviceState(IDevice::DeviceStateUnknown);
|
||||||
@@ -31,7 +32,7 @@ ProjectExplorer::IDevice::Ptr McuSupportDevice::create()
|
|||||||
McuSupportDeviceFactory::McuSupportDeviceFactory()
|
McuSupportDeviceFactory::McuSupportDeviceFactory()
|
||||||
: ProjectExplorer::IDeviceFactory(Constants::DEVICE_TYPE)
|
: ProjectExplorer::IDeviceFactory(Constants::DEVICE_TYPE)
|
||||||
{
|
{
|
||||||
setDisplayName(McuSupportDevice::tr("MCU Device"));
|
setDisplayName(Tr::tr("MCU Device"));
|
||||||
setCombinedIcon(":/mcusupport/images/mcusupportdevicesmall.png",
|
setCombinedIcon(":/mcusupport/images/mcusupportdevicesmall.png",
|
||||||
":/mcusupport/images/mcusupportdevice.png");
|
":/mcusupport/images/mcusupportdevice.png");
|
||||||
setConstructionFunction(&McuSupportDevice::create);
|
setConstructionFunction(&McuSupportDevice::create);
|
||||||
|
@@ -10,8 +10,6 @@ namespace Internal {
|
|||||||
|
|
||||||
class McuSupportDevice final : public ProjectExplorer::DesktopDevice
|
class McuSupportDevice final : public ProjectExplorer::DesktopDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportDevice)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ProjectExplorer::IDevice::Ptr create();
|
static ProjectExplorer::IDevice::Ptr create();
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#include "mcupackage.h"
|
#include "mcupackage.h"
|
||||||
#include "mcusupportconstants.h"
|
#include "mcusupportconstants.h"
|
||||||
#include "mcusupportsdk.h"
|
#include "mcusupportsdk.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
#include "mcutarget.h"
|
#include "mcutarget.h"
|
||||||
#include "settingshandler.h"
|
#include "settingshandler.h"
|
||||||
|
|
||||||
@@ -184,8 +185,8 @@ void McuSupportOptions::registerExamples() const
|
|||||||
if (docsDir.isEmpty())
|
if (docsDir.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto examples = {std::make_pair(QStringLiteral("demos"), tr("Qt for MCUs Demos")),
|
auto examples = {std::make_pair(QStringLiteral("demos"), Tr::tr("Qt for MCUs Demos")),
|
||||||
std::make_pair(QStringLiteral("examples"), tr("Qt for MCUs Examples"))};
|
std::make_pair(QStringLiteral("examples"), Tr::tr("Qt for MCUs Examples"))};
|
||||||
for (const auto &dir : examples) {
|
for (const auto &dir : examples) {
|
||||||
const FilePath examplesDir = qulDirFromSettings() / dir.first;
|
const FilePath examplesDir = qulDirFromSettings() / dir.first;
|
||||||
if (!examplesDir.exists())
|
if (!examplesDir.exists())
|
||||||
@@ -235,11 +236,11 @@ McuKitManager::UpgradeOption McuSupportOptions::askForKitUpgrades()
|
|||||||
{
|
{
|
||||||
QMessageBox upgradePopup(Core::ICore::dialogParent());
|
QMessageBox upgradePopup(Core::ICore::dialogParent());
|
||||||
upgradePopup.setStandardButtons(QMessageBox::Cancel);
|
upgradePopup.setStandardButtons(QMessageBox::Cancel);
|
||||||
QPushButton *replaceButton = upgradePopup.addButton(tr("Replace Existing Kits"),
|
QPushButton *replaceButton = upgradePopup.addButton(Tr::tr("Replace Existing Kits"),
|
||||||
QMessageBox::NoRole);
|
QMessageBox::NoRole);
|
||||||
QPushButton *keepButton = upgradePopup.addButton(tr("Create New Kits"), QMessageBox::NoRole);
|
QPushButton *keepButton = upgradePopup.addButton(Tr::tr("Create New Kits"), QMessageBox::NoRole);
|
||||||
upgradePopup.setWindowTitle(tr("Qt for MCUs"));
|
upgradePopup.setWindowTitle(Tr::tr("Qt for MCUs"));
|
||||||
upgradePopup.setText(tr("New version of Qt for MCUs detected. Upgrade existing kits?"));
|
upgradePopup.setText(Tr::tr("New version of Qt for MCUs detected. Upgrade existing kits?"));
|
||||||
|
|
||||||
upgradePopup.exec();
|
upgradePopup.exec();
|
||||||
|
|
||||||
|
@@ -37,8 +37,6 @@ namespace McuSupport::Internal {
|
|||||||
|
|
||||||
class McuSupportOptionsWidget : public Core::IOptionsPageWidget
|
class McuSupportOptionsWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportOptionsWidget)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
McuSupportOptionsWidget(McuSupportOptions &, const SettingsHandler::Ptr &);
|
McuSupportOptionsWidget(McuSupportOptions &, const SettingsHandler::Ptr &);
|
||||||
|
|
||||||
@@ -89,7 +87,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
m_qtForMCUsSdkGroupBox = new QGroupBox(tr("Qt for MCUs SDK"));
|
m_qtForMCUsSdkGroupBox = new QGroupBox(Tr::tr("Qt for MCUs SDK"));
|
||||||
m_qtForMCUsSdkGroupBox->setFlat(true);
|
m_qtForMCUsSdkGroupBox->setFlat(true);
|
||||||
auto *layout = new QVBoxLayout(m_qtForMCUsSdkGroupBox);
|
auto *layout = new QVBoxLayout(m_qtForMCUsSdkGroupBox);
|
||||||
layout->addWidget(m_options.qtForMCUsSdkPackage->widget());
|
layout->addWidget(m_options.qtForMCUsSdkPackage->widget());
|
||||||
@@ -98,7 +96,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
|
|||||||
|
|
||||||
{
|
{
|
||||||
m_mcuTargetsGroupBox = new QGroupBox(
|
m_mcuTargetsGroupBox = new QGroupBox(
|
||||||
tr("Targets supported by the %1").arg(m_qtForMCUsSdkGroupBox->title()));
|
Tr::tr("Targets supported by the %1").arg(m_qtForMCUsSdkGroupBox->title()));
|
||||||
m_mcuTargetsGroupBox->setFlat(true);
|
m_mcuTargetsGroupBox->setFlat(true);
|
||||||
mainLayout->addWidget(m_mcuTargetsGroupBox);
|
mainLayout->addWidget(m_mcuTargetsGroupBox);
|
||||||
m_mcuTargetsComboBox = new QComboBox;
|
m_mcuTargetsComboBox = new QComboBox;
|
||||||
@@ -115,7 +113,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
m_packagesGroupBox = new QGroupBox(tr("Requirements"));
|
m_packagesGroupBox = new QGroupBox(Tr::tr("Requirements"));
|
||||||
m_packagesGroupBox->setFlat(true);
|
m_packagesGroupBox->setFlat(true);
|
||||||
mainLayout->addWidget(m_packagesGroupBox);
|
mainLayout->addWidget(m_packagesGroupBox);
|
||||||
m_packagesLayout = new QFormLayout;
|
m_packagesLayout = new QFormLayout;
|
||||||
@@ -129,7 +127,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
|
|||||||
|
|
||||||
{
|
{
|
||||||
m_kitAutomaticCreationCheckBox = new QCheckBox(
|
m_kitAutomaticCreationCheckBox = new QCheckBox(
|
||||||
tr("Automatically create kits for all available targets on start"));
|
Tr::tr("Automatically create kits for all available targets on start"));
|
||||||
connect(m_kitAutomaticCreationCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
connect(m_kitAutomaticCreationCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
||||||
m_options.setAutomaticKitCreationEnabled(state == Qt::CheckState::Checked);
|
m_options.setAutomaticKitCreationEnabled(state == Qt::CheckState::Checked);
|
||||||
});
|
});
|
||||||
@@ -137,20 +135,20 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
m_kitCreationGroupBox = new QGroupBox(tr("Create a Kit"));
|
m_kitCreationGroupBox = new QGroupBox(Tr::tr("Create a Kit"));
|
||||||
m_kitCreationGroupBox->setFlat(true);
|
m_kitCreationGroupBox->setFlat(true);
|
||||||
mainLayout->addWidget(m_kitCreationGroupBox);
|
mainLayout->addWidget(m_kitCreationGroupBox);
|
||||||
m_kitCreationInfoLabel = new Utils::InfoLabel;
|
m_kitCreationInfoLabel = new Utils::InfoLabel;
|
||||||
auto *vLayout = new QHBoxLayout(m_kitCreationGroupBox);
|
auto *vLayout = new QHBoxLayout(m_kitCreationGroupBox);
|
||||||
vLayout->addWidget(m_kitCreationInfoLabel);
|
vLayout->addWidget(m_kitCreationInfoLabel);
|
||||||
m_kitCreationPushButton = new QPushButton(tr("Create Kit"));
|
m_kitCreationPushButton = new QPushButton(Tr::tr("Create Kit"));
|
||||||
m_kitCreationPushButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
|
m_kitCreationPushButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
|
||||||
connect(m_kitCreationPushButton, &QPushButton::clicked, this, [this] {
|
connect(m_kitCreationPushButton, &QPushButton::clicked, this, [this] {
|
||||||
McuKitManager::newKit(currentMcuTarget().get(), m_options.qtForMCUsSdkPackage);
|
McuKitManager::newKit(currentMcuTarget().get(), m_options.qtForMCUsSdkPackage);
|
||||||
m_options.registerQchFiles();
|
m_options.registerQchFiles();
|
||||||
updateStatus();
|
updateStatus();
|
||||||
});
|
});
|
||||||
m_kitUpdatePushButton = new QPushButton(tr("Update Kit"));
|
m_kitUpdatePushButton = new QPushButton(Tr::tr("Update Kit"));
|
||||||
m_kitUpdatePushButton->setSizePolicy(m_kitCreationPushButton->sizePolicy());
|
m_kitUpdatePushButton->setSizePolicy(m_kitCreationPushButton->sizePolicy());
|
||||||
connect(m_kitUpdatePushButton, &QPushButton::clicked, this, [this] {
|
connect(m_kitUpdatePushButton, &QPushButton::clicked, this, [this] {
|
||||||
for (auto *kit : McuKitManager::upgradeableKits(currentMcuTarget().get(),
|
for (auto *kit : McuKitManager::upgradeableKits(currentMcuTarget().get(),
|
||||||
@@ -196,7 +194,7 @@ void McuSupportOptionsWidget::updateStatus()
|
|||||||
if (checkDeprecatedSdkError(sdkPath, deprecationMessage))
|
if (checkDeprecatedSdkError(sdkPath, deprecationMessage))
|
||||||
m_mcuTargetsInfoLabel->setText(deprecationMessage);
|
m_mcuTargetsInfoLabel->setText(deprecationMessage);
|
||||||
else
|
else
|
||||||
m_mcuTargetsInfoLabel->setText(tr("No valid kit descriptions found at %1.")
|
m_mcuTargetsInfoLabel->setText(Tr::tr("No valid kit descriptions found at %1.")
|
||||||
.arg(kitsPath(sdkPath).toUserOutput()));
|
.arg(kitsPath(sdkPath).toUserOutput()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,12 +221,12 @@ void McuSupportOptionsWidget::updateStatus()
|
|||||||
|
|
||||||
m_kitCreationInfoLabel->setText(
|
m_kitCreationInfoLabel->setText(
|
||||||
hasMatchingKits
|
hasMatchingKits
|
||||||
? tr("A kit for the selected target and SDK version already exists.")
|
? Tr::tr("A kit for the selected target and SDK version already exists.")
|
||||||
: hasUpgradeableKits ? tr("Kits for a different SDK version exist.")
|
: hasUpgradeableKits ? Tr::tr("Kits for a different SDK version exist.")
|
||||||
: tr("A kit for the selected target can be created."));
|
: Tr::tr("A kit for the selected target can be created."));
|
||||||
} else {
|
} else {
|
||||||
m_kitCreationInfoLabel->setType(Utils::InfoLabel::NotOk);
|
m_kitCreationInfoLabel->setType(Utils::InfoLabel::NotOk);
|
||||||
m_kitCreationInfoLabel->setText(tr("Provide the package paths in order to create a kit "
|
m_kitCreationInfoLabel->setText(Tr::tr("Provide the package paths in order to create a kit "
|
||||||
"for your target."));
|
"for your target."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,7 +239,7 @@ void McuSupportOptionsWidget::updateStatus()
|
|||||||
m_statusInfoLabel->setVisible(!cMakeAvailable);
|
m_statusInfoLabel->setVisible(!cMakeAvailable);
|
||||||
if (m_statusInfoLabel->isVisible()) {
|
if (m_statusInfoLabel->isVisible()) {
|
||||||
m_statusInfoLabel->setType(Utils::InfoLabel::NotOk);
|
m_statusInfoLabel->setType(Utils::InfoLabel::NotOk);
|
||||||
m_statusInfoLabel->setText(tr("No CMake tool was detected. Add a CMake tool in the "
|
m_statusInfoLabel->setText(Tr::tr("No CMake tool was detected. Add a CMake tool in the "
|
||||||
"<a href=\"cmake\">CMake options</a> and press Apply."));
|
"<a href=\"cmake\">CMake options</a> and press Apply."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -351,7 +349,7 @@ McuSupportOptionsPage::McuSupportOptionsPage(McuSupportOptions &options,
|
|||||||
const SettingsHandler::Ptr &settingsHandler)
|
const SettingsHandler::Ptr &settingsHandler)
|
||||||
{
|
{
|
||||||
setId(Utils::Id(Constants::SETTINGS_ID));
|
setId(Utils::Id(Constants::SETTINGS_ID));
|
||||||
setDisplayName(McuSupportOptionsWidget::tr("MCU"));
|
setDisplayName(Tr::tr("MCU"));
|
||||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setWidgetCreator([&options, &settingsHandler] {
|
setWidgetCreator([&options, &settingsHandler] {
|
||||||
return new McuSupportOptionsWidget(options, settingsHandler);
|
return new McuSupportOptionsWidget(options, settingsHandler);
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mcusupportplugin.h"
|
#include "mcusupportplugin.h"
|
||||||
|
|
||||||
#include "mcukitinformation.h"
|
#include "mcukitinformation.h"
|
||||||
#include "mcukitmanager.h"
|
#include "mcukitmanager.h"
|
||||||
#include "mcusupportconstants.h"
|
#include "mcusupportconstants.h"
|
||||||
@@ -9,6 +10,7 @@
|
|||||||
#include "mcusupportoptions.h"
|
#include "mcusupportoptions.h"
|
||||||
#include "mcusupportoptionspage.h"
|
#include "mcusupportoptionspage.h"
|
||||||
#include "mcusupportrunconfiguration.h"
|
#include "mcusupportrunconfiguration.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
|
|
||||||
#if defined(WITH_TESTS) && defined(GOOGLE_TEST_IS_FOUND)
|
#if defined(WITH_TESTS) && defined(GOOGLE_TEST_IS_FOUND)
|
||||||
#include "test/unittest.h"
|
#include "test/unittest.h"
|
||||||
@@ -40,8 +42,7 @@ namespace Internal {
|
|||||||
|
|
||||||
void printMessage(const QString &message, bool important)
|
void printMessage(const QString &message, bool important)
|
||||||
{
|
{
|
||||||
const QString displayMessage = QCoreApplication::translate("QtForMCUs", "Qt for MCUs: %1")
|
const QString displayMessage = Tr::tr("Qt for MCUs: %1").arg(message);
|
||||||
.arg(message);
|
|
||||||
if (important)
|
if (important)
|
||||||
Core::MessageManager::writeFlashing(displayMessage);
|
Core::MessageManager::writeFlashing(displayMessage);
|
||||||
else
|
else
|
||||||
@@ -98,11 +99,11 @@ void McuSupportPlugin::askUserAboutMcuSupportKitsSetup()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Utils::InfoBarEntry info(setupMcuSupportKits,
|
Utils::InfoBarEntry info(setupMcuSupportKits,
|
||||||
tr("Create Kits for Qt for MCUs? "
|
Tr::tr("Create Kits for Qt for MCUs? "
|
||||||
"To do it later, select Edit > Preferences > Devices > MCU."),
|
"To do it later, select Edit > Preferences > Devices > MCU."),
|
||||||
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
||||||
// clazy:excludeall=connect-3arg-lambda
|
// clazy:excludeall=connect-3arg-lambda
|
||||||
info.addCustomButton(tr("Create Kits for Qt for MCUs"), [] {
|
info.addCustomButton(Tr::tr("Create Kits for Qt for MCUs"), [] {
|
||||||
ICore::infoBar()->removeInfo(setupMcuSupportKits);
|
ICore::infoBar()->removeInfo(setupMcuSupportKits);
|
||||||
QTimer::singleShot(0, []() { ICore::showOptionsDialog(Constants::SETTINGS_ID); });
|
QTimer::singleShot(0, []() { ICore::showOptionsDialog(Constants::SETTINGS_ID); });
|
||||||
});
|
});
|
||||||
@@ -117,20 +118,20 @@ void McuSupportPlugin::askUserAboutMcuSupportKitsUpgrade(const SettingsHandler::
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Utils::InfoBarEntry info(upgradeMcuSupportKits,
|
Utils::InfoBarEntry info(upgradeMcuSupportKits,
|
||||||
tr("New version of Qt for MCUs detected. Upgrade existing Kits?"),
|
Tr::tr("New version of Qt for MCUs detected. Upgrade existing Kits?"),
|
||||||
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
||||||
using McuKitManager::UpgradeOption;
|
using McuKitManager::UpgradeOption;
|
||||||
static UpgradeOption selectedOption = UpgradeOption::Keep;
|
static UpgradeOption selectedOption = UpgradeOption::Keep;
|
||||||
|
|
||||||
const QList<Utils::InfoBarEntry::ComboInfo> infos
|
const QList<Utils::InfoBarEntry::ComboInfo> infos
|
||||||
= {{tr("Create new kits"), QVariant::fromValue(UpgradeOption::Keep)},
|
= {{Tr::tr("Create new kits"), QVariant::fromValue(UpgradeOption::Keep)},
|
||||||
{tr("Replace existing kits"), QVariant::fromValue(UpgradeOption::Replace)}};
|
{Tr::tr("Replace existing kits"), QVariant::fromValue(UpgradeOption::Replace)}};
|
||||||
|
|
||||||
info.setComboInfo(infos, [](const Utils::InfoBarEntry::ComboInfo &selected) {
|
info.setComboInfo(infos, [](const Utils::InfoBarEntry::ComboInfo &selected) {
|
||||||
selectedOption = selected.data.value<UpgradeOption>();
|
selectedOption = selected.data.value<UpgradeOption>();
|
||||||
});
|
});
|
||||||
|
|
||||||
info.addCustomButton(tr("Proceed"), [upgradeMcuSupportKits, settingsHandler] {
|
info.addCustomButton(Tr::tr("Proceed"), [upgradeMcuSupportKits, settingsHandler] {
|
||||||
ICore::infoBar()->removeInfo(upgradeMcuSupportKits);
|
ICore::infoBar()->removeInfo(upgradeMcuSupportKits);
|
||||||
QTimer::singleShot(0, [settingsHandler]() {
|
QTimer::singleShot(0, [settingsHandler]() {
|
||||||
McuKitManager::upgradeKitsByCreatingNewPackage(settingsHandler, selectedOption);
|
McuKitManager::upgradeKitsByCreatingNewPackage(settingsHandler, selectedOption);
|
||||||
|
@@ -2,7 +2,9 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mcusupportrunconfiguration.h"
|
#include "mcusupportrunconfiguration.h"
|
||||||
|
|
||||||
#include "mcusupportconstants.h"
|
#include "mcusupportconstants.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
|
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
@@ -39,14 +41,12 @@ static QStringList flashAndRunArgs(const RunConfiguration *rc, const Target *tar
|
|||||||
|
|
||||||
class FlashAndRunConfiguration final : public RunConfiguration
|
class FlashAndRunConfiguration final : public RunConfiguration
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::FlashAndRunConfiguration)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FlashAndRunConfiguration(Target *target, Utils::Id id)
|
FlashAndRunConfiguration(Target *target, Utils::Id id)
|
||||||
: RunConfiguration(target, id)
|
: RunConfiguration(target, id)
|
||||||
{
|
{
|
||||||
auto flashAndRunParameters = addAspect<StringAspect>();
|
auto flashAndRunParameters = addAspect<StringAspect>();
|
||||||
flashAndRunParameters->setLabelText(tr("Flash and run CMake parameters:"));
|
flashAndRunParameters->setLabelText(Tr::tr("Flash and run CMake parameters:"));
|
||||||
flashAndRunParameters->setDisplayStyle(StringAspect::TextEditDisplay);
|
flashAndRunParameters->setDisplayStyle(StringAspect::TextEditDisplay);
|
||||||
flashAndRunParameters->setSettingsKey("FlashAndRunConfiguration.Parameters");
|
flashAndRunParameters->setSettingsKey("FlashAndRunConfiguration.Parameters");
|
||||||
|
|
||||||
|
@@ -195,7 +195,7 @@ McuToolChainPackagePtr createMsvcToolChainPackage(const SettingsHandler::Ptr &se
|
|||||||
R"(\b(\d+\.\d+)\.\d+\b)");
|
R"(\b(\d+\.\d+)\.\d+\b)");
|
||||||
|
|
||||||
return McuToolChainPackagePtr{new McuToolChainPackage(settingsHandler,
|
return McuToolChainPackagePtr{new McuToolChainPackage(settingsHandler,
|
||||||
McuPackage::tr("MSVC Binary directory"),
|
Tr::tr("MSVC Binary directory"),
|
||||||
defaultPath,
|
defaultPath,
|
||||||
detectionPath,
|
detectionPath,
|
||||||
"MsvcToolchain",
|
"MsvcToolchain",
|
||||||
@@ -221,7 +221,7 @@ McuToolChainPackagePtr createGccToolChainPackage(const SettingsHandler::Ptr &set
|
|||||||
R"(\b(\d+\.\d+\.\d+)\b)");
|
R"(\b(\d+\.\d+\.\d+)\b)");
|
||||||
|
|
||||||
return McuToolChainPackagePtr{new McuToolChainPackage(settingsHandler,
|
return McuToolChainPackagePtr{new McuToolChainPackage(settingsHandler,
|
||||||
McuPackage::tr("GCC Toolchain"),
|
Tr::tr("GCC Toolchain"),
|
||||||
defaultPath,
|
defaultPath,
|
||||||
detectionPath,
|
detectionPath,
|
||||||
"GnuToolchain",
|
"GnuToolchain",
|
||||||
@@ -258,7 +258,7 @@ McuToolChainPackagePtr createArmGccToolchainPackage(const SettingsHandler::Ptr &
|
|||||||
|
|
||||||
return McuToolChainPackagePtr{
|
return McuToolChainPackagePtr{
|
||||||
new McuToolChainPackage(settingsHandler,
|
new McuToolChainPackage(settingsHandler,
|
||||||
McuPackage::tr("GNU Arm Embedded Toolchain"),
|
Tr::tr("GNU Arm Embedded Toolchain"),
|
||||||
defaultPath,
|
defaultPath,
|
||||||
detectionPath,
|
detectionPath,
|
||||||
"GNUArmEmbeddedToolchain", // settingsKey
|
"GNUArmEmbeddedToolchain", // settingsKey
|
||||||
@@ -374,7 +374,7 @@ McuPackagePtr createStm32CubeProgrammerPackage(const SettingsHandler::Ptr &setti
|
|||||||
|
|
||||||
return McuPackagePtr{
|
return McuPackagePtr{
|
||||||
new McuPackage(settingsHandler,
|
new McuPackage(settingsHandler,
|
||||||
McuPackage::tr("STM32CubeProgrammer"),
|
Tr::tr("STM32CubeProgrammer"),
|
||||||
defaultPath,
|
defaultPath,
|
||||||
detectionPath,
|
detectionPath,
|
||||||
"Stm32CubeProgrammer",
|
"Stm32CubeProgrammer",
|
||||||
@@ -779,7 +779,7 @@ bool checkDeprecatedSdkError(const FilePath &qulDir, QString &message)
|
|||||||
const QString legacyVersion = legacySupportVersionFor(sdkDetectedVersion);
|
const QString legacyVersion = legacySupportVersionFor(sdkDetectedVersion);
|
||||||
|
|
||||||
if (!legacyVersion.isEmpty()) {
|
if (!legacyVersion.isEmpty()) {
|
||||||
message = McuTarget::tr("Qt for MCUs SDK version %1 detected, "
|
message = Tr::tr("Qt for MCUs SDK version %1 detected, "
|
||||||
"only supported by Qt Creator version %2. "
|
"only supported by Qt Creator version %2. "
|
||||||
"This version of Qt Creator requires Qt for MCUs %3 or greater.")
|
"This version of Qt Creator requires Qt for MCUs %3 or greater.")
|
||||||
.arg(sdkDetectedVersion,
|
.arg(sdkDetectedVersion,
|
||||||
@@ -808,7 +808,7 @@ McuSdkRepository targetsAndPackages(const McuPackagePtr &qtForMCUsPackage,
|
|||||||
bool ok = false;
|
bool ok = false;
|
||||||
const int compatVersion = desc.compatVersion.toInt(&ok);
|
const int compatVersion = desc.compatVersion.toInt(&ok);
|
||||||
if (!desc.compatVersion.isEmpty() && ok && compatVersion > MAX_COMPATIBILITY_VERSION) {
|
if (!desc.compatVersion.isEmpty() && ok && compatVersion > MAX_COMPATIBILITY_VERSION) {
|
||||||
printMessage(McuTarget::tr("Skipped %1. Unsupported version \"%2\".")
|
printMessage(Tr::tr("Skipped %1. Unsupported version \"%2\".")
|
||||||
.arg(QDir::toNativeSeparators(filePath.fileNameWithPathComponents(1)),
|
.arg(QDir::toNativeSeparators(filePath.fileNameWithPathComponents(1)),
|
||||||
desc.qulVersion),
|
desc.qulVersion),
|
||||||
false);
|
false);
|
||||||
@@ -822,10 +822,10 @@ McuSdkRepository targetsAndPackages(const McuPackagePtr &qtForMCUsPackage,
|
|||||||
const QString legacyVersion = legacySupportVersionFor(desc.qulVersion);
|
const QString legacyVersion = legacySupportVersionFor(desc.qulVersion);
|
||||||
const QString qtcSupportText
|
const QString qtcSupportText
|
||||||
= !legacyVersion.isEmpty()
|
= !legacyVersion.isEmpty()
|
||||||
? McuTarget::tr("Detected version \"%1\", only supported by Qt Creator %2.")
|
? Tr::tr("Detected version \"%1\", only supported by Qt Creator %2.")
|
||||||
.arg(desc.qulVersion, legacyVersion)
|
.arg(desc.qulVersion, legacyVersion)
|
||||||
: McuTarget::tr("Unsupported version \"%1\".").arg(desc.qulVersion);
|
: Tr::tr("Unsupported version \"%1\".").arg(desc.qulVersion);
|
||||||
printMessage(McuTarget::tr("Skipped %1. %2 Qt for MCUs version >= %3 required.")
|
printMessage(Tr::tr("Skipped %1. %2 Qt for MCUs version >= %3 required.")
|
||||||
.arg(QDir::toNativeSeparators(filePath.fileNameWithPathComponents(1)),
|
.arg(QDir::toNativeSeparators(filePath.fileNameWithPathComponents(1)),
|
||||||
qtcSupportText,
|
qtcSupportText,
|
||||||
McuSupportOptions::minimalQulVersion().toString()),
|
McuSupportOptions::minimalQulVersion().toString()),
|
||||||
@@ -838,7 +838,7 @@ McuSdkRepository targetsAndPackages(const McuPackagePtr &qtForMCUsPackage,
|
|||||||
// No valid description means invalid or old SDK installation.
|
// No valid description means invalid or old SDK installation.
|
||||||
if (descriptions.empty()) {
|
if (descriptions.empty()) {
|
||||||
if (kitsPath(qtForMCUSdkPath).exists()) {
|
if (kitsPath(qtForMCUSdkPath).exists()) {
|
||||||
printMessage(McuTarget::tr("No valid kit descriptions found at %1.")
|
printMessage(Tr::tr("No valid kit descriptions found at %1.")
|
||||||
.arg(kitsPath(qtForMCUSdkPath).toUserOutput()),
|
.arg(kitsPath(qtForMCUSdkPath).toUserOutput()),
|
||||||
true);
|
true);
|
||||||
return McuSdkRepository{};
|
return McuSdkRepository{};
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2022 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mcutarget.h"
|
|
||||||
#include "mcukitmanager.h"
|
#include "mcukitmanager.h"
|
||||||
#include "mcupackage.h"
|
#include "mcupackage.h"
|
||||||
#include "mcusupportplugin.h"
|
#include "mcusupportplugin.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
|
#include "mcutarget.h"
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
|
||||||
@@ -86,13 +87,13 @@ void McuTarget::printPackageProblems() const
|
|||||||
for (auto package : packages()) {
|
for (auto package : packages()) {
|
||||||
package->updateStatus();
|
package->updateStatus();
|
||||||
if (!package->isValidStatus())
|
if (!package->isValidStatus())
|
||||||
printMessage(tr("Error creating kit for target %1, package %2: %3")
|
printMessage(Tr::tr("Error creating kit for target %1, package %2: %3")
|
||||||
.arg(McuKitManager::generateKitNameFromTarget(this),
|
.arg(McuKitManager::generateKitNameFromTarget(this),
|
||||||
package->label(),
|
package->label(),
|
||||||
package->statusText()),
|
package->statusText()),
|
||||||
true);
|
true);
|
||||||
if (package->status() == McuAbstractPackage::Status::ValidPackageMismatchedVersion)
|
if (package->status() == McuAbstractPackage::Status::ValidPackageMismatchedVersion)
|
||||||
printMessage(tr("Warning creating kit for target %1, package %2: %3")
|
printMessage(Tr::tr("Warning creating kit for target %1, package %2: %3")
|
||||||
.arg(McuKitManager::generateKitNameFromTarget(this),
|
.arg(McuKitManager::generateKitNameFromTarget(this),
|
||||||
package->label(),
|
package->label(),
|
||||||
package->statusText()),
|
package->statusText()),
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2022 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "mcutargetfactory.h"
|
|
||||||
#include "mcuhelpers.h"
|
#include "mcuhelpers.h"
|
||||||
#include "mcupackage.h"
|
#include "mcupackage.h"
|
||||||
#include "mcusupport_global.h"
|
#include "mcusupport_global.h"
|
||||||
#include "mcusupportplugin.h"
|
#include "mcusupportplugin.h"
|
||||||
|
#include "mcusupporttr.h"
|
||||||
#include "mcusupportversiondetection.h"
|
#include "mcusupportversiondetection.h"
|
||||||
#include "mcutarget.h"
|
#include "mcutarget.h"
|
||||||
#include "mcutargetdescription.h"
|
#include "mcutargetdescription.h"
|
||||||
|
#include "mcutargetfactory.h"
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -178,24 +179,24 @@ McuToolChainPackage *McuTargetFactory::createToolchain(
|
|||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
|
|
||||||
if (toolchain.id.isEmpty()) {
|
if (toolchain.id.isEmpty()) {
|
||||||
errorMessage = McuPackage::tr("the toolchain.id JSON entry is empty");
|
errorMessage = Tr::tr("the toolchain.id JSON entry is empty");
|
||||||
} else if (!toolchainTypeMapping.contains(toolchain.id)) {
|
} else if (!toolchainTypeMapping.contains(toolchain.id)) {
|
||||||
errorMessage = McuPackage::tr("the given toolchain \"%1\" is not supported").arg(toolchain.id);
|
errorMessage = Tr::tr("the given toolchain \"%1\" is not supported").arg(toolchain.id);
|
||||||
} else if (toolchain.compiler.cmakeVar.isEmpty()) {
|
} else if (toolchain.compiler.cmakeVar.isEmpty()) {
|
||||||
errorMessage = McuPackage::tr("the toolchain.compiler.cmakeVar JSON entry is empty");
|
errorMessage = Tr::tr("the toolchain.compiler.cmakeVar JSON entry is empty");
|
||||||
} else if (toolchain.file.cmakeVar.isEmpty()) {
|
} else if (toolchain.file.cmakeVar.isEmpty()) {
|
||||||
errorMessage = McuPackage::tr("the toolchain.file.cmakeVar JSON entry is empty");
|
errorMessage = Tr::tr("the toolchain.file.cmakeVar JSON entry is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
toolchainType = McuToolChainPackage::ToolChainType::Unsupported;
|
toolchainType = McuToolChainPackage::ToolChainType::Unsupported;
|
||||||
|
|
||||||
if (toolchain.id.isEmpty()) {
|
if (toolchain.id.isEmpty()) {
|
||||||
printMessage(McuPackage::tr("Toolchain is invalid because %2 in file \"%3\".")
|
printMessage(Tr::tr("Toolchain is invalid because %2 in file \"%3\".")
|
||||||
.arg(errorMessage).arg(sourceFile.toUserOutput()),
|
.arg(errorMessage).arg(sourceFile.toUserOutput()),
|
||||||
true);
|
true);
|
||||||
} else {
|
} else {
|
||||||
printMessage(McuPackage::tr("Toolchain description for \"%1\" is invalid because %2 in file \"%3\".")
|
printMessage(Tr::tr("Toolchain description for \"%1\" is invalid because %2 in file \"%3\".")
|
||||||
.arg(toolchain.id).arg(errorMessage).arg(sourceFile.toUserOutput()),
|
.arg(toolchain.id).arg(errorMessage).arg(sourceFile.toUserOutput()),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user