ClangCodeModel: Tr::tr

Change-Id: I60aeadd38471cc65de250f66f0f09ba2931b3da2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-19 09:51:10 +01:00
parent 0454e939e1
commit 117b6f1921
22 changed files with 139 additions and 284 deletions

View File

@@ -56017,7 +56017,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsPropertiesPage</name>
<name>::ClangCodeModel</name>
<message>
<source>Pre-compiled headers:</source>
<translation>Předpřeložené hlavičky:</translation>
@@ -56427,30 +56427,21 @@ Vytvořte, prosím, aplikaci qmldump na stránce pro nastavení verze Qt.</trans
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<name>::ClangCodeModel</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Umístění: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangIndexer</name>
<message>
<source>C++ Indexing</source>
<translation>Indexování C++</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
<translation>Clang</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Clang Settings</source>
<translation>Nastavení pro Clang</translation>
@@ -56463,9 +56454,6 @@ Vytvořte, prosím, aplikaci qmldump na stránce pro nastavení verze Qt.</trans
<source>All Files (*)</source>
<translation>Všechny soubory (*)</translation>
</message>
</context>
<context>
<name>ClangCodeModel::CompletionProposalsBuilder</name>
<message>
<source>Is deprecated</source>
<extracomment>deprecated C++ symbol</extracomment>
@@ -56479,9 +56467,6 @@ Vytvořte, prosím, aplikaci qmldump na stránce pro nastavení verze Qt.</trans
<source>Signal of %1, returns %2</source>
<translation>Signál: %1, vrací %2</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Diagnostic</name>
<message>
<source>ignored</source>
<translation>Přehlíženo</translation>
@@ -56502,9 +56487,6 @@ Vytvořte, prosím, aplikaci qmldump na stránce pro nastavení verze Qt.</trans
<source>fatal</source>
<translation>Selhání</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::PchManager</name>
<message>
<source>Successfully generated PCH file &quot;%1&quot;.</source>
<translation>Soubor PCH &quot;%1&quot; byl úspěšně vytvořen.</translation>

View File

@@ -4589,7 +4589,7 @@ F.eks., vil &quot;Revision: 15&quot; efterlade grenen ved revision 15.</translat
</message>
</context>
<context>
<name>Clang Code Model Marks</name>
<name>::ClangCodeModel</name>
<message>
<source>Code Model Warning</source>
<translation>Kodemodel advarsel</translation>
@@ -4598,9 +4598,6 @@ F.eks., vil &quot;Revision: 15&quot; efterlade grenen ved revision 15.</translat
<source>Code Model Error</source>
<translation>Kodemodel fejl</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::BackendCommunicator</name>
<message>
<source>Clang Code Model: Error: The clangbackend executable &quot;%1&quot; does not exist.</source>
<translation>Clang-kodemodel: Fejl: clangbackend-eksekverbaren &quot;%1&quot; findes ikke.</translation>
@@ -4613,24 +4610,15 @@ F.eks., vil &quot;Revision: 15&quot; efterlade grenen ved revision 15.</translat
<source>Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.</source>
<translation>Clang-kodemodel: Fejl: clangbackend-processen har afsluttet uventet og blev genstartet.</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Placering: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangDiagnosticManager</name>
<message>
<source>Inspect available fixits</source>
<translation>Inspicer tilgængelige fixits</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Clang Code Model</source>
<translation>Clang-kodemodel</translation>
@@ -4653,9 +4641,6 @@ Men brug af de afslappede og udvidet regler betyder også at der ikke kan levere
<source>Enable MSVC-compliant template parsing</source>
<translation>Aktivér MSVC-kompatibel skabelon-parsing</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
@@ -40296,14 +40281,7 @@ Spordataene er tabt.</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<message>
<source>Clang Code Model</source>
<translation>Clang-kodemodel</translation>
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>Clazy Issue</source>
<translation>Clazy-problemstilling</translation>

View File

@@ -41357,7 +41357,7 @@ Are you sure?</source>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<name>::ClangCodeModel</name>
<message>
<source>Generating Compilation DB</source>
<translation>Erzeuge Kompilierungsdatenbank</translation>
@@ -41382,9 +41382,6 @@ Are you sure?</source>
<source>Generating Clang compilation database failed: %1</source>
<translation>Erzeugen der Clang-Kompilierungsdatenbank fehlgeschlagen: %1</translation>
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<message>
<source>Clazy Issue</source>
<translation>Clang-Problem</translation>
@@ -41397,9 +41394,6 @@ Are you sure?</source>
<source>[Source: %1]</source>
<translation>[Quelle: %1]</translation>
</message>
</context>
<context>
<name>::ClangCodeModel</name>
<message>
<source>Component</source>
<translation>Komponente</translation>
@@ -50904,7 +50898,7 @@ in &quot;%2&quot; aus.
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangdClient</name>
<name>::ClangCodeModel</name>
<message>
<source>clangd</source>
<translation>clangd</translation>
@@ -50934,9 +50928,6 @@ in &quot;%2&quot; aus.
<source>&lt;base declaration&gt;</source>
<translation>&lt;Basisdeklaration&gt;</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangdFindReferences</name>
<message>
<source>C++ Usages:</source>
<translation>C++ Referenzen:</translation>
@@ -50954,9 +50945,6 @@ in &quot;%2&quot; aus.
<translation>Dateien:
%1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangModelManagerSupport</name>
<message>
<source>The use of clangd for the C/C++ code model was disabled, because it is likely that its memory requirements would be higher than what your system can handle.</source>
<translation>Clangd wurde für das C/C++-Codemodell deaktiviert, da dessen Speicheranforderung wahrscheinlich die Leistungsfähigkeit Ihres Systems übersteigt.</translation>
@@ -50975,9 +50963,6 @@ in &quot;%2&quot; aus.
<translation>Kann Clangd nicht nutzen: Erstellen der Kompilierungsdatenbank fehlgeschlagen:
%1</translation>
</message>
</context>
<context>
<name>ClangdTextMark</name>
<message>
<source>Code Model Error</source>
<translation>Codemodell-Fehler</translation>

View File

@@ -1718,7 +1718,7 @@ Na primjer, „Revizija: 15” će ostaviti granu na reviziji 15.</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>Global</source>
<translation>Globalno</translation>
@@ -15934,14 +15934,11 @@ Check the test environment.</source>
</message>
</context>
<context>
<name>ClangCodeModel::ClangAssistProposalItem</name>
<name>::ClangCodeModel</name>
<message>
<source>Requires changing &quot;%1&quot; to &quot;%2&quot;</source>
<translation>Zahtijeva mijenjanje &quot;%1&quot; u &quot;%2&quot;</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::BackendCommunicator</name>
<message>
<source>Clang Code Model: Error: The clangbackend executable &quot;%1&quot; does not exist.</source>
<translation type="unfinished"></translation>
@@ -15954,13 +15951,6 @@ Check the test environment.</source>
<source>Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<message>
<source>Clang Code Model</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Generate Compilation Database</source>
<translation type="unfinished"></translation>
@@ -15969,17 +15959,11 @@ Check the test environment.</source>
<source>Generate Compilation Database for &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Mjesto: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangDiagnosticManager</name>
<message>
<source>Inspect available fixits</source>
<translation type="unfinished"></translation>
@@ -15993,15 +15977,12 @@ Check the test environment.</source>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<name>::ClangCodeModel</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
<translation>Clang</translation>
</message>
</context>
<context>
<name>::ClangCodeModel</name>
<message>
<source>&lt;No Symbols&gt;</source>
<translation>&lt;Bez simbola&gt;</translation>
@@ -16023,7 +16004,7 @@ Check the test environment.</source>
</message>
</context>
<context>
<name>Clang Code Model Marks</name>
<name>::ClangCodeModel</name>
<message>
<source>Code Model Warning</source>
<translation>Code Model upozorenje</translation>
@@ -16032,9 +16013,6 @@ Check the test environment.</source>
<source>Code Model Error</source>
<translation>Code Model greška</translation>
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<message>
<source>Clazy Issue</source>
<translation>Clazy problem</translation>

View File

@@ -32208,15 +32208,12 @@ Qt バージョンオプションページで qmldump アプリケーション
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<name>::ClangCodeModel</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
@@ -34094,7 +34091,7 @@ Android 5 ではローカルの Qt ライブラリをデプロイできません
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>Warnings</source>
<translation></translation>
@@ -42276,7 +42273,7 @@ Android パッケージソースディレクトリのファイルはビルドデ
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangDiagnosticManager</name>
<name>::ClangCodeModel</name>
<message>
<source>Inspect available fixits</source>
<translation></translation>
@@ -45186,14 +45183,11 @@ The name of the release build configuration created by default for a qmake proje
</message>
</context>
<context>
<name>ClangCodeModel::ClangAssistProposalItem</name>
<name>::ClangCodeModel</name>
<message>
<source>Requires changing &quot;%1&quot; to &quot;%2&quot;</source>
<translation>&quot;%1&quot;&quot;%2 &quot;</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::BackendCommunicator</name>
<message>
<source>Clang Code Model: Error: The clangbackend executable &quot;%1&quot; does not exist.</source>
<translation>Clang コードモデル: エラー: clangbackend &quot;%1&quot; </translation>
@@ -45206,17 +45200,10 @@ The name of the release build configuration created by default for a qmake proje
<source>Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.</source>
<translation>Clang コードモデル: エラー: clangbackend </translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<message>
<source>Generating Compilation DB</source>
<translation> DB </translation>
</message>
<message>
<source>Clang Code Model</source>
<translation>Clang </translation>
</message>
<message>
<source>Generate Compilation Database</source>
<translation> DB </translation>
@@ -45268,7 +45255,7 @@ The name of the release build configuration created by default for a qmake proje
</message>
</context>
<context>
<name>Clang Code Model Marks</name>
<name>::ClangCodeModel</name>
<message>
<source>Code Model Warning</source>
<translation></translation>
@@ -45298,7 +45285,7 @@ The name of the release build configuration created by default for a qmake proje
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>Clazy Issue</source>
<translation>Clazy </translation>

View File

@@ -27356,23 +27356,17 @@ Zbuduj aplikację qmldump na stronie z opcjami wersji Qt.</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<name>::ClangCodeModel</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Położenie: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
<translation>Clang</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Warnings</source>
<translation>Ostrzeżenia</translation>
@@ -36832,7 +36826,7 @@ po naciśnięciu klawisza backspace</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangDiagnosticManager</name>
<name>::ClangCodeModel</name>
<message>
<source>Inspect available fixits</source>
<translation type="unfinished"></translation>
@@ -37869,7 +37863,7 @@ Uwaga: podczas używania zwykłego formatu tekstowego może brakować niektóryc
</message>
</context>
<context>
<name>ClangCodeModel::Internal::IpcCommunicator</name>
<name>::ClangCodeModel</name>
<message>
<source>Clang Code Model: Error: The clangbackend executable &quot;%1&quot; does not exist.</source>
<translation>Model kodu Clang: Błąd: Plik wykonywalny &quot;%1&quot; clangbackendu nie istnieje.</translation>
@@ -37882,9 +37876,6 @@ Uwaga: podczas używania zwykłego formatu tekstowego może brakować niektóryc
<source>Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.</source>
<translation>Model kodu Clang: Błąd: Proces clangbackend nieoczekiwanie zakończony i zrestartowany.</translation>
</message>
</context>
<context>
<name>Clang Code Model Marks</name>
<message>
<source>Code Model Warning</source>
<translation>Ostrzeżenie modelu kodu</translation>

View File

@@ -6318,7 +6318,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
</message>
</context>
<context>
<name>Clang Code Model Marks</name>
<name>::ClangCodeModel</name>
<message>
<source>Code Model Warning</source>
<translation>Предупреждение модели кода</translation>
@@ -6327,9 +6327,6 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<source>Code Model Error</source>
<translation>Ошибка модели кода</translation>
</message>
</context>
<context>
<name>::ClangCodeModel</name>
<message>
<source>&lt;No Symbols&gt;</source>
<translation>&lt;Нет символов&gt;</translation>
@@ -6338,16 +6335,10 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<source>&lt;Select Symbol&gt;</source>
<translation>&lt;Выберите символ&gt;</translation>
</message>
</context>
<context>
<name>ClangCodeModel::ClangAssistProposalItem</name>
<message>
<source>Requires changing &quot;%1&quot; to &quot;%2&quot;</source>
<translation>Требует изменить «%1» на «%2»</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::BackendCommunicator</name>
<message>
<source>Clang Code Model: Error: The clangbackend executable &quot;%1&quot; does not exist.</source>
<translation>Модель кода Clang: Ошибка: Программа clangbackend «%1» отсутствует.</translation>
@@ -6360,9 +6351,6 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<source>Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted.</source>
<translation>Модель кода Clang: Ошибка: Программа clangbackend неожиданно завершилась и была перезапущена.</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<message>
<source>Generating Compilation DB</source>
<translation>Создание БД компиляции</translation>
@@ -6387,28 +6375,15 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<source>Generating Clang compilation database failed: %1</source>
<translation>Clang: не удалось создать БД компиляции: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Находится в %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangDiagnosticManager</name>
<message>
<source>Inspect available fixits</source>
<translation>Проверить доступные запросы на исправление</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Clang Code Model</source>
<translation>Модель кода Clang</translation>
</message>
<message>
<source>Parse templates in a MSVC-compliant way. This helps to parse headers for example from Active Template Library (ATL) or Windows Runtime Library (WRL).
However, using the relaxed and extended rules means also that no highlighting/completion can be provided within template functions.</source>
@@ -6431,9 +6406,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>&lt;a href=&quot;target&quot;&gt;Open Global Settings&lt;/a&gt;</source>
<translation>&lt;a href=&quot;target&quot;&gt;Открыть глобальные настройки&lt;/a&gt;</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
@@ -6475,7 +6447,7 @@ However, using the relaxed and extended rules means also that no highlighting/co
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>Clazy Issue</source>
<translation>Проблема Clazy</translation>

View File

@@ -35284,7 +35284,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsPropertiesPage</name>
<name>::ClangCodeModel</name>
<message>
<source>Pre-compiled headers:</source>
<translation type="vanished">Попередньо скомпільовані заголовки:</translation>
@@ -35721,15 +35721,12 @@ Please build the qmldump application on the Qt version options page.</source>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCompletionAssistProcessor</name>
<name>::ClangCodeModel</name>
<message>
<source>Location: %1</source>
<extracomment>Parent folder for proposed #include completion</extracomment>
<translation>Розташування: %1</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangIndexer</name>
<message>
<source>C++ Indexing</source>
<translation type="vanished">Індексування C++</translation>
@@ -35738,17 +35735,11 @@ Please build the qmldump application on the Qt version options page.</source>
<source>Parsing C/C++/ObjC Files</source>
<translation type="vanished">Розбір файлів C/C++/ObjC</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
<extracomment>Display name</extracomment>
<translation>Clang</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Clang Settings</source>
<translation type="vanished">Налаштування Clang</translation>
@@ -35773,9 +35764,6 @@ Please build the qmldump application on the Qt version options page.</source>
<source>Global setting (%1)</source>
<translation>Глобальні налаштування (%1)</translation>
</message>
</context>
<context>
<name>ClangCodeModel::CompletionProposalsBuilder</name>
<message>
<source>Is deprecated</source>
<extracomment>deprecated C++ symbol</extracomment>
@@ -35789,9 +35777,6 @@ Please build the qmldump application on the Qt version options page.</source>
<source>Signal of %1, returns %2</source>
<translation type="vanished">Сигнал %1, повертає %2</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Diagnostic</name>
<message>
<source>ignored</source>
<translation type="vanished">проігноровано</translation>
@@ -35812,9 +35797,6 @@ Please build the qmldump application on the Qt version options page.</source>
<source>fatal</source>
<translation type="vanished">фатальне</translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::PchManager</name>
<message>
<source>Successfully generated PCH file &quot;%1&quot;.</source>
<translation type="vanished">Файл PCH &quot;%1&quot; було успішно створено.</translation>

View File

@@ -6829,9 +6829,6 @@ Make sure that CMAKE_BUILD_TYPE variable matches the &quot;Build type&quot; fiel
<source>Update</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangCodeModelPlugin</name>
<message>
<source>Generating Compilation DB</source>
<translation type="unfinished"></translation>
@@ -6856,9 +6853,6 @@ Make sure that CMAKE_BUILD_TYPE variable matches the &quot;Build type&quot; fiel
<source>Generating Clang compilation database failed: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangModelManagerSupport</name>
<message>
<source>The use of clangd for the C/C++ code model was disabled, because it is likely that its memory requirements would be higher than what your system can handle.</source>
<translation type="unfinished"></translation>
@@ -6876,9 +6870,6 @@ Make sure that CMAKE_BUILD_TYPE variable matches the &quot;Build type&quot; fiel
%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
<message>
<source>Parse templates in a MSVC-compliant way. This helps to parse headers for example from Active Template Library (ATL) or Windows Runtime Library (WRL).
However, using the relaxed and extended rules means also that no highlighting/completion can be provided within template functions.</source>
@@ -6888,9 +6879,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>Enable MSVC-compliant template parsing</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangdClient</name>
<message>
<source>clangd</source>
<translation type="unfinished"></translation>
@@ -6920,9 +6908,6 @@ However, using the relaxed and extended rules means also that no highlighting/co
<source>&lt;base declaration&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ClangCodeModel::Internal::ClangdFindReferences</name>
<message>
<source>C++ Usages:</source>
<translation type="unfinished">C++ 使:</translation>
@@ -6966,7 +6951,7 @@ However, using the relaxed and extended rules means also that no highlighting/co
</message>
</context>
<context>
<name>ClangDiagnosticWidget</name>
<name>::ClangCodeModel</name>
<message>
<source>[Source: %1]</source>
<translation type="unfinished"></translation>
@@ -7739,7 +7724,7 @@ Set a valid executable first.</source>
</message>
</context>
<context>
<name>ClangdTextMark</name>
<name>::ClangCodeModel</name>
<message>
<source>Code Model Error</source>
<translation type="unfinished"></translation>

View File

@@ -3,6 +3,7 @@
#include "clangcodemodelplugin.h"
#include "clangcodemodeltr.h"
#include "clangconstants.h"
#include "clangmodelmanagersupport.h"
#include "clangutils.h"
@@ -38,6 +39,8 @@
#include <utils/runextensions.h>
#include <utils/temporarydirectory.h>
using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace ClangCodeModel {
@@ -47,7 +50,7 @@ void ClangCodeModelPlugin::generateCompilationDB()
{
using namespace CppEditor;
ProjectExplorer::Target *target = ProjectExplorer::SessionManager::startupTarget();
Target *target = SessionManager::startupTarget();
if (!target)
return;
@@ -64,7 +67,7 @@ void ClangCodeModelPlugin::generateCompilationDB()
warningsConfigForProject(target->project()),
globalClangOptions(),
FilePath());
Core::ProgressManager::addTask(task, tr("Generating Compilation DB"), "generate compilation db");
ProgressManager::addTask(task, Tr::tr("Generating Compilation DB"), "generate compilation db");
m_generatorWatcher.setFuture(task);
}
@@ -78,11 +81,11 @@ bool ClangCodeModelPlugin::initialize(const QStringList &arguments, QString *err
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
ProjectExplorer::TaskHub::addCategory(Constants::TASK_CATEGORY_DIAGNOSTICS,
tr("Clang Code Model"));
TaskHub::addCategory(Constants::TASK_CATEGORY_DIAGNOSTICS,
Tr::tr("Clang Code Model"));
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
&ProjectExplorer::ProjectExplorerPlugin::finishedInitialization,
connect(ProjectExplorerPlugin::instance(),
&ProjectExplorerPlugin::finishedInitialization,
this,
&ClangCodeModelPlugin::maybeHandleBatchFileAndExit);
@@ -98,15 +101,15 @@ void ClangCodeModelPlugin::createCompilationDBAction()
{
// generate compile_commands.json
m_generateCompilationDBAction = new ParameterAction(
tr("Generate Compilation Database"),
tr("Generate Compilation Database for \"%1\""),
Tr::tr("Generate Compilation Database"),
Tr::tr("Generate Compilation Database for \"%1\""),
ParameterAction::AlwaysEnabled, this);
ProjectExplorer::Project *startupProject = ProjectExplorer::SessionManager::startupProject();
Project *startupProject = SessionManager::startupProject();
if (startupProject)
m_generateCompilationDBAction->setParameter(startupProject->displayName());
Core::Command *command = Core::ActionManager::registerAction(m_generateCompilationDBAction,
Command *command = ActionManager::registerAction(m_generateCompilationDBAction,
Constants::GENERATE_COMPILATION_DB);
command->setAttribute(Core::Command::CA_UpdateText);
command->setAttribute(Command::CA_UpdateText);
command->setDescription(m_generateCompilationDBAction->text());
connect(&m_generatorWatcher, &QFutureWatcher<GenerateCompilationDbResult>::finished,
@@ -114,31 +117,30 @@ void ClangCodeModelPlugin::createCompilationDBAction()
const GenerateCompilationDbResult result = m_generatorWatcher.result();
QString message;
if (result.error.isEmpty()) {
message = tr("Clang compilation database generated at \"%1\".")
message = Tr::tr("Clang compilation database generated at \"%1\".")
.arg(QDir::toNativeSeparators(result.filePath));
} else {
message = tr("Generating Clang compilation database failed: %1").arg(result.error);
message = Tr::tr("Generating Clang compilation database failed: %1").arg(result.error);
}
Core::MessageManager::writeFlashing(message);
MessageManager::writeFlashing(message);
m_generateCompilationDBAction->setEnabled(true);
});
connect(m_generateCompilationDBAction, &QAction::triggered, this, [this] {
if (!m_generateCompilationDBAction->isEnabled()) {
Core::MessageManager::writeDisrupting("Cannot generate compilation database: "
MessageManager::writeDisrupting("Cannot generate compilation database: "
"Generator is already running.");
return;
}
ProjectExplorer::Project * const project
= ProjectExplorer::SessionManager::startupProject();
Project * const project = SessionManager::startupProject();
if (!project) {
Core::MessageManager::writeDisrupting("Cannot generate compilation database: "
MessageManager::writeDisrupting("Cannot generate compilation database: "
"No active project.");
return;
}
const CppEditor::ProjectInfo::ConstPtr projectInfo = CppEditor::CppModelManager::instance()
->projectInfo(project);
if (!projectInfo || projectInfo->projectParts().isEmpty()) {
Core::MessageManager::writeDisrupting("Cannot generate compilation database: "
MessageManager::writeDisrupting("Cannot generate compilation database: "
"Project has no C/C++ project parts.");
return;
}
@@ -146,28 +148,23 @@ void ClangCodeModelPlugin::createCompilationDBAction()
generateCompilationDB();
});
connect(CppEditor::CppModelManager::instance(), &CppEditor::CppModelManager::projectPartsUpdated,
this, [this](ProjectExplorer::Project *project) {
if (project != ProjectExplorer::SessionManager::startupProject())
this, [this](Project *project) {
if (project != SessionManager::startupProject())
return;
m_generateCompilationDBAction->setParameter(project->displayName());
});
connect(ProjectExplorer::SessionManager::instance(),
&ProjectExplorer::SessionManager::startupProjectChanged,
this,
[this](ProjectExplorer::Project *project) {
connect(SessionManager::instance(), &SessionManager::startupProjectChanged,
this, [this](Project *project) {
m_generateCompilationDBAction->setParameter(project ? project->displayName() : "");
});
connect(ProjectExplorer::SessionManager::instance(),
&ProjectExplorer::SessionManager::projectDisplayNameChanged,
this,
[this](ProjectExplorer::Project *project) {
if (project != ProjectExplorer::SessionManager::startupProject())
connect(SessionManager::instance(), &SessionManager::projectDisplayNameChanged,
this, [this](Project *project) {
if (project != SessionManager::startupProject())
return;
m_generateCompilationDBAction->setParameter(project->displayName());
});
connect(ProjectExplorer::SessionManager::instance(),
&ProjectExplorer::SessionManager::projectAdded, this,
[this](ProjectExplorer::Project *project) {
connect(SessionManager::instance(), &SessionManager::projectAdded,
this, [this](Project *project) {
project->registerGenerator(Constants::GENERATE_COMPILATION_DB,
m_generateCompilationDBAction->text(),
[this] { m_generateCompilationDBAction->trigger(); });

View File

@@ -3,6 +3,7 @@
#include "clangdclient.h"
#include "clangcodemodeltr.h"
#include "clangconstants.h"
#include "clangdast.h"
#include "clangdcompletion.h"
@@ -359,7 +360,7 @@ static void addCompilationDb(QJsonObject &parentObject, const QJsonObject &cdb)
ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir, const Id &id)
: Client(clientInterface(project, jsonDbDir), id), d(new Private(this, project))
{
setName(tr("clangd"));
setName(Tr::tr("clangd"));
LanguageFilter langFilter;
langFilter.mimeTypes = QStringList{"text/x-chdr", "text/x-csrc",
"text/x-c++hdr", "text/x-c++src", "text/x-objc++src", "text/x-objcsrc"};
@@ -415,8 +416,8 @@ ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir, c
setLocatorsEnabled(false);
setAutoRequestCodeActions(false); // clangd sends code actions inside diagnostics
progressManager()->setTitleForToken(indexingToken(),
project ? tr("Indexing %1 with clangd").arg(project->displayName())
: tr("Indexing session with clangd"));
project ? Tr::tr("Indexing %1 with clangd").arg(project->displayName())
: Tr::tr("Indexing session with clangd"));
progressManager()->setClickHandlerForToken(indexingToken(), [] {
// don't directly open modal dialog from click handler, because that would mess
// up the stack
@@ -602,7 +603,7 @@ QTextCursor ClangdClient::adjustedCursorForHighlighting(const QTextCursor &curso
const LanguageClient::Client::CustomInspectorTabs ClangdClient::createCustomInspectorTabs()
{
return {{new ClangdMemoryUsageWidget(this), tr("Memory Usage")}};
return {{new ClangdMemoryUsageWidget(this), Tr::tr("Memory Usage")}};
}
class ClangdDiagnosticManager : public LanguageClient::DiagnosticManager

View File

@@ -3,6 +3,7 @@
#include "clangdcompletion.h"
#include "clangcodemodeltr.h"
#include "clangcompletioncontextanalyzer.h"
#include "clangdclient.h"
#include "clangpreprocessorassistproposalitem.h"
@@ -18,12 +19,16 @@
#include <cppeditor/projectpart.h>
#include <cplusplus/Icons.h>
#include <cplusplus/MatchingText.h>
#include <languageclient/languageclientfunctionhint.h>
#include <projectexplorer/headerpath.h>
#include <texteditor/codeassist/assistinterface.h>
#include <texteditor/codeassist/genericproposal.h>
#include <texteditor/codeassist/genericproposalmodel.h>
#include <texteditor/texteditorsettings.h>
#include <utils/utilsicons.h>
using namespace CppEditor;
@@ -35,10 +40,12 @@ using namespace TextEditor;
using namespace Utils;
namespace ClangCodeModel::Internal {
static Q_LOGGING_CATEGORY(clangdLogCompletion, "qtc.clangcodemodel.clangd.completion",
QtWarningMsg);
enum class CustomAssistMode { Doxygen, Preprocessor, IncludePath };
class CustomAssistProcessor : public IAssistProcessor
{
public:
@@ -532,7 +539,7 @@ QList<AssistProposalItemInterface *> CustomAssistProcessor::completeIncludePath(
QList<AssistProposalItemInterface *> completions;
QDirIterator i(realPath, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
//: Parent folder for proposed #include completion
const QString hint = ClangdClient::tr("Location: %1")
const QString hint = Tr::tr("Location: %1")
.arg(QDir::toNativeSeparators(QDir::cleanPath(realPath)));
while (i.hasNext()) {
const QString fileName = i.next();

View File

@@ -3,24 +3,29 @@
#include "clangdfindreferences.h"
#include "clangcodemodeltr.h"
#include "clangdast.h"
#include "clangdclient.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/searchresultwindow.h>
#include <cplusplus/FindUsages.h>
#include <cppeditor/cppcodemodelsettings.h>
#include <cppeditor/cppfindreferences.h>
#include <cppeditor/cpptoolsreuse.h>
#include <languageclient/languageclientsymbolsupport.h>
#include <languageserverprotocol/lsptypes.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/session.h>
#include <texteditor/basefilefind.h>
#include <utils/filepath.h>
#include <QCheckBox>
#include <QFile>
@@ -119,7 +124,7 @@ ClangdFindReferences::ClangdFindReferences(ClangdClient *client, TextDocument *d
}
d->search = SearchResultWindow::instance()->startNewSearch(
tr("C++ Usages:"),
Tr::tr("C++ Usages:"),
{},
searchTerm,
replacement ? SearchResultWindow::SearchAndReplace : SearchResultWindow::SearchOnly,
@@ -354,10 +359,10 @@ void ClangdFindReferences::Private::finishSearch()
search->additionalReplaceWidget());
QTC_CHECK(renameCheckBox);
const QSet<Utils::FilePath> files = replacementData->fileRenameCandidates;
renameCheckBox->setText(tr("Re&name %n files", nullptr, files.size()));
renameCheckBox->setText(Tr::tr("Re&name %n files", nullptr, files.size()));
const QStringList filesForUser = Utils::transform<QStringList>(files,
[](const Utils::FilePath &fp) { return fp.toUserOutput(); });
renameCheckBox->setToolTip(tr("Files:\n%1").arg(filesForUser.join('\n')));
renameCheckBox->setToolTip(Tr::tr("Files:\n%1").arg(filesForUser.join('\n')));
renameCheckBox->setVisible(true);
search->setUserData(QVariant::fromValue(*replacementData));
}

View File

@@ -3,15 +3,18 @@
#include "clangdfollowsymbol.h"
#include "clangcodemodeltr.h"
#include "clangdast.h"
#include "clangdclient.h"
#include <cppeditor/cppeditorwidget.h>
#include <cppeditor/cppvirtualfunctionassistprovider.h>
#include <cppeditor/cppvirtualfunctionproposalitem.h>
#include <languageclient/languageclientsymbolsupport.h>
#include <languageserverprotocol/lsptypes.h>
#include <languageserverprotocol/jsonrpcmessages.h>
#include <texteditor/codeassist/assistinterface.h>
#include <texteditor/codeassist/iassistprocessor.h>
#include <texteditor/codeassist/iassistprovider.h>
@@ -26,6 +29,7 @@ using namespace TextEditor;
using namespace Utils;
namespace ClangCodeModel::Internal {
using SymbolData = QPair<QString, Link>;
using SymbolDataList = QList<SymbolData>;
@@ -318,7 +322,7 @@ ClangdFollowSymbol::VirtualFunctionAssistProcessor::createProposal(bool final) c
items << createEntry({}, m_followSymbol->d->defLink);
if (!final) {
const auto infoItem = new VirtualFunctionProposalItem({}, false);
infoItem->setText(ClangdClient::tr("collecting overrides ..."));
infoItem->setText(Tr::tr("collecting overrides ..."));
infoItem->setOrder(-1);
items << infoItem;
}
@@ -336,7 +340,7 @@ ClangdFollowSymbol::VirtualFunctionAssistProcessor::createEntry(const QString &n
if (link == m_followSymbol->d->defLink) {
item->setOrder(1000); // Ensure base declaration is on top.
if (text.isEmpty()) {
text = ClangdClient::tr("<base declaration>");
text = Tr::tr("<base declaration>");
} else if (m_followSymbol->d->defLinkNode.isPureVirtualDeclaration()
|| m_followSymbol->d->defLinkNode.isPureVirtualDefinition()) {
text += " = 0";

View File

@@ -3,6 +3,7 @@
#include "clangdiagnostictooltipwidget.h"
#include "clangcodemodeltr.h"
#include "clangfixitoperation.h"
#include "clangutils.h"
@@ -132,8 +133,7 @@ public:
if (!source.isEmpty()) {
text.append(QString::fromUtf8("<tr><td colspan='2' align='left'>"
"<font color='gray'>%1</font></td></tr>")
.arg(QCoreApplication::translate("ClangDiagnosticWidget",
"[Source: %1]").arg(source)));
.arg(Tr::tr("[Source: %1]").arg(source)));
}
text.append("</table>");

View File

@@ -199,7 +199,7 @@ ClangFunctionsFilter::ClangFunctionsFilter()
: ClangGlobalSymbolFilter(new CppFunctionsFilter, new LspFunctionsFilter)
{
setId(CppEditor::Constants::FUNCTIONS_FILTER_ID);
setDisplayName(QCoreApplication::translate(":CppEditor",
setDisplayName(QCoreApplication::translate("::CppEditor",
CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
setDefaultShortcutString("m");
setDefaultIncludedByDefault(false);

View File

@@ -3,9 +3,11 @@
#include "clangdmemoryusagewidget.h"
#include "clangcodemodeltr.h"
#include "clangdclient.h"
#include <languageserverprotocol/jsonobject.h>
#include <utils/itemviews.h>
#include <utils/treemodel.h>
@@ -52,7 +54,6 @@ private:
class MemoryTreeItem : public TreeItem
{
Q_DECLARE_TR_FUNCTIONS(ClangCodeModel)
public:
MemoryTreeItem(const QString &displayName, const MemoryTree &tree)
: m_displayName(displayName), m_bytesUsed(tree.total())
@@ -102,8 +103,7 @@ class MemoryTreeModel : public BaseTreeModel
public:
MemoryTreeModel()
{
setHeader({ClangdMemoryUsageWidget::tr("Component"),
ClangdMemoryUsageWidget::tr("Total Memory")});
setHeader({Tr::tr("Component"), Tr::tr("Total Memory")});
}
void update(const MemoryTree &tree)
@@ -154,7 +154,7 @@ void ClangdMemoryUsageWidget::Private::setupUi()
layout->addWidget(&view);
QObject::connect(&view, &QWidget::customContextMenuRequested, q, [this](const QPoint &pos) {
QMenu menu;
menu.addAction(tr("Update"), [this] { getMemoryTree(); });
menu.addAction(Tr::tr("Update"), [this] { getMemoryTree(); });
menu.exec(view.mapToGlobal(pos));
});
}

View File

@@ -3,15 +3,14 @@
#pragma once
#include <QCoreApplication>
#include <QWidget>
namespace ClangCodeModel::Internal {
class ClangdClient;
class ClangdMemoryUsageWidget : public QWidget
{
Q_DECLARE_TR_FUNCTIONS(::ClangCodeModel)
public:
explicit ClangdMemoryUsageWidget(ClangdClient *client);
~ClangdMemoryUsageWidget();
@@ -20,5 +19,5 @@ public:
Private * const d;
};
} // namespace ClangCodeModel::Internal
} // ClangCodeModel::Internal

View File

@@ -3,6 +3,7 @@
#include "clangmodelmanagersupport.h"
#include "clangcodemodeltr.h"
#include "clangconstants.h"
#include "clangdclient.h"
#include "clangdquickfixes.h"
@@ -54,8 +55,7 @@ using namespace CppEditor;
using namespace LanguageClient;
using namespace Utils;
namespace ClangCodeModel {
namespace Internal {
namespace ClangCodeModel::Internal {
static CppEditor::CppModelManager *cppModelManager()
{
@@ -97,7 +97,7 @@ static const QList<ProjectExplorer::Project *> projectsForClient(const Client *c
return projects;
}
static bool fileIsProjectBuildArtifact(const Client *client, const Utils::FilePath &filePath)
static bool fileIsProjectBuildArtifact(const Client *client, const FilePath &filePath)
{
for (const ProjectExplorer::Project * const p : projectsForClient(client)) {
if (const auto t = p->activeTarget()) {
@@ -110,7 +110,7 @@ static bool fileIsProjectBuildArtifact(const Client *client, const Utils::FilePa
return false;
}
static Client *clientForGeneratedFile(const Utils::FilePath &filePath)
static Client *clientForGeneratedFile(const FilePath &filePath)
{
for (Client * const client : LanguageClientManager::clients()) {
if (qobject_cast<ClangdClient *>(client) && client->reachable()
@@ -129,13 +129,13 @@ static void checkSystemForClangdSuitability()
return;
ClangdSettings::setUseClangdAndSave(false);
const QString warnStr = ClangModelManagerSupport::tr("The use of clangd for the C/C++ "
const QString warnStr = Tr::tr("The use of clangd for the C/C++ "
"code model was disabled, because it is likely that its memory requirements "
"would be higher than what your system can handle.");
const Utils::Id clangdWarningSetting("WarnAboutClangd");
Utils::InfoBarEntry info(clangdWarningSetting, warnStr);
const Id clangdWarningSetting("WarnAboutClangd");
InfoBarEntry info(clangdWarningSetting, warnStr);
info.setDetailsWidgetCreator([] {
const auto label = new QLabel(ClangModelManagerSupport::tr(
const auto label = new QLabel(Tr::tr(
"With clangd enabled, Qt Creator fully supports modern C++ "
"when highlighting code, completing symbols and so on.<br>"
"This comes at a higher cost in terms of CPU load and memory usage compared "
@@ -148,7 +148,7 @@ static void checkSystemForClangdSuitability()
});
return label;
});
info.addCustomButton(ClangModelManagerSupport::tr("Enable Anyway"), [clangdWarningSetting] {
info.addCustomButton(Tr::tr("Enable Anyway"), [clangdWarningSetting] {
ClangdSettings::setUseClangdAndSave(true);
Core::ICore::infoBar()->removeInfo(clangdWarningSetting);
});
@@ -162,7 +162,7 @@ static void updateParserConfig(ClangdClient *client)
if (const auto editor = TextEditor::BaseTextEditor::currentTextEditor()) {
if (!client->documentOpen(editor->textDocument()))
return;
const Utils::FilePath filePath = editor->textDocument()->filePath();
const FilePath filePath = editor->textDocument()->filePath();
if (const auto processor = ClangEditorDocumentProcessor::get(filePath))
client->updateParserConfig(filePath, processor->parserConfig());
}
@@ -257,7 +257,7 @@ ClangModelManagerSupport::~ClangModelManagerSupport()
}
void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &data,
const Utils::LinkHandler &processLinkCallback, bool resolveTarget,
const LinkHandler &processLinkCallback, bool resolveTarget,
bool inNextSplit)
{
if (ClangdClient * const client = clientForFile(data.filePath());
@@ -272,7 +272,7 @@ void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &dat
}
void ClangModelManagerSupport::followSymbolToType(const CppEditor::CursorInEditor &data,
const Utils::LinkHandler &processLinkCallback,
const LinkHandler &processLinkCallback,
bool inNextSplit)
{
if (ClangdClient * const client = clientForFile(data.filePath())) {
@@ -285,7 +285,7 @@ void ClangModelManagerSupport::followSymbolToType(const CppEditor::CursorInEdito
}
void ClangModelManagerSupport::switchDeclDef(const CppEditor::CursorInEditor &data,
const Utils::LinkHandler &processLinkCallback)
const LinkHandler &processLinkCallback)
{
if (ClangdClient * const client = clientForFile(data.filePath());
client && client->isFullyIndexed()) {
@@ -352,8 +352,8 @@ void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool
CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin);
}
void ClangModelManagerSupport::checkUnused(const Utils::Link &link, Core::SearchResult *search,
const Utils::LinkHandler &callback)
void ClangModelManagerSupport::checkUnused(const Link &link, Core::SearchResult *search,
const LinkHandler &callback)
{
if (const ProjectExplorer::Project * const project
= ProjectExplorer::SessionManager::projectForFile(link.targetFilePath)) {
@@ -377,7 +377,7 @@ CppEditor::BaseEditorDocumentProcessor *ClangModelManagerSupport::createEditorDo
TextEditor::TextDocument *baseTextDocument)
{
const auto processor = new ClangEditorDocumentProcessor(baseTextDocument);
const auto handleConfigChange = [](const Utils::FilePath &fp,
const auto handleConfigChange = [](const FilePath &fp,
const BaseEditorDocumentParser::Configuration &config) {
if (const auto client = clientForFile(fp))
client->updateParserConfig(fp, config);
@@ -394,7 +394,7 @@ void ClangModelManagerSupport::onCurrentEditorChanged(Core::IEditor *editor)
if (!editor || !editor->document() || !cppModelManager()->isCppEditor(editor))
return;
const ::Utils::FilePath filePath = editor->document()->filePath();
const FilePath filePath = editor->document()->filePath();
if (auto processor = ClangEditorDocumentProcessor::get(filePath)) {
processor->semanticRehighlight();
if (const auto client = clientForFile(filePath)) {
@@ -413,11 +413,11 @@ void ClangModelManagerSupport::connectToWidgetsMarkContextMenuRequested(QWidget
}
}
static Utils::FilePath getJsonDbDir(const ProjectExplorer::Project *project)
static FilePath getJsonDbDir(const ProjectExplorer::Project *project)
{
static const QString dirName(".qtc_clangd");
if (!project) {
const QString sessionDirName = Utils::FileUtils::fileSystemFriendlyName(
const QString sessionDirName = FileUtils::fileSystemFriendlyName(
ProjectExplorer::SessionManager::activeSession());
return Core::ICore::userResourcePath() / dirName / sessionDirName; // TODO: Make configurable?
}
@@ -427,12 +427,12 @@ static Utils::FilePath getJsonDbDir(const ProjectExplorer::Project *project)
return bc->buildDirectory() / dirName;
}
}
return Utils::FilePath();
return {};
}
static bool isProjectDataUpToDate(
ProjectExplorer::Project *project, ProjectInfoList projectInfo,
const Utils::FilePath &jsonDbDir)
const FilePath &jsonDbDir)
{
if (project && !ProjectExplorer::SessionManager::hasProject(project))
return false;
@@ -478,7 +478,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
return;
}
const Utils::FilePath jsonDbDir = getJsonDbDir(project);
const FilePath jsonDbDir = getJsonDbDir(project);
if (jsonDbDir.isEmpty())
return;
const auto generatorWatcher = new QFutureWatcher<GenerateCompilationDbResult>;
@@ -490,7 +490,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
const GenerateCompilationDbResult result = generatorWatcher->result();
if (!result.error.isEmpty()) {
Core::MessageManager::writeDisrupting(
tr("Cannot use clangd: Failed to generate compilation database:\n%1")
Tr::tr("Cannot use clangd: Failed to generate compilation database:\n%1")
.arg(result.error));
return;
}
@@ -500,7 +500,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
LanguageClientManager::shutdownClient(oldClient);
}
ClangdClient * const client = new ClangdClient(project, jsonDbDir, previousId);
connect(client, &Client::shadowDocumentSwitched, this, [](const Utils::FilePath &fp) {
connect(client, &Client::shadowDocumentSwitched, this, [](const FilePath &fp) {
ClangdClient::handleUiHeaderChange(fp.fileName());
});
connect(CppModelManager::instance(),
@@ -588,7 +588,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
});
});
const Utils::FilePath includeDir = settings.clangdIncludePath();
const FilePath includeDir = settings.clangdIncludePath();
auto future = Utils::runAsync(&Internal::generateCompilationDB, projectInfo,
jsonDbDir, CompilationDbPurpose::CodeModel,
warningsConfigForProject(project),
@@ -629,7 +629,7 @@ ClangdClient *ClangModelManagerSupport::clientWithProject(const ProjectExplorer:
return clients.empty() ? nullptr : qobject_cast<ClangdClient *>(clients.first());
}
ClangdClient *ClangModelManagerSupport::clientForFile(const Utils::FilePath &file)
ClangdClient *ClangModelManagerSupport::clientForFile(const FilePath &file)
{
return qobject_cast<ClangdClient *>(LanguageClientManager::clientForFilePath(file));
}
@@ -663,10 +663,10 @@ void ClangModelManagerSupport::claimNonProjectSources(ClangdClient *client)
void ClangModelManagerSupport::watchForExternalChanges()
{
connect(Core::DocumentManager::instance(), &Core::DocumentManager::filesChangedExternally,
this, [this](const QSet<Utils::FilePath> &files) {
this, [this](const QSet<FilePath> &files) {
if (!LanguageClientManager::hasClients<ClangdClient>())
return;
for (const Utils::FilePath &file : files) {
for (const FilePath &file : files) {
const ProjectFile::Kind kind = ProjectFile::classify(file.toString());
if (!ProjectFile::isSource(kind) && !ProjectFile::isHeader(kind))
continue;
@@ -691,8 +691,8 @@ void ClangModelManagerSupport::watchForExternalChanges()
void ClangModelManagerSupport::watchForInternalChanges()
{
connect(Core::DocumentManager::instance(), &Core::DocumentManager::filesChangedInternally,
this, [this](const Utils::FilePaths &filePaths) {
for (const Utils::FilePath &fp : filePaths) {
this, [this](const FilePaths &filePaths) {
for (const FilePath &fp : filePaths) {
const ProjectFile::Kind kind = ProjectFile::classify(fp.toString());
if (!ProjectFile::isSource(kind) && !ProjectFile::isHeader(kind))
continue;
@@ -755,7 +755,7 @@ void ClangModelManagerSupport::onAbstractEditorSupportContentsUpdated(const QStr
if (content.size() == 0)
return; // Generation not yet finished.
const auto fp = Utils::FilePath::fromString(filePath);
const auto fp = FilePath::fromString(filePath);
const QString stringContent = QString::fromUtf8(content);
if (Client * const client = clientForGeneratedFile(fp)) {
client->setShadowDocument(fp, stringContent);
@@ -770,7 +770,7 @@ void ClangModelManagerSupport::onAbstractEditorSupportRemoved(const QString &fil
{
QTC_ASSERT(!filePath.isEmpty(), return);
const auto fp = Utils::FilePath::fromString(filePath);
const auto fp = FilePath::fromString(filePath);
if (Client * const client = clientForGeneratedFile(fp)) {
client->removeShadowDocument(fp);
ClangdClient::handleUiHeaderChange(fp.fileName());
@@ -809,7 +809,7 @@ void ClangModelManagerSupport::onTextMarkContextMenuRequested(TextEditor::TextEd
QTC_ASSERT(lineNumber >= 1, return);
QTC_ASSERT(menu, return);
const Utils::FilePath filePath = widget->textDocument()->filePath();
const FilePath filePath = widget->textDocument()->filePath();
ClangEditorDocumentProcessor *processor = ClangEditorDocumentProcessor::get(filePath);
if (processor) {
const auto assistInterface = createAssistInterface(widget, lineNumber);
@@ -916,5 +916,4 @@ void ClangModelManagerSupport::reinitializeBackendDocuments(const QStringList &p
}
}
} // Internal
} // ClangCodeModel
} // ClangCodeModel::Internal

View File

@@ -3,6 +3,7 @@
#include "clangtextmark.h"
#include "clangcodemodeltr.h"
#include "clangconstants.h"
#include "clangdclient.h"
#include "clangdiagnostictooltipwidget.h"
@@ -10,6 +11,7 @@
#include "clangutils.h"
#include <coreplugin/icore.h>
#include <cppeditor/clangdiagnosticconfigsmodel.h>
#include <cppeditor/cppeditorconstants.h>
#include <cppeditor/cpptoolsreuse.h>
@@ -283,7 +285,7 @@ ClangdTextMark::ClangdTextMark(const FilePath &filePath,
const bool isError = diagnostic.severity()
&& *diagnostic.severity() == DiagnosticSeverity::Error;
setDefaultToolTip(isError ? tr("Code Model Error") : tr("Code Model Warning"));
setDefaultToolTip(isError ? Tr::tr("Code Model Error") : Tr::tr("Code Model Warning"));
setPriority(isError ? TextEditor::TextMark::HighPriority
: TextEditor::TextMark::NormalPriority);
setIcon(isError ? Icons::CODEMODEL_ERROR.icon() : Icons::CODEMODEL_WARNING.icon());
@@ -299,7 +301,7 @@ ClangdTextMark::ClangdTextMark(const FilePath &filePath,
QList<QAction *> actions;
QAction *action = new QAction();
action->setIcon(QIcon::fromTheme("edit-copy", Icons::COPY.icon()));
action->setToolTip(tr("Copy to Clipboard", "Clang Code Model Marks"));
action->setToolTip(Tr::tr("Copy to Clipboard", "Clang Code Model Marks"));
QObject::connect(action, &QAction::triggered, [diag] {
const QString text = ClangDiagnosticWidget::createText({diag},
ClangDiagnosticWidget::InfoBar);
@@ -312,7 +314,7 @@ ClangdTextMark::ClangdTextMark(const FilePath &filePath,
if (project && isDiagnosticConfigChangable(project, diag)) {
action = new QAction();
action->setIcon(Icons::BROKEN.icon());
action->setToolTip(tr("Disable Diagnostic in Current Project"));
action->setToolTip(Tr::tr("Disable Diagnostic in Current Project"));
QObject::connect(action, &QAction::triggered, [diag] {
disableDiagnosticInCurrentProjectConfig(diag);
});

View File

@@ -22,7 +22,6 @@ class ClangdClient;
class ClangdTextMark : public TextEditor::TextMark
{
Q_DECLARE_TR_FUNCTIONS(ClangdTextMark)
public:
ClangdTextMark(const ::Utils::FilePath &filePath,
const LanguageServerProtocol::Diagnostic &diagnostic,

View File

@@ -3,6 +3,8 @@
#include "clangutils.h"
#include "clangcodemodeltr.h"
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <cppeditor/baseeditordocumentparser.h>
@@ -239,9 +241,9 @@ QString DiagnosticTextInfo::category() const
const int index = m_squareBracketStartIndex + 1;
if (isClazyOption(m_text.mid(index)))
return QCoreApplication::translate("ClangDiagnosticWidget", "Clazy Issue");
return Tr::tr("Clazy Issue");
else
return QCoreApplication::translate("ClangDiagnosticWidget", "Clang-Tidy Issue");
return Tr::tr("Clang-Tidy Issue");
}
bool DiagnosticTextInfo::isClazyOption(const QString &option)