Debugger: Convert to Tr::tr

Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-07-05 15:37:08 +02:00
parent bb3549a721
commit 9894c6eaf0
143 changed files with 2272 additions and 36880 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -10600,10 +10600,6 @@ Flag: %3</translation>
<source>Annotate &quot;%1&quot;</source>
<translation>Annotate &quot;%1&quot;</translation>
</message>
<message>
<source>Add</source>
<translation>Tilføj</translation>
</message>
<message>
<source>Add &quot;%1&quot;</source>
<translation>Tilføj &quot;%1&quot;</translation>
@@ -10923,26 +10919,15 @@ Flag: %3</translation>
</context>
<context>
<name>Debugger</name>
<message>
<source>General</source>
<translation>Generelt</translation>
</message>
<message>
<source>Locals &amp;&amp; Expressions</source>
<extracomment>&apos;&amp;&amp;&apos; will appear as one (one is marking keyboard shortcut)</extracomment>
<translation>Locals og expressions</translation>
</message>
<message>
<source>Debugger</source>
<translation>Fejlretter</translation>
</message>
<message>
<source>&lt;Encoding error&gt;</source>
<translation>&lt;kodningsfejl&gt;</translation>
</message>
</context>
<context>
<name>Debugger::AnalyzerRunConfigWidget</name>
<message>
<source>Use Customized Settings</source>
<translation>Brug brugerdefinerede indstillinger</translation>
@@ -10951,9 +10936,6 @@ Flag: %3</translation>
<source>Use Global Settings</source>
<translation>Brug globale indstillinger</translation>
</message>
</context>
<context>
<name>Debugger::DebuggerItemManager</name>
<message>
<source>Not recognized</source>
<translation>Ikke genkendt</translation>
@@ -10970,10 +10952,6 @@ Flag: %3</translation>
<source>Name:</source>
<translation>Navn:</translation>
</message>
<message>
<source>Path:</source>
<translation>Sti:</translation>
</message>
<message>
<source>Type:</source>
<translation>Type:</translation>
@@ -11016,17 +10994,10 @@ Flag: %3</translation>
<source>Extracted from Kit %1</source>
<translation>Udtrukket fra kit %1</translation>
</message>
</context>
<context>
<name>Debugger::DebuggerKitInformation</name>
<message>
<source>Type of Debugger Backend</source>
<translation>Type af fejlretter-backend</translation>
</message>
<message>
<source>Debugger</source>
<translation>Fejlretter</translation>
</message>
<message>
<source>Unknown debugger version</source>
<translation>Ukendt fejlretter version</translation>
@@ -11083,13 +11054,6 @@ Flag: %3</translation>
<source>%1 using &quot;%2&quot;</source>
<translation>%1 bruger &quot;%2&quot;</translation>
</message>
</context>
<context>
<name>Debugger::DebuggerOptionsPage</name>
<message>
<source>Add</source>
<translation>Tilføj</translation>
</message>
<message>
<source>Clone</source>
<translation>Klon</translation>
@@ -11102,18 +11066,10 @@ Flag: %3</translation>
<source>Clone of %1</source>
<translation>Klon af %1</translation>
</message>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>Location</source>
<translation>Placering</translation>
</message>
<message>
<source>Type</source>
<translation>Type</translation>
</message>
<message>
<source>Auto-detected</source>
<translation>Auto-detekteret</translation>
@@ -11134,16 +11090,10 @@ Flag: %3</translation>
<source>Debuggers</source>
<translation>Fejlrettere</translation>
</message>
</context>
<context>
<name>Debugger::DebuggerRunConfigurationAspect</name>
<message>
<source>Debugger settings</source>
<translation>Fejlretterindstillinger</translation>
</message>
</context>
<context>
<name>Debugger::DebuggerRunTool</name>
<message>
<source>Unpacking core file to %1</source>
<translation>Udpakker kernefil til %1</translation>
@@ -11160,10 +11110,6 @@ Flag: %3</translation>
<source>Unsupported CDB host system.</source>
<translation>Ikke-understøttet CDB-værtssystem.</translation>
</message>
<message>
<source>Debugger</source>
<translation>Fejlretter</translation>
</message>
<message>
<source>&amp;Show this message again.</source>
<translation>&amp;Vis denne meddelelse igen.</translation>
@@ -11184,16 +11130,10 @@ Flag: %3</translation>
<source>Debugged executable</source>
<translation>Fejlrettet eksekverbar</translation>
</message>
</context>
<context>
<name>Debugger::DetailedErrorView</name>
<message>
<source>Copy</source>
<translation>Kopiér</translation>
</message>
</context>
<context>
<name>Debugger::Internal::AddressDialog</name>
<message>
<source>Select Start Address</source>
<translation>Vælg startadresse</translation>
@@ -11202,9 +11142,6 @@ Flag: %3</translation>
<source>Enter an address:</source>
<translation>Indtast en adresse:</translation>
</message>
</context>
<context>
<name>Debugger::Internal::AttachCoreDialog</name>
<message>
<source>Load Core File</source>
<translation>Indlæs kernefil</translation>
@@ -11217,18 +11154,10 @@ Flag: %3</translation>
<source>Select Core File</source>
<translation>Vælg kernefil</translation>
</message>
<message>
<source>Select Executable</source>
<translation>Vælg eksekverbar</translation>
</message>
<message>
<source>Select Startup Script</source>
<translation>Vælg opstart-script</translation>
</message>
<message>
<source>Kit:</source>
<translation>Kit:</translation>
</message>
<message>
<source>Core file:</source>
<translation>Kernefil:</translation>
@@ -11245,13 +11174,6 @@ Flag: %3</translation>
<source>Select Remote Core File</source>
<translation>Vælg fjern-kernefil</translation>
</message>
</context>
<context>
<name>Debugger::Internal::AttachToQmlPortDialog</name>
<message>
<source>Start Debugger</source>
<translation>Start fejlretter</translation>
</message>
<message>
<source>Kit:</source>
<translation>Kit:</translation>
@@ -11262,7 +11184,7 @@ Flag: %3</translation>
</message>
</context>
<context>
<name>Debugger::Internal::BreakHandler</name>
<name>Debugger</name>
<message>
<source>New</source>
<translation>Ny</translation>
@@ -11516,10 +11438,6 @@ Flag: %3</translation>
<source>Line</source>
<translation>Linje</translation>
</message>
<message>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<source>Condition</source>
<translation>Betingelse</translation>
@@ -11612,10 +11530,6 @@ Flag: %3</translation>
<source>Delete Breakpoints of File</source>
<translation>Slet brudpunkter af fil</translation>
</message>
<message>
<source>Synchronize Breakpoints</source>
<translation>Synkroniser brudpunkter</translation>
</message>
<message>
<source>Remove All Breakpoints</source>
<translation>Fjern alle brudpunkter</translation>
@@ -11708,10 +11622,6 @@ Flag: %3</translation>
<source>Corrected Line Number:</source>
<translation>Korrigeret linjenummer:</translation>
</message>
<message>
<source>Module:</source>
<translation>Modul:</translation>
</message>
<message>
<source>Breakpoint Address:</source>
<translation>Brudpunktsadresse:</translation>
@@ -11720,14 +11630,6 @@ Flag: %3</translation>
<source>Multiple Addresses:</source>
<translation>Flere adresser:</translation>
</message>
<message>
<source>Command:</source>
<translation>Kommando:</translation>
</message>
<message>
<source>Message:</source>
<translation>Meddelelse:</translation>
</message>
<message>
<source>Condition:</source>
<translation>Betingelse:</translation>
@@ -11782,7 +11684,7 @@ Flag: %3</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CacheDirectoryDialog</name>
<name>Debugger</name>
<message>
<source>Select Local Cache Folder</source>
<translation>Vælg lokal mellemlager-mappe</translation>
@@ -11809,7 +11711,7 @@ Flag: %3</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CdbBreakEventWidget</name>
<name>Debugger</name>
<message>
<source>C++ exception</source>
<translation>C++-undtagelse</translation>
@@ -11836,7 +11738,7 @@ Flag: %3</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CdbEngine</name>
<name>Debugger</name>
<message>
<source>Failed to Start the Debugger</source>
<translation>Kunne ikke starte fejlretteren</translation>
@@ -11899,14 +11801,14 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::CdbOptionsPage</name>
<name>Debugger</name>
<message>
<source>CDB</source>
<translation>CDB</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CdbOptionsPageWidget</name>
<name>Debugger</name>
<message>
<source>Startup</source>
<extracomment>Placeholder</extracomment>
@@ -11954,14 +11856,14 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::CdbPathsPage</name>
<name>Debugger</name>
<message>
<source>CDB Paths</source>
<translation>CDB-stier</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CdbPathsPageWidget</name>
<name>Debugger</name>
<message>
<source>Symbol Paths</source>
<translation>Symbolstier</translation>
@@ -11972,7 +11874,7 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::CdbSymbolPathListEditor</name>
<name>Debugger</name>
<message>
<source>Insert Symbol Server...</source>
<translation>Indsæt symbol-server...</translation>
@@ -11999,7 +11901,7 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::CommonOptionsPage</name>
<name>Debugger</name>
<message>
<source>Behavior</source>
<translation>Adfærd</translation>
@@ -12092,10 +11994,6 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
<source>Maximum stack depth:</source>
<translation>Maksimum stakdybde:</translation>
</message>
<message>
<source>&lt;unlimited&gt;</source>
<translation>&lt;ubegrænset&gt;</translation>
</message>
<message>
<source>Stop when %1() is called</source>
<translation>Stop når %1() er kaldt</translation>
@@ -12106,7 +12004,7 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::Console</name>
<name>Debugger</name>
<message>
<source>Show debug, log, and info messages.</source>
<translation>Vis fejlretnings-, log- og infomeddelelser.</translation>
@@ -12129,7 +12027,7 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::ConsoleView</name>
<name>Debugger</name>
<message>
<source>&amp;Copy</source>
<translation>&amp;Kopiér</translation>
@@ -12144,7 +12042,7 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerEngine</name>
<name>Debugger</name>
<message>
<source>No Memory Viewer Available</source>
<translation>Ingen hukommelsesfremviser tilgængelig</translation>
@@ -12173,10 +12071,6 @@ Hvis du byggede %2 fra kilder og vil bruge en CDB-eksekverbar med anden bitness
<source>Running.</source>
<translation>Kører.</translation>
</message>
<message>
<source>Stopped.</source>
<translation>Stoppet.</translation>
</message>
<message>
<source>Run requested...</source>
<translation>Kør anmodede...</translation>
@@ -12287,10 +12181,6 @@ Vælges GDB eller LLDB som fejlretter, så vil det forbedre fejlretningsoplevels
<source>Section %1: %2</source>
<translation>Sektion %1: %2</translation>
</message>
<message>
<source>Warning</source>
<translation>Advarsel</translation>
</message>
<message>
<source>This does not seem to be a &quot;Debug&quot; build.
Setting breakpoints by file name and line number may fail.</source>
@@ -12315,14 +12205,14 @@ Sætning af brudpunkter efter filnavn og linjenummer kan mislykkes.</translation
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerEnginePrivate</name>
<name>Debugger</name>
<message>
<source>Debugging has finished</source>
<translation>Fejlretning er fuldført</translation>
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerKitConfigWidget</name>
<name>Debugger</name>
<message>
<source>The debugger to use for this kit.</source>
<translation>Fejlretteren som bruges til dette kit.</translation>
@@ -12337,7 +12227,7 @@ Sætning af brudpunkter efter filnavn og linjenummer kan mislykkes.</translation
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerPane</name>
<name>Debugger</name>
<message>
<source>Clear Contents</source>
<translation>Ryd indhold</translation>
@@ -12352,7 +12242,7 @@ Sætning af brudpunkter efter filnavn og linjenummer kan mislykkes.</translation
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerPlugin</name>
<name>Debugger</name>
<message>
<source>Debug</source>
<translation>Fejlret</translation>
@@ -12373,18 +12263,10 @@ Sætning af brudpunkter efter filnavn og linjenummer kan mislykkes.</translation
<source>Invalid debugger option: %1</source>
<translation>Ugyldig fejlretter-valgmulighed: %1</translation>
</message>
<message>
<source>Process %1</source>
<translation>Proces %1</translation>
</message>
<message>
<source>Symbol</source>
<translation>Symbol</translation>
</message>
<message>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<source>Code</source>
<translation>Kode</translation>
@@ -12393,10 +12275,6 @@ Sætning af brudpunkter efter filnavn og linjenummer kan mislykkes.</translation
<source>Section</source>
<translation>Sektion</translation>
</message>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>Symbols in &quot;%1&quot;</source>
<translation>Symboler i &quot;%1&quot;</translation>
@@ -12494,7 +12372,7 @@ Påvirket brudpunkter er %1</translation>
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerPluginPrivate</name>
<name>Debugger</name>
<message>
<source>0x%1 hit</source>
<extracomment>Message tracepoint: Address hit.</extracomment>
@@ -12597,10 +12475,6 @@ Påvirket brudpunkter er %1</translation>
<source>Source Files</source>
<translation>Kildefiler</translation>
</message>
<message>
<source>Locals</source>
<translation>Locals</translation>
</message>
<message>
<source>&amp;Expressions</source>
<translation>&amp;Udtryk</translation>
@@ -12673,10 +12547,6 @@ Påvirket brudpunkter er %1</translation>
<source>Toggle Breakpoint</source>
<translation>Brudpunkt til/fra</translation>
</message>
<message>
<source>Add Expression Evaluator</source>
<translation>Tilføj udtryksevaluerer</translation>
</message>
<message>
<source>Reverse Direction</source>
<translation>Omvend retning</translation>
@@ -12819,10 +12689,6 @@ Påvirket brudpunkter er %1</translation>
<source>Threads:</source>
<translation>Tråde:</translation>
</message>
<message>
<source>Debugger</source>
<translation>Fejlretter</translation>
</message>
<message>
<source>Warning</source>
<translation>Advarsel</translation>
@@ -12917,7 +12783,7 @@ Påvirket brudpunkter er %1</translation>
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerSettings</name>
<name>Debugger</name>
<message>
<source>Configure Debugger...</source>
<translation>Konfigurer fejlretter...</translation>
@@ -13140,7 +13006,7 @@ Påvirket brudpunkter er %1</translation>
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerSourcePathMappingWidget</name>
<name>Debugger</name>
<message>
<source>&lt;new source&gt;</source>
<translation>&lt;ny kilde&gt;</translation>
@@ -13165,10 +13031,6 @@ Påvirket brudpunkter er %1</translation>
<source>Add Qt sources...</source>
<translation>Tilføj Qt-kilder...</translation>
</message>
<message>
<source>Remove</source>
<translation>Fjern</translation>
</message>
<message>
<source>Source Paths Mapping</source>
<translation>Kildestier kortlægning</translation>
@@ -13203,23 +13065,7 @@ Påvirket brudpunkter er %1</translation>
</message>
</context>
<context>
<name>Debugger::Internal::DebuggerToolTipManager</name>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>Value</source>
<translation>Værdi</translation>
</message>
<message>
<source>Type</source>
<translation>Type</translation>
</message>
<message>
<source>Copy Contents to Clipboard</source>
<translation>Kopiér indhold til udklipsholder</translation>
</message>
<name>Debugger</name>
<message>
<source>Expression %1 in function %2 from line %3 to %4</source>
<translation>Udtryk %1 i funktion %2 fra linje %3 til %4</translation>
@@ -13242,7 +13088,7 @@ Påvirket brudpunkter er %1</translation>
</message>
</context>
<context>
<name>Debugger::Internal::GdbEngine</name>
<name>Debugger</name>
<message>
<source>The gdb process failed to start.</source>
<translation>Gdp-processen kunne ikke starte.</translation>
@@ -13391,10 +13237,6 @@ Du kan vælge mellem at vente længere tid eller afbryde fejlretning.</numerusfo
<source>There is no GDB binary available for binaries in format &quot;%1&quot;.</source>
<translation>Der er ingen GDB-binær tilgængelig for binærer i formatet &quot;%1&quot;.</translation>
</message>
<message>
<source>Running requested...</source>
<translation>Kører anmodet...</translation>
</message>
<message>
<source>Step requested...</source>
<translation>Trin anmodet...</translation>
@@ -13619,7 +13461,7 @@ Du kan vælge mellem at vente længere tid eller afbryde fejlretning.</numerusfo
</message>
</context>
<context>
<name>Debugger::Internal::GdbOptionsPage</name>
<name>Debugger</name>
<message>
<source>General</source>
<translation>Generelt</translation>
@@ -13792,21 +13634,21 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
</message>
</context>
<context>
<name>Debugger::Internal::GdbOptionsPage2</name>
<name>Debugger</name>
<message>
<source>GDB Extended</source>
<translation>GDB udvidet</translation>
</message>
</context>
<context>
<name>Debugger::Internal::InputPane</name>
<name>Debugger</name>
<message>
<source>Type Ctrl-&lt;Return&gt; to execute a line.</source>
<translation>Skriv Ctrl-&lt;Retur&gt; for at eksekvere en linje.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::LldbEngine</name>
<name>Debugger</name>
<message>
<source>Stopping temporarily</source>
<translation>Stopper midlertidigt</translation>
@@ -13819,14 +13661,6 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
<source>Adapter start failed.</source>
<translation>Start af adaptor mislykkedes.</translation>
</message>
<message>
<source>Setting up inferior...</source>
<translation>Opsætter laverestående...</translation>
</message>
<message>
<source>Running requested...</source>
<translation>Kører anmodet...</translation>
</message>
<message>
<source>Interrupt requested...</source>
<translation>Interrupt anmodet...</translation>
@@ -13843,10 +13677,6 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
<source>The LLDB process crashed some time after starting successfully.</source>
<translation>LLDB-processen holdt op med at virke noget tid efter start.</translation>
</message>
<message>
<source>The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again.</source>
<translation>Den sidste waitFor...()-funktion fik timeout. Tilstanden af QProcess er uændret og du kan prøve at kalde waitFor...() igen.</translation>
</message>
<message>
<source>An error occurred when attempting to write to the LLDB process. For example, the process may not be running, or it may have closed its input channel.</source>
<translation>Der opstod en fejl under forsøg at skrive til LLDB-processen. Det kan f.eks. være at processen ikke køre eller den kan have lukket sin input-kanal.</translation>
@@ -13859,9 +13689,6 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
<source>An unknown error in the LLDB process occurred.</source>
<translation>Der opstod en ukendt fejl i LLDB-processen.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::LocalProcessRunner</name>
<message>
<source>Upload failed: %1</source>
<translation>Upload mislykkedes: %1</translation>
@@ -13896,7 +13723,7 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
</message>
</context>
<context>
<name>Debugger::Internal::LocalsAndExpressionsOptionsPage</name>
<name>Debugger</name>
<message>
<source>Use Debugging Helper</source>
<translation>Brug fejlretningshjælper</translation>
@@ -13935,7 +13762,7 @@ længere på lansomme maskiner. Værdien bør i dette tilfælde øges.</translat
</message>
</context>
<context>
<name>Debugger::Internal::LogWindow</name>
<name>Debugger</name>
<message>
<source>Debugger &amp;Log</source>
<translation>Fejlretter&amp;log</translation>
@@ -13968,7 +13795,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::MemoryAgent</name>
<name>Debugger</name>
<message>
<source>Memory at Register &quot;%1&quot; (0x%2)</source>
<translation>Hukommelse ved register &quot;%1&quot; (0x%2)</translation>
@@ -13983,7 +13810,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::ModulesHandler</name>
<name>Debugger</name>
<message>
<source>Module Name</source>
<translation>Modulnavn</translation>
@@ -14010,7 +13837,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::OutputCollector</name>
<name>Debugger</name>
<message>
<source>Cannot create temporary file: %1</source>
<translation>Kan ikke oprette midlertidig fil: %1</translation>
@@ -14025,7 +13852,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::PdbEngine</name>
<name>Debugger</name>
<message>
<source>Python Error</source>
<translation>Python-fejl</translation>
@@ -14054,10 +13881,6 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
<source>The Pdb process crashed some time after starting successfully.</source>
<translation>Pdb-processen holdt op med at virke noget tid efter start.</translation>
</message>
<message>
<source>The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again.</source>
<translation>Den sidste waitFor...()-funktion fik timeout. Tilstanden af QProcess er uændret og du kan prøve at kalde waitFor...() igen.</translation>
</message>
<message>
<source>An error occurred when attempting to write to the Pdb process. For example, the process may not be running, or it may have closed its input channel.</source>
<translation>Der opstod en fejl under forsøg at skrive til Pdb-processen. Det kan f.eks. være at processen ikke køre eller den kan have lukket sin input-kanal.</translation>
@@ -14072,7 +13895,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::QmlCppEngine</name>
<name>Debugger</name>
<message>
<source>C++ debugger activated</source>
<translation>C++-fejlretter aktiveret</translation>
@@ -14083,7 +13906,7 @@ Du kan blive spurgt om at dele indholdet af denne log ved rapportering af fejl r
</message>
</context>
<context>
<name>Debugger::Internal::QmlEngine</name>
<name>Debugger</name>
<message>
<source>No application output received in time</source>
<translation>Ingen program-ouput modtaget i tide</translation>
@@ -14136,7 +13959,7 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::QmlInspectorAgent</name>
<name>Debugger</name>
<message>
<source>Success:</source>
<translation>Succes:</translation>
@@ -14151,7 +13974,7 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::RegisterHandler</name>
<name>Debugger</name>
<message>
<source>Content as ASCII Characters</source>
<translation>Indhold som ASCII-tegn</translation>
@@ -14180,14 +14003,6 @@ Vil du prøve igen?</translation>
<source>Content as %1-bit Floating Point Values</source>
<translation>Indhold som %1-bit flydende kommatal værdier</translation>
</message>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>Value</source>
<translation>Værdi</translation>
</message>
<message>
<source>Reload Register Listing</source>
<translation>Genindlæs registervisning</translation>
@@ -14242,7 +14057,7 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::RunConfigWidget</name>
<name>Debugger</name>
<message>
<source>Debugger Settings</source>
<translation>Fejlretterindstillinger</translation>
@@ -14269,29 +14084,11 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SelectRemoteFileDialog</name>
<name>Debugger</name>
<message>
<source>Download of remote file succeeded.</source>
<translation>Download af fjern-fil lykkedes.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SnapshotHandler</name>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>File</source>
<translation>Fil</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SnapshotTreeView</name>
<message>
<source>Snapshots</source>
<translation>Øjebliksbilleder</translation>
</message>
<message>
<source>Create Snapshot</source>
<translation>Opret øjebliksbillede</translation>
@@ -14302,7 +14099,7 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::SourceFilesHandler</name>
<name>Debugger</name>
<message>
<source>Internal Name</source>
<translation>Internt navn</translation>
@@ -14325,7 +14122,7 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::StackHandler</name>
<name>Debugger</name>
<message>
<source>Address:</source>
<translation>Adresse:</translation>
@@ -14394,22 +14191,6 @@ Vil du prøve igen?</translation>
<source>Level</source>
<translation>Niveau</translation>
</message>
<message>
<source>Function</source>
<translation>Funktion</translation>
</message>
<message>
<source>File</source>
<translation>Fil</translation>
</message>
<message>
<source>Line</source>
<translation>Linje</translation>
</message>
<message>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<source>Disassemble Function</source>
<translation>Disassemble funktion</translation>
@@ -14434,14 +14215,6 @@ Vil du prøve igen?</translation>
<source>Load QML Stack</source>
<translation>Indlæs QML-stak</translation>
</message>
<message>
<source>Open Memory Editor at 0x%1</source>
<translation>Åbn hukommelse-redigering ved 0x%1</translation>
</message>
<message>
<source>Open Memory Editor</source>
<translation>Åbn hukommelse-redigering</translation>
</message>
<message>
<source>Memory at Frame #%1 (%2) 0x%3</source>
<translation>Hukommelse ved ramme #%1 (%2) 0x%3</translation>
@@ -14450,14 +14223,6 @@ Vil du prøve igen?</translation>
<source>Frame #%1 (%2)</source>
<translation>Ramme #%1 (%2)</translation>
</message>
<message>
<source>Open Disassembler at 0x%1</source>
<translation>Åbn disassembler ved 0x%1</translation>
</message>
<message>
<source>Open Disassembler</source>
<translation>Åbn disassembler</translation>
</message>
<message>
<source>Open Disassembler at Address...</source>
<translation>Åbn disassembler ved adresse...</translation>
@@ -14472,14 +14237,14 @@ Vil du prøve igen?</translation>
</message>
</context>
<context>
<name>Debugger::Internal::StackTreeView</name>
<name>Debugger</name>
<message>
<source>Stack</source>
<translation>Stak</translation>
</message>
</context>
<context>
<name>Debugger::Internal::StartApplicationDialog</name>
<name>Debugger</name>
<message>
<source>Start Debugger</source>
<translation>Start fejlretter</translation>
@@ -14565,7 +14330,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::StartRemoteCdbDialog</name>
<name>Debugger</name>
<message>
<source>&lt;html&gt;&lt;body&gt;&lt;p&gt;The remote CDB needs to load the matching %1 CDB extension (&lt;code&gt;%2&lt;/code&gt; or &lt;code&gt;%3&lt;/code&gt;, respectively).&lt;/p&gt;&lt;p&gt;Copy it onto the remote machine and set the environment variable &lt;code&gt;%4&lt;/code&gt; to point to its folder.&lt;/p&gt;&lt;p&gt;Launch the remote CDB as &lt;code&gt;%5 &amp;lt;executable&amp;gt;&lt;/code&gt; to use TCP/IP as communication protocol.&lt;/p&gt;&lt;p&gt;Enter the connection parameters as:&lt;/p&gt;&lt;pre&gt;%6&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;body&gt;&lt;p&gt;Fjern-CDB&apos;en skal indlæse den matchende %1 CDB-udvidelse (henholdvis &lt;code&gt;%2&lt;/code&gt; eller &lt;code&gt;%3&lt;/code&gt;).&lt;/p&gt;&lt;p&gt;Kopiér den til fjern-maskingen og sæt miljøvariablen &lt;code&gt;%4&lt;/code&gt; til at pege til dens mappe.&lt;/p&gt;&lt;p&gt;Start fjern-CDB&apos;en som &lt;code&gt;%5 &amp;lt;eksekverbar&amp;gt;&lt;/code&gt; for at bruge TCP/IP som kommunikationsprotokol.&lt;/p&gt;&lt;p&gt;Indtast forbindelsesparameterne som:&lt;/p&gt;&lt;pre&gt;%6&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</translation>
@@ -14580,7 +14345,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::StartRemoteEngineDialog</name>
<name>Debugger</name>
<message>
<source>Start Remote Engine</source>
<translation>Start fjern-motor</translation>
@@ -14607,7 +14372,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::SymbolPathsDialog</name>
<name>Debugger</name>
<message>
<source>Set up Symbol Paths</source>
<translation>Opsæt symbol-stier</translation>
@@ -14626,7 +14391,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::Terminal</name>
<name>Debugger</name>
<message>
<source>Terminal: Cannot open /dev/ptmx: %1</source>
<translation>Terminal: kan ikke åbne /dev/ptmx: %1</translation>
@@ -14657,7 +14422,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::ThreadsHandler</name>
<name>Debugger</name>
<message>
<source>Thread&amp;nbsp;id:</source>
<translation>Tråd-id:</translation>
@@ -14670,14 +14435,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Group&amp;nbsp;id:</source>
<translation>Gruppe-id:</translation>
</message>
<message>
<source>Name:</source>
<translation>Navn:</translation>
</message>
<message>
<source>State:</source>
<translation>Tilstand:</translation>
</message>
<message>
<source>Core:</source>
<translation>Kerne:</translation>
@@ -14694,18 +14451,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<source>Function</source>
<translation>Funktion</translation>
</message>
<message>
<source>File</source>
<translation>Fil</translation>
</message>
<message>
<source>Line</source>
<translation>Linje</translation>
</message>
<message>
<source>State</source>
<translation>Tilstand</translation>
@@ -14728,11 +14473,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::TypeFormatsDialog</name>
<message>
<source>Reset</source>
<translation>Nulstil</translation>
</message>
<name>Debugger</name>
<message>
<source>Type Formats</source>
<translation>Typeformater</translation>
@@ -14751,7 +14492,7 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::Internal::UnstartedAppWatcherDialog</name>
<name>Debugger</name>
<message>
<source>Attach to Process Not Yet Started</source>
<translation>Tilkobl til proces endnu ikke startet</translation>
@@ -14780,10 +14521,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Start Watching</source>
<translation>Start overvågning</translation>
</message>
<message>
<source>Kit: </source>
<translation>Kit: </translation>
</message>
<message>
<source>Executable: </source>
<translation>Eksekverbar: </translation>
@@ -14906,10 +14643,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<extracomment>Display of variables shadowed by variables of the same name in nested scopes: Variable %1 is the variable name, %2 is a simple count.</extracomment>
<translation>%1 &lt;skygget %2&gt;</translation>
</message>
<message>
<source>Name</source>
<translation>Navn</translation>
</message>
<message>
<source>Value</source>
<translation>Værdi</translation>
@@ -15099,10 +14832,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Stop the program when the data at the address given by the expression is modified.</source>
<translation>Stop programmet når dataene ved adressen givet af udtrykket er ændret.</translation>
</message>
<message>
<source>Open Memory Editor</source>
<translation>Åbn hukommelse-redigering</translation>
</message>
<message>
<source>Open Memory View at Object&apos;s Address (0x%1)</source>
<translation>Åbn hukommelse-visning ved objekts adresse (0x%1)</translation>
@@ -15289,15 +15018,11 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
</message>
</context>
<context>
<name>Debugger::StartRemoteDialog</name>
<name>Debugger</name>
<message>
<source>Start Remote Analysis</source>
<translation>Start fjern-analyse</translation>
</message>
<message>
<source>Kit:</source>
<translation>Kit:</translation>
</message>
<message>
<source>Executable:</source>
<translation>Eksekverbar:</translation>
@@ -15306,17 +15031,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Arguments:</source>
<translation>Argumenter:</translation>
</message>
<message>
<source>Working directory:</source>
<translation>Arbejdsmappe:</translation>
</message>
</context>
<context>
<name>Debuggger::Internal::ModulesHandler</name>
<message>
<source>Unknown</source>
<translation>Ukendt</translation>
</message>
<message>
<source>No</source>
<translation>Nej</translation>
@@ -15325,10 +15039,6 @@ Du kan vælge andre kommunikationskanaler her, såsom en seriel linje eller brug
<source>Yes</source>
<translation>Ja</translation>
</message>
<message>
<source>None</source>
<translation>Ingen</translation>
</message>
<message>
<source>Plain</source>
<translation>Almindelig</translation>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -26,6 +26,8 @@
#include "analyzerrunconfigwidget.h"
#include "debuggertr.h"
#include <utils/detailswidget.h>
#include <utils/layoutbuilder.h>
@@ -42,10 +44,10 @@ AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::GlobalOrProjec
using namespace Layouting;
auto settingsCombo = new QComboBox;
settingsCombo->addItem(tr("Global"));
settingsCombo->addItem(tr("Custom"));
settingsCombo->addItem(Tr::tr("Global"));
settingsCombo->addItem(Tr::tr("Custom"));
auto restoreButton = new QPushButton(tr("Restore Global"));
auto restoreButton = new QPushButton(Tr::tr("Restore Global"));
auto innerPane = new QWidget;
auto configWidget = aspect->projectSettings()->createConfigWidget();
@@ -72,8 +74,8 @@ AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::GlobalOrProjec
configWidget->setEnabled(isCustom);
restoreButton->setEnabled(isCustom);
details->setSummaryText(isCustom
? tr("Use Customized Settings")
: tr("Use Global Settings"));
? Tr::tr("Use Customized Settings")
: Tr::tr("Use Global Settings"));
};
chooseSettings(aspect->isUsingGlobalSettings() ? 0 : 1);

View File

@@ -30,14 +30,10 @@
#include <projectexplorer/runconfiguration.h>
#include <QCoreApplication>
namespace Debugger {
class DEBUGGER_EXPORT AnalyzerRunConfigWidget : public QWidget
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::EditorSettingsPropertiesPage);
public:
AnalyzerRunConfigWidget(ProjectExplorer::GlobalOrProjectAspect *aspect);
};

View File

@@ -25,6 +25,7 @@
#include "detailederrorview.h"
#include "debuggertr.h"
#include "diagnosticlocation.h"
#include <coreplugin/editormanager/editormanager.h>
@@ -50,7 +51,7 @@ DetailedErrorView::DetailedErrorView(QWidget *parent) :
{
header()->setSectionResizeMode(QHeaderView::ResizeToContents);
m_copyAction->setText(tr("Copy"));
m_copyAction->setText(Tr::tr("Copy"));
m_copyAction->setIcon(Utils::Icons::COPY.icon());
m_copyAction->setShortcut(QKeySequence::Copy);
m_copyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
@@ -169,4 +170,4 @@ void DetailedErrorView::setCurrentRow(int row)
selectIndex(model()->index(row, 0));
}
} // namespace Debugger
} // Debugger

View File

@@ -36,8 +36,6 @@ class DiagnosticLocation;
class DEBUGGER_EXPORT DetailedErrorView : public QTreeView
{
Q_OBJECT
public:
DetailedErrorView(QWidget *parent = nullptr);
~DetailedErrorView() override;

View File

@@ -27,7 +27,7 @@
#include <debugger/debugger_global.h>
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <QDebug>
#include <QMetaType>

View File

@@ -25,6 +25,8 @@
#include "startremotedialog.h"
#include "debuggertr.h"
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/idevice.h>
@@ -60,7 +62,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
: QDialog(parent)
, d(new Internal::StartRemoteDialogPrivate)
{
setWindowTitle(tr("Start Remote Analysis"));
setWindowTitle(Tr::tr("Start Remote Analysis"));
d->kitChooser = new KitChooser(this);
d->kitChooser->setKitPredicate([](const Kit *kit) {
@@ -77,10 +79,10 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
auto formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("Executable:"), d->executable);
formLayout->addRow(tr("Arguments:"), d->arguments);
formLayout->addRow(tr("Working directory:"), d->workingDirectory);
formLayout->addRow(Tr::tr("Kit:"), d->kitChooser);
formLayout->addRow(Tr::tr("Executable:"), d->executable);
formLayout->addRow(Tr::tr("Arguments:"), d->arguments);
formLayout->addRow(Tr::tr("Working directory:"), d->workingDirectory);
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
@@ -89,7 +91,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QSettings *settings = Core::ICore::settings();
settings->beginGroup("AnalyzerStartRemoteDialog");
d->kitChooser->populate();
d->kitChooser->setCurrentKitId(Utils::Id::fromSetting(settings->value("profile")));
d->kitChooser->setCurrentKitId(Id::fromSetting(settings->value("profile")));
d->executable->setText(settings->value("executable").toString());
d->workingDirectory->setText(settings->value("workingDirectory").toString());
d->arguments->setText(settings->value("arguments").toString());
@@ -141,4 +143,4 @@ FilePath StartRemoteDialog::workingDirectory() const
return FilePath::fromString(d->workingDirectory->text());
}
} // namespace Debugger
} // Debugger

View File

@@ -40,8 +40,6 @@ namespace Internal { class StartRemoteDialogPrivate; }
class DEBUGGER_EXPORT StartRemoteDialog : public QDialog
{
Q_OBJECT
public:
explicit StartRemoteDialog(QWidget *parent = nullptr);
~StartRemoteDialog() override;
@@ -56,4 +54,4 @@ private:
Internal::StartRemoteDialogPrivate *d;
};
} // namespace Debugger
} // Debugger

View File

@@ -30,6 +30,7 @@
#include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include "disassembleragent.h"
#include "enginemanager.h"
#include "simplifytype.h"
@@ -92,7 +93,7 @@ public:
: TextMark(fileName, lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_bp(bp)
{
setColor(Theme::Debugger_Breakpoint_TextMarkColor);
setDefaultToolTip(QApplication::translate("BreakHandler", "Breakpoint"));
setDefaultToolTip(Tr::tr("Breakpoint"));
setPriority(TextEditor::TextMark::NormalPriority);
setIconProvider([bp] { return bp->icon(); });
setToolTipProvider([bp] { return bp->toolTip(); });
@@ -149,7 +150,7 @@ public:
GlobalBreakpointMarker(GlobalBreakpoint gbp, const FilePath &fileName, int lineNumber)
: TextMark(fileName, lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_gbp(gbp)
{
setDefaultToolTip(QApplication::translate("BreakHandler", "Breakpoint"));
setDefaultToolTip(Tr::tr("Breakpoint"));
setPriority(TextEditor::TextMark::NormalPriority);
setIconProvider([this] { return m_gbp->icon(); });
setToolTipProvider([this] { return m_gbp->toolTip(); });
@@ -206,44 +207,44 @@ static QString stateToString(BreakpointState state)
{
switch (state) {
case BreakpointNew:
return BreakHandler::tr("New");
return Tr::tr("New");
case BreakpointInsertionRequested:
return BreakHandler::tr("Insertion requested");
return Tr::tr("Insertion requested");
case BreakpointInsertionProceeding:
return BreakHandler::tr("Insertion proceeding");
return Tr::tr("Insertion proceeding");
case BreakpointUpdateRequested:
return BreakHandler::tr("Change requested");
return Tr::tr("Change requested");
case BreakpointUpdateProceeding:
return BreakHandler::tr("Change proceeding");
return Tr::tr("Change proceeding");
case BreakpointInserted:
return BreakHandler::tr("Breakpoint inserted");
return Tr::tr("Breakpoint inserted");
case BreakpointRemoveRequested:
return BreakHandler::tr("Removal requested");
return Tr::tr("Removal requested");
case BreakpointRemoveProceeding:
return BreakHandler::tr("Removal proceeding");
return Tr::tr("Removal proceeding");
case BreakpointDead:
return BreakHandler::tr("Dead");
return Tr::tr("Dead");
default:
break;
}
//: Invalid breakpoint state.
return BreakHandler::tr("<invalid state>");
return Tr::tr("<invalid state>");
}
static QString msgBreakpointAtSpecialFunc(const QString &func)
{
return BreakHandler::tr("Breakpoint at \"%1\"").arg(func);
return Tr::tr("Breakpoint at \"%1\"").arg(func);
}
static QString typeToString(BreakpointType type)
{
switch (type) {
case BreakpointByFileAndLine:
return BreakHandler::tr("Breakpoint by File and Line");
return Tr::tr("Breakpoint by File and Line");
case BreakpointByFunction:
return BreakHandler::tr("Breakpoint by Function");
return Tr::tr("Breakpoint by Function");
case BreakpointByAddress:
return BreakHandler::tr("Breakpoint by Address");
return Tr::tr("Breakpoint by Address");
case BreakpointAtThrow:
return msgBreakpointAtSpecialFunc("throw");
case BreakpointAtCatch:
@@ -257,20 +258,20 @@ static QString typeToString(BreakpointType type)
case BreakpointAtSysCall:
return msgBreakpointAtSpecialFunc("syscall");
case BreakpointAtMain:
return BreakHandler::tr("Breakpoint at Function \"main()\"");
return Tr::tr("Breakpoint at Function \"main()\"");
case WatchpointAtAddress:
return BreakHandler::tr("Watchpoint at Address");
return Tr::tr("Watchpoint at Address");
case WatchpointAtExpression:
return BreakHandler::tr("Watchpoint at Expression");
return Tr::tr("Watchpoint at Expression");
case BreakpointOnQmlSignalEmit:
return BreakHandler::tr("Breakpoint on QML Signal Emit");
return Tr::tr("Breakpoint on QML Signal Emit");
case BreakpointAtJavaScriptThrow:
return BreakHandler::tr("Breakpoint at JavaScript throw");
return Tr::tr("Breakpoint at JavaScript throw");
case UnknownBreakpointType:
case LastBreakpointType:
break;
}
return BreakHandler::tr("Unknown Breakpoint Type");
return Tr::tr("Unknown Breakpoint Type");
}
class LeftElideDelegate : public QStyledItemDelegate
@@ -308,8 +309,6 @@ public:
class BreakpointDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
explicit BreakpointDialog(unsigned int enabledParts, QWidget *parent = nullptr);
bool showDialog(BreakpointParameters *data, BreakpointParts *parts);
@@ -373,130 +372,130 @@ BreakpointDialog::BreakpointDialog(unsigned int enabledParts, QWidget *parent)
: QDialog(parent), m_enabledParts(enabledParts), m_previousType(UnknownBreakpointType),
m_firstTypeChange(true)
{
setWindowTitle(tr("Edit Breakpoint Properties"));
setWindowTitle(Tr::tr("Edit Breakpoint Properties"));
auto groupBoxBasic = new QGroupBox(tr("Basic"), this);
auto groupBoxBasic = new QGroupBox(Tr::tr("Basic"), this);
// Match BreakpointType (omitting unknown type).
const QStringList types = {
tr("File Name and Line Number"),
tr("Function Name"),
tr("Break on Memory Address"),
tr("Break When C++ Exception Is Thrown"),
tr("Break When C++ Exception Is Caught"),
tr("Break When Function \"main\" Starts"),
tr("Break When a New Process Is Forked"),
tr("Break When a New Process Is Executed"),
tr("Break When a System Call Is Executed"),
tr("Break on Data Access at Fixed Address"),
tr("Break on Data Access at Address Given by Expression"),
tr("Break on QML Signal Emit"),
tr("Break When JavaScript Exception Is Thrown")
Tr::tr("File Name and Line Number"),
Tr::tr("Function Name"),
Tr::tr("Break on Memory Address"),
Tr::tr("Break When C++ Exception Is Thrown"),
Tr::tr("Break When C++ Exception Is Caught"),
Tr::tr("Break When Function \"main\" Starts"),
Tr::tr("Break When a New Process Is Forked"),
Tr::tr("Break When a New Process Is Executed"),
Tr::tr("Break When a System Call Is Executed"),
Tr::tr("Break on Data Access at Fixed Address"),
Tr::tr("Break on Data Access at Address Given by Expression"),
Tr::tr("Break on QML Signal Emit"),
Tr::tr("Break When JavaScript Exception Is Thrown")
};
// We don't list UnknownBreakpointType, so 1 less:
QTC_CHECK(types.size() + 1 == LastBreakpointType);
m_comboBoxType = new QComboBox(groupBoxBasic);
m_comboBoxType->setMaxVisibleItems(20);
m_comboBoxType->addItems(types);
m_labelType = new QLabel(tr("Breakpoint &type:"), groupBoxBasic);
m_labelType = new QLabel(Tr::tr("Breakpoint &type:"), groupBoxBasic);
m_labelType->setBuddy(m_comboBoxType);
m_pathChooserFileName = new PathChooser(groupBoxBasic);
m_pathChooserFileName->setHistoryCompleter("Debugger.Breakpoint.File.History");
m_pathChooserFileName->setExpectedKind(PathChooser::File);
m_labelFileName = new QLabel(tr("&File name:"), groupBoxBasic);
m_labelFileName = new QLabel(Tr::tr("&File name:"), groupBoxBasic);
m_labelFileName->setBuddy(m_pathChooserFileName);
m_lineEditLineNumber = new QLineEdit(groupBoxBasic);
m_labelLineNumber = new QLabel(tr("&Line number:"), groupBoxBasic);
m_labelLineNumber = new QLabel(Tr::tr("&Line number:"), groupBoxBasic);
m_labelLineNumber->setBuddy(m_lineEditLineNumber);
m_checkBoxEnabled = new QCheckBox(groupBoxBasic);
m_labelEnabled = new QLabel(tr("&Enabled:"), groupBoxBasic);
m_labelEnabled = new QLabel(Tr::tr("&Enabled:"), groupBoxBasic);
m_labelEnabled->setBuddy(m_checkBoxEnabled);
m_lineEditAddress = new QLineEdit(groupBoxBasic);
m_labelAddress = new QLabel(tr("&Address:"), groupBoxBasic);
m_labelAddress = new QLabel(Tr::tr("&Address:"), groupBoxBasic);
m_labelAddress->setBuddy(m_lineEditAddress);
m_lineEditExpression = new QLineEdit(groupBoxBasic);
m_labelExpression = new QLabel(tr("&Expression:"), groupBoxBasic);
m_labelExpression = new QLabel(Tr::tr("&Expression:"), groupBoxBasic);
m_labelExpression->setBuddy(m_lineEditExpression);
m_lineEditFunction = new QLineEdit(groupBoxBasic);
m_labelFunction = new QLabel(tr("Fun&ction:"), groupBoxBasic);
m_labelFunction = new QLabel(Tr::tr("Fun&ction:"), groupBoxBasic);
m_labelFunction->setBuddy(m_lineEditFunction);
auto groupBoxAdvanced = new QGroupBox(tr("Advanced"), this);
auto groupBoxAdvanced = new QGroupBox(Tr::tr("Advanced"), this);
m_checkBoxTracepoint = new QCheckBox(groupBoxAdvanced);
m_labelTracepoint = new QLabel(tr("T&racepoint only:"), groupBoxAdvanced);
m_labelTracepoint = new QLabel(Tr::tr("T&racepoint only:"), groupBoxAdvanced);
m_labelTracepoint->setBuddy(m_checkBoxTracepoint);
m_checkBoxOneShot = new QCheckBox(groupBoxAdvanced);
m_labelOneShot = new QLabel(tr("&One shot only:"), groupBoxAdvanced);
m_labelOneShot = new QLabel(Tr::tr("&One shot only:"), groupBoxAdvanced);
m_labelOneShot->setBuddy(m_checkBoxOneShot);
const QString pathToolTip =
tr("<p>Determines how the path is specified "
"when setting breakpoints:</p><ul>"
"<li><i>Use Engine Default</i>: Preferred setting of the "
"debugger engine.</li>"
"<li><i>Use Full Path</i>: Pass full path, avoiding ambiguities "
"should files of the same name exist in several modules. "
"This is the engine default for CDB and LLDB.</li>"
"<li><i>Use File Name</i>: Pass the file name only. This is "
"useful when using a source tree whose location does "
"not match the one used when building the modules. "
"It is the engine default for GDB as using full paths can "
"be slow with this engine.</li></ul>");
Tr::tr("<p>Determines how the path is specified "
"when setting breakpoints:</p><ul>"
"<li><i>Use Engine Default</i>: Preferred setting of the "
"debugger engine.</li>"
"<li><i>Use Full Path</i>: Pass full path, avoiding ambiguities "
"should files of the same name exist in several modules. "
"This is the engine default for CDB and LLDB.</li>"
"<li><i>Use File Name</i>: Pass the file name only. This is "
"useful when using a source tree whose location does "
"not match the one used when building the modules. "
"It is the engine default for GDB as using full paths can "
"be slow with this engine.</li></ul>");
m_comboBoxPathUsage = new QComboBox(groupBoxAdvanced);
m_comboBoxPathUsage->addItem(tr("Use Engine Default"));
m_comboBoxPathUsage->addItem(tr("Use Full Path"));
m_comboBoxPathUsage->addItem(tr("Use File Name"));
m_comboBoxPathUsage->addItem(Tr::tr("Use Engine Default"));
m_comboBoxPathUsage->addItem(Tr::tr("Use Full Path"));
m_comboBoxPathUsage->addItem(Tr::tr("Use File Name"));
m_comboBoxPathUsage->setToolTip(pathToolTip);
m_labelUseFullPath = new QLabel(tr("Pat&h:"), groupBoxAdvanced);
m_labelUseFullPath = new QLabel(Tr::tr("Pat&h:"), groupBoxAdvanced);
m_labelUseFullPath->setBuddy(m_comboBoxPathUsage);
m_labelUseFullPath->setToolTip(pathToolTip);
const QString moduleToolTip =
"<p>" + tr("Specifying the module (base name of the library or executable) "
"<p>" + Tr::tr("Specifying the module (base name of the library or executable) "
"for function or file type breakpoints can significantly speed up "
"debugger startup times (CDB, LLDB).") + "</p>";
m_lineEditModule = new QLineEdit(groupBoxAdvanced);
m_lineEditModule->setToolTip(moduleToolTip);
m_labelModule = new QLabel(tr("&Module:"), groupBoxAdvanced);
m_labelModule = new QLabel(Tr::tr("&Module:"), groupBoxAdvanced);
m_labelModule->setBuddy(m_lineEditModule);
m_labelModule->setToolTip(moduleToolTip);
const QString commandsToolTip =
"<p>" + tr("Debugger commands to be executed when the breakpoint is hit. "
"<p>" + Tr::tr("Debugger commands to be executed when the breakpoint is hit. "
"This feature is only available for GDB.") + "</p>";
m_textEditCommands = new SmallTextEdit(groupBoxAdvanced);
m_textEditCommands->setToolTip(commandsToolTip);
m_labelCommands = new QLabel(tr("&Commands:"), groupBoxAdvanced);
m_labelCommands = new QLabel(Tr::tr("&Commands:"), groupBoxAdvanced);
m_labelCommands->setBuddy(m_textEditCommands);
m_labelCommands->setToolTip(commandsToolTip);
m_lineEditMessage = new QLineEdit(groupBoxAdvanced);
m_labelMessage = new QLabel(tr("&Message:"), groupBoxAdvanced);
m_labelMessage = new QLabel(Tr::tr("&Message:"), groupBoxAdvanced);
m_labelMessage->setBuddy(m_lineEditMessage);
m_lineEditCondition = new QLineEdit(groupBoxAdvanced);
m_labelCondition = new QLabel(tr("C&ondition:"), groupBoxAdvanced);
m_labelCondition = new QLabel(Tr::tr("C&ondition:"), groupBoxAdvanced);
m_labelCondition->setBuddy(m_lineEditCondition);
m_spinBoxIgnoreCount = new QSpinBox(groupBoxAdvanced);
m_spinBoxIgnoreCount->setMinimum(0);
m_spinBoxIgnoreCount->setMaximum(2147483647);
m_labelIgnoreCount = new QLabel(tr("&Ignore count:"), groupBoxAdvanced);
m_labelIgnoreCount = new QLabel(Tr::tr("&Ignore count:"), groupBoxAdvanced);
m_labelIgnoreCount->setBuddy(m_spinBoxIgnoreCount);
m_lineEditThreadSpec = new QLineEdit(groupBoxAdvanced);
m_labelThreadSpec = new QLabel(tr("&Thread specification:"), groupBoxAdvanced);
m_labelThreadSpec = new QLabel(Tr::tr("&Thread specification:"), groupBoxAdvanced);
m_labelThreadSpec->setBuddy(m_lineEditThreadSpec);
m_checkBoxPropagate = new QCheckBox(tr("Propagate Change to Preset Breakpoint"), this);
m_checkBoxPropagate = new QCheckBox(Tr::tr("Propagate Change to Preset Breakpoint"), this);
m_checkBoxPropagate->setCheckable(true);
m_checkBoxPropagate->setChecked(true);
m_checkBoxPropagate->setVisible(false); // FIXME: Make it work.
@@ -847,8 +846,6 @@ bool BreakpointDialog::showDialog(BreakpointParameters *data,
// Dialog allowing changing properties of multiple breakpoints at a time.
class MultiBreakPointsDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
MultiBreakPointsDialog(unsigned int enabledParts, QWidget *parent);
@@ -872,7 +869,7 @@ private:
MultiBreakPointsDialog::MultiBreakPointsDialog(unsigned int enabledParts, QWidget *parent) :
QDialog(parent)
{
setWindowTitle(tr("Edit Breakpoint Properties"));
setWindowTitle(Tr::tr("Edit Breakpoint Properties"));
m_lineEditCondition = new QLineEdit(this);
m_spinBoxIgnoreCount = new QSpinBox(this);
@@ -885,9 +882,9 @@ MultiBreakPointsDialog::MultiBreakPointsDialog(unsigned int enabledParts, QWidge
auto formLayout = new QFormLayout;
if (enabledParts & ConditionPart)
formLayout->addRow(tr("&Condition:"), m_lineEditCondition);
formLayout->addRow(tr("&Ignore count:"), m_spinBoxIgnoreCount);
formLayout->addRow(tr("&Thread specification:"), m_lineEditThreadSpec);
formLayout->addRow(Tr::tr("&Condition:"), m_lineEditCondition);
formLayout->addRow(Tr::tr("&Ignore count:"), m_spinBoxIgnoreCount);
formLayout->addRow(Tr::tr("&Thread specification:"), m_lineEditThreadSpec);
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
@@ -903,8 +900,8 @@ BreakHandler::BreakHandler(DebuggerEngine *engine)
#if USE_BREAK_MODEL_TEST
new ModelTest(this, 0);
#endif
setHeader({tr("Number"), tr("Function"), tr("File"), tr("Line"), tr("Address"),
tr("Condition"), tr("Ignore"), tr("Threads")});
setHeader({Tr::tr("Number"), Tr::tr("Function"), Tr::tr("File"), Tr::tr("Line"),
Tr::tr("Address"), Tr::tr("Condition"), Tr::tr("Ignore"), Tr::tr("Threads")});
}
bool BreakpointParameters::isLocatedAt(const FilePath &file, int line, const FilePath &markerFile) const
@@ -1011,7 +1008,7 @@ SubBreakpoints BreakHandler::findSubBreakpointsByIndex(const QList<QModelIndex>
QString BreakHandler::displayFromThreadSpec(int spec)
{
return spec == -1 ? BreakHandler::tr("(all)") : QString::number(spec);
return spec == -1 ? Tr::tr("(all)") : QString::number(spec);
}
int BreakHandler::threadSpecFromDisplay(const QString &str)
@@ -1064,10 +1061,10 @@ QVariant BreakpointItem::data(int column, int role) const
return typeToString(m_parameters.type);
if (m_parameters.type == WatchpointAtAddress)
return BreakHandler::tr("Data at 0x%1").arg(m_parameters.address, 0, 16);
return Tr::tr("Data at 0x%1").arg(m_parameters.address, 0, 16);
if (m_parameters.type == WatchpointAtExpression)
return BreakHandler::tr("Data at %1").arg(m_parameters.expression);
return Tr::tr("Data at %1").arg(m_parameters.expression);
return empty;
}
@@ -1097,7 +1094,7 @@ QVariant BreakpointItem::data(int column, int role) const
if (role == Qt::DisplayRole)
return m_parameters.condition;
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit if this condition is met.");
return Tr::tr("Breakpoint will only be hit if this condition is met.");
if (role == Qt::UserRole + 1)
return m_parameters.condition;
break;
@@ -1107,7 +1104,7 @@ QVariant BreakpointItem::data(int column, int role) const
return ignoreCount ? QVariant(ignoreCount) : QVariant(QString());
}
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit after being ignored so many times.");
return Tr::tr("Breakpoint will only be hit after being ignored so many times.");
if (role == Qt::UserRole + 1)
return m_parameters.ignoreCount;
break;
@@ -1115,7 +1112,7 @@ QVariant BreakpointItem::data(int column, int role) const
if (role == Qt::DisplayRole)
return BreakHandler::displayFromThreadSpec(m_parameters.threadSpec);
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit in the specified thread(s).");
return Tr::tr("Breakpoint will only be hit in the specified thread(s).");
if (role == Qt::UserRole + 1)
return BreakHandler::displayFromThreadSpec(m_parameters.threadSpec);
break;
@@ -1616,9 +1613,9 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
auto menu = new QMenu;
addAction(this, menu, tr("Add Breakpoint..."), true, &BreakpointManager::executeAddBreakpointDialog);
addAction(this, menu, Tr::tr("Add Breakpoint..."), true, &BreakpointManager::executeAddBreakpointDialog);
addAction(this, menu, tr("Delete Selected Breakpoints"),
addAction(this, menu, Tr::tr("Delete Selected Breakpoints"),
!selectedBreakpoints.isEmpty(),
[selectedBreakpoints] {
for (Breakpoint bp : selectedBreakpoints) {
@@ -1630,7 +1627,7 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
}
});
addAction(this, menu, tr("Edit Selected Breakpoints..."),
addAction(this, menu, Tr::tr("Edit Selected Breakpoints..."),
!selectedBreakpoints.isEmpty(),
[this, selectedBreakpoints, ev] { editBreakpoints(selectedBreakpoints, ev.view()); });
@@ -1638,8 +1635,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
// FIXME BP: m_engine->threadsHandler()->currentThreadId();
// int threadId = 0;
// addAction(menu,
// threadId == -1 ? tr("Associate Breakpoint with All Threads")
// : tr("Associate Breakpoint with Thread %1").arg(threadId),
// threadId == -1 ? Tr::tr("Associate Breakpoint with All Threads")
// : Tr::tr("Associate Breakpoint with Thread %1").arg(threadId),
// !selectedItems.isEmpty(),
// [this, selectedItems, threadId] {
// for (Breakpoint bp : selectedItems)
@@ -1648,8 +1645,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
addAction(this, menu,
selectedBreakpoints.size() > 1
? breakpointsEnabled ? tr("Disable Selected Breakpoints") : tr("Enable Selected Breakpoints")
: breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"),
? breakpointsEnabled ? Tr::tr("Disable Selected Breakpoints") : Tr::tr("Enable Selected Breakpoints")
: breakpointsEnabled ? Tr::tr("Disable Breakpoint") : Tr::tr("Enable Breakpoint"),
!selectedBreakpoints.isEmpty(),
[this, selectedBreakpoints, breakpointsEnabled] {
for (Breakpoint bp : selectedBreakpoints) {
@@ -1662,8 +1659,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
addAction(this, menu,
selectedLocations.size() > 1
? locationsEnabled ? tr("Disable Selected Locations") : tr("Enable Selected Locations")
: locationsEnabled ? tr("Disable Location") : tr("Enable Location"),
? locationsEnabled ? Tr::tr("Disable Selected Locations") : Tr::tr("Enable Selected Locations")
: locationsEnabled ? Tr::tr("Disable Location") : Tr::tr("Enable Location"),
!selectedLocations.isEmpty() && handlesIndividualLocations,
[this, selectedLocations, locationsEnabled] {
for (SubBreakpointItem * const sbp : selectedLocations)
@@ -1673,7 +1670,7 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
menu->addSeparator();
addAction(this, menu, tr("Delete All Breakpoints"),
addAction(this, menu, Tr::tr("Delete All Breakpoints"),
rowCount() > 0,
&BreakpointManager::executeDeleteAllBreakpointsDialog);
@@ -1688,8 +1685,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
breakpointsInFile.append(findBreakpointByIndex(index));
}
}
addAction(this, menu, tr("Delete Breakpoints of \"%1\"").arg(file),
tr("Delete Breakpoints of File"),
addAction(this, menu, Tr::tr("Delete Breakpoints of \"%1\"").arg(file),
Tr::tr("Delete Breakpoints of File"),
breakpointsInFile.size() > 1,
[breakpointsInFile] {
for (Breakpoint bp : breakpointsInFile)
@@ -1933,78 +1930,78 @@ QString BreakpointItem::toolTip() const
const BreakpointParameters &requested = requestedParameters();
QString rc;
QTextStream str(&rc);
str << "<html><body><b>" << tr("Breakpoint") << "</b>"
str << "<html><body><b>" << Tr::tr("Breakpoint") << "</b>"
<< "<table>"
<< "<tr><td>" << tr("Internal ID:")
<< "<tr><td>" << Tr::tr("Internal ID:")
<< "</td><td>" << m_responseId << "</td></tr>"
<< "<tr><td>" << tr("State:")
<< "</td><td>" << (requestedParameters().enabled ? tr("Enabled") : tr("Disabled"));
<< "<tr><td>" << Tr::tr("State:")
<< "</td><td>" << (requestedParameters().enabled ? Tr::tr("Enabled") : Tr::tr("Disabled"));
if (m_parameters.pending)
str << ", " << tr("pending");
str << ", " << Tr::tr("pending");
str << ", " << stateToString(m_state) << "</td></tr>";
str << "<tr><td>" << tr("Breakpoint Type:")
str << "<tr><td>" << Tr::tr("Breakpoint Type:")
<< "</td><td>" << typeToString(requested.type) << "</td></tr>"
<< "<tr><td>" << tr("Marker File:")
<< "<tr><td>" << Tr::tr("Marker File:")
<< "</td><td>" << markerFileName().toUserOutput() << "</td></tr>"
<< "<tr><td>" << tr("Marker Line:")
<< "<tr><td>" << Tr::tr("Marker Line:")
<< "</td><td>" << markerLineNumber() << "</td></tr>"
<< "<tr><td>" << tr("Hit Count:")
<< "<tr><td>" << Tr::tr("Hit Count:")
<< "</td><td>" << m_parameters.hitCount << "</td></tr>"
<< "</table><br><table>"
<< "<tr><th>" << tr("Property")
<< "</th><th>" << tr("Requested")
<< "</th><th>" << tr("Obtained") << "</th></tr>";
<< "<tr><th>" << Tr::tr("Property")
<< "</th><th>" << Tr::tr("Requested")
<< "</th><th>" << Tr::tr("Obtained") << "</th></tr>";
if (!m_displayName.isEmpty()) {
str << "<tr><td>" << tr("Display Name:")
str << "<tr><td>" << Tr::tr("Display Name:")
<< "</td><td>&mdash;</td><td>" << m_displayName << "</td></tr>";
}
if (m_parameters.type == BreakpointByFunction) {
str << "<tr><td>" << tr("Function Name:")
str << "<tr><td>" << Tr::tr("Function Name:")
<< "</td><td>" << requested.functionName
<< "</td><td>" << m_parameters.functionName
<< "</td></tr>";
}
if (m_parameters.type == BreakpointByFileAndLine) {
str << "<tr><td>" << tr("File Name:")
str << "<tr><td>" << Tr::tr("File Name:")
<< "</td><td>" << requested.fileName.toUserOutput()
<< "</td><td>" << m_parameters.fileName.toUserOutput()
<< "</td></tr>"
<< "<tr><td>" << tr("Line Number:")
<< "<tr><td>" << Tr::tr("Line Number:")
<< "</td><td>" << requested.lineNumber
<< "</td><td>" << m_parameters.lineNumber << "</td></tr>";
}
if (requested.type == BreakpointByFunction || m_parameters.type == BreakpointByFileAndLine) {
str << "<tr><td>" << tr("Module:")
str << "<tr><td>" << Tr::tr("Module:")
<< "</td><td>" << requested.module
<< "</td><td>" << m_parameters.module
<< "</td></tr>";
}
str << "<tr><td>" << tr("Breakpoint Address:")
str << "<tr><td>" << Tr::tr("Breakpoint Address:")
<< "</td><td>";
formatAddress(str, requested.address);
str << "</td><td>";
formatAddress(str, m_parameters.address);
str << "</td></tr>";
if (!requested.command.isEmpty() || !m_parameters.command.isEmpty()) {
str << "<tr><td>" << tr("Command:")
str << "<tr><td>" << Tr::tr("Command:")
<< "</td><td>" << requested.command
<< "</td><td>" << m_parameters.command
<< "</td></tr>";
}
if (!requested.message.isEmpty() || !m_parameters.message.isEmpty()) {
str << "<tr><td>" << tr("Message:")
str << "<tr><td>" << Tr::tr("Message:")
<< "</td><td>" << requested.message
<< "</td><td>" << m_parameters.message
<< "</td></tr>";
}
if (!requested.condition.isEmpty() || !m_parameters.condition.isEmpty()) {
str << "<tr><td>" << tr("Condition:")
str << "<tr><td>" << Tr::tr("Condition:")
<< "</td><td>" << requested.condition
<< "</td><td>" << m_parameters.condition
<< "</td></tr>";
}
if (requested.ignoreCount || m_parameters.ignoreCount) {
str << "<tr><td>" << tr("Ignore Count:") << "</td><td>";
str << "<tr><td>" << Tr::tr("Ignore Count:") << "</td><td>";
if (requested.ignoreCount)
str << m_parameters.ignoreCount;
str << "</td><td>";
@@ -2013,7 +2010,7 @@ QString BreakpointItem::toolTip() const
str << "</td></tr>";
}
if (requested.threadSpec >= 0 || m_parameters.threadSpec >= 0) {
str << "<tr><td>" << tr("Thread Specification:")
str << "<tr><td>" << Tr::tr("Thread Specification:")
<< "</td><td>";
if (requested.threadSpec >= 0)
str << requested.threadSpec;
@@ -2069,33 +2066,33 @@ void BreakHandler::releaseAllBreakpoints()
QString BreakpointItem::msgWatchpointByExpressionTriggered(const QString &expr) const
{
return tr("Internal data breakpoint %1 at %2 triggered.")
return Tr::tr("Internal data breakpoint %1 at %2 triggered.")
.arg(responseId()).arg(expr);
}
QString BreakpointItem::msgWatchpointByExpressionTriggered(const QString &expr,
const QString &threadId) const
{
return tr("Internal data breakpoint %1 at %2 in thread %3 triggered.")
return Tr::tr("Internal data breakpoint %1 at %2 in thread %3 triggered.")
.arg(responseId()).arg(expr).arg(threadId);
}
QString BreakpointItem::msgWatchpointByAddressTriggered(quint64 address) const
{
return tr("Internal data breakpoint %1 at 0x%2 triggered.")
return Tr::tr("Internal data breakpoint %1 at 0x%2 triggered.")
.arg(responseId()).arg(address, 0, 16);
}
QString BreakpointItem::msgWatchpointByAddressTriggered(quint64 address,
const QString &threadId) const
{
return tr("Internal data breakpoint %1 at 0x%2 in thread %3 triggered.")
return Tr::tr("Internal data breakpoint %1 at 0x%2 in thread %3 triggered.")
.arg(responseId()).arg(address, 0, 16).arg(threadId);
}
QString BreakpointItem::msgBreakpointTriggered(const QString &threadId) const
{
return tr("Stopped at breakpoint %1 in thread %2.")
return Tr::tr("Stopped at breakpoint %1 in thread %2.")
.arg(responseId()).arg(threadId);
}
@@ -2171,9 +2168,9 @@ QVariant GlobalBreakpointItem::data(int column, int role) const
|| m_params.type == BreakpointAtSysCall)
return typeToString(m_params.type);
if (m_params.type == WatchpointAtAddress)
return BreakHandler::tr("Data at 0x%1").arg(m_params.address, 0, 16);
return Tr::tr("Data at 0x%1").arg(m_params.address, 0, 16);
if (m_params.type == WatchpointAtExpression)
return BreakHandler::tr("Data at %1").arg(m_params.expression);
return Tr::tr("Data at %1").arg(m_params.expression);
return empty;
}
break;
@@ -2202,7 +2199,7 @@ QVariant GlobalBreakpointItem::data(int column, int role) const
if (role == Qt::DisplayRole)
return m_params.condition;
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit if this condition is met.");
return Tr::tr("Breakpoint will only be hit if this condition is met.");
if (role == Qt::UserRole + 1)
return m_params.condition;
break;
@@ -2212,7 +2209,7 @@ QVariant GlobalBreakpointItem::data(int column, int role) const
return ignoreCount ? QVariant(ignoreCount) : QVariant(QString());
}
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit after being ignored so many times.");
return Tr::tr("Breakpoint will only be hit after being ignored so many times.");
if (role == Qt::UserRole + 1)
return m_params.ignoreCount;
break;
@@ -2220,7 +2217,7 @@ QVariant GlobalBreakpointItem::data(int column, int role) const
if (role == Qt::DisplayRole)
return BreakHandler::displayFromThreadSpec(m_params.threadSpec);
if (role == Qt::ToolTipRole)
return BreakHandler::tr("Breakpoint will only be hit in the specified thread(s).");
return Tr::tr("Breakpoint will only be hit in the specified thread(s).");
if (role == Qt::UserRole + 1)
return BreakHandler::displayFromThreadSpec(m_params.threadSpec);
break;
@@ -2377,43 +2374,42 @@ QString GlobalBreakpointItem::toolTip() const
{
QString rc;
QTextStream str(&rc);
str << "<html><body><b>" << BreakpointItem::tr("Unclaimed Breakpoint") << "</b>"
str << "<html><body><b>" << Tr::tr("Unclaimed Breakpoint") << "</b>"
<< "<table>"
//<< "<tr><td>" << tr("ID:") << "</td><td>" << m_id << "</td></tr>"
<< "<tr><td>" << BreakpointItem::tr("State:")
<< "</td><td>" << (m_params.enabled ? BreakpointItem::tr("Enabled") : BreakpointItem::tr("Disabled"))
<< "<tr><td>" << BreakpointItem::tr("Breakpoint Type:")
<< "</td><td>" << typeToString(m_params.type) << "</td></tr>";
//<< "<tr><td>" << Tr::tr("ID:") << "</td><td>" << m_id << "</td></tr>"
<< "<tr><td>" << Tr::tr("State:") << "</td><td>"
<< (m_params.enabled ? Tr::tr("Enabled") : Tr::tr("Disabled")) << "<tr><td>"
<< Tr::tr("Breakpoint Type:") << "</td><td>" << typeToString(m_params.type) << "</td></tr>";
if (m_params.type == BreakpointByFunction) {
str << "<tr><td>" << BreakpointItem::tr("Function Name:")
str << "<tr><td>" << Tr::tr("Function Name:")
<< "</td><td>" << m_params.functionName
<< "</td></tr>";
}
if (m_params.type == BreakpointByFileAndLine) {
str << "<tr><td>" << BreakpointItem::tr("File Name:")
str << "<tr><td>" << Tr::tr("File Name:")
<< "</td><td>" << m_params.fileName.toUserOutput()
<< "</td></tr>"
<< "<tr><td>" << BreakpointItem::tr("Line Number:")
<< "<tr><td>" << Tr::tr("Line Number:")
<< "</td><td>" << m_params.lineNumber;
}
if (m_params.type == BreakpointByFunction || m_params.type == BreakpointByFileAndLine) {
str << "<tr><td>" << BreakpointItem::tr("Module:")
str << "<tr><td>" << Tr::tr("Module:")
<< "</td><td>" << m_params.module
<< "</td></tr>";
}
str << "<tr><td>" << BreakpointItem::tr("Breakpoint Address:") << "</td><td>";
str << "<tr><td>" << Tr::tr("Breakpoint Address:") << "</td><td>";
formatAddress(str, m_params.address);
str << "</td></tr>";
if (!m_params.command.isEmpty())
str << "<tr><td>" << BreakpointItem::tr("Command:") << "</td><td>" << m_params.command << "</td></tr>";
str << "<tr><td>" << Tr::tr("Command:") << "</td><td>" << m_params.command << "</td></tr>";
if (!m_params.message.isEmpty())
str << "<tr><td>" << BreakpointItem::tr("Message:") << "</td><td>" << m_params.message << "</td></tr>";
str << "<tr><td>" << Tr::tr("Message:") << "</td><td>" << m_params.message << "</td></tr>";
if (!m_params.condition.isEmpty())
str << "<tr><td>" << BreakpointItem::tr("Condition:") << "</td><td>" << m_params.condition << "</td></tr>";
str << "<tr><td>" << Tr::tr("Condition:") << "</td><td>" << m_params.condition << "</td></tr>";
if (m_params.ignoreCount)
str << "<tr><td>" << BreakpointItem::tr("Ignore Count:") << "</td><td>" << m_params.ignoreCount << "</td></tr>";
str << "<tr><td>" << Tr::tr("Ignore Count:") << "</td><td>" << m_params.ignoreCount << "</td></tr>";
if (m_params.threadSpec >= 0)
str << "<tr><td>" << BreakpointItem::tr("Thread Specification:") << "</td><td>" << m_params.threadSpec << "</td></tr>";
str << "<tr><td>" << Tr::tr("Thread Specification:") << "</td><td>" << m_params.threadSpec << "</td></tr>";
str << "</table></body></html><hr>";
return rc;
@@ -2426,8 +2422,8 @@ QString GlobalBreakpointItem::toolTip() const
BreakpointManager::BreakpointManager()
{
theBreakpointManager = this;
setHeader({tr("Debuggee"), tr("Function"), tr("File"), tr("Line"), tr("Address"),
tr("Condition"), tr("Ignore"), tr("Threads")});
setHeader({Tr::tr("Debuggee"), Tr::tr("Function"), Tr::tr("File"), Tr::tr("Line"), Tr::tr("Address"),
Tr::tr("Condition"), Tr::tr("Ignore"), Tr::tr("Threads")});
connect(SessionManager::instance(), &SessionManager::sessionLoaded,
this, &BreakpointManager::loadSessionData);
connect(SessionManager::instance(), &SessionManager::aboutToSaveSession,
@@ -2567,7 +2563,7 @@ void BreakpointManager::executeAddBreakpointDialog()
BreakpointParameters data(BreakpointByFileAndLine);
BreakpointParts parts = NoParts;
BreakpointDialog dialog(~0, ICore::dialogParent());
dialog.setWindowTitle(tr("Add Breakpoint"));
dialog.setWindowTitle(Tr::tr("Add Breakpoint"));
if (dialog.showDialog(&data, &parts))
BreakpointManager::createBreakpoint(data);
}
@@ -2642,23 +2638,23 @@ bool BreakpointManager::contextMenuEvent(const ItemViewEvent &ev)
auto menu = new QMenu;
addAction(this, menu, tr("Add Breakpoint..."), true, &BreakpointManager::executeAddBreakpointDialog);
addAction(this, menu, Tr::tr("Add Breakpoint..."), true, &BreakpointManager::executeAddBreakpointDialog);
addAction(this, menu, tr("Delete Selected Breakpoints"),
addAction(this, menu, Tr::tr("Delete Selected Breakpoints"),
!selectedBreakpoints.isEmpty(),
[selectedBreakpoints] {
for (GlobalBreakpoint gbp : selectedBreakpoints)
gbp->deleteBreakpoint();
});
addAction(this, menu, tr("Edit Selected Breakpoints..."),
addAction(this, menu, Tr::tr("Edit Selected Breakpoints..."),
!selectedBreakpoints.isEmpty(),
[this, selectedBreakpoints, ev] { editBreakpoints(selectedBreakpoints, ev.view()); });
addAction(this, menu,
selectedBreakpoints.size() > 1
? breakpointsEnabled ? tr("Disable Selected Breakpoints") : tr("Enable Selected Breakpoints")
: breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"),
? breakpointsEnabled ? Tr::tr("Disable Selected Breakpoints") : Tr::tr("Enable Selected Breakpoints")
: breakpointsEnabled ? Tr::tr("Disable Breakpoint") : Tr::tr("Enable Breakpoint"),
!selectedBreakpoints.isEmpty(),
[selectedBreakpoints, breakpointsEnabled] {
for (GlobalBreakpoint gbp : selectedBreakpoints)
@@ -2668,7 +2664,7 @@ bool BreakpointManager::contextMenuEvent(const ItemViewEvent &ev)
menu->addSeparator();
addAction(this, menu, tr("Delete All Breakpoints"),
addAction(this, menu, Tr::tr("Delete All Breakpoints"),
rowCount() > 0,
&BreakpointManager::executeDeleteAllBreakpointsDialog);
@@ -2684,8 +2680,8 @@ bool BreakpointManager::contextMenuEvent(const ItemViewEvent &ev)
});
}
}
addAction(this, menu, tr("Delete Breakpoints of \"%1\"").arg(file.toUserOutput()),
tr("Delete Breakpoints of File"),
addAction(this, menu, Tr::tr("Delete Breakpoints of \"%1\"").arg(file.toUserOutput()),
Tr::tr("Delete Breakpoints of File"),
breakpointsInFile.size() > 1,
[breakpointsInFile] {
for (GlobalBreakpoint gbp : breakpointsInFile)
@@ -2714,9 +2710,9 @@ void BreakpointManager::executeDeleteAllBreakpointsDialog()
{
QDialogButtonBox::StandardButton pressed =
CheckableMessageBox::doNotAskAgainQuestion(ICore::dialogParent(),
tr("Remove All Breakpoints"),
tr("Are you sure you want to remove all breakpoints "
"from all files in the current session?"),
Tr::tr("Remove All Breakpoints"),
Tr::tr("Are you sure you want to remove all breakpoints "
"from all files in the current session?"),
ICore::settings(),
"RemoveAllBreakpoints");
if (pressed != QDialogButtonBox::Yes)

View File

@@ -28,16 +28,14 @@
#include "breakpoint.h"
#include "debuggerprotocol.h"
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <utils/treemodel.h>
#include <QCoreApplication>
#include <QPointer>
namespace Utils { class ItemViewEvent; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class BreakHandler;
class BreakpointItem;
@@ -64,8 +62,6 @@ using SubBreakpoint = QPointer<SubBreakpointItem>;
class GlobalBreakpointItem : public QObject, public Utils::TreeItem
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
explicit GlobalBreakpointItem();
~GlobalBreakpointItem() override;
@@ -115,8 +111,6 @@ using GlobalBreakpoints = QList<GlobalBreakpoint>;
class BreakpointItem final : public QObject, public Utils::TypedTreeItem<SubBreakpointItem>
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
explicit BreakpointItem(const GlobalBreakpoint &gbp);
~BreakpointItem() final;
@@ -229,8 +223,6 @@ inline auto qHash(const Debugger::Internal::GlobalBreakpoint &b) { return qHash(
class BreakHandler : public BreakHandlerModel
{
Q_OBJECT
public:
explicit BreakHandler(DebuggerEngine *engine);
@@ -291,8 +283,6 @@ private:
class BreakpointManager : public BreakpointManagerModel
{
Q_OBJECT
public:
BreakpointManager();
@@ -328,6 +318,4 @@ private:
void editBreakpoints(const GlobalBreakpoints &gbps, QWidget *parent);
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,11 +25,11 @@
#include "breakpoint.h"
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerprotocol.h"
#include <projectexplorer/abi.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>

View File

@@ -39,6 +39,7 @@
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/debuggertr.h>
#include <debugger/disassembleragent.h>
#include <debugger/disassemblerlines.h>
#include <debugger/enginemanager.h>
@@ -303,7 +304,7 @@ void CdbEngine::createFullBacktrace()
void CdbEngine::handleSetupFailure(const QString &errorMessage)
{
showMessage(errorMessage, LogError);
Core::AsynchronousMessageBox::critical(tr("Failed to Start the Debugger"), errorMessage);
Core::AsynchronousMessageBox::critical(Tr::tr("Failed to Start the Debugger"), errorMessage);
notifyEngineSetupFailed();
}
@@ -337,7 +338,7 @@ void CdbEngine::setupEngine()
// The extension is passed as relative name with the path variable set
//(does not work with absolute path names)
if (sp.debugger.command.isEmpty()) {
handleSetupFailure(tr("There is no CDB executable specified."));
handleSetupFailure(Tr::tr("There is no CDB executable specified."));
return;
}
@@ -353,7 +354,7 @@ void CdbEngine::setupEngine()
m_wow64State = noWow64Stack;
const QFileInfo extensionFi(CdbEngine::extensionLibraryName(cdbIs64Bit, cdbIsArm));
if (!extensionFi.isFile()) {
handleSetupFailure(tr("Internal error: The extension %1 cannot be found.\n"
handleSetupFailure(Tr::tr("Internal error: The extension %1 cannot be found.\n"
"If you have updated %2 via Maintenance Tool, you may "
"need to rerun the Tool and select \"Add or remove components\" "
"and then select the "
@@ -1638,14 +1639,14 @@ enum StopActionFlags
static inline QString msgTracePointTriggered(const Breakpoint &, const QString &displayName,
const QString &threadId)
{
return CdbEngine::tr("Trace point %1 in thread %2 triggered.")
return Tr::tr("Trace point %1 in thread %2 triggered.")
.arg(displayName).arg(threadId);
}
static inline QString msgCheckingConditionalBreakPoint(const Breakpoint &bp, const QString &displayName,
const QString &threadId)
{
return CdbEngine::tr("Conditional breakpoint %1 in thread %2 triggered, examining expression \"%3\".")
return Tr::tr("Conditional breakpoint %1 in thread %2 triggered, examining expression \"%3\".")
.arg(displayName).arg(threadId, bp->condition());
}
@@ -1662,7 +1663,7 @@ unsigned CdbEngine::examineStopReason(const GdbMi &stopReason,
qDebug("%s", qPrintable(stopReason.toString(true, 4)));
const QString reason = stopReason["reason"].data();
if (reason.isEmpty()) {
*message = tr("Malformed stop response received.");
*message = Tr::tr("Malformed stop response received.");
rc |= StopReportParseError|StopNotifyStop;
return rc;
}
@@ -1806,7 +1807,7 @@ void CdbEngine::processStop(const GdbMi &stopReason, bool conditionalBreakPointT
m_sourceStepInto = false;
// Start sequence to get all relevant data.
if (stopFlags & StopInArtificialThread) {
showMessage(tr("Switching to main thread..."), LogMisc);
showMessage(Tr::tr("Switching to main thread..."), LogMisc);
runCommand({"~0 s", NoFlags});
forcedThread = true;
// Re-fetch stack again.
@@ -2169,7 +2170,7 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QString &what, c
const Task::TaskType type =
isFatalWinException(exception.exceptionCode) ? Task::Error : Task::Warning;
const FilePath fileName = FilePath::fromUserInput(exception.file);
const QString taskEntry = tr("Debugger encountered an exception: %1").arg(
const QString taskEntry = Tr::tr("Debugger encountered an exception: %1").arg(
exception.toString(false).trimmed());
TaskHub::addTask(Task(type, taskEntry,
fileName, exception.lineNumber,
@@ -2251,7 +2252,7 @@ void CdbEngine::checkQtSdkPdbFiles(const QString &module)
return;
const QString message
= tr("The installed %1 is missing debug information files.\n"
= Tr::tr("The installed %1 is missing debug information files.\n"
"Locals and Expression might not be able to display all Qt Types in a "
"human readable format.\n\n"
"Please install the \"Qt Debug Information Files\" Package from the "
@@ -2261,7 +2262,7 @@ void CdbEngine::checkQtSdkPdbFiles(const QString &module)
CheckableMessageBox::doNotShowAgainInformation(
Core::ICore::dialogParent(),
tr("Missing Qt Debug Information"),
Tr::tr("Missing Qt Debug Information"),
message,
Core::ICore::settings(),
"CdbQtSdkPdbHint");
@@ -2384,7 +2385,7 @@ void CdbEngine::parseOutputLine(QString line)
const QRegularExpressionMatch match = moduleRegExp.match(line);
if (match.hasMatch()) {
const QString module = match.captured(3).trimmed();
showStatusMessage(tr("Module loaded: %1").arg(module), 3000);
showStatusMessage(Tr::tr("Module loaded: %1").arg(module), 3000);
checkQtSdkPdbFiles(module);
}
} else {
@@ -2818,9 +2819,9 @@ void CdbEngine::handleExpression(const DebuggerResponse &response, const Breakpo
showMessage(response.data["msg"].data(), LogError);
// Is this a conditional breakpoint?
const QString message = value ?
tr("Value %1 obtained from evaluating the condition of breakpoint %2, stopping.").
Tr::tr("Value %1 obtained from evaluating the condition of breakpoint %2, stopping.").
arg(value).arg(bp->displayName()) :
tr("Value 0 obtained from evaluating the condition of breakpoint %1, continuing.").
Tr::tr("Value 0 obtained from evaluating the condition of breakpoint %1, continuing.").
arg(bp->displayName());
showMessage(message, LogMisc);
// Stop if evaluation is true, else continue

View File

@@ -36,8 +36,7 @@
#include <QElapsedTimer>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class CdbEngine : public CppDebuggerEngine
{
@@ -231,5 +230,4 @@ private:
mutable CPlusPlus::Snapshot m_codeModelSnapshot;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,12 +25,11 @@
#include "cdboptionspage.h"
#include "cdbengine.h"
#include <debugger/commonoptionspage.h>
#include <debugger/debuggeractions.h>
#include <debugger/debuggercore.h>
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggertr.h>
#include <debugger/shared/cdbsymbolpathlisteditor.h>
#include <coreplugin/icore.h>
@@ -56,18 +55,12 @@ struct EventsDescription {
// Parameters of the "sxe" command
const EventsDescription eventDescriptions[] =
{
{"eh", false, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"C++ exception")},
{"ct", false, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"Thread creation")},
{"et", false, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"Thread exit")},
{"ld", true, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"Load module:")},
{"ud", true, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"Unload module:")},
{"out", true, QT_TRANSLATE_NOOP("Debugger::Internal::CdbBreakEventWidget",
"Output:")}
{"eh", false, QT_TRANSLATE_NOOP("Debugger", "C++ exception")},
{"ct", false, QT_TRANSLATE_NOOP("Debugger", "Thread creation")},
{"et", false, QT_TRANSLATE_NOOP("Debugger", "Thread exit")},
{"ld", true, QT_TRANSLATE_NOOP("Debugger", "Load module:")},
{"ud", true, QT_TRANSLATE_NOOP("Debugger", "Unload module:")},
{"out", true, QT_TRANSLATE_NOOP("Debugger", "Output:")}
};
static inline int indexOfEvent(const QString &abbrev)
@@ -86,8 +79,6 @@ static inline int indexOfEvent(const QString &abbrev)
// events with parameters (like 'out:Needle').
class CdbBreakEventWidget : public QWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbBreakEventWidget)
public:
explicit CdbBreakEventWidget(QWidget *parent = nullptr);
@@ -113,7 +104,7 @@ CdbBreakEventWidget::CdbBreakEventWidget(QWidget *parent) : QWidget(parent)
mainLayout->addLayout(leftLayout);
const size_t eventCount = sizeof(eventDescriptions) / sizeof(EventsDescription);
for (size_t e = 0; e < eventCount; e++) {
auto cb = new QCheckBox(tr(eventDescriptions[e].description));
auto cb = new QCheckBox(Tr::tr(eventDescriptions[e].description));
QLineEdit *le = nullptr;
if (eventDescriptions[e].hasParameter) {
if (!parameterLayout) {
@@ -185,8 +176,6 @@ QStringList CdbBreakEventWidget::breakEvents() const
class CdbOptionsPageWidget : public Core::IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbOptionsPageWidget)
public:
CdbOptionsPageWidget();
@@ -209,14 +198,14 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
Column {
Row {
Group {
Title(tr("Startup")),
Title(Tr::tr("Startup")),
s.cdbAdditionalArguments,
s.useCdbConsole,
Stretch()
},
Group {
Title(tr("Various")),
Title(Tr::tr("Various")),
s.ignoreFirstChanceAccessViolation,
s.cdbBreakOnCrtDbgReport,
s.cdbBreakPointCorrection,
@@ -225,12 +214,12 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
},
Group {
Title(tr("Break On")),
Title(Tr::tr("Break On")),
m_breakEventWidget
},
Group {
Title(tr("Add Exceptions to Issues View")),
Title(Tr::tr("Add Exceptions to Issues View")),
s.firstChanceExceptionTaskEntry,
s.secondChanceExceptionTaskEntry
},
@@ -255,7 +244,7 @@ void CdbOptionsPageWidget::finish()
CdbOptionsPage::CdbOptionsPage()
{
setId("F.Debugger.Cda");
setDisplayName(CdbOptionsPageWidget::tr("CDB"));
setDisplayName(Tr::tr("CDB"));
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
setWidgetCreator([] { return new CdbOptionsPageWidget; });
}
@@ -265,8 +254,6 @@ CdbOptionsPage::CdbOptionsPage()
class CdbPathsPageWidget : public Core::IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbPathsPageWidget)
public:
CdbPathsPageWidget();
@@ -288,8 +275,8 @@ CdbPathsPageWidget::CdbPathsPageWidget()
finish();
Column {
Group { Title(tr("Symbol Paths")), m_symbolPaths },
Group { Title(tr("Source Paths")), m_sourcePaths },
Group { Title(Tr::tr("Symbol Paths")), m_symbolPaths },
Group { Title(Tr::tr("Source Paths")), m_sourcePaths },
Stretch()
}.attachTo(this);
}
@@ -310,7 +297,7 @@ void CdbPathsPageWidget::finish()
CdbPathsPage::CdbPathsPage()
{
setId("F.Debugger.Cdb");
setDisplayName(CdbPathsPageWidget::tr("CDB Paths"));
setDisplayName(Tr::tr("CDB Paths"));
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
setWidgetCreator([] { return new CdbPathsPageWidget; });
}

View File

@@ -27,6 +27,7 @@
#include "debuggeractions.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include <coreplugin/icore.h>
@@ -47,8 +48,6 @@ namespace Internal {
class CommonOptionsPageWidget : public Core::IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CommonOptionsPageWidget)
public:
explicit CommonOptionsPageWidget()
{
@@ -107,23 +106,23 @@ void CommonOptionsPageWidget::apply()
CommonOptionsPage::CommonOptionsPage()
{
setId(DEBUGGER_COMMON_SETTINGS_ID);
setDisplayName(QCoreApplication::translate("Debugger", "General"));
setDisplayName(Tr::tr("General"));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", "Debugger"));
setDisplayCategory(Tr::tr("Debugger"));
setCategoryIconPath(":/debugger/images/settingscategory_debugger.png");
setWidgetCreator([] { return new CommonOptionsPageWidget; });
}
QString CommonOptionsPage::msgSetBreakpointAtFunction(const char *function)
{
return CommonOptionsPageWidget::tr("Stop when %1() is called").arg(QLatin1String(function));
return Tr::tr("Stop when %1() is called").arg(QLatin1String(function));
}
QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *function,
const QString &hint)
{
QString result = "<html><head/><body>";
result += CommonOptionsPageWidget::tr("Always adds a breakpoint on the <i>%1()</i> function.")
result += Tr::tr("Always adds a breakpoint on the <i>%1()</i> function.")
.arg(QLatin1String(function));
if (!hint.isEmpty()) {
result += "<br>";
@@ -142,8 +141,6 @@ QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *functio
class LocalsAndExpressionsOptionsPageWidget : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::LocalsAndExpressionsOptionsPage)
public:
LocalsAndExpressionsOptionsPageWidget()
{
@@ -154,7 +151,7 @@ public:
label->setTextFormat(Qt::AutoText);
label->setWordWrap(true);
label->setText("<html><head/><body>\n<p>"
+ tr("The debugging helpers are used to produce a nice "
+ Tr::tr("The debugging helpers are used to produce a nice "
"display of objects of certain types like QString or "
"std::map in the &quot;Locals&quot; and &quot;Expressions&quot; views.")
+ "</p></body></html>");
@@ -163,13 +160,13 @@ public:
label,
s.useCodeModel,
s.showThreadNames,
Group { Title(tr("Extra Debugging Helper")), s.extraDumperFile }
Group { Title(Tr::tr("Extra Debugging Helper")), s.extraDumperFile }
};
Group useHelper {
Row {
left,
Group { Title(tr("Debugging Helper Customization")), s.extraDumperCommands }
Group { Title(Tr::tr("Debugging Helper Customization")), s.extraDumperCommands }
}
};
@@ -203,7 +200,7 @@ LocalsAndExpressionsOptionsPage::LocalsAndExpressionsOptionsPage()
{
setId("Z.Debugger.LocalsAndExpressions");
//: '&&' will appear as one (one is marking keyboard shortcut)
setDisplayName(QCoreApplication::translate("Debugger", "Locals && Expressions"));
setDisplayName(Tr::tr("Locals && Expressions"));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
setWidgetCreator([] { return new LocalsAndExpressionsOptionsPageWidget; });
}

View File

@@ -27,8 +27,7 @@
#include <coreplugin/dialogs/ioptionspage.h>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class CommonOptionsPage final : public Core::IOptionsPage
{
@@ -46,5 +45,4 @@ public:
LocalsAndExpressionsOptionsPage();
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -24,14 +24,18 @@
****************************************************************************/
#include "console.h"
#include "consoleview.h"
#include "consoleproxymodel.h"
#include "consoleitemdelegate.h"
#include "../debuggertr.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icore.h>
#include <utils/utilsicons.h>
#include <aggregation/aggregate.h>
#include <coreplugin/find/itemviewfind.h>
@@ -46,8 +50,7 @@ const char SHOW_LOG[] = "showLog";
const char SHOW_WARNING[] = "showWarning";
const char SHOW_ERROR[] = "showError";
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
/////////////////////////////////////////////////////////////////////
//
@@ -103,8 +106,8 @@ Console::Console()
m_showDebug.setDefaultValue(true);
m_showDebug.setSettingsKey(CONSOLE, SHOW_LOG);
m_showDebug.setLabelText(tr("Show debug, log, and info messages."));
m_showDebug.setToolTip(tr("Show debug, log, and info messages."));
m_showDebug.setLabelText(Tr::tr("Show debug, log, and info messages."));
m_showDebug.setToolTip(Tr::tr("Show debug, log, and info messages."));
m_showDebug.setValue(true);
m_showDebug.action()->setIcon(Utils::Icons::INFO_TOOLBAR.icon());
connect(&m_showDebug, &Utils::BoolAspect::valueChanged,
@@ -115,8 +118,8 @@ Console::Console()
m_showWarning.setDefaultValue(true);
m_showWarning.setSettingsKey(CONSOLE, SHOW_WARNING);
m_showWarning.setLabelText(tr("Show warning messages."));
m_showWarning.setToolTip(tr("Show warning messages."));
m_showWarning.setLabelText(Tr::tr("Show warning messages."));
m_showWarning.setToolTip(Tr::tr("Show warning messages."));
m_showWarning.setValue(true);
m_showWarning.action()->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
connect(m_showWarning.action(), &QAction::toggled,
@@ -127,8 +130,8 @@ Console::Console()
m_showError.setDefaultValue(true);
m_showError.setSettingsKey(CONSOLE, SHOW_ERROR);
m_showError.setLabelText(tr("Show error messages."));
m_showError.setToolTip(tr("Show error messages."));
m_showError.setLabelText(Tr::tr("Show error messages."));
m_showError.setToolTip(Tr::tr("Show error messages."));
m_showError.setValue(true);
m_showError.action()->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon());
connect(m_showError.action(), &QAction::toggled,
@@ -162,6 +165,11 @@ QList<QWidget *> Console::toolBarWidgets() const
m_spacer, m_statusLabel};
}
QString Console::displayName() const
{
return Tr::tr("QML Debugger Console");
}
int Console::priorityInStatusBar() const
{
return 20;
@@ -269,14 +277,12 @@ void Console::evaluate(const QString &expression)
m_consoleItemModel->shiftEditableRow();
m_scriptEvaluator(expression);
} else {
auto item = new ConsoleItem(ConsoleItem::ErrorType,
QCoreApplication::translate(
"Debugger::Internal::Console",
"Can only evaluate during a debug session."));
auto item = new ConsoleItem(
ConsoleItem::ErrorType,
QCoreApplication::translate("Debugger", "Can only evaluate during a debug session."));
m_consoleItemModel->shiftEditableRow();
printItem(item);
}
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -41,8 +41,7 @@ QT_END_NAMESPACE
namespace Utils { class BoolAspect; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
using ScriptEvaluator = std::function<void (QString)>;
@@ -51,15 +50,13 @@ class ConsoleView;
class Console final : public Core::IOutputPane
{
Q_OBJECT
public:
Console();
~Console() override;
QWidget *outputWidget(QWidget *) override;
QList<QWidget *> toolBarWidgets() const override;
QString displayName() const override { return tr("QML Debugger Console"); }
QString displayName() const override;
int priorityInStatusBar() const override;
void clearContents() override;
bool canFocus() const override;
@@ -101,5 +98,4 @@ private:
Console *debuggerConsole();
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -24,22 +24,15 @@
****************************************************************************/
#include "consoleedit.h"
#include "consoleitemmodel.h"
#include "console.h"
#include <utils/qtcassert.h>
#include <QUrl>
#include <QMenu>
#include <QKeyEvent>
namespace Debugger {
namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// ConsoleEdit
//
///////////////////////////////////////////////////////////////////////
namespace Debugger::Internal {
ConsoleEdit::ConsoleEdit(const QModelIndex &index, QWidget *parent) :
QTextEdit(parent),
@@ -154,5 +147,4 @@ void ConsoleEdit::replaceCurrentScript(const QString &script)
setTextCursor(cursor);
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -29,8 +29,7 @@
#include <QString>
#include <QTextEdit>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleEdit : public QTextEdit
{
@@ -57,5 +56,4 @@ private:
QString m_cachedScript;
};
} // Debugger
} // Internal
} // Debugger::Internal

View File

@@ -25,8 +25,7 @@
#include "consoleitem.h"
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
static QString addZeroWidthSpace(QString text)
{
@@ -157,5 +156,4 @@ QString ConsoleItem::expression() const
return text().remove(QChar(0x200b)); // ZERO WIDTH SPACE
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -27,11 +27,7 @@
#include <utils/treemodel.h>
#include <QString>
#include <functional>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleItem : public Utils::TreeItem
{
@@ -80,5 +76,4 @@ private:
std::function<void(ConsoleItem *)> m_doFetch;
};
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -24,6 +24,7 @@
****************************************************************************/
#include "consoleitemdelegate.h"
#include "consoleedit.h"
#include <coreplugin/coreconstants.h>
@@ -39,14 +40,7 @@
const int ELLIPSIS_GRADIENT_WIDTH = 16;
namespace Debugger {
namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// ConsoleItemDelegate
//
///////////////////////////////////////////////////////////////////////
namespace Debugger::Internal {
ConsoleItemDelegate::ConsoleItemDelegate(ConsoleItemModel *model, QObject *parent) :
QStyledItemDelegate(parent),
@@ -328,5 +322,4 @@ qreal ConsoleItemDelegate::layoutText(QTextLayout &tl, int width,
return height;
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -26,18 +26,15 @@
#pragma once
#include "consoleitemmodel.h"
#include "console.h"
#include <QStyledItemDelegate>
QT_FORWARD_DECLARE_CLASS(QTextLayout)
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
ConsoleItemDelegate(ConsoleItemModel *model, QObject *parent);
@@ -164,5 +161,4 @@ public:
static const int ITEM_SPACING = 4;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -28,14 +28,7 @@
#include <QFontMetrics>
#include <QFont>
namespace Debugger {
namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// ConsoleItemModel
//
///////////////////////////////////////////////////////////////////////
namespace Debugger::Internal {
ConsoleItemModel::ConsoleItemModel(QObject *parent) :
Utils::TreeModel<>(new ConsoleItem, parent)
@@ -103,5 +96,4 @@ int ConsoleItemModel::sizeOfLineNumber(const QFont &font)
return fm.horizontalAdvance("88888");
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -34,8 +34,7 @@ QT_BEGIN_NAMESPACE
class QFont;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleItemModel : public Utils::TreeModel<>
{
@@ -64,5 +63,4 @@ private:
bool m_canFetchMore = false;
};
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -24,10 +24,8 @@
****************************************************************************/
#include "consoleproxymodel.h"
#include "consoleitemmodel.h"
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
ConsoleProxyModel::ConsoleProxyModel(QObject *parent) :
QSortFilterProxyModel(parent),
@@ -81,5 +79,4 @@ void ConsoleProxyModel::onRowsInserted(const QModelIndex &index, int start, int
} while (--rowIndex >= start);
}
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -30,8 +30,7 @@
#include <QSortFilterProxyModel>
#include <QItemSelectionModel>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleProxyModel : public QSortFilterProxyModel
{
@@ -59,5 +58,4 @@ private:
QFlags<ConsoleItem::ItemType> m_filter;
};
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -24,8 +24,10 @@
****************************************************************************/
#include "consoleview.h"
#include "consoleitemdelegate.h"
#include "consoleitemmodel.h"
#include "../debuggertr.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/manhattanstyle.h>
@@ -145,14 +147,14 @@ void ConsoleView::contextMenuEvent(QContextMenuEvent *event)
QModelIndex itemIndex = indexAt(event->pos());
QMenu menu;
auto copy = new QAction(tr("&Copy"), this);
auto copy = new QAction(Tr::tr("&Copy"), this);
copy->setEnabled(itemIndex.isValid());
menu.addAction(copy);
auto show = new QAction(tr("&Show in Editor"), this);
auto show = new QAction(Tr::tr("&Show in Editor"), this);
show->setEnabled(canShowItemInTextEditor(itemIndex));
menu.addAction(show);
menu.addSeparator();
auto clear = new QAction(tr("C&lear"), this);
auto clear = new QAction(Tr::tr("C&lear"), this);
menu.addAction(clear);
QAction *a = menu.exec(event->globalPos());

View File

@@ -28,15 +28,12 @@
#include <utils/fileinprojectfinder.h>
#include <utils/itemviews.h>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ConsoleItemModel;
class ConsoleView : public Utils::TreeView
{
Q_OBJECT
public:
ConsoleView(ConsoleItemModel *model, QWidget *parent);
@@ -60,5 +57,4 @@ private:
Utils::FileInProjectFinder m_finder;
};
} // Internal
} // Debugger
} // Debugger::Internal

View File

@@ -28,6 +28,7 @@
#include "commonoptionspage.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#ifdef Q_OS_WIN
#include "registerpostmortemaction.h"
@@ -45,12 +46,11 @@
using namespace Utils;
namespace Debugger::Internal {
const char debugModeSettingsGroupC[] = "DebugMode";
const char cdbSettingsGroupC[] = "CDB2";
namespace Debugger {
namespace Internal {
//////////////////////////////////////////////////////////////////////////
//
// DebuggerSettings
@@ -72,79 +72,79 @@ DebuggerSettings::DebuggerSettings()
const QString debugModeGroup(debugModeSettingsGroupC);
const QString cdbSettingsGroup(cdbSettingsGroupC);
settingsDialog.setLabelText(tr("Configure Debugger..."));
settingsDialog.setLabelText(Tr::tr("Configure Debugger..."));
/*
groupBoxPluginDebugging = new QGroupBox(q);
groupBoxPluginDebugging->setTitle(GdbOptionsPage::tr(
groupBoxPluginDebugging->setTitle(Tr::tr(
"Behavior of Breakpoint Setting in Plugins"));
radioButtonAllPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
radioButtonAllPluginBreakpoints->setText(GdbOptionsPage::tr(
radioButtonAllPluginBreakpoints->setText(Tr::tr(
"Always try to set breakpoints in plugins automatically"));
radioButtonAllPluginBreakpoints->setToolTip(GdbOptionsPage::tr(
radioButtonAllPluginBreakpoints->setToolTip(Tr::tr(
"This is the slowest but safest option."));
radioButtonSelectedPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
radioButtonSelectedPluginBreakpoints->setText(GdbOptionsPage::tr(
radioButtonSelectedPluginBreakpoints->setText(Tr::tr(
"Try to set breakpoints in selected plugins"));
radioButtonNoPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
radioButtonNoPluginBreakpoints->setText(GdbOptionsPage::tr(
radioButtonNoPluginBreakpoints->setText(Tr::tr(
"Never set breakpoints in plugins automatically"));
lineEditSelectedPluginBreakpointsPattern = new QLineEdit(groupBoxPluginDebugging);
labelSelectedPluginBreakpoints = new QLabel(groupBoxPluginDebugging);
labelSelectedPluginBreakpoints->setText(GdbOptionsPage::tr(
labelSelectedPluginBreakpoints->setText(Tr::tr(
"Matching regular expression: "));
*/
//
// View
//
alwaysAdjustColumnWidths.setLabelText(tr("Always Adjust View Column Widths to Contents"));
alwaysAdjustColumnWidths.setLabelText(Tr::tr("Always Adjust View Column Widths to Contents"));
alwaysAdjustColumnWidths.setSettingsKey(debugModeGroup, "AlwaysAdjustColumnWidths");
alwaysAdjustColumnWidths.setDefaultValue(true);
// Needed by QML Inspector
//useAlternatingRowColors.setLabelText(tr("Use Alternating Row Colors"));
//useAlternatingRowColors.setLabelText(Tr::tr("Use Alternating Row Colors"));
useAlternatingRowColors.setSettingsKey(debugModeGroup, "UseAlternatingRowColours");
useAlternatingRowColors.setLabelText(tr("Use alternating row colors in debug views"));
useAlternatingRowColors.setLabelText(Tr::tr("Use alternating row colors in debug views"));
stationaryEditorWhileStepping.setSettingsKey(debugModeGroup, "StationaryEditorWhileStepping");
stationaryEditorWhileStepping.setLabelText(tr("Keep editor stationary when stepping"));
stationaryEditorWhileStepping.setToolTip(tr("Scrolls the editor only when it is necessary "
stationaryEditorWhileStepping.setLabelText(Tr::tr("Keep editor stationary when stepping"));
stationaryEditorWhileStepping.setToolTip(Tr::tr("Scrolls the editor only when it is necessary "
"to keep the current line in view, "
"instead of keeping the next statement centered at "
"all times."));
forceLoggingToConsole.setSettingsKey(debugModeGroup, "ForceLoggingToConsole");
forceLoggingToConsole.setLabelText(tr("Force logging to console"));
forceLoggingToConsole.setToolTip(tr("Sets QT_LOGGING_TO_CONSOLE=1 in the environment "
forceLoggingToConsole.setLabelText(Tr::tr("Force logging to console"));
forceLoggingToConsole.setToolTip(Tr::tr("Sets QT_LOGGING_TO_CONSOLE=1 in the environment "
"of the debugged program, preventing storing debug output "
"in system logs."));
fontSizeFollowsEditor.setSettingsKey(debugModeGroup, "FontSizeFollowsEditor");
fontSizeFollowsEditor.setToolTip(tr("Changes the font size in the debugger views when"
fontSizeFollowsEditor.setToolTip(Tr::tr("Changes the font size in the debugger views when"
"the font size in the main editor changes."));
fontSizeFollowsEditor.setLabelText(tr("Debugger font size follows main editor"));
fontSizeFollowsEditor.setLabelText(Tr::tr("Debugger font size follows main editor"));
useMessageBoxForSignals.setSettingsKey(debugModeGroup, "UseMessageBoxForSignals");
useMessageBoxForSignals.setDefaultValue(true);
useMessageBoxForSignals.setLabelText(/*GdbOptionsPage::*/tr(
useMessageBoxForSignals.setLabelText(Tr::tr(
"Show a message box when receiving a signal"));
useMessageBoxForSignals.setToolTip(/*GdbOptionsPage::*/tr(
useMessageBoxForSignals.setToolTip(Tr::tr(
"Displays a message box as soon as your application\n"
"receives a signal like SIGSEGV during debugging."));
logTimeStamps.setLabelText(tr("Log Time Stamps"));
logTimeStamps.setLabelText(Tr::tr("Log Time Stamps"));
logTimeStamps.setSettingsKey(debugModeGroup, "LogTimeStamps");
autoDerefPointers.setLabelText(tr("Dereference Pointers Automatically"));
autoDerefPointers.setLabelText(Tr::tr("Dereference Pointers Automatically"));
autoDerefPointers.setDefaultValue(true);
autoDerefPointers.setSettingsKey(debugModeGroup, "AutoDerefPointers");
autoDerefPointers.setToolTip(tr("<p>This switches the Locals and Expressions views to "
autoDerefPointers.setToolTip(Tr::tr("<p>This switches the Locals and Expressions views to "
"automatically dereference pointers. This saves a level in the "
"tree view, but also loses data for the now-missing intermediate "
"level."));
@@ -155,7 +155,7 @@ DebuggerSettings::DebuggerSettings()
cdbAdditionalArguments.setSettingsKey(cdbSettingsGroup, "AdditionalArguments");
cdbAdditionalArguments.setDisplayStyle(StringAspect::LineEditDisplay);
cdbAdditionalArguments.setLabelText(tr("Additional arguments:"));
cdbAdditionalArguments.setLabelText(Tr::tr("Additional arguments:"));
cdbSymbolPaths.setSettingsKey(cdbSettingsGroup, "SymbolPaths");
cdbSourcePaths.setSettingsKey(cdbSettingsGroup, "SourcePaths");
@@ -166,68 +166,68 @@ DebuggerSettings::DebuggerSettings()
CommonOptionsPage::msgSetBreakpointAtFunction(Constants::CRT_DEBUG_REPORT));
cdbBreakOnCrtDbgReport.setToolTip(
CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(Constants::CRT_DEBUG_REPORT,
tr("Catches runtime error messages caused by assert(), for example.")));
Tr::tr("Catches runtime error messages caused by assert(), for example.")));
useCdbConsole.setSettingsKey(cdbSettingsGroup, "CDB_Console");
useCdbConsole.setToolTip("<html><head/><body><p>" + tr(
useCdbConsole.setToolTip("<html><head/><body><p>" + Tr::tr(
"Uses CDB's native console for console applications. "
"This overrides the setting in Environment > System. "
"The native console does not prompt on application exit. "
"It is suitable for diagnosing cases in which the application does not "
"start up properly in the configured console and the subsequent attach fails.")
+ "</p></body></html>");
useCdbConsole.setLabelText(tr("Use CDB &console"));
useCdbConsole.setLabelText(Tr::tr("Use CDB &console"));
cdbBreakPointCorrection.setSettingsKey(cdbSettingsGroup, "BreakpointCorrection");
cdbBreakPointCorrection.setDefaultValue(true);
cdbBreakPointCorrection.setToolTip("<html><head/><body><p>" + tr(
cdbBreakPointCorrection.setToolTip("<html><head/><body><p>" + Tr::tr(
"Attempts to correct the location of a breakpoint based on file and line number should"
"it be in a comment or in a line for which no code is generated. "
"The correction is based on the code model.") + "</p></body></html>");
cdbBreakPointCorrection.setLabelText(tr("Correct breakpoint location"));
cdbBreakPointCorrection.setLabelText(Tr::tr("Correct breakpoint location"));
cdbUsePythonDumper.setSettingsKey(cdbSettingsGroup, "UsePythonDumper");
cdbUsePythonDumper.setDefaultValue(true);
cdbUsePythonDumper.setLabelText(tr("Use Python dumper"));
cdbUsePythonDumper.setLabelText(Tr::tr("Use Python dumper"));
firstChanceExceptionTaskEntry.setSettingsKey(cdbSettingsGroup, "FirstChanceExceptionTaskEntry");
firstChanceExceptionTaskEntry.setDefaultValue(true);
firstChanceExceptionTaskEntry.setLabelText(tr("First chance exceptions"));
firstChanceExceptionTaskEntry.setLabelText(Tr::tr("First chance exceptions"));
secondChanceExceptionTaskEntry.setSettingsKey(cdbSettingsGroup, "SecondChanceExceptionTaskEntry");
secondChanceExceptionTaskEntry.setDefaultValue(true);
secondChanceExceptionTaskEntry.setLabelText(tr("Second chance exceptions"));
secondChanceExceptionTaskEntry.setLabelText(Tr::tr("Second chance exceptions"));
ignoreFirstChanceAccessViolation.setSettingsKey(cdbSettingsGroup, "IgnoreFirstChanceAccessViolation");
ignoreFirstChanceAccessViolation.setLabelText(tr("Ignore first chance access violations"));
ignoreFirstChanceAccessViolation.setLabelText(Tr::tr("Ignore first chance access violations"));
//
// Locals & Watchers
//
showStdNamespace.setSettingsKey(debugModeGroup, "ShowStandardNamespace");
showStdNamespace.setDefaultValue(true);
showStdNamespace.setDisplayName(tr("Show \"std::\" Namespace in Types"));
showStdNamespace.setLabelText(tr("Show \"std::\" namespace in types"));
showStdNamespace.setToolTip(tr("<p>Shows \"std::\" prefix for types from the standard library."));
showStdNamespace.setDisplayName(Tr::tr("Show \"std::\" Namespace in Types"));
showStdNamespace.setLabelText(Tr::tr("Show \"std::\" namespace in types"));
showStdNamespace.setToolTip(Tr::tr("<p>Shows \"std::\" prefix for types from the standard library."));
showQtNamespace.setSettingsKey(debugModeGroup, "ShowQtNamespace");
showQtNamespace.setDefaultValue(true);
showQtNamespace.setDisplayName(tr("Show Qt's Namespace in Types"));
showQtNamespace.setLabelText(tr("Show Qt's namespace in types"));
showQtNamespace.setToolTip(tr("<p>Shows Qt namespace prefix for Qt types. This is only "
showQtNamespace.setDisplayName(Tr::tr("Show Qt's Namespace in Types"));
showQtNamespace.setLabelText(Tr::tr("Show Qt's namespace in types"));
showQtNamespace.setToolTip(Tr::tr("<p>Shows Qt namespace prefix for Qt types. This is only "
"relevant if Qt was configured with \"-qtnamespace\"."));
showQObjectNames.setSettingsKey(debugModeGroup, "ShowQObjectNames2");
showQObjectNames.setDefaultValue(true);
showQObjectNames.setDisplayName(tr("Show QObject names if available"));
showQObjectNames.setLabelText(tr("Show QObject names if available"));
showQObjectNames.setToolTip(tr("<p>Displays the objectName property of QObject based items. "
showQObjectNames.setDisplayName(Tr::tr("Show QObject names if available"));
showQObjectNames.setLabelText(Tr::tr("Show QObject names if available"));
showQObjectNames.setToolTip(Tr::tr("<p>Displays the objectName property of QObject based items. "
"Note that this can negatively impact debugger performance "
"even if no QObjects are present."));
sortStructMembers.setSettingsKey(debugModeGroup, "SortStructMembers");
sortStructMembers.setDisplayName(tr("Sort Members of Classes and Structs Alphabetically"));
sortStructMembers.setLabelText(tr("Sort members of classes and structs alphabetically"));
sortStructMembers.setDisplayName(Tr::tr("Sort Members of Classes and Structs Alphabetically"));
sortStructMembers.setLabelText(Tr::tr("Sort members of classes and structs alphabetically"));
sortStructMembers.setDefaultValue(true);
//
@@ -235,27 +235,27 @@ DebuggerSettings::DebuggerSettings()
//
useDebuggingHelpers.setSettingsKey(debugModeGroup, "UseDebuggingHelper");
useDebuggingHelpers.setDefaultValue(true);
useDebuggingHelpers.setLabelText(tr("Use Debugging Helpers"));
useDebuggingHelpers.setLabelText(Tr::tr("Use Debugging Helpers"));
useCodeModel.setSettingsKey(debugModeGroup, "UseCodeModel");
useCodeModel.setDefaultValue(true);
useCodeModel.setLabelText(tr("Use code model"));
useCodeModel.setToolTip(tr("<p>Selecting this causes the C++ Code Model being asked "
useCodeModel.setLabelText(Tr::tr("Use code model"));
useCodeModel.setToolTip(Tr::tr("<p>Selecting this causes the C++ Code Model being asked "
"for variable scope information. This might result in slightly faster "
"debugger operation but may fail for optimized code."));
showThreadNames.setSettingsKey(debugModeGroup, "ShowThreadNames");
showThreadNames.setLabelText(tr("Display thread names"));
showThreadNames.setToolTip(tr("<p>Displays names of QThread based threads."));
showThreadNames.setLabelText(Tr::tr("Display thread names"));
showThreadNames.setToolTip(Tr::tr("<p>Displays names of QThread based threads."));
//
// Breakpoints
//
synchronizeBreakpoints.setLabelText(tr("Synchronize Breakpoints"));
synchronizeBreakpoints.setLabelText(Tr::tr("Synchronize Breakpoints"));
adjustBreakpointLocations.setDisplayName(tr("Adjust Breakpoint Locations"));
adjustBreakpointLocations.setToolTip(tr("<p>Not all source code lines generate "
adjustBreakpointLocations.setDisplayName(Tr::tr("Adjust Breakpoint Locations"));
adjustBreakpointLocations.setToolTip(Tr::tr("<p>Not all source code lines generate "
"executable code. Putting a breakpoint on such a line acts as "
"if the breakpoint was set on the next line that generated code. "
"Selecting 'Adjust Breakpoint Locations' shifts the red "
@@ -263,9 +263,9 @@ DebuggerSettings::DebuggerSettings()
"breakpoint."));
adjustBreakpointLocations.setDefaultValue(true);
adjustBreakpointLocations.setSettingsKey(debugModeGroup, "AdjustBreakpointLocations");
adjustBreakpointLocations.setLabelText(/*GdbOptionsPage::*/tr(
adjustBreakpointLocations.setLabelText(Tr::tr(
"Adjust breakpoint locations"));
adjustBreakpointLocations.setToolTip(/*GdbOptionsPage::*/tr(
adjustBreakpointLocations.setToolTip(Tr::tr(
"GDB allows setting breakpoints on source lines for which no code \n"
"was generated. In such situations the breakpoint is shifted to the\n"
"next source code line for which code was actually generated.\n"
@@ -273,24 +273,24 @@ DebuggerSettings::DebuggerSettings()
"markers in the source code editor."));
breakOnThrow.setLabelText(tr("Break on \"throw\""));
breakOnThrow.setLabelText(Tr::tr("Break on \"throw\""));
breakOnThrow.setSettingsKey(debugModeGroup, "BreakOnThrow");
breakOnCatch.setLabelText(tr("Break on \"catch\""));
breakOnCatch.setLabelText(Tr::tr("Break on \"catch\""));
breakOnCatch.setSettingsKey(debugModeGroup, "BreakOnCatch");
breakOnWarning.setLabelText(tr("Break on \"qWarning\""));
breakOnWarning.setLabelText(Tr::tr("Break on \"qWarning\""));
breakOnWarning.setSettingsKey(debugModeGroup, "BreakOnWarning");
// FIXME: Move to common settings page.
breakOnWarning.setLabelText(CommonOptionsPage::msgSetBreakpointAtFunction("qWarning"));
breakOnWarning.setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("qWarning"));
breakOnFatal.setLabelText(tr("Break on \"qFatal\""));
breakOnFatal.setLabelText(Tr::tr("Break on \"qFatal\""));
breakOnFatal.setSettingsKey(debugModeGroup, "BreakOnFatal");
breakOnFatal.setLabelText(CommonOptionsPage::msgSetBreakpointAtFunction("qFatal"));
breakOnFatal.setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("qFatal"));
breakOnAbort.setLabelText(tr("Break on \"abort\""));
breakOnAbort.setLabelText(Tr::tr("Break on \"abort\""));
breakOnAbort.setSettingsKey(debugModeGroup, "BreakOnAbort");
breakOnAbort.setLabelText(CommonOptionsPage::msgSetBreakpointAtFunction("abort"));
breakOnAbort.setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("abort"));
@@ -301,46 +301,46 @@ DebuggerSettings::DebuggerSettings()
loadGdbInit.setSettingsKey(debugModeGroup, "LoadGdbInit");
loadGdbInit.setDefaultValue(true);
loadGdbInit.setLabelText(/*GdbOptionsPage::*/tr("Load .gdbinit file on startup"));
loadGdbInit.setToolTip(/*GdbOptionsPage::*/tr(
loadGdbInit.setLabelText(Tr::tr("Load .gdbinit file on startup"));
loadGdbInit.setToolTip(Tr::tr(
"Allows or inhibits reading the user's default\n"
".gdbinit file on debugger startup."));
loadGdbDumpers.setSettingsKey(debugModeGroup, "LoadGdbDumpers2");
loadGdbDumpers.setLabelText(/*GdbOptionsPage::*/tr("Load system GDB pretty printers"));
loadGdbDumpers.setToolTip(/*GdbOptionsPage::*/tr(
loadGdbDumpers.setLabelText(Tr::tr("Load system GDB pretty printers"));
loadGdbDumpers.setToolTip(Tr::tr(
"Uses the default GDB pretty printers installed in your "
"system or linked to the libraries your application uses."));
autoEnrichParameters.setSettingsKey(debugModeGroup, "AutoEnrichParameters");
autoEnrichParameters.setDefaultValue(true);
autoEnrichParameters.setLabelText(/*GdbOptionsPage::*/tr(
autoEnrichParameters.setLabelText(Tr::tr(
"Use common locations for debug information"));
autoEnrichParameters.setToolTip(/*GdbOptionsPage::*/tr(
autoEnrichParameters.setToolTip(Tr::tr(
"<html><head/><body>Adds common paths to locations "
"of debug information such as <i>/usr/src/debug</i> "
"when starting GDB.</body></html>"));
useDynamicType.setSettingsKey(debugModeGroup, "UseDynamicType");
useDynamicType.setDefaultValue(true);
useDynamicType.setDisplayName(tr("Use Dynamic Object Type for Display"));
useDynamicType.setLabelText(/*GdbOptionsPage::*/tr(
useDynamicType.setDisplayName(Tr::tr("Use Dynamic Object Type for Display"));
useDynamicType.setLabelText(Tr::tr(
"Use dynamic object type for display"));
useDynamicType.setToolTip(/*GdbOptionsPage::*/tr(
useDynamicType.setToolTip(Tr::tr(
"Specifies whether the dynamic or the static type of objects will be "
"displayed. Choosing the dynamic type might be slower."));
targetAsync.setSettingsKey(debugModeGroup, "TargetAsync");
targetAsync.setLabelText(/*GdbOptionsPage::*/tr(
targetAsync.setLabelText(Tr::tr(
"Use asynchronous mode to control the inferior"));
warnOnReleaseBuilds.setSettingsKey(debugModeGroup, "WarnOnReleaseBuilds");
warnOnReleaseBuilds.setDefaultValue(true);
warnOnReleaseBuilds.setLabelText(tr("Warn when debugging \"Release\" builds"));
warnOnReleaseBuilds.setToolTip(tr("Shows a warning when starting the debugger "
warnOnReleaseBuilds.setLabelText(Tr::tr("Warn when debugging \"Release\" builds"));
warnOnReleaseBuilds.setToolTip(Tr::tr("Shows a warning when starting the debugger "
"on a binary with insufficient debug information."));
QString howToUsePython = /*GdbOptionsPage::*/tr(
QString howToUsePython = Tr::tr(
"<p>To execute simple Python commands, prefix them with \"python\".</p>"
"<p>To execute sequences of Python commands spanning multiple lines "
"prepend the block with \"python\" on a separate line, and append "
@@ -351,7 +351,7 @@ DebuggerSettings::DebuggerSettings()
gdbStartupCommands.setSettingsKey(debugModeGroup, "GdbStartupCommands");
gdbStartupCommands.setDisplayStyle(StringAspect::TextEditDisplay);
gdbStartupCommands.setUseGlobalMacroExpander();
gdbStartupCommands.setToolTip("<html><head/><body><p>" + /*GdbOptionsPage::*/tr(
gdbStartupCommands.setToolTip("<html><head/><body><p>" + Tr::tr(
"GDB commands entered here will be executed after "
"GDB has been started, but before the debugged program is started or "
"attached, and before the debugging helpers are initialized.") + "</p>"
@@ -360,7 +360,7 @@ DebuggerSettings::DebuggerSettings()
gdbPostAttachCommands.setSettingsKey(debugModeGroup, "GdbPostAttachCommands");
gdbPostAttachCommands.setDisplayStyle(StringAspect::TextEditDisplay);
gdbPostAttachCommands.setUseGlobalMacroExpander();
gdbPostAttachCommands.setToolTip("<html><head/><body><p>" + /*GdbOptionsPage::*/tr(
gdbPostAttachCommands.setToolTip("<html><head/><body><p>" + Tr::tr(
"GDB commands entered here will be executed after "
"GDB has successfully attached to remote targets.</p>"
"<p>You can add commands to further set up the target here, "
@@ -371,102 +371,100 @@ DebuggerSettings::DebuggerSettings()
extraDumperCommands.setDisplayStyle(StringAspect::TextEditDisplay);
extraDumperCommands.setUseGlobalMacroExpander();
extraDumperCommands.setToolTip("<html><head/><body><p>"
+ tr("Python commands entered here will be executed after built-in "
+ Tr::tr("Python commands entered here will be executed after built-in "
"debugging helpers have been loaded and fully initialized. You can "
"load additional debugging helpers or modify existing ones here.")
+ "</p></body></html>");
extraDumperFile.setSettingsKey(debugModeGroup, "ExtraDumperFile");
extraDumperFile.setDisplayStyle(StringAspect::PathChooserDisplay);
extraDumperFile.setDisplayName(tr("Extra Debugging Helpers"));
extraDumperFile.setDisplayName(Tr::tr("Extra Debugging Helpers"));
// Label text is intentional empty in the GUI.
extraDumperFile.setToolTip(tr("Path to a Python file containing additional data dumpers."));
extraDumperFile.setToolTip(Tr::tr("Path to a Python file containing additional data dumpers."));
const QString t = tr("Stopping and stepping in the debugger "
const QString t = Tr::tr("Stopping and stepping in the debugger "
"will automatically open views associated with the current location.") + '\n';
closeSourceBuffersOnExit.setSettingsKey(debugModeGroup, "CloseBuffersOnExit");
closeSourceBuffersOnExit.setLabelText(tr("Close temporary source views on debugger exit"));
closeSourceBuffersOnExit.setToolTip(t + tr("Closes automatically opened source views when the debugger exits."));
closeSourceBuffersOnExit.setLabelText(Tr::tr("Close temporary source views on debugger exit"));
closeSourceBuffersOnExit.setToolTip(t + Tr::tr("Closes automatically opened source views when the debugger exits."));
closeMemoryBuffersOnExit.setSettingsKey(debugModeGroup, "CloseMemoryBuffersOnExit");
closeMemoryBuffersOnExit.setDefaultValue(true);
closeMemoryBuffersOnExit.setLabelText(tr("Close temporary memory views on debugger exit"));
closeMemoryBuffersOnExit.setToolTip(t + tr("Closes automatically opened memory views when the debugger exits."));
closeMemoryBuffersOnExit.setLabelText(Tr::tr("Close temporary memory views on debugger exit"));
closeMemoryBuffersOnExit.setToolTip(t + Tr::tr("Closes automatically opened memory views when the debugger exits."));
switchModeOnExit.setSettingsKey(debugModeGroup, "SwitchModeOnExit");
switchModeOnExit.setLabelText(tr("Switch to previous mode on debugger exit"));
switchModeOnExit.setLabelText(Tr::tr("Switch to previous mode on debugger exit"));
breakpointsFullPathByDefault.setSettingsKey(debugModeGroup, "BreakpointsFullPath");
breakpointsFullPathByDefault.setToolTip(tr("Enables a full file path in breakpoints by default also for GDB."));
breakpointsFullPathByDefault.setLabelText(tr("Set breakpoints using a full absolute path"));
breakpointsFullPathByDefault.setToolTip(Tr::tr("Enables a full file path in breakpoints by default also for GDB."));
breakpointsFullPathByDefault.setLabelText(Tr::tr("Set breakpoints using a full absolute path"));
raiseOnInterrupt.setSettingsKey(debugModeGroup, "RaiseOnInterrupt");
raiseOnInterrupt.setDefaultValue(true);
raiseOnInterrupt.setLabelText(tr("Bring %1 to foreground when application interrupts")
raiseOnInterrupt.setLabelText(Tr::tr("Bring %1 to foreground when application interrupts")
.arg(Core::Constants::IDE_DISPLAY_NAME));
autoQuit.setSettingsKey(debugModeGroup, "AutoQuit");
autoQuit.setLabelText(tr("Automatically Quit Debugger"));
autoQuit.setLabelText(Tr::tr("Automatically Quit Debugger"));
multiInferior.setSettingsKey(debugModeGroup, "MultiInferior");
multiInferior.setLabelText(/*GdbOptionsPage::*/tr("Debug all child processes"));
multiInferior.setToolTip(/*GdbOptionsPage::*/tr(
multiInferior.setLabelText(Tr::tr("Debug all child processes"));
multiInferior.setToolTip(Tr::tr(
"<html><head/><body>Keeps debugging all children after a fork."
"</body></html>"));
intelFlavor.setSettingsKey(debugModeGroup, "IntelFlavor");
intelFlavor.setLabelText(/*GdbOptionsPage::*/tr("Use Intel style disassembly"));
intelFlavor.setToolTip(/*GdbOptionsPage::*/tr(
"GDB shows by default AT&&T style disassembly."));
intelFlavor.setLabelText(Tr::tr("Use Intel style disassembly"));
intelFlavor.setToolTip(Tr::tr("GDB shows by default AT&&T style disassembly."));
useAnnotationsInMainEditor.setSettingsKey(debugModeGroup, "UseAnnotations");
useAnnotationsInMainEditor.setLabelText(tr("Use annotations in main editor when debugging"));
useAnnotationsInMainEditor.setToolTip(tr("<p>Shows simple variable values "
useAnnotationsInMainEditor.setLabelText(Tr::tr("Use annotations in main editor when debugging"));
useAnnotationsInMainEditor.setToolTip(Tr::tr("<p>Shows simple variable values "
"as annotations in the main editor during debugging."));
useAnnotationsInMainEditor.setDefaultValue(true);
usePseudoTracepoints.setSettingsKey(debugModeGroup, "UsePseudoTracepoints");
usePseudoTracepoints.setLabelText(/*GdbOptionsPage::*/tr("Use pseudo message tracepoints"));
usePseudoTracepoints.setToolTip(
/*GdbOptionsPage::*/ tr("Uses Python to extend the ordinary GDB breakpoint class."));
usePseudoTracepoints.setLabelText(Tr::tr("Use pseudo message tracepoints"));
usePseudoTracepoints.setToolTip(Tr::tr("Uses Python to extend the ordinary GDB breakpoint class."));
usePseudoTracepoints.setDefaultValue(true);
useIndexCache.setSettingsKey(debugModeGroup, "UseIndexCache");
useIndexCache.setLabelText(tr("Use automatic symbol cache"));
useIndexCache.setToolTip(tr("It is possible for GDB to automatically save a copy of "
useIndexCache.setLabelText(Tr::tr("Use automatic symbol cache"));
useIndexCache.setToolTip(Tr::tr("It is possible for GDB to automatically save a copy of "
"its symbol index in a cache on disk and retrieve it from there when loading the same "
"binary in the future."));
useIndexCache.setDefaultValue(true);
useToolTipsInMainEditor.setSettingsKey(debugModeGroup, "UseToolTips");
useToolTipsInMainEditor.setLabelText(tr("Use tooltips in main editor when debugging"));
useToolTipsInMainEditor.setToolTip(tr("<p>Enables tooltips for variable "
useToolTipsInMainEditor.setLabelText(Tr::tr("Use tooltips in main editor when debugging"));
useToolTipsInMainEditor.setToolTip(Tr::tr("<p>Enables tooltips for variable "
"values during debugging. Since this can slow down debugging and "
"does not provide reliable information as it does not use scope "
"information, it is switched off by default."));
useToolTipsInMainEditor.setDefaultValue(true);
useToolTipsInLocalsView.setSettingsKey(debugModeGroup, "UseToolTipsInLocalsView");
useToolTipsInLocalsView.setLabelText(tr("Use Tooltips in Locals View when Debugging"));
useToolTipsInLocalsView.setToolTip(tr("<p>Enables tooltips in the locals "
useToolTipsInLocalsView.setLabelText(Tr::tr("Use Tooltips in Locals View when Debugging"));
useToolTipsInLocalsView.setToolTip(Tr::tr("<p>Enables tooltips in the locals "
"view during debugging."));
useToolTipsInBreakpointsView.setSettingsKey(debugModeGroup, "UseToolTipsInBreakpointsView");
useToolTipsInBreakpointsView.setLabelText(tr("Use Tooltips in Breakpoints View when Debugging"));
useToolTipsInBreakpointsView.setToolTip(tr("<p>Enables tooltips in the breakpoints "
useToolTipsInBreakpointsView.setLabelText(Tr::tr("Use Tooltips in Breakpoints View when Debugging"));
useToolTipsInBreakpointsView.setToolTip(Tr::tr("<p>Enables tooltips in the breakpoints "
"view during debugging."));
useToolTipsInStackView.setSettingsKey(debugModeGroup, "UseToolTipsInStackView");
useToolTipsInStackView.setLabelText(tr("Use Tooltips in Stack View when Debugging"));
useToolTipsInStackView.setToolTip(tr("<p>Enables tooltips in the stack "
useToolTipsInStackView.setLabelText(Tr::tr("Use Tooltips in Stack View when Debugging"));
useToolTipsInStackView.setToolTip(Tr::tr("<p>Enables tooltips in the stack "
"view during debugging."));
useToolTipsInStackView.setDefaultValue(true);
skipKnownFrames.setSettingsKey(debugModeGroup, "SkipKnownFrames");
skipKnownFrames.setDisplayName(tr("Skip Known Frames"));
skipKnownFrames.setLabelText(/*GdbOptionsPage::*/tr("Skip known frames when stepping"));
skipKnownFrames.setToolTip(/*GdbOptionsPage::*/tr(
skipKnownFrames.setDisplayName(Tr::tr("Skip Known Frames"));
skipKnownFrames.setLabelText(Tr::tr("Skip known frames when stepping"));
skipKnownFrames.setToolTip(Tr::tr(
"<html><head/><body><p>"
"Allows <i>Step Into</i> to compress several steps into one step\n"
"for less noisy debugging. For example, the atomic reference\n"
@@ -475,9 +473,9 @@ DebuggerSettings::DebuggerSettings()
enableReverseDebugging.setSettingsKey(debugModeGroup, "EnableReverseDebugging");
enableReverseDebugging.setIcon(Icons::REVERSE_MODE.icon());
enableReverseDebugging.setDisplayName(tr("Enable Reverse Debugging"));
enableReverseDebugging.setLabelText(/*GdbOptionsPage::*/tr("Enable reverse debugging"));
enableReverseDebugging.setToolTip(/*GdbOptionsPage::*/tr(
enableReverseDebugging.setDisplayName(Tr::tr("Enable Reverse Debugging"));
enableReverseDebugging.setLabelText(Tr::tr("Enable reverse debugging"));
enableReverseDebugging.setToolTip(Tr::tr(
"<html><head/><body><p>Enables stepping backwards.</p><p>"
"<b>Note:</b> This feature is very slow and unstable on the GDB side. "
"It exhibits unpredictable behavior when going backwards over system "
@@ -488,10 +486,10 @@ DebuggerSettings::DebuggerSettings()
registerForPostMortem = new RegisterPostMortemAction;
registerForPostMortem->setSettingsKey(debugModeGroup, "RegisterForPostMortem");
registerForPostMortem->setToolTip(
tr("Registers %1 for debugging crashed applications.")
Tr::tr("Registers %1 for debugging crashed applications.")
.arg(Core::Constants::IDE_DISPLAY_NAME));
registerForPostMortem->setLabelText(
tr("Use %1 for post-mortem debugging")
Tr::tr("Use %1 for post-mortem debugging")
.arg(Core::Constants::IDE_DISPLAY_NAME));
#else
// Some dummy.
@@ -511,40 +509,40 @@ DebuggerSettings::DebuggerSettings()
maximalStackDepth.setSettingsKey(debugModeGroup, "MaximalStackDepth");
maximalStackDepth.setDefaultValue(20);
maximalStackDepth.setSpecialValueText(tr("<unlimited>"));
maximalStackDepth.setSpecialValueText(Tr::tr("<unlimited>"));
maximalStackDepth.setRange(0, 1000);
maximalStackDepth.setSingleStep(5);
maximalStackDepth.setLabelText(tr("Maximum stack depth:"));
maximalStackDepth.setLabelText(Tr::tr("Maximum stack depth:"));
displayStringLimit.setSettingsKey(debugModeGroup, "DisplayStringLimit");
displayStringLimit.setDefaultValue(300);
displayStringLimit.setSpecialValueText(tr("<unlimited>"));
displayStringLimit.setSpecialValueText(Tr::tr("<unlimited>"));
displayStringLimit.setRange(20, 10000);
displayStringLimit.setSingleStep(10);
displayStringLimit.setLabelText(tr("Display string length:"));
displayStringLimit.setToolTip(tr("<p>The maximum length of string entries in the "
displayStringLimit.setLabelText(Tr::tr("Display string length:"));
displayStringLimit.setToolTip(Tr::tr("<p>The maximum length of string entries in the "
"Locals and Expressions views. Longer than that are cut off "
"and displayed with an ellipsis attached."));
maximalStringLength.setSettingsKey(debugModeGroup, "MaximalStringLength");
maximalStringLength.setDefaultValue(10000);
maximalStringLength.setSpecialValueText(tr("<unlimited>"));
maximalStringLength.setSpecialValueText(Tr::tr("<unlimited>"));
maximalStringLength.setRange(20, 10000000);
maximalStringLength.setSingleStep(20);
maximalStringLength.setLabelText(tr("Maximum string length:"));
maximalStringLength.setToolTip(tr("<p>The maximum length for strings in separated windows. "
maximalStringLength.setLabelText(Tr::tr("Maximum string length:"));
maximalStringLength.setToolTip(Tr::tr("<p>The maximum length for strings in separated windows. "
"Longer strings are cut off and displayed with an ellipsis attached."));
expandStack.setLabelText(tr("Reload Full Stack"));
expandStack.setLabelText(Tr::tr("Reload Full Stack"));
createFullBacktrace.setLabelText(tr("Create Full Backtrace"));
createFullBacktrace.setLabelText(Tr::tr("Create Full Backtrace"));
gdbWatchdogTimeout.setSettingsKey(debugModeGroup, "WatchdogTimeout");
gdbWatchdogTimeout.setDefaultValue(20);
gdbWatchdogTimeout.setSuffix(/*GdbOptionsPage::*/tr("sec"));
gdbWatchdogTimeout.setSuffix(Tr::tr("sec"));
gdbWatchdogTimeout.setRange(20, 1000000);
gdbWatchdogTimeout.setLabelText(/*GdbOptionsPage::*/tr("GDB timeout:"));
gdbWatchdogTimeout.setToolTip(/*GdbOptionsPage::*/tr(
gdbWatchdogTimeout.setLabelText(Tr::tr("GDB timeout:"));
gdbWatchdogTimeout.setToolTip(Tr::tr(
"The number of seconds before a non-responsive GDB process is terminated.\n"
"The default value of 20 seconds should be sufficient for most\n"
"applications, but there are situations when loading big libraries or\n"
@@ -556,8 +554,9 @@ DebuggerSettings::DebuggerSettings()
//
showQmlObjectTree.setSettingsKey(debugModeGroup, "ShowQmlObjectTree");
showQmlObjectTree.setDefaultValue(true);
showQmlObjectTree.setToolTip(tr("Shows QML object tree in Locals and Expressions when connected and not stepping."));
showQmlObjectTree.setLabelText(tr("Show QML object tree"));
showQmlObjectTree.setToolTip(Tr::tr("Shows QML object tree in Locals and Expressions "
"when connected and not stepping."));
showQmlObjectTree.setLabelText(Tr::tr("Show QML object tree"));
const QString qmlInspectorGroup = "QML.Inspector";
showAppOnTop.setSettingsKey(qmlInspectorGroup, "QmlInspector.ShowAppOnTop");
@@ -697,6 +696,5 @@ QString DebuggerSettings::dump()
return "Debugger settings:\n" + settings.join('\n');
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -32,8 +32,7 @@
#include <utils/aspects.h>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class SourcePathMapAspectPrivate;
@@ -75,8 +74,6 @@ class GeneralSettings
class DebuggerSettings
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::DebuggerSettings)
public:
explicit DebuggerSettings();
~DebuggerSettings();
@@ -203,9 +200,6 @@ private:
DebuggerSettings *debuggerSettings();
///////////////////////////////////////////////////////////
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_METATYPE(Debugger::Internal::SourcePathMap)

View File

@@ -40,8 +40,7 @@ QT_END_NAMESPACE
namespace Utils { class BaseTreeView; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
enum TestCases
{
@@ -66,5 +65,4 @@ QStringList qtBuildPaths();
QWidget *addSearch(Utils::BaseTreeView *treeView);
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -26,14 +26,16 @@
#include "debuggerdialogs.h"
#include "cdb/cdbengine.h"
#include "debuggerkitinformation.h"
#include "debuggerruncontrol.h"
#include "debuggertr.h"
#include <app/app_version.h>
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/sshparameters.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchain.h>
@@ -61,8 +63,7 @@ using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
///////////////////////////////////////////////////////////////////////
//
@@ -96,13 +97,11 @@ public:
QDialogButtonBox *buttonBox;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_METATYPE(Debugger::Internal::StartApplicationParameters)
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
///////////////////////////////////////////////////////////////////////
//
@@ -212,31 +211,31 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
StartApplicationDialog::StartApplicationDialog(QWidget *parent)
: QDialog(parent), d(new StartApplicationDialogPrivate)
{
setWindowTitle(tr("Start Debugger"));
setWindowTitle(Tr::tr("Start Debugger"));
d->kitChooser = new KitChooser(this);
d->kitChooser->setShowIcons(true);
d->kitChooser->populate();
d->serverPortLabel = new QLabel(tr("Server port:"), this);
d->serverPortLabel = new QLabel(Tr::tr("Server port:"), this);
d->serverPortSpinBox = new QSpinBox(this);
d->serverPortSpinBox->setRange(1, 65535);
d->channelOverrideHintLabel =
new QLabel(tr("Normally, the running server is identified by the IP of the "
new QLabel(Tr::tr("Normally, the running server is identified by the IP of the "
"device in the kit and the server port selected above.\n"
"You can choose another communication channel here, such as "
"a serial line or custom ip:port."));
d->channelOverrideLabel = new QLabel(tr("Override server channel:"), this);
d->channelOverrideLabel = new QLabel(Tr::tr("Override server channel:"), this);
d->channelOverrideEdit = new QLineEdit(this);
//: "For example, /dev/ttyS0, COM1, 127.0.0.1:1234"
d->channelOverrideEdit->setPlaceholderText(
tr("For example, %1").arg("/dev/ttyS0, COM1, 127.0.0.1:1234"));
Tr::tr("For example, %1").arg("/dev/ttyS0, COM1, 127.0.0.1:1234"));
d->localExecutablePathChooser = new PathChooser(this);
d->localExecutablePathChooser->setExpectedKind(PathChooser::File);
d->localExecutablePathChooser->setPromptDialogTitle(tr("Select Executable"));
d->localExecutablePathChooser->setPromptDialogTitle(Tr::tr("Select Executable"));
d->localExecutablePathChooser->setHistoryCompleter("LocalExecutable");
d->arguments = new FancyLineEdit(this);
@@ -244,7 +243,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->workingDirectory = new PathChooser(this);
d->workingDirectory->setExpectedKind(PathChooser::ExistingDirectory);
d->workingDirectory->setPromptDialogTitle(tr("Select Working Directory"));
d->workingDirectory->setPromptDialogTitle(Tr::tr("Select Working Directory"));
d->workingDirectory->setHistoryCompleter("WorkingDirectory");
d->runInTerminalCheckBox = new QCheckBox(this);
@@ -257,32 +256,32 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->sysRootPathChooser = new PathChooser(this);
d->sysRootPathChooser->setExpectedKind(PathChooser::Directory);
d->sysRootPathChooser->setHistoryCompleter("Debugger.SysRoot.History");
d->sysRootPathChooser->setPromptDialogTitle(tr("Select SysRoot Directory"));
d->sysRootPathChooser->setToolTip(tr(
d->sysRootPathChooser->setPromptDialogTitle(Tr::tr("Select SysRoot Directory"));
d->sysRootPathChooser->setToolTip(Tr::tr(
"This option can be used to override the kit's SysRoot setting."));
d->sysRootLabel = new QLabel(tr("Override S&ysRoot:"), this);
d->sysRootLabel = new QLabel(Tr::tr("Override S&ysRoot:"), this);
d->sysRootLabel->setBuddy(d->sysRootPathChooser);
d->sysRootLabel->setToolTip(d->sysRootPathChooser->toolTip());
d->serverInitCommandsTextEdit = new QPlainTextEdit(this);
d->serverInitCommandsTextEdit->setToolTip(tr(
d->serverInitCommandsTextEdit->setToolTip(Tr::tr(
"This option can be used to send the target init commands."));
d->serverInitCommandsLabel = new QLabel(tr("&Init commands:"), this);
d->serverInitCommandsLabel = new QLabel(Tr::tr("&Init commands:"), this);
d->serverInitCommandsLabel->setBuddy(d->serverInitCommandsTextEdit);
d->serverInitCommandsLabel->setToolTip(d->serverInitCommandsTextEdit->toolTip());
d->serverResetCommandsTextEdit = new QPlainTextEdit(this);
d->serverResetCommandsTextEdit->setToolTip(tr(
d->serverResetCommandsTextEdit->setToolTip(Tr::tr(
"This option can be used to send the target reset commands."));
d->serverResetCommandsLabel = new QLabel(tr("&Reset commands:"), this);
d->serverResetCommandsLabel = new QLabel(Tr::tr("&Reset commands:"), this);
d->serverResetCommandsLabel->setBuddy(d->serverResetCommandsTextEdit);
d->serverResetCommandsLabel->setToolTip(d->serverResetCommandsTextEdit->toolTip());
d->debuginfoPathChooser = new PathChooser(this);
d->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information"));
d->debuginfoPathChooser->setToolTip(tr(
d->debuginfoPathChooser->setPromptDialogTitle(Tr::tr("Select Location of Debugging Information"));
d->debuginfoPathChooser->setToolTip(Tr::tr(
"Base path for external debug information and debug sources. "
"If empty, $SYSROOT/usr/lib/debug will be chosen."));
d->debuginfoPathChooser->setHistoryCompleter("Debugger.DebugLocation.History");
@@ -303,22 +302,22 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
auto formLayout = new QFormLayout();
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
formLayout->addRow(tr("&Kit:"), d->kitChooser);
formLayout->addRow(Tr::tr("&Kit:"), d->kitChooser);
formLayout->addRow(d->serverPortLabel, d->serverPortSpinBox);
formLayout->addRow(tr("Local &executable:"), d->localExecutablePathChooser);
formLayout->addRow(tr("Command line &arguments:"), d->arguments);
formLayout->addRow(tr("&Working directory:"), d->workingDirectory);
formLayout->addRow(tr("Run in &terminal:"), d->runInTerminalCheckBox);
formLayout->addRow(tr("Break at \"&main\":"), d->breakAtMainCheckBox);
formLayout->addRow(tr("Use target extended-remote to connect:"), d->useTargetExtendedRemoteCheckBox);
formLayout->addRow(Tr::tr("Local &executable:"), d->localExecutablePathChooser);
formLayout->addRow(Tr::tr("Command line &arguments:"), d->arguments);
formLayout->addRow(Tr::tr("&Working directory:"), d->workingDirectory);
formLayout->addRow(Tr::tr("Run in &terminal:"), d->runInTerminalCheckBox);
formLayout->addRow(Tr::tr("Break at \"&main\":"), d->breakAtMainCheckBox);
formLayout->addRow(Tr::tr("Use target extended-remote to connect:"), d->useTargetExtendedRemoteCheckBox);
formLayout->addRow(d->sysRootLabel, d->sysRootPathChooser);
formLayout->addRow(d->serverInitCommandsLabel, d->serverInitCommandsTextEdit);
formLayout->addRow(d->serverResetCommandsLabel, d->serverResetCommandsTextEdit);
formLayout->addRow(tr("Debug &information:"), d->debuginfoPathChooser);
formLayout->addRow(Tr::tr("Debug &information:"), d->debuginfoPathChooser);
formLayout->addRow(d->channelOverrideHintLabel);
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
formLayout->addRow(line2);
formLayout->addRow(tr("&Recent:"), d->historyComboBox);
formLayout->addRow(Tr::tr("&Recent:"), d->historyComboBox);
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
@@ -463,7 +462,7 @@ void StartApplicationDialog::run(bool attachRemote)
debugger->setStartMode(AttachToRemoteServer);
debugger->setCloseMode(KillAtClose);
debugger->setUseContinueInsteadOfRun(true);
debugger->setRunControlName(tr("Attach to %1").arg(debugger->remoteChannel()));
debugger->setRunControlName(Tr::tr("Attach to %1").arg(debugger->remoteChannel()));
}
debugger->startRunControl();
}
@@ -532,7 +531,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
: QDialog(parent),
d(new AttachToQmlPortDialogPrivate)
{
setWindowTitle(tr("Start Debugger"));
setWindowTitle(Tr::tr("Start Debugger"));
d->kitChooser = new KitChooser(this);
d->kitChooser->setShowIcons(true);
@@ -547,8 +546,8 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
auto formLayout = new QFormLayout();
formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("&Port:"), d->portSpinBox);
formLayout->addRow(Tr::tr("Kit:"), d->kitChooser);
formLayout->addRow(Tr::tr("&Port:"), d->portSpinBox);
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
@@ -598,7 +597,7 @@ static QString cdbRemoteHelp()
const QString ext32 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(false));
const QString ext64 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(true));
return StartRemoteCdbDialog::tr(
return Tr::tr(
"<html><body><p>The remote CDB needs to load the matching %1 CDB extension "
"(<code>%2</code> or <code>%3</code>, respectively).</p><p>Copy it onto the remote machine and set the "
"environment variable <code>%4</code> to point to its folder.</p><p>"
@@ -614,7 +613,7 @@ static QString cdbRemoteHelp()
StartRemoteCdbDialog::StartRemoteCdbDialog(QWidget *parent) :
QDialog(parent), m_lineEdit(new QLineEdit)
{
setWindowTitle(tr("Start a CDB Remote Session"));
setWindowTitle(Tr::tr("Start a CDB Remote Session"));
auto groupBox = new QGroupBox;
@@ -622,7 +621,7 @@ StartRemoteCdbDialog::StartRemoteCdbDialog(QWidget *parent) :
helpLabel->setWordWrap(true);
helpLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
auto label = new QLabel(tr("&Connection:"));
auto label = new QLabel(Tr::tr("&Connection:"));
label->setBuddy(m_lineEdit);
m_lineEdit->setMinimumWidth(400);
@@ -686,10 +685,10 @@ AddressDialog::AddressDialog(QWidget *parent) :
m_lineEdit(new QLineEdit),
m_box(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
{
setWindowTitle(tr("Select Start Address"));
setWindowTitle(Tr::tr("Select Start Address"));
auto hLayout = new QHBoxLayout;
hLayout->addWidget(new QLabel(tr("Enter an address:") + ' '));
hLayout->addWidget(new QLabel(Tr::tr("Enter an address:") + ' '));
hLayout->addWidget(m_lineEdit);
auto vLayout = new QVBoxLayout;
@@ -764,7 +763,7 @@ public:
StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
: QDialog(parent), d(new StartRemoteEngineDialogPrivate)
{
setWindowTitle(tr("Start Remote Engine"));
setWindowTitle(Tr::tr("Start Remote Engine"));
d->host = new FancyLineEdit(this);
d->host->setHistoryCompleter("HostName");
@@ -785,11 +784,11 @@ StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
auto formLayout = new QFormLayout();
formLayout->addRow(tr("&Host:"), d->host);
formLayout->addRow(tr("&Username:"), d->username);
formLayout->addRow(tr("&Password:"), d->password);
formLayout->addRow(tr("&Engine path:"), d->enginePath);
formLayout->addRow(tr("&Inferior path:"), d->inferiorPath);
formLayout->addRow(Tr::tr("&Host:"), d->host);
formLayout->addRow(Tr::tr("&Username:"), d->username);
formLayout->addRow(Tr::tr("&Password:"), d->password);
formLayout->addRow(Tr::tr("&Engine path:"), d->enginePath);
formLayout->addRow(Tr::tr("&Inferior path:"), d->inferiorPath);
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
@@ -859,7 +858,7 @@ public:
m_layout->addWidget(new QLabel(type), row, column++);
for (int i = -1; i != typeFormats.size(); ++i) {
auto choice = new QRadioButton(this);
choice->setText(i == -1 ? TypeFormatsDialog::tr("Reset")
choice->setText(i == -1 ? Tr::tr("Reset")
: WatchHandler::nameForFormat(typeFormats.at(i)));
m_layout->addWidget(choice, row, column++);
if (i == current)
@@ -916,10 +915,10 @@ private:
TypeFormatsDialog::TypeFormatsDialog(QWidget *parent)
: QDialog(parent), m_ui(new TypeFormatsDialogUi(this))
{
setWindowTitle(tr("Type Formats"));
m_ui->addPage(tr("Qt Types"));
m_ui->addPage(tr("Standard Types"));
m_ui->addPage(tr("Misc Types"));
setWindowTitle(Tr::tr("Type Formats"));
m_ui->addPage(Tr::tr("Qt Types"));
m_ui->addPage(Tr::tr("Standard Types"));
m_ui->addPage(Tr::tr("Misc Types"));
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
@@ -943,5 +942,4 @@ void TypeFormatsDialog::addTypeFormats(const QString &type0,
m_ui->pages[pos]->addTypeFormats(type, typeFormats, current);
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -38,8 +38,7 @@ class QLineEdit;
class QDialogButtonBox;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class AttachToQmlPortDialogPrivate;
class DebuggerRunParameters;
@@ -49,8 +48,6 @@ class StartRemoteEngineDialogPrivate;
class StartApplicationDialog : public QDialog
{
Q_OBJECT
public:
explicit StartApplicationDialog(QWidget *parent);
~StartApplicationDialog() override;
@@ -72,8 +69,6 @@ private:
class AttachToQmlPortDialog : public QDialog
{
Q_OBJECT
public:
explicit AttachToQmlPortDialog(QWidget *parent);
~AttachToQmlPortDialog() override;
@@ -90,8 +85,6 @@ private:
class StartRemoteCdbDialog : public QDialog
{
Q_OBJECT
public:
explicit StartRemoteCdbDialog(QWidget *parent);
~StartRemoteCdbDialog() override;
@@ -109,8 +102,6 @@ private:
class AddressDialog : public QDialog
{
Q_OBJECT
public:
explicit AddressDialog(QWidget *parent = nullptr);
@@ -132,8 +123,6 @@ private:
class StartRemoteEngineDialog : public QDialog
{
Q_OBJECT
public:
explicit StartRemoteEngineDialog(QWidget *parent);
~StartRemoteEngineDialog() override;
@@ -151,8 +140,6 @@ class TypeFormatsDialogUi;
class TypeFormatsDialog : public QDialog
{
Q_OBJECT
public:
explicit TypeFormatsDialog(QWidget *parent);
~TypeFormatsDialog() override;
@@ -164,5 +151,4 @@ private:
TypeFormatsDialogUi *m_ui;
};
} // namespace Debugger
} // namespace Internal
} // Debugger::Internal

View File

@@ -32,6 +32,7 @@
#include "debuggericons.h"
#include "debuggerruncontrol.h"
#include "debuggertooltipmanager.h"
#include "debuggertr.h"
#include "breakhandler.h"
#include "disassembleragent.h"
@@ -228,8 +229,8 @@ public:
} else {
delete agent;
AsynchronousMessageBox::warning(
DebuggerEngine::tr("No Memory Viewer Available"),
DebuggerEngine::tr("The memory contents cannot be shown as no viewer plugin "
Tr::tr("No Memory Viewer Available"),
Tr::tr("The memory contents cannot be shown as no viewer plugin "
"for binary data has been loaded."));
}
}
@@ -281,7 +282,7 @@ public:
m_disassemblerAgent(engine),
m_toolTipManager(engine)
{
m_debuggerName = DebuggerEngine::tr("Debugger");
m_debuggerName = Tr::tr("Debugger");
m_logWindow = new LogWindow(m_engine); // Needed before start()
m_logWindow->setObjectName("Debugger.Dock.Output");
@@ -366,8 +367,8 @@ public:
{
// update tooltips that are visible on the button in the mode selector
const QString displayName = m_engine->displayName();
m_continueAction.setToolTip(tr("Continue %1").arg(displayName));
m_interruptAction.setToolTip(tr("Interrupt %1").arg(displayName));
m_continueAction.setToolTip(Tr::tr("Continue %1").arg(displayName));
m_interruptAction.setToolTip(Tr::tr("Interrupt %1").arg(displayName));
}
void setupViews();
@@ -425,7 +426,7 @@ public:
m_stackHandler.removeAll();
m_threadsHandler.removeAll();
m_watchHandler.cleanup();
m_engine->showMessage(tr("Debugger finished."), StatusBar);
m_engine->showMessage(Tr::tr("Debugger finished."), StatusBar);
m_engine->setState(DebuggerFinished); // Also destroys views.
if (debuggerSettings()->switchModeOnExit.value())
EngineManager::deactivateDebugMode();
@@ -526,32 +527,29 @@ public:
bool m_isDying = false;
QAction m_detachAction;
OptionalAction m_continueAction{tr("Continue")};
QAction m_exitAction{tr("Stop Debugger")}; // On application output button if "Stop" is possible
OptionalAction m_interruptAction{tr("Interrupt")}; // On the fat debug button if "Pause" is possible
QAction m_abortAction{tr("Abort Debugging")};
QAction m_stepIntoAction{tr("Step Into")};
QAction m_stepOutAction{tr("Step Out")};
QAction m_runToLineAction{tr("Run to Line")}; // In the debug menu
QAction m_runToSelectedFunctionAction{tr("Run to Selected Function")};
QAction m_jumpToLineAction{tr("Jump to Line")};
QAction m_frameUpAction{QCoreApplication::translate("Debugger::Internal::DebuggerPluginPrivate",
"Move to Calling Frame")};
QAction m_frameDownAction{QCoreApplication::translate("Debugger::Internal::DebuggerPluginPrivate",
"Move to Called Frame")};
QAction m_openMemoryEditorAction{QCoreApplication::translate("Debugger::Internal::DebuggerPluginPrivate",
"Memory...")};
OptionalAction m_continueAction{Tr::tr("Continue")};
QAction m_exitAction{Tr::tr("Stop Debugger")}; // On application output button if "Stop" is possible
OptionalAction m_interruptAction{Tr::tr("Interrupt")}; // On the fat debug button if "Pause" is possible
QAction m_abortAction{Tr::tr("Abort Debugging")};
QAction m_stepIntoAction{Tr::tr("Step Into")};
QAction m_stepOutAction{Tr::tr("Step Out")};
QAction m_runToLineAction{Tr::tr("Run to Line")}; // In the debug menu
QAction m_runToSelectedFunctionAction{Tr::tr("Run to Selected Function")};
QAction m_jumpToLineAction{Tr::tr("Jump to Line")};
QAction m_frameUpAction{Tr::tr("Move to Calling Frame")};
QAction m_frameDownAction{Tr::tr("Move to Called Frame")};
QAction m_openMemoryEditorAction{Tr::tr("Memory...")};
// In the Debug menu.
QAction m_returnFromFunctionAction{tr("Immediately Return From Inner Function")};
QAction m_stepOverAction{tr("Step Over")};
QAction m_watchAction{tr("Add Expression Evaluator")};
QAction m_setOrRemoveBreakpointAction{tr("Set or Remove Breakpoint")};
QAction m_enableOrDisableBreakpointAction{tr("Enable or Disable Breakpoint")};
QAction m_resetAction{tr("Restart Debugging")};
OptionalAction m_operateByInstructionAction{tr("Operate by Instruction")};
QAction m_recordForReverseOperationAction{tr("Record Information to Allow Reversal of Direction")};
OptionalAction m_operateInReverseDirectionAction{tr("Reverse Direction")};
OptionalAction m_snapshotAction{tr("Take Snapshot of Process State")};
QAction m_returnFromFunctionAction{Tr::tr("Immediately Return From Inner Function")};
QAction m_stepOverAction{Tr::tr("Step Over")};
QAction m_watchAction{Tr::tr("Add Expression Evaluator")};
QAction m_setOrRemoveBreakpointAction{Tr::tr("Set or Remove Breakpoint")};
QAction m_enableOrDisableBreakpointAction{Tr::tr("Enable or Disable Breakpoint")};
QAction m_resetAction{Tr::tr("Restart Debugging")};
OptionalAction m_operateByInstructionAction{Tr::tr("Operate by Instruction")};
QAction m_recordForReverseOperationAction{Tr::tr("Record Information to Allow Reversal of Direction")};
OptionalAction m_operateInReverseDirectionAction{Tr::tr("Reverse Direction")};
OptionalAction m_snapshotAction{Tr::tr("Take Snapshot of Process State")};
QPointer<TerminalRunner> m_terminalRunner;
DebuggerToolTipManager m_toolTipManager;
@@ -575,7 +573,7 @@ void DebuggerEnginePrivate::setupViews()
m_progress.setProgressRange(0, 1000);
FutureProgress *fp = ProgressManager::addTask(m_progress.future(),
tr("Launching Debugger"), "Debugger.Launcher");
Tr::tr("Launching Debugger"), "Debugger.Launcher");
connect(fp, &FutureProgress::canceled, m_engine, &DebuggerEngine::quitDebugger);
fp->setKeepOnFinish(FutureProgress::HideOnFinish);
m_progress.reportStarted();
@@ -589,7 +587,7 @@ void DebuggerEnginePrivate::setupViews()
m_operateByInstructionAction.setIcon(Debugger::Icons::SINGLE_INSTRUCTION_MODE.icon());
m_operateByInstructionAction.setCheckable(true);
m_operateByInstructionAction.setChecked(false);
m_operateByInstructionAction.setToolTip("<p>" + tr("Switches the debugger to instruction-wise "
m_operateByInstructionAction.setToolTip("<p>" + Tr::tr("Switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single "
"instructions and the source location view also shows the "
"disassembled instructions."));
@@ -641,7 +639,7 @@ void DebuggerEnginePrivate::setupViews()
Qt::QueuedConnection);
m_modulesWindow = addSearch(m_modulesView);
m_modulesWindow->setObjectName("Debugger.Dock.Modules." + engineId);
m_modulesWindow->setWindowTitle(tr("&Modules"));
m_modulesWindow->setWindowTitle(Tr::tr("&Modules"));
m_registerView = new BaseTreeView;
m_registerView->setModel(m_registerHandler.model());
@@ -653,7 +651,7 @@ void DebuggerEnginePrivate::setupViews()
Qt::QueuedConnection);
m_registerWindow = addSearch(m_registerView);
m_registerWindow->setObjectName("Debugger.Dock.Register." + engineId);
m_registerWindow->setWindowTitle(tr("Reg&isters"));
m_registerWindow->setWindowTitle(Tr::tr("Reg&isters"));
m_peripheralRegisterView = new BaseTreeView;
m_peripheralRegisterView->setModel(m_peripheralRegisterHandler.model());
@@ -665,7 +663,7 @@ void DebuggerEnginePrivate::setupViews()
Qt::QueuedConnection);
m_peripheralRegisterWindow = addSearch(m_peripheralRegisterView);
m_peripheralRegisterWindow->setObjectName("Debugger.Dock.PeripheralRegister." + engineId);
m_peripheralRegisterWindow->setWindowTitle(tr("Peripheral Reg&isters"));
m_peripheralRegisterWindow->setWindowTitle(Tr::tr("Peripheral Reg&isters"));
m_stackView = new StackTreeView;
m_stackView->setModel(m_stackHandler.model());
@@ -674,7 +672,7 @@ void DebuggerEnginePrivate::setupViews()
m_stackView->enableColumnHiding();
m_stackWindow = addSearch(m_stackView);
m_stackWindow->setObjectName("Debugger.Dock.Stack." + engineId);
m_stackWindow->setWindowTitle(tr("&Stack"));
m_stackWindow->setWindowTitle(Tr::tr("&Stack"));
m_sourceFilesView = new BaseTreeView;
m_sourceFilesView->setModel(m_sourceFilesHandler.model());
@@ -686,7 +684,7 @@ void DebuggerEnginePrivate::setupViews()
Qt::QueuedConnection);
m_sourceFilesWindow = addSearch(m_sourceFilesView);
m_sourceFilesWindow->setObjectName("Debugger.Dock.SourceFiles." + engineId);
m_sourceFilesWindow->setWindowTitle(tr("Source Files"));
m_sourceFilesWindow->setWindowTitle(Tr::tr("Source Files"));
m_threadsView = new BaseTreeView;
m_threadsView->setModel(m_threadsHandler.model());
@@ -697,13 +695,13 @@ void DebuggerEnginePrivate::setupViews()
m_threadsView->enableColumnHiding();
m_threadsWindow = addSearch(m_threadsView);
m_threadsWindow->setObjectName("Debugger.Dock.Threads." + engineId);
m_threadsWindow->setWindowTitle(tr("&Threads"));
m_threadsWindow->setWindowTitle(Tr::tr("&Threads"));
m_returnView = new WatchTreeView{ReturnType};
m_returnView->setModel(m_watchHandler.model());
m_returnWindow = addSearch(m_returnView);
m_returnWindow->setObjectName("CppDebugReturn");
m_returnWindow->setWindowTitle(tr("Locals"));
m_returnWindow->setWindowTitle(Tr::tr("Locals"));
m_returnWindow->setVisible(false);
m_localsView = new WatchTreeView{LocalsType};
@@ -711,21 +709,21 @@ void DebuggerEnginePrivate::setupViews()
m_localsView->setSettings(settings, "Debugger.LocalsView");
m_localsWindow = addSearch(m_localsView);
m_localsWindow->setObjectName("Debugger.Dock.Locals." + engineId);
m_localsWindow->setWindowTitle(tr("Locals"));
m_localsWindow->setWindowTitle(Tr::tr("Locals"));
m_inspectorView = new WatchTreeView{InspectType};
m_inspectorView->setModel(m_watchHandler.model());
m_inspectorView->setSettings(settings, "Debugger.LocalsView"); // sic! same as locals view.
m_inspectorWindow = addSearch(m_inspectorView);
m_inspectorWindow->setObjectName("Debugger.Dock.Inspector." + engineId);
m_inspectorWindow->setWindowTitle(tr("Locals"));
m_inspectorWindow->setWindowTitle(Tr::tr("Locals"));
m_watchersView = new WatchTreeView{WatchersType};
m_watchersView->setModel(m_watchHandler.model());
m_watchersView->setSettings(settings, "Debugger.WatchersView");
m_watchersWindow = addSearch(m_watchersView);
m_watchersWindow->setObjectName("Debugger.Dock.Watchers." + engineId);
m_watchersWindow->setWindowTitle(tr("&Expressions"));
m_watchersWindow->setWindowTitle(Tr::tr("&Expressions"));
m_localsAndInspectorWindow = new LocalsAndInspectorWindow(
m_localsWindow, m_inspectorWindow, m_returnWindow);
@@ -747,7 +745,7 @@ void DebuggerEnginePrivate::setupViews()
m_breakView->enableColumnHiding();
m_breakWindow = addSearch(m_breakView);
m_breakWindow->setObjectName("Debugger.Dock.Break." + engineId);
m_breakWindow->setWindowTitle(tr("&Breakpoints"));
m_breakWindow->setWindowTitle(Tr::tr("&Breakpoints"));
m_perspective->useSubPerspectiveSwitcher(EngineManager::engineChooser());
@@ -775,11 +773,11 @@ void DebuggerEnginePrivate::setupViews()
connect(&m_interruptAction, &QAction::triggered,
m_engine, &DebuggerEngine::handleExecInterrupt);
m_abortAction.setToolTip(tr("Aborts debugging and resets the debugger to the initial state."));
m_abortAction.setToolTip(Tr::tr("Aborts debugging and resets the debugger to the initial state."));
connect(&m_abortAction, &QAction::triggered,
m_engine, &DebuggerEngine::abortDebugger);
m_resetAction.setToolTip(tr("Restarts the debugging session."));
m_resetAction.setToolTip(Tr::tr("Restarts the debugging session."));
m_resetAction.setIcon(Icons::RESTART_TOOLBAR.icon());
connect(&m_resetAction, &QAction::triggered,
m_engine, &DebuggerEngine::handleReset);
@@ -825,7 +823,7 @@ void DebuggerEnginePrivate::setupViews()
m_perspective->addToolbarSeparator();
m_threadLabel = new QLabel(tr("Threads:"));
m_threadLabel = new QLabel(Tr::tr("Threads:"));
m_perspective->addToolBarWidget(m_threadLabel);
m_perspective->addToolBarWidget(m_threadsHandler.threadSwitcher());
@@ -1120,7 +1118,7 @@ void DebuggerEngine::gotoLocation(const Location &loc)
if (loc.needsMarker()) {
d->m_locationMark.reset(new LocationMark(this, loc.fileName(), line));
d->m_locationMark->setToolTip(tr("Current debugger location of %1").arg(displayName()));
d->m_locationMark->setToolTip(Tr::tr("Current debugger location of %1").arg(displayName()));
}
d->m_breakHandler.setLocation(loc);
@@ -1249,7 +1247,7 @@ void DebuggerEngine::notifyEngineSetupFailed()
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << this << state());
setState(EngineSetupFailed);
if (d->m_isPrimaryEngine) {
showMessage(tr("Debugging has failed."), NormalMessageFormat);
showMessage(Tr::tr("Debugging has failed."), NormalMessageFormat);
d->m_progress.setProgressValue(900);
d->m_progress.reportCanceled();
d->m_progress.reportFinished();
@@ -1276,7 +1274,7 @@ void DebuggerEngine::notifyEngineRunOkAndInferiorUnrunnable()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Loading finished."));
showStatusMessage(Tr::tr("Loading finished."));
setState(InferiorUnrunnable);
}
@@ -1287,7 +1285,7 @@ void DebuggerEngine::notifyEngineRunFailed()
d->m_progress.setProgressValue(900);
d->m_progress.reportCanceled();
d->m_progress.reportFinished();
showStatusMessage(tr("Run failed."));
showStatusMessage(Tr::tr("Run failed."));
setState(EngineRunFailed);
d->doShutdownEngine();
}
@@ -1298,7 +1296,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Running."));
showStatusMessage(Tr::tr("Running."));
setState(InferiorRunOk);
}
@@ -1308,7 +1306,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Stopped."));
showStatusMessage(Tr::tr("Stopped."));
setState(InferiorStopOk);
}
@@ -1316,7 +1314,7 @@ void DebuggerEngine::notifyInferiorRunRequested()
{
showMessage("NOTE: INFERIOR RUN REQUESTED");
QTC_ASSERT(state() == InferiorStopOk, qDebug() << this << state());
showStatusMessage(tr("Run requested..."));
showStatusMessage(Tr::tr("Run requested..."));
setState(InferiorRunRequested);
}
@@ -1327,7 +1325,7 @@ void DebuggerEngine::notifyInferiorRunOk()
return;
}
showMessage("NOTE: INFERIOR RUN OK");
showStatusMessage(tr("Running."));
showStatusMessage(Tr::tr("Running."));
// Transition from StopRequested can happen in remotegdbadapter.
QTC_ASSERT(state() == InferiorRunRequested
|| state() == InferiorStopOk
@@ -1364,7 +1362,7 @@ void DebuggerEngine::notifyInferiorStopOk()
return;
}
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << this << state());
showMessage(tr("Stopped."), StatusBar);
showMessage(Tr::tr("Stopped."), StatusBar);
setState(InferiorStopOk);
}
@@ -1374,7 +1372,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
QTC_ASSERT(state() == InferiorRunOk, qDebug() << this << state());
if (QTC_GUARD(d->m_perspective))
d->m_perspective->select();
showMessage(tr("Stopped."), StatusBar);
showMessage(Tr::tr("Stopped."), StatusBar);
setState(InferiorStopOk);
if (debuggerSettings()->raiseOnInterrupt.value())
ICore::raiseWindow(DebuggerMainWindow::instance());
@@ -1398,9 +1396,9 @@ void DebuggerEnginePrivate::setInitialActionStates()
m_recordForReverseOperationAction.setIcon(Icons::RECORD_OFF.icon());
m_recordForReverseOperationAction.setToolTip(QString("<html><head/><body><p>%1</p><p>"
"<b>%2</b>%3</p></body></html>").arg(
tr("Record information to enable stepping backwards."),
tr("Note: "),
tr("This feature is very slow and unstable on the GDB side. "
Tr::tr("Record information to enable stepping backwards."),
Tr::tr("Note: "),
Tr::tr("This feature is very slow and unstable on the GDB side. "
"It exhibits unpredictable behavior when going backwards over system "
"calls and is very likely to destroy your debugging session.")));
@@ -1451,7 +1449,7 @@ void DebuggerEnginePrivate::updateState()
const DebuggerState state = m_state;
const bool companionPreventsAction = m_engine->companionPreventsActions();
// Fixme: hint tr("Debugger is Busy");
// Fixme: hint Tr::tr("Debugger is Busy");
// Exactly one of m_interuptAction and m_continueAction should be
// visible, possibly disabled.
if (state == DebuggerNotReady) {
@@ -1602,7 +1600,7 @@ void DebuggerEnginePrivate::updateReverseActions()
m_operateInReverseDirectionAction.setVisible(canReverse);
m_operateInReverseDirectionAction.setEnabled(canReverse && stopped && doesRecord);
m_operateInReverseDirectionAction.setIcon(Icons::DIRECTION_BACKWARD.icon());
m_operateInReverseDirectionAction.setText(DebuggerEngine::tr("Operate in Reverse Direction"));
m_operateInReverseDirectionAction.setText(Tr::tr("Operate in Reverse Direction"));
}
void DebuggerEnginePrivate::cleanupViews()
@@ -1819,9 +1817,9 @@ void DebuggerEngine::notifyDebuggerProcessFinished(const ProcessResultData &resu
// Initiate shutdown sequence
notifyInferiorIll();
const QString msg = result.m_exitStatus == QProcess::CrashExit ?
tr("The %1 process terminated.") :
tr("The %2 process terminated unexpectedly (exit code %1).").arg(result.m_exitCode);
AsynchronousMessageBox::critical(tr("Unexpected %1 Exit").arg(backendName),
Tr::tr("The %1 process terminated.") :
Tr::tr("The %2 process terminated unexpectedly (exit code %1).").arg(result.m_exitCode);
AsynchronousMessageBox::critical(Tr::tr("Unexpected %1 Exit").arg(backendName),
msg.arg(backendName));
break;
}
@@ -1963,7 +1961,7 @@ void DebuggerEngine::notifyInferiorPid(const ProcessHandle &pid)
return;
d->m_inferiorPid = pid;
if (pid.isValid()) {
showMessage(tr("Taking notice of pid %1").arg(pid.pid()));
showMessage(Tr::tr("Taking notice of pid %1").arg(pid.pid()));
DebuggerStartMode sm = runParameters().startMode;
if (sm == StartInternal || sm == StartExternal || sm == AttachToLocalProcess)
d->m_inferiorPid.activate();
@@ -1982,14 +1980,14 @@ bool DebuggerEngine::isReverseDebugging() const
void DebuggerEngine::handleBeginOfRecordingReached()
{
showStatusMessage(tr("Reverse-execution history exhausted. Going forward again."));
showStatusMessage(Tr::tr("Reverse-execution history exhausted. Going forward again."));
d->m_operateInReverseDirectionAction.setChecked(false);
d->updateReverseActions();
}
void DebuggerEngine::handleRecordingFailed()
{
showStatusMessage(tr("Reverse-execution recording failed."));
showStatusMessage(Tr::tr("Reverse-execution recording failed."));
d->m_operateInReverseDirectionAction.setChecked(false);
d->m_recordForReverseOperationAction.setChecked(false);
d->updateReverseActions();
@@ -2009,7 +2007,7 @@ void DebuggerEngine::quitDebugger()
break;
case InferiorRunOk:
setState(InferiorStopRequested);
showMessage(tr("Attempting to interrupt."), StatusBar);
showMessage(Tr::tr("Attempting to interrupt."), StatusBar);
interruptInferior();
break;
case EngineSetupRequested:
@@ -2037,7 +2035,7 @@ void DebuggerEngine::requestInterruptInferior()
QTC_ASSERT(state() == InferiorRunOk, qDebug() << this << state());
setState(InferiorStopRequested);
showMessage("CALL: INTERRUPT INFERIOR");
showMessage(tr("Attempting to interrupt."), StatusBar);
showMessage(Tr::tr("Attempting to interrupt."), StatusBar);
interruptInferior();
}
@@ -2074,7 +2072,7 @@ void DebuggerEngine::watchPoint(const QPoint &pnt)
cmd.callback = [this](const DebuggerResponse &response) {
qulonglong addr = response.data["selected"].toAddress();
if (addr == 0)
showMessage(tr("Could not find a widget."), StatusBar);
showMessage(Tr::tr("Could not find a widget."), StatusBar);
// Add the watcher entry nevertheless, as that's the place where
// the user expects visual feedback.
watchHandler()->watchExpression(response.data["expr"].data(), QString(), true);
@@ -2188,7 +2186,7 @@ void DebuggerEngine::updateAll()
QString DebuggerEngine::displayName() const
{
//: e.g. LLDB for "myproject", shows up i
return tr("%1 for \"%2\"").arg(d->m_debuggerName, runParameters().displayName);
return Tr::tr("%1 for \"%2\"").arg(d->m_debuggerName, runParameters().displayName);
}
void DebuggerEngine::insertBreakpoint(const Breakpoint &bp)
@@ -2244,7 +2242,7 @@ void DebuggerEngine::handleReverseDirection(bool reverse)
void DebuggerEngine::executeDebuggerCommand(const QString &)
{
showMessage(tr("This debugger cannot handle user input."), StatusBar);
showMessage(Tr::tr("This debugger cannot handle user input."), StatusBar);
}
bool DebuggerEngine::isDying() const
@@ -2254,24 +2252,24 @@ bool DebuggerEngine::isDying() const
QString DebuggerEngine::msgStopped(const QString &reason)
{
return reason.isEmpty() ? tr("Stopped.") : tr("Stopped: \"%1\".").arg(reason);
return reason.isEmpty() ? Tr::tr("Stopped.") : Tr::tr("Stopped: \"%1\".").arg(reason);
}
QString DebuggerEngine::msgStoppedBySignal(const QString &meaning,
const QString &name)
{
return tr("Stopped: %1 (Signal %2).").arg(meaning, name);
return Tr::tr("Stopped: %1 (Signal %2).").arg(meaning, name);
}
QString DebuggerEngine::msgStoppedByException(const QString &description,
const QString &threadId)
{
return tr("Stopped in thread %1 by: %2.").arg(threadId, description);
return Tr::tr("Stopped in thread %1 by: %2.").arg(threadId, description);
}
QString DebuggerEngine::msgInterrupted()
{
return tr("Interrupted.");
return Tr::tr("Interrupted.");
}
bool DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
@@ -2280,25 +2278,25 @@ bool DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name
return false;
if (name.isEmpty())
name = ' ' + tr("<Unknown>", "name") + ' ';
name = ' ' + Tr::tr("<Unknown>", "name") + ' ';
if (meaning.isEmpty())
meaning = ' ' + tr("<Unknown>", "meaning") + ' ';
const QString msg = tr("<p>The inferior stopped because it received a "
meaning = ' ' + Tr::tr("<Unknown>", "meaning") + ' ';
const QString msg = Tr::tr("<p>The inferior stopped because it received a "
"signal from the operating system.<p>"
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
"<tr><td>Signal meaning : </td><td>%2</td></tr></table>")
.arg(name, meaning);
d->m_alertBox = AsynchronousMessageBox::information(tr("Signal Received"), msg);
d->m_alertBox = AsynchronousMessageBox::information(Tr::tr("Signal Received"), msg);
return true;
}
void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description)
{
const QString msg =
tr("<p>The inferior stopped because it triggered an exception.<p>%1").
Tr::tr("<p>The inferior stopped because it triggered an exception.<p>%1").
arg(description);
AsynchronousMessageBox::information(tr("Exception Triggered"), msg);
AsynchronousMessageBox::information(Tr::tr("Exception Triggered"), msg);
}
void DebuggerEngine::openMemoryView(const MemoryViewSetupData &data)
@@ -2365,7 +2363,7 @@ void DebuggerEngine::updateLocalsView(const GdbMi &all)
static int count = 0;
showMessage(QString("<Rebuild Watchmodel %1 @ %2 >")
.arg(++count).arg(LogWindow::logTimeStamp()), LogMiscInput);
showMessage(tr("Finished retrieving data."), 400, StatusBar);
showMessage(Tr::tr("Finished retrieving data."), 400, StatusBar);
d->m_toolTipManager.updateToolTips();
@@ -2518,9 +2516,9 @@ void DebuggerEngine::handleExecRunToSelectedFunction()
}
if (functionName.isEmpty()) {
showMessage(tr("No function selected."), StatusBar);
showMessage(Tr::tr("No function selected."), StatusBar);
} else {
showMessage(tr("Running to function \"%1\".").arg(functionName), StatusBar);
showMessage(Tr::tr("Running to function \"%1\".").arg(functionName), StatusBar);
resetLocation();
executeRunToFunction(functionName);
}
@@ -2547,8 +2545,8 @@ void DebuggerEngine::handleAddToWatchWindow()
exp = exp.trimmed();
if (exp.isEmpty()) {
// Happens e.g. when trying to evaluate 'char' or 'return'.
AsynchronousMessageBox::warning(tr("Warning"),
tr("Select a valid expression to evaluate."));
AsynchronousMessageBox::warning(Tr::tr("Warning"),
Tr::tr("Select a valid expression to evaluate."));
return;
}
watchHandler()->watchVariable(exp);
@@ -2682,13 +2680,13 @@ void DebuggerEngine::showModuleSymbols(const QString &moduleName, const Symbols
w->setSortingEnabled(true);
w->setObjectName("Symbols." + moduleName);
QStringList header;
header.append(tr("Symbol"));
header.append(tr("Address"));
header.append(tr("Code"));
header.append(tr("Section"));
header.append(tr("Name"));
header.append(Tr::tr("Symbol"));
header.append(Tr::tr("Address"));
header.append(Tr::tr("Code"));
header.append(Tr::tr("Section"));
header.append(Tr::tr("Name"));
w->setHeaderLabels(header);
w->setWindowTitle(tr("Symbols in \"%1\"").arg(moduleName));
w->setWindowTitle(Tr::tr("Symbols in \"%1\"").arg(moduleName));
for (const Symbol &s : symbols) {
auto it = new QTreeWidgetItem;
it->setData(0, Qt::DisplayRole, s.name);
@@ -2711,13 +2709,13 @@ void DebuggerEngine::showModuleSections(const QString &moduleName, const Section
w->setSortingEnabled(true);
w->setObjectName("Sections." + moduleName);
QStringList header;
header.append(tr("Name"));
header.append(tr("From"));
header.append(tr("To"));
header.append(tr("Address"));
header.append(tr("Flags"));
header.append(Tr::tr("Name"));
header.append(Tr::tr("From"));
header.append(Tr::tr("To"));
header.append(Tr::tr("Address"));
header.append(Tr::tr("Flags"));
w->setHeaderLabels(header);
w->setWindowTitle(tr("Sections in \"%1\"").arg(moduleName));
w->setWindowTitle(Tr::tr("Sections in \"%1\"").arg(moduleName));
for (const Section &s : sections) {
auto it = new QTreeWidgetItem;
it->setData(0, Qt::DisplayRole, s.name);
@@ -2760,7 +2758,7 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
}
if (!preferredDebugger.isEmpty()) {
warnOnInappropriateDebugger = true;
detailedWarning = DebuggerEngine::tr(
detailedWarning = Tr::tr(
"The inferior is in the Portable Executable format.\n"
"Selecting %1 as debugger would improve the debugging "
"experience for this binary format.")
@@ -2791,7 +2789,7 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
if (CheckableMessageBox::shouldAskAgain(coreSettings, warnOnInappropriateDebuggerKey)) {
if (rp.cppEngineType == CdbEngineType) {
warnOnInappropriateDebugger = true;
detailedWarning = DebuggerEngine::tr(
detailedWarning = Tr::tr(
"The inferior is in the ELF format.\n"
"Selecting GDB or LLDB as debugger would improve the debugging "
"experience for this binary format.");
@@ -2885,9 +2883,9 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
return;
for (const QByteArray &name : qAsConst(interesting)) {
const QString found = seen.contains(name) ? DebuggerEngine::tr("Found.")
: DebuggerEngine::tr("Not found.");
detailedWarning.append('\n' + DebuggerEngine::tr("Section %1: %2").arg(QString::fromUtf8(name)).arg(found));
const QString found = seen.contains(name) ? Tr::tr("Found.")
: Tr::tr("Not found.");
detailedWarning.append('\n' + Tr::tr("Section %1: %2").arg(QString::fromUtf8(name)).arg(found));
}
break;
}
@@ -2897,8 +2895,8 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
if (warnOnInappropriateDebugger) {
CheckableMessageBox::doNotShowAgainInformation(
Core::ICore::dialogParent(),
DebuggerEngine::tr("Warning"),
DebuggerEngine::tr(
Tr::tr("Warning"),
Tr::tr(
"The selected debugger may be inappropriate for the inferior.\n"
"Examining symbols and setting breakpoints by file name and line number "
"may fail.\n")
@@ -2906,8 +2904,8 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
Core::ICore::settings(),
warnOnInappropriateDebuggerKey);
} else if (warnOnRelease) {
AsynchronousMessageBox::information(DebuggerEngine::tr("Warning"),
DebuggerEngine::tr("This does not seem to be a \"Debug\" build.\n"
AsynchronousMessageBox::information(Tr::tr("Warning"),
Tr::tr("This does not seem to be a \"Debug\" build.\n"
"Setting breakpoints by file name and line number may fail.")
+ '\n' + detailedWarning);
}

View File

@@ -27,8 +27,7 @@
using namespace Utils;
namespace Debugger {
namespace Icons {
namespace Debugger::Icons {
const Icon BREAKPOINT({
{":/utils/images/filledcircle.png", Theme::IconsErrorColor}}, Icon::Tint);
@@ -158,5 +157,5 @@ const Icon MACOS_TOUCHBAR_DEBUG_STEP_INTO(
":/debugger/images/macos_touchbar_debug_step_into.png");
const Icon MACOS_TOUCHBAR_DEBUG_STEP_OUT(
":/debugger/images/macos_touchbar_debug_step_out.png");
} // namespace Icons
} // namespace Debugger
} // Debugger::Icons

View File

@@ -29,8 +29,7 @@
#include <utils/icon.h>
namespace Debugger {
namespace Icons {
namespace Debugger::Icons {
// Used in QmlProfiler.
DEBUGGER_EXPORT extern const Utils::Icon RECORD_ON;
@@ -90,5 +89,4 @@ extern const Utils::Icon MACOS_TOUCHBAR_DEBUG_STEP_OVER;
extern const Utils::Icon MACOS_TOUCHBAR_DEBUG_STEP_INTO;
extern const Utils::Icon MACOS_TOUCHBAR_DEBUG_STEP_OUT;
} // namespace Icons
} // namespace Debugger
} // namespace Debugger::Icons

View File

@@ -24,14 +24,14 @@
****************************************************************************/
#include "debuggeritem.h"
#include "debuggeritemmanager.h"
#include "debuggerkitinformation.h"
#include "debuggerprotocol.h"
#include "debuggertr.h"
#include <projectexplorer/abi.h>
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <utils/hostosinfo.h>
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
@@ -40,14 +40,8 @@
#include <utils/utilsicons.h>
#include <utils/winutils.h>
#include <QFileInfo>
#include <QUuid>
#ifdef WITH_TESTS
# include <QTest>
# include "debuggerplugin.h"
#endif
using namespace Debugger::Internal;
using namespace ProjectExplorer;
using namespace Utils;
@@ -307,7 +301,7 @@ QString DebuggerItem::engineTypeName() const
{
switch (m_engineType) {
case NoEngineType:
return DebuggerItemManager::tr("Not recognized");
return Tr::tr("Not recognized");
case GdbEngineType:
return QLatin1String("GDB");
case CdbEngineType:
@@ -348,7 +342,7 @@ QIcon DebuggerItem::decoration() const
QString DebuggerItem::validityMessage() const
{
if (m_engineType == NoEngineType)
return DebuggerItemManager::tr("Could not determine debugger type");
return Tr::tr("Could not determine debugger type");
return QString();
}
@@ -384,14 +378,12 @@ QString DebuggerItem::displayName() const
return m_unexpandedDisplayName;
MacroExpander expander;
expander.registerVariable("Debugger:Type", DebuggerKitAspect::tr("Type of Debugger Backend"),
expander.registerVariable("Debugger:Type", Tr::tr("Type of Debugger Backend"),
[this] { return engineTypeName(); });
expander.registerVariable("Debugger:Version", DebuggerKitAspect::tr("Debugger"),
[this] { return !m_version.isEmpty() ? m_version :
DebuggerKitAspect::tr("Unknown debugger version"); });
expander.registerVariable("Debugger:Abi", DebuggerKitAspect::tr("Debugger"),
[this] { return !m_abis.isEmpty() ? abiNames().join(' ') :
DebuggerKitAspect::tr("Unknown debugger ABI"); });
expander.registerVariable("Debugger:Version", Tr::tr("Debugger"),
[this] { return !m_version.isEmpty() ? m_version : Tr::tr("Unknown debugger version"); });
expander.registerVariable("Debugger:Abi", Tr::tr("Debugger"),
[this] { return !m_abis.isEmpty() ? abiNames().join(' ') : Tr::tr("Unknown debugger ABI"); });
return expander.expand(m_unexpandedDisplayName);
}
@@ -494,4 +486,4 @@ bool DebuggerItem::isValid() const
return !m_id.isNull();
}
} // namespace Debugger;
} // namespace Debugger

View File

@@ -24,8 +24,9 @@
****************************************************************************/
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
#include "debuggerkitinformation.h"
#include "debuggertr.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/icore.h>
@@ -48,7 +49,6 @@
#include <utils/treemodel.h>
#include <utils/winutils.h>
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QFileInfo>
@@ -80,7 +80,6 @@ class DebuggerItemModel;
class DebuggerItemManagerPrivate
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerItemManager)
public:
DebuggerItemManagerPrivate();
~DebuggerItemManagerPrivate();
@@ -111,8 +110,6 @@ static DebuggerItemManagerPrivate *d = nullptr;
class DebuggerItemConfigWidget : public QWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerItemManager)
public:
explicit DebuggerItemConfigWidget();
void load(const DebuggerItem *item);
@@ -190,8 +187,6 @@ public:
class DebuggerItemModel : public TreeModel<TreeItem, StaticTreeItem, DebuggerTreeItem>
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)
public:
DebuggerItemModel();
@@ -225,7 +220,7 @@ const DebuggerItem *findDebugger(const Predicate &pred)
DebuggerItemModel::DebuggerItemModel()
{
setHeader({tr("Name"), tr("Path"), tr("Type")});
setHeader({Tr::tr("Name"), Tr::tr("Path"), Tr::tr("Type")});
rootItem()->appendChild(
new StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()},
{ProjectExplorer::Constants::msgAutoDetectedToolTip()}));
@@ -334,7 +329,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget()
m_cdbLabel->setOpenExternalLinks(true);
m_versionLabel = new QLineEdit(this);
m_versionLabel->setPlaceholderText(tr("Unknown"));
m_versionLabel->setPlaceholderText(Tr::tr("Unknown"));
m_versionLabel->setEnabled(false);
m_abis = new QLineEdit(this);
@@ -342,13 +337,13 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget()
auto formLayout = new QFormLayout(this);
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
formLayout->addRow(new QLabel(tr("Name:")), m_displayNameLineEdit);
formLayout->addRow(new QLabel(Tr::tr("Name:")), m_displayNameLineEdit);
formLayout->addRow(m_cdbLabel);
formLayout->addRow(new QLabel(tr("Path:")), m_binaryChooser);
formLayout->addRow(new QLabel(tr("Type:")), m_typeLineEdit);
formLayout->addRow(new QLabel(tr("ABIs:")), m_abis);
formLayout->addRow(new QLabel(tr("Version:")), m_versionLabel);
formLayout->addRow(new QLabel(tr("Working directory:")), m_workingDirectoryChooser);
formLayout->addRow(new QLabel(Tr::tr("Path:")), m_binaryChooser);
formLayout->addRow(new QLabel(Tr::tr("Type:")), m_typeLineEdit);
formLayout->addRow(new QLabel(Tr::tr("ABIs:")), m_abis);
formLayout->addRow(new QLabel(Tr::tr("Version:")), m_versionLabel);
formLayout->addRow(new QLabel(Tr::tr("Working directory:")), m_workingDirectoryChooser);
connect(m_binaryChooser, &PathChooser::filePathChanged,
this, &DebuggerItemConfigWidget::binaryPathHasChanged);
@@ -413,10 +408,10 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item)
QString versionCommand;
if (item->engineType() == CdbEngineType) {
const bool is64bit = is64BitWindowsSystem();
const QString versionString = is64bit ? tr("64-bit version") : tr("32-bit version");
const QString versionString = is64bit ? Tr::tr("64-bit version") : Tr::tr("32-bit version");
//: Label text for path configuration. %2 is "x-bit version".
text = "<html><body><p>"
+ tr("Specify the path to the "
+ Tr::tr("Specify the path to the "
"<a href=\"%1\">Windows Console Debugger executable</a>"
" (%2) here.").arg(QLatin1String(debuggingToolsWikiLinkC), versionString)
+ "</p></body></html>";
@@ -460,13 +455,12 @@ void DebuggerItemConfigWidget::binaryPathHasChanged()
class DebuggerConfigWidget : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)
public:
DebuggerConfigWidget()
{
m_addButton = new QPushButton(tr("Add"), this);
m_addButton = new QPushButton(Tr::tr("Add"), this);
m_cloneButton = new QPushButton(tr("Clone"), this);
m_cloneButton = new QPushButton(Tr::tr("Clone"), this);
m_cloneButton->setEnabled(false);
m_delButton = new QPushButton(this);
@@ -555,7 +549,7 @@ void DebuggerConfigWidget::cloneDebugger()
DebuggerItem newItem;
newItem.createId();
newItem.setCommand(item->command());
newItem.setUnexpandedDisplayName(d->uniqueDisplayName(tr("Clone of %1").arg(item->displayName())));
newItem.setUnexpandedDisplayName(d->uniqueDisplayName(Tr::tr("Clone of %1").arg(item->displayName())));
newItem.reinitializeFromFile();
newItem.setAutoDetected(false);
d->m_model->addDebugger(newItem, true);
@@ -567,7 +561,7 @@ void DebuggerConfigWidget::addDebugger()
DebuggerItem item;
item.createId();
item.setEngineType(NoEngineType);
item.setUnexpandedDisplayName(d->uniqueDisplayName(tr("New Debugger")));
item.setUnexpandedDisplayName(d->uniqueDisplayName(Tr::tr("New Debugger")));
item.setAutoDetected(false);
d->m_model->addDebugger(item, true);
m_debuggerView->setCurrentIndex(d->m_model->lastIndex());
@@ -597,7 +591,7 @@ void DebuggerConfigWidget::updateButtons()
m_container->setVisible(item != nullptr);
m_cloneButton->setEnabled(item && item->isValid() && item->canClone());
m_delButton->setEnabled(item && !item->isAutoDetected());
m_delButton->setText(item && titem->m_removed ? tr("Restore") : tr("Remove"));
m_delButton->setText(item && titem->m_removed ? Tr::tr("Restore") : Tr::tr("Remove"));
}
// --------------------------------------------------------------------------
@@ -606,12 +600,10 @@ void DebuggerConfigWidget::updateButtons()
class DebuggerOptionsPage : public Core::IOptionsPage
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerOptionsPage)
public:
DebuggerOptionsPage() {
setId(ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID);
setDisplayName(tr("Debuggers"));
setDisplayName(Tr::tr("Debuggers"));
setCategory(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY);
setWidgetCreator([] { return new DebuggerConfigWidget; });
}
@@ -688,7 +680,7 @@ void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
item.setAbis(Abi::abisOfBinary(cdb));
item.setCommand(cdb);
item.setEngineType(CdbEngineType);
item.setUnexpandedDisplayName(uniqueDisplayName(tr("Auto-detected CDB at %1").arg(cdb.toUserOutput())));
item.setUnexpandedDisplayName(uniqueDisplayName(Tr::tr("Auto-detected CDB at %1").arg(cdb.toUserOutput())));
item.reinitializeFromFile(); // collect version number
m_model->addDebugger(item);
}
@@ -736,7 +728,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePaths &s
// DebuggerItem result;
// result.setAutoDetected(true);
// result.setDisplayName(tr("Auto-detected for Tool Chain %1").arg(tc->displayName()));
// result.setDisplayName(Tr::tr("Auto-detected for Tool Chain %1").arg(tc->displayName()));
/*
// Check suggestions from the SDK.
Environment env = Environment::systemEnvironment();
@@ -785,7 +777,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePaths &s
for (const FilePath &path : paths)
path.iterateDirectory(addSuspect, {filters, QDir::Files | QDir::Executable});
QStringList logMessages{tr("Searching debuggers...")};
QStringList logMessages{Tr::tr("Searching debuggers...")};
for (const FilePath &command : qAsConst(suspects)) {
const auto commandMatches = [command](const DebuggerTreeItem *titem) {
return titem->m_item.command() == command;
@@ -804,10 +796,10 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePaths &s
if (item.engineType() == NoEngineType)
continue;
//: %1: Debugger engine type (GDB, LLDB, CDB...), %2: Path
const QString name = detectionSource.isEmpty() ? tr("System %1 at %2") : tr("Detected %1 at %2");
const QString name = detectionSource.isEmpty() ? Tr::tr("System %1 at %2") : Tr::tr("Detected %1 at %2");
item.setUnexpandedDisplayName(name.arg(item.engineTypeName()).arg(command.toUserOutput()));
m_model->addDebugger(item);
logMessages.append(tr("Found: \"%1\"").arg(command.toUserOutput()));
logMessages.append(Tr::tr("Found: \"%1\"").arg(command.toUserOutput()));
}
if (logMessage)
*logMessage = logMessages.join('\n');
@@ -848,7 +840,7 @@ void DebuggerItemManagerPrivate::autoDetectUvscDebuggers()
item.setVersion(uVisionVersion);
item.setEngineType(UvscEngineType);
item.setUnexpandedDisplayName(
uniqueDisplayName(tr("Auto-detected uVision at %1")
uniqueDisplayName(Tr::tr("Auto-detected uVision at %1")
.arg(uVision.toUserOutput())));
m_model->addDebugger(item);
}
@@ -996,8 +988,8 @@ void DebuggerItemManagerPrivate::saveDebuggers()
DebuggerItemManager::DebuggerItemManager()
{
new DebuggerItemManagerPrivate;
connect(ICore::instance(), &ICore::saveSettingsRequested,
this, [] { d->saveDebuggers(); });
QObject::connect(ICore::instance(), &ICore::saveSettingsRequested,
[] { d->saveDebuggers(); });
}
DebuggerItemManager::~DebuggerItemManager()
@@ -1056,7 +1048,7 @@ void DebuggerItemManager::autoDetectDebuggersForDevice(const FilePaths &searchPa
void DebuggerItemManager::removeDetectedDebuggers(const QString &detectionSource,
QString *logMessage)
{
QStringList logMessages{tr("Removing debugger entries...")};
QStringList logMessages{Tr::tr("Removing debugger entries...")};
QList<DebuggerTreeItem *> toBeRemoved;
d->m_model->forItemsAtLevel<2>([detectionSource, &toBeRemoved](DebuggerTreeItem *titem) {
@@ -1070,7 +1062,7 @@ void DebuggerItemManager::removeDetectedDebuggers(const QString &detectionSource
toBeRemoved.append(titem);
});
for (DebuggerTreeItem *current : toBeRemoved) {
logMessages.append(tr("Removed \"%1\"").arg(current->m_item.displayName()));
logMessages.append(Tr::tr("Removed \"%1\"").arg(current->m_item.displayName()));
d->m_model->destroyItem(current);
}
@@ -1081,7 +1073,7 @@ void DebuggerItemManager::removeDetectedDebuggers(const QString &detectionSource
void DebuggerItemManager::listDetectedDebuggers(const QString &detectionSource, QString *logMessage)
{
QTC_ASSERT(logMessage, return);
QStringList logMessages{tr("Debuggers:")};
QStringList logMessages{Tr::tr("Debuggers:")};
d->m_model->forItemsAtLevel<2>([detectionSource, &logMessages](DebuggerTreeItem *titem) {
if (titem->m_item.detectionSource() == detectionSource)
logMessages.append(titem->m_item.displayName());

View File

@@ -31,21 +31,18 @@
#include <utils/filepath.h>
#include <QList>
#include <QObject>
#include <QString>
#include <QCoreApplication>
namespace Debugger {
class DebuggerItem;
class DEBUGGER_EXPORT DebuggerItemManager : public QObject
class DEBUGGER_EXPORT DebuggerItemManager
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerItemManager)
Q_DISABLE_COPY_MOVE(DebuggerItemManager)
public:
DebuggerItemManager();
~DebuggerItemManager() override;
~DebuggerItemManager();
static const QList<DebuggerItem> debuggers();

View File

@@ -27,6 +27,7 @@
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
#include "debuggertr.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -34,7 +35,7 @@
#include <projectexplorer/toolchain.h>
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <utils/layoutbuilder.h>
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
@@ -57,8 +58,6 @@ namespace Internal {
class DebuggerKitAspectWidget final : public KitAspectWidget
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerKitAspect)
public:
DebuggerKitAspectWidget(Kit *workingCopy, const KitAspect *ki)
: KitAspectWidget(workingCopy, ki)
@@ -99,7 +98,7 @@ private:
{
m_ignoreChanges = true;
m_comboBox->clear();
m_comboBox->addItem(tr("None"), QString());
m_comboBox->addItem(Tr::tr("None"), QString());
for (const DebuggerItem &item : DebuggerItemManager::debuggers())
m_comboBox->addItem(item.displayName(), item.id());
@@ -142,8 +141,8 @@ DebuggerKitAspect::DebuggerKitAspect()
{
setObjectName("DebuggerKitAspect");
setId(DebuggerKitAspect::id());
setDisplayName(tr("Debugger"));
setDescription(tr("The debugger to use for this kit."));
setDisplayName(Tr::tr("Debugger"));
setDescription(Tr::tr("The debugger to use for this kit."));
setPriority(28000);
}
@@ -378,23 +377,23 @@ Tasks DebuggerKitAspect::validateDebugger(const Kit *k)
path = item->command().toUserOutput();
if (errors & NoDebugger)
result << BuildSystemTask(Task::Warning, tr("No debugger set up."));
result << BuildSystemTask(Task::Warning, Tr::tr("No debugger set up."));
if (errors & DebuggerNotFound)
result << BuildSystemTask(Task::Error, tr("Debugger \"%1\" not found.").arg(path));
result << BuildSystemTask(Task::Error, Tr::tr("Debugger \"%1\" not found.").arg(path));
if (errors & DebuggerNotExecutable)
result << BuildSystemTask(Task::Error, tr("Debugger \"%1\" not executable.").arg(path));
result << BuildSystemTask(Task::Error, Tr::tr("Debugger \"%1\" not executable.").arg(path));
if (errors & DebuggerNeedsAbsolutePath) {
const QString message =
tr("The debugger location must be given as an "
Tr::tr("The debugger location must be given as an "
"absolute path (%1).").arg(path);
result << BuildSystemTask(Task::Error, message);
}
if (errors & DebuggerDoesNotMatch) {
const QString message = tr("The ABI of the selected debugger does not "
const QString message = Tr::tr("The ABI of the selected debugger does not "
"match the toolchain ABI.");
result << BuildSystemTask(Task::Warning, message);
}
@@ -409,37 +408,37 @@ KitAspectWidget *DebuggerKitAspect::createConfigWidget(Kit *k) const
void DebuggerKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{
QTC_ASSERT(kit, return);
expander->registerVariable("Debugger:Name", tr("Name of Debugger"),
expander->registerVariable("Debugger:Name", Tr::tr("Name of Debugger"),
[kit]() -> QString {
const DebuggerItem *item = debugger(kit);
return item ? item->displayName() : tr("Unknown debugger");
return item ? item->displayName() : Tr::tr("Unknown debugger");
});
expander->registerVariable("Debugger:Type", tr("Type of Debugger Backend"),
expander->registerVariable("Debugger:Type", Tr::tr("Type of Debugger Backend"),
[kit]() -> QString {
const DebuggerItem *item = debugger(kit);
return item ? item->engineTypeName() : tr("Unknown debugger type");
return item ? item->engineTypeName() : Tr::tr("Unknown debugger type");
});
expander->registerVariable("Debugger:Version", tr("Debugger"),
expander->registerVariable("Debugger:Version", Tr::tr("Debugger"),
[kit]() -> QString {
const DebuggerItem *item = debugger(kit);
return item && !item->version().isEmpty()
? item->version() : tr("Unknown debugger version");
? item->version() : Tr::tr("Unknown debugger version");
});
expander->registerVariable("Debugger:Abi", tr("Debugger"),
expander->registerVariable("Debugger:Abi", Tr::tr("Debugger"),
[kit]() -> QString {
const DebuggerItem *item = debugger(kit);
return item && !item->abis().isEmpty()
? item->abiNames().join(' ')
: tr("Unknown debugger ABI");
: Tr::tr("Unknown debugger ABI");
});
}
KitAspect::ItemList DebuggerKitAspect::toUserOutput(const Kit *k) const
{
return {{tr("Debugger"), displayString(k)}};
return {{Tr::tr("Debugger"), displayString(k)}};
}
DebuggerEngineType DebuggerKitAspect::engineType(const Kit *k)
@@ -453,10 +452,10 @@ QString DebuggerKitAspect::displayString(const Kit *k)
{
const DebuggerItem *item = debugger(k);
if (!item)
return tr("No Debugger");
return Tr::tr("No Debugger");
QString binary = item->command().toUserOutput();
QString name = tr("%1 Engine").arg(item->engineTypeName());
return binary.isEmpty() ? tr("%1 <None>").arg(name) : tr("%1 using \"%2\"").arg(name, binary);
QString name = Tr::tr("%1 Engine").arg(item->engineTypeName());
return binary.isEmpty() ? Tr::tr("%1 <None>").arg(name) : Tr::tr("%1 using \"%2\"").arg(name, binary);
}
void DebuggerKitAspect::setDebugger(Kit *k, const QVariant &id)

View File

@@ -36,8 +36,6 @@ class DebuggerItem;
class DEBUGGER_EXPORT DebuggerKitAspect : public ProjectExplorer::KitAspect
{
Q_OBJECT
public:
DebuggerKitAspect();
@@ -76,4 +74,4 @@ public:
static QString displayString(const ProjectExplorer::Kit *k);
};
} // namespace Debugger
} // Debugger

View File

@@ -25,7 +25,7 @@
#include "debuggermainwindow.h"
#include "debuggerconstants.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include "enginemanager.h"
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -216,11 +216,11 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
});
auto viewButton = new QToolButton;
viewButton->setText(DebuggerMainWindow::tr("&Views"));
viewButton->setText(Tr::tr("&Views"));
auto closeButton = new QToolButton();
closeButton->setIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon());
closeButton->setToolTip(DebuggerMainWindow::tr("Leave Debug Mode"));
closeButton->setToolTip(Tr::tr("Leave Debug Mode"));
auto toolbar = new Utils::StyledBar;
toolbar->setProperty("topBorder", true);
@@ -258,7 +258,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
scrolledToolbar->setFixedHeight(StyleHelper::navigationWidgetHeight());
scrolledToolbar->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
auto dock = new QDockWidget(DebuggerMainWindow::tr("Toolbar"), q);
auto dock = new QDockWidget(Tr::tr("Toolbar"), q);
dock->setObjectName("Toolbar");
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
@@ -585,7 +585,7 @@ void DebuggerMainWindowPrivate::setCentralWidget(QWidget *widget)
q->showCentralWidgetAction()->setText(widget->windowTitle());
} else {
m_centralWidgetStack->addWidget(m_editorPlaceHolder);
q->showCentralWidgetAction()->setText(DebuggerMainWindow::tr("Editor"));
q->showCentralWidgetAction()->setText(Tr::tr("Editor"));
}
}
@@ -755,7 +755,7 @@ void PerspectivePrivate::populatePerspective()
theMainWindow->showCentralWidgetAction()->setText(m_centralWidget->windowTitle());
} else {
theMainWindow->d->m_centralWidgetStack->addWidget(theMainWindow->d->m_editorPlaceHolder);
theMainWindow->showCentralWidgetAction()->setText(DebuggerMainWindow::tr("Editor"));
theMainWindow->showCentralWidgetAction()->setText(Tr::tr("Editor"));
}
ICore::addAdditionalContext(context());
@@ -875,11 +875,11 @@ void Perspective::registerNextPrevShortcuts(QAction *next, QAction *prev)
static const char nextId[] = "Analyzer.nextitem";
static const char prevId[] = "Analyzer.previtem";
next->setText(DebuggerMainWindow::tr("Next Item"));
next->setText(Tr::tr("Next Item"));
Command * const nextCmd = ActionManager::registerAction(next, nextId,
Context(Id::fromString(id())));
nextCmd->augmentActionWithShortcutToolTip(next);
prev->setText(DebuggerMainWindow::tr("Previous Item"));
prev->setText(Tr::tr("Previous Item"));
Command * const prevCmd = ActionManager::registerAction(prev, prevId,
Context(Id::fromString(id())));
prevCmd->augmentActionWithShortcutToolTip(prev);

View File

@@ -37,6 +37,7 @@
#include "debuggerrunconfigurationaspect.h"
#include "debuggerruncontrol.h"
#include "debuggerkitinformation.h"
#include "debuggertr.h"
#include "memoryagent.h"
#include "breakhandler.h"
#include "disassemblerlines.h"
@@ -488,7 +489,7 @@ public:
{
setObjectName("DebugMode");
setContext(Context(C_DEBUGMODE, CC::C_NAVIGATION_PANE));
setDisplayName(DebuggerPlugin::tr("Debug"));
setDisplayName(Tr::tr("Debug"));
setIcon(Utils::Icon::modeIcon(Icons::MODE_DEBUGGER_CLASSIC,
Icons::MODE_DEBUGGER_FLAT, Icons::MODE_DEBUGGER_FLAT_ACTIVE));
setPriority(85);
@@ -628,19 +629,18 @@ public:
if (isMessageOnly) {
if (data.type == LocationByAddress) {
//: Message tracepoint: Address hit.
message = tr("0x%1 hit").arg(data.address, 0, 16);
message = Tr::tr("0x%1 hit").arg(data.address, 0, 16);
} else {
//: Message tracepoint: %1 file, %2 line %3 function hit.
message = tr("%1:%2 %3() hit").arg(data.fileName.fileName()).
message = Tr::tr("%1:%2 %3() hit").arg(data.fileName.fileName()).
arg(data.lineNumber).
arg(cppFunctionAt(data.fileName.toString(), data.lineNumber));
}
QInputDialog dialog; // Create wide input dialog.
dialog.setWindowFlags(dialog.windowFlags()
& ~(Qt::MSWindowsFixedSizeDialogHint));
dialog.setWindowFlags(dialog.windowFlags() & ~(Qt::MSWindowsFixedSizeDialogHint));
dialog.resize(600, dialog.height());
dialog.setWindowTitle(tr("Add Message Tracepoint"));
dialog.setLabelText (tr("Message:"));
dialog.setWindowTitle(Tr::tr("Add Message Tracepoint"));
dialog.setLabelText(Tr::tr("Message:"));
dialog.setTextValue(message);
if (dialog.exec() != QDialog::Accepted || dialog.textValue().isEmpty())
return;
@@ -694,22 +694,22 @@ public:
ProxyAction m_hiddenStopAction;
QAction m_undisturbableAction;
OptionalAction m_startAction;
QAction m_debugWithoutDeployAction{tr("Start Debugging Without Deployment")};
QAction m_startAndDebugApplicationAction{tr("Start and Debug External Application...")};
QAction m_attachToRunningApplication{tr("Attach to Running Application...")};
QAction m_attachToUnstartedApplication{tr("Attach to Unstarted Application...")};
QAction m_attachToQmlPortAction{tr("Attach to QML Port...")};
QAction m_attachToRemoteServerAction{tr("Attach to Running Debug Server...")};
QAction m_startRemoteCdbAction{tr("Attach to Remote CDB Session...")};
QAction m_attachToCoreAction{tr("Load Core File...")};
QAction m_debugWithoutDeployAction{Tr::tr("Start Debugging Without Deployment")};
QAction m_startAndDebugApplicationAction{Tr::tr("Start and Debug External Application...")};
QAction m_attachToRunningApplication{Tr::tr("Attach to Running Application...")};
QAction m_attachToUnstartedApplication{Tr::tr("Attach to Unstarted Application...")};
QAction m_attachToQmlPortAction{Tr::tr("Attach to QML Port...")};
QAction m_attachToRemoteServerAction{Tr::tr("Attach to Running Debug Server...")};
QAction m_startRemoteCdbAction{Tr::tr("Attach to Remote CDB Session...")};
QAction m_attachToCoreAction{Tr::tr("Load Core File...")};
// In the Debug menu.
QAction m_startAndBreakOnMain{tr("Start and Break on Main")};
QAction m_watchAction{tr("Add Expression Evaluator")};
QAction m_startAndBreakOnMain{Tr::tr("Start and Break on Main")};
QAction m_watchAction{Tr::tr("Add Expression Evaluator")};
Command *m_watchCommand = nullptr;
QAction m_setOrRemoveBreakpointAction{tr("Set or Remove Breakpoint")};
QAction m_enableOrDisableBreakpointAction{tr("Enable or Disable Breakpoint")};
QAction m_reloadDebuggingHelpersAction{tr("Reload Debugging Helpers")};
QAction m_setOrRemoveBreakpointAction{Tr::tr("Set or Remove Breakpoint")};
QAction m_enableOrDisableBreakpointAction{Tr::tr("Enable or Disable Breakpoint")};
QAction m_reloadDebuggingHelpersAction{Tr::tr("Reload Debugging Helpers")};
BreakpointManager m_breakpointManager;
QString m_lastPermanentStatusMessage;
@@ -727,7 +727,7 @@ public:
QList<IOptionsPage *> m_optionPages;
IContext m_debugModeContext;
Perspective m_perspective{Constants::PRESET_PERSPECTIVE_ID, tr("Debugger")};
Perspective m_perspective{Constants::PRESET_PERSPECTIVE_ID, Tr::tr("Debugger")};
DebuggerKitAspect debuggerKitAspect;
CommonOptionsPage commonOptionsPage;
@@ -763,7 +763,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
// Task integration.
//: Category under which Analyzer tasks are listed in Issues view
TaskHub::addCategory(ANALYZERTASK_ID, tr("Debugger"));
TaskHub::addCategory(ANALYZERTASK_ID, Tr::tr("Debugger"));
const Context debuggerNotRunning(C_DEBUGGER_NOTRUNNING);
ICore::addAdditionalContext(debuggerNotRunning);
@@ -775,7 +775,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
// Menus
m_menu = ActionManager::createMenu(M_DEBUG_ANALYZER);
m_menu->menu()->setTitle(tr("&Analyze"));
m_menu->menu()->setTitle(Tr::tr("&Analyze"));
m_menu->menu()->setEnabled(true);
m_menu->appendGroup(G_ANALYZER_CONTROL);
@@ -800,13 +800,13 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
QAction *act;
// Populate Windows->Views menu with standard actions.
act = new QAction(tr("Memory..."), this);
act = new QAction(Tr::tr("Memory..."), this);
act->setVisible(false);
act->setEnabled(false);
Command *cmd = ActionManager::registerAction(act, Constants::OPEN_MEMORY_EDITOR);
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_DEBUGINFO, tr("Debug Information"));
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_RUNTIME, tr("Debugger Runtime"));
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_DEBUGINFO, Tr::tr("Debug Information"));
TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_RUNTIME, Tr::tr("Debugger Runtime"));
m_debuggerSettings.readSettings();
@@ -843,14 +843,14 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
breakpointManagerView->enableColumnHiding();
auto breakpointManagerWindow = addSearch(breakpointManagerView);
breakpointManagerWindow->setWindowTitle(tr("Breakpoint Preset"));
breakpointManagerWindow->setWindowTitle(Tr::tr("Breakpoint Preset"));
breakpointManagerWindow->setObjectName("Debugger.Docks.BreakpointManager");
addLabel(breakpointManagerWindow, breakpointManagerWindow->windowTitle());
addFontSizeAdaptation(breakpointManagerWindow);
// Snapshot
auto engineManagerView = new BaseTreeView;
engineManagerView->setWindowTitle(tr("Running Debuggers"));
engineManagerView->setWindowTitle(Tr::tr("Running Debuggers"));
engineManagerView->setSettings(ICore::settings(), "Debugger.SnapshotView");
engineManagerView->setIconSize(QSize(10, 10));
engineManagerView->setModel(EngineManager::model());
@@ -858,7 +858,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
engineManagerView->enableColumnHiding();
auto engineManagerWindow = addSearch(engineManagerView);
engineManagerWindow->setWindowTitle(tr("Debugger Perspectives"));
engineManagerWindow->setWindowTitle(Tr::tr("Debugger Perspectives"));
engineManagerWindow->setObjectName("Debugger.Docks.Snapshots");
addLabel(engineManagerWindow, engineManagerWindow->windowTitle());
addFontSizeAdaptation(engineManagerWindow);
@@ -908,17 +908,17 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
// MENU_GROUP_START_REMOTE
// MENU_GROUP_START_QML
const QKeySequence startShortcut(useMacShortcuts ? tr("Ctrl+Y") : tr("F5"));
const QKeySequence startShortcut(useMacShortcuts ? Tr::tr("Ctrl+Y") : Tr::tr("F5"));
cmd = ActionManager::registerAction(&m_visibleStartAction, "Debugger.Debug");
cmd->setDescription(tr("Start Debugging or Continue"));
cmd->setDescription(Tr::tr("Start Debugging or Continue"));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setAttribute(Command::CA_UpdateIcon);
//mstart->addAction(cmd, CC::G_DEFAULT_ONE);
cmd = ActionManager::registerAction(&m_startAction, DEBUGGER_START);
cmd->setDescription(tr("Start Debugging"));
cmd->setDescription(Tr::tr("Start Debugging"));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(startShortcut);
mstart->addAction(cmd, CC::G_DEFAULT_ONE);
@@ -943,12 +943,12 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
cmd = ActionManager::registerAction(&m_attachToRunningApplication,
"Debugger.AttachToRemoteProcess");
cmd->setDescription(tr("Attach to Running Application"));
cmd->setDescription(Tr::tr("Attach to Running Application"));
mstart->addAction(cmd, MENU_GROUP_GENERAL);
cmd = ActionManager::registerAction(&m_attachToUnstartedApplication,
"Debugger.AttachToUnstartedProcess");
cmd->setDescription(tr("Attach to Unstarted Application"));
cmd->setDescription(Tr::tr("Attach to Unstarted Application"));
mstart->addAction(cmd, MENU_GROUP_GENERAL);
cmd = ActionManager::registerAction(&m_startAndDebugApplicationAction,
@@ -979,22 +979,22 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, MENU_GROUP_START_QML);
act = new QAction(tr("Detach Debugger"), this);
act = new QAction(Tr::tr("Detach Debugger"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::DETACH);
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
act = new QAction(interruptIcon(false), tr("Interrupt"), this);
act = new QAction(interruptIcon(false), Tr::tr("Interrupt"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::INTERRUPT);
cmd->setDescription(tr("Interrupt Debugger"));
cmd->setDescription(Tr::tr("Interrupt Debugger"));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(startShortcut);
cmd->setTouchBarIcon(Icons::MACOS_TOUCHBAR_DEBUG_INTERRUPT.icon());
touchBar->addAction(cmd);
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
act = new QAction(continueIcon(false), tr("Continue"), this);
act = new QAction(continueIcon(false), Tr::tr("Continue"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::CONTINUE);
cmd->setAttribute(Command::CA_UpdateText);
@@ -1005,7 +1005,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
const QIcon sidebarStopIcon = Icon::sideBarIcon(Icons::STOP, Icons::STOP_FLAT);
const QIcon stopIcon = Icon::combinedIcon({Icons::DEBUG_EXIT_SMALL.icon(), sidebarStopIcon});
act = new QAction(stopIcon, tr("Stop Debugger"), this);
act = new QAction(stopIcon, Tr::tr("Stop Debugger"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::STOP);
cmd->setTouchBarIcon(Icons::MACOS_TOUCHBAR_DEBUG_EXIT.icon());
@@ -1016,19 +1016,19 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
m_hiddenStopAction.setAttribute(ProxyAction::UpdateIcon);
cmd = ActionManager::registerAction(&m_hiddenStopAction, "Debugger.HiddenStop");
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Shift+Ctrl+Y") : tr("Shift+F5")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Shift+Ctrl+Y") : Tr::tr("Shift+F5")));
act = new QAction(tr("Abort Debugging"), this);
act = new QAction(Tr::tr("Abort Debugging"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::ABORT);
cmd->setDescription(tr("Reset Debugger"));
cmd->setDescription(Tr::tr("Reset Debugger"));
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
act = new QAction(Icons::RESTART_TOOLBAR.icon(), tr("Restart Debugging"), this);
act = new QAction(Icons::RESTART_TOOLBAR.icon(), Tr::tr("Restart Debugging"), this);
act->setEnabled(false);
act->setToolTip(tr("Restart the debugging session."));
act->setToolTip(Tr::tr("Restart the debugging session."));
cmd = ActionManager::registerAction(act, Constants::RESET);
cmd->setDescription(tr("Restart Debugging"));
cmd->setDescription(Tr::tr("Restart Debugging"));
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
debugMenu->addSeparator();
@@ -1036,7 +1036,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
cmd = ActionManager::registerAction(&m_startAndBreakOnMain,
"Debugger.StartAndBreakOnMain",
debuggerNotRunning);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+O") : Tr::tr("F10")));
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
connect(&m_startAndBreakOnMain, &QAction::triggered, this, [] {
@@ -1044,53 +1044,53 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE, false);
});
act = new QAction(Icons::STEP_OVER.icon(), tr("Step Over"), this);
act = new QAction(Icons::STEP_OVER.icon(), Tr::tr("Step Over"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::NEXT);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+O") : Tr::tr("F10")));
cmd->setTouchBarIcon(Icons::MACOS_TOUCHBAR_DEBUG_STEP_OVER.icon());
touchBar->addAction(cmd);
debugMenu->addAction(cmd);
act = new QAction(Icons::STEP_INTO.icon(), tr("Step Into"), this);
act = new QAction(Icons::STEP_INTO.icon(), Tr::tr("Step Into"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::STEP);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+I") : tr("F11")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+I") : Tr::tr("F11")));
cmd->setTouchBarIcon(Icons::MACOS_TOUCHBAR_DEBUG_STEP_INTO.icon());
touchBar->addAction(cmd);
debugMenu->addAction(cmd);
act = new QAction(Icons::STEP_OUT.icon(), tr("Step Out"), this);
act = new QAction(Icons::STEP_OUT.icon(), Tr::tr("Step Out"), this);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::STEPOUT);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+T") : tr("Shift+F11")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+T") : Tr::tr("Shift+F11")));
cmd->setTouchBarIcon(Icons::MACOS_TOUCHBAR_DEBUG_STEP_OUT.icon());
touchBar->addAction(cmd);
debugMenu->addAction(cmd);
act = new QAction(tr("Run to Line"), this);
act = new QAction(Tr::tr("Run to Line"), this);
act->setEnabled(false);
act->setVisible(false);
cmd = ActionManager::registerAction(act, Constants::RUNTOLINE);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Shift+F8") : tr("Ctrl+F10")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Shift+F8") : Tr::tr("Ctrl+F10")));
debugMenu->addAction(cmd);
act = new QAction(tr("Run to Selected Function"), this);
act = new QAction(Tr::tr("Run to Selected Function"), this);
act->setEnabled(false);
act->setEnabled(false);
cmd = ActionManager::registerAction(act, Constants::RUNTOSELECTEDFUNCTION);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+F6")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+F6")));
// Don't add to menu by default as keeping its enabled state
// and text up-to-date is a lot of hassle.
// debugMenu->addAction(cmd);
act = new QAction(tr("Jump to Line"), this);
act = new QAction(Tr::tr("Jump to Line"), this);
act->setEnabled(false);
act->setVisible(false);
cmd = ActionManager::registerAction(act, Constants::JUMPTOLINE);
debugMenu->addAction(cmd);
act = new QAction(tr("Immediately Return From Inner Function"), this);
act = new QAction(Tr::tr("Immediately Return From Inner Function"), this);
act->setEnabled(false);
act->setVisible(false);
cmd = ActionManager::registerAction(act, Constants::RETURNFROMFUNCTION);
@@ -1099,22 +1099,19 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
debugMenu->addSeparator();
act = new QAction(this);
act->setText(QCoreApplication::translate("Debugger::Internal::DebuggerPluginPrivate",
"Move to Calling Frame"));
act->setText(QCoreApplication::translate("Debugger", "Move to Calling Frame"));
act->setEnabled(false);
act->setVisible(false);
ActionManager::registerAction(act, Constants::FRAME_UP);
act = new QAction(this);
act->setText(QCoreApplication::translate("Debugger::Internal::DebuggerPluginPrivate",
"Move to Called Frame"));
act->setText(QCoreApplication::translate("Debugger", "Move to Called Frame"));
act->setEnabled(false);
act->setVisible(false);
ActionManager::registerAction(act, Constants::FRAME_DOWN);
act = new QAction(this);
act->setText(QCoreApplication::translate("Debugger::Internal::DebuggerEnginePrivate",
"Operate by Instruction"));
act->setText(QCoreApplication::translate("Debugger", "Operate by Instruction"));
act->setEnabled(false);
act->setVisible(false);
act->setCheckable(true);
@@ -1123,28 +1120,28 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
debugMenu->addAction(cmd);
cmd = ActionManager::registerAction(&m_setOrRemoveBreakpointAction, "Debugger.ToggleBreak");
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("F8") : tr("F9")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("F8") : Tr::tr("F9")));
debugMenu->addAction(cmd);
connect(&m_setOrRemoveBreakpointAction, &QAction::triggered,
this, &DebuggerPluginPrivate::setOrRemoveBreakpoint);
cmd = ActionManager::registerAction(&m_enableOrDisableBreakpointAction,
"Debugger.EnableOrDisableBreakpoint");
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+F8") : tr("Ctrl+F9")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+F8") : Tr::tr("Ctrl+F9")));
debugMenu->addAction(cmd);
connect(&m_enableOrDisableBreakpointAction, &QAction::triggered,
this, &DebuggerPluginPrivate::enableOrDisableBreakpoint);
debugMenu->addSeparator();
auto qmlShowAppOnTopDummyAction = new QAction(tr("Show Application on Top"), this);
auto qmlShowAppOnTopDummyAction = new QAction(Tr::tr("Show Application on Top"), this);
qmlShowAppOnTopDummyAction->setCheckable(true);
qmlShowAppOnTopDummyAction->setIcon(Icons::APP_ON_TOP.icon());
qmlShowAppOnTopDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlShowAppOnTopDummyAction, Constants::QML_SHOW_APP_ON_TOP);
debugMenu->addAction(cmd);
auto qmlSelectDummyAction = new QAction(tr("Select"), this);
auto qmlSelectDummyAction = new QAction(Tr::tr("Select"), this);
qmlSelectDummyAction->setCheckable(true);
qmlSelectDummyAction->setIcon(Icons::SELECT.icon());
qmlSelectDummyAction->setEnabled(false);
@@ -1242,7 +1239,7 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate()
static QString msgParameterMissing(const QString &a)
{
return DebuggerPlugin::tr("Option \"%1\" is missing the parameter.").arg(a);
return Tr::tr("Option \"%1\" is missing the parameter.").arg(a);
}
static Kit *guessKitFromAbis(const Abis &abis)
@@ -1305,7 +1302,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
} else if (executable.isEmpty()) {
executable = FilePath::fromString(key);
} else {
*errorMessage = DebuggerPlugin::tr("Only one executable allowed.");
*errorMessage = Tr::tr("Only one executable allowed.");
return false;
}
} else if (key == "kit") {
@@ -1338,23 +1335,23 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
debugger->setStartMode(AttachToLocalProcess);
debugger->setCloseMode(DetachAtClose);
debugger->setAttachPid(pid);
debugger->setRunControlName(tr("Process %1").arg(pid));
debugger->setStartMessage(tr("Attaching to local process %1.").arg(pid));
debugger->setRunControlName(Tr::tr("Process %1").arg(pid));
debugger->setStartMessage(Tr::tr("Attaching to local process %1.").arg(pid));
} else if (startMode == AttachToRemoteServer) {
debugger->setStartMode(AttachToRemoteServer);
debugger->setRemoteChannel(remoteChannel);
debugger->setRunControlName(tr("Remote: \"%1\"").arg(remoteChannel));
debugger->setStartMessage(tr("Attaching to remote server %1.").arg(remoteChannel));
debugger->setRunControlName(Tr::tr("Remote: \"%1\"").arg(remoteChannel));
debugger->setStartMessage(Tr::tr("Attaching to remote server %1.").arg(remoteChannel));
} else if (startMode == AttachToCore) {
debugger->setStartMode(AttachToCore);
debugger->setCloseMode(DetachAtClose);
debugger->setCoreFilePath(coreFile);
debugger->setRunControlName(tr("Core file \"%1\"").arg(coreFile.toUserOutput()));
debugger->setStartMessage(tr("Attaching to core file %1.").arg(coreFile.toUserOutput()));
debugger->setRunControlName(Tr::tr("Core file \"%1\"").arg(coreFile.toUserOutput()));
debugger->setStartMessage(Tr::tr("Attaching to core file %1.").arg(coreFile.toUserOutput()));
} else {
debugger->setStartMode(StartExternal);
debugger->setRunControlName(tr("Executable file \"%1\"").arg(executable.toUserOutput()));
debugger->setStartMessage(tr("Debugging file %1.").arg(executable.toUserOutput()));
debugger->setRunControlName(Tr::tr("Executable file \"%1\"").arg(executable.toUserOutput()));
debugger->setStartMessage(Tr::tr("Debugging file %1.").arg(executable.toUserOutput()));
}
debugger->setUseTerminal(useTerminal);
@@ -1379,10 +1376,10 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
debugger->setStartMode(AttachToCrashedProcess);
debugger->setCrashParameter(it->section(':', 0, 0));
debugger->setAttachPid(pid);
debugger->setRunControlName(tr("Crashed process %1").arg(pid));
debugger->setStartMessage(tr("Attaching to crashed process %1").arg(pid));
debugger->setRunControlName(Tr::tr("Crashed process %1").arg(pid));
debugger->setStartMessage(Tr::tr("Attaching to crashed process %1").arg(pid));
if (pid < 1) {
*errorMessage = DebuggerPlugin::tr("The parameter \"%1\" of option \"%2\" "
*errorMessage = Tr::tr("The parameter \"%1\" of option \"%2\" "
"does not match the pattern <handle>:<pid>.").arg(*it, option);
return false;
}
@@ -1390,7 +1387,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
return true;
}
*errorMessage = DebuggerPlugin::tr("Invalid debugger option: %1").arg(option);
*errorMessage = Tr::tr("Invalid debugger option: %1").arg(option);
return false;
}
@@ -1408,7 +1405,7 @@ void DebuggerPluginPrivate::parseCommandLineArguments()
{
QString errorMessage;
if (!parseArguments(m_arguments, &errorMessage)) {
errorMessage = tr("Error evaluating command line arguments: %1")
errorMessage = Tr::tr("Error evaluating command line arguments: %1")
.arg(errorMessage);
qWarning("%s\n", qPrintable(errorMessage));
MessageManager::writeDisrupting(errorMessage);
@@ -1448,10 +1445,10 @@ void DebuggerPluginPrivate::updatePresetState()
// Restrict width, otherwise Creator gets too wide, see QTCREATORBUG-21885
const QString startToolTip =
canRun ? tr("Start debugging of startup project") : whyNot;
canRun ? Tr::tr("Start debugging of startup project") : whyNot;
m_startAction.setToolTip(startToolTip);
m_startAction.setText(tr("Start Debugging of Startup Project"));
m_startAction.setText(Tr::tr("Start Debugging of Startup Project"));
if (!currentEngine) {
// No engine running -- or -- we have a running engine but it does not
@@ -1578,7 +1575,7 @@ void DebuggerPluginPrivate::attachCore()
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(dlg.kit());
runControl->setDisplayName(tr("Core file \"%1\"")
runControl->setDisplayName(Tr::tr("Core file \"%1\"")
.arg(dlg.useLocalCoreFile() ? dlg.localCoreFile().toUserOutput()
: dlg.remoteCoreFile().toUserOutput()));
auto debugger = new DebuggerRunTool(runControl);
@@ -1599,7 +1596,7 @@ void DebuggerPluginPrivate::reloadDebuggingHelpers()
engine->reloadDebuggingHelpers();
else
DebuggerMainWindow::showStatusMessage(
tr("Reload debugging helpers skipped as no engine is running."), 5000);
Tr::tr("Reload debugging helpers skipped as no engine is running."), 5000);
}
void DebuggerPluginPrivate::startRemoteCdbSession()
@@ -1677,7 +1674,7 @@ void DebuggerPluginPrivate::attachToRunningApplication()
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(kit);
//: %1: PID
runControl->setDisplayName(tr("Process %1").arg(processInfo.processId));
runControl->setDisplayName(Tr::tr("Process %1").arg(processInfo.processId));
auto debugger = new RemoteAttachRunner(runControl, ProcessHandle(processInfo.processId));
debugger->startRunControl();
}
@@ -1709,7 +1706,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
IDevice::ConstPtr device = DeviceKitAspect::device(kit);
QTC_ASSERT(device, return nullptr);
if (processInfo.processId == 0) {
AsynchronousMessageBox::warning(tr("Warning"), tr("Cannot attach to process with PID 0"));
AsynchronousMessageBox::warning(Tr::tr("Warning"), Tr::tr("Cannot attach to process with PID 0"));
return nullptr;
}
@@ -1717,23 +1714,23 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
const bool isWindows = (tcAbi.os() == Abi::WindowsOS);
if (isWindows && isWinProcessBeingDebugged(processInfo.processId)) {
AsynchronousMessageBox::warning(
tr("Process Already Under Debugger Control"),
tr("The process %1 is already under the control of a debugger.\n"
Tr::tr("Process Already Under Debugger Control"),
Tr::tr("The process %1 is already under the control of a debugger.\n"
"%2 cannot attach to it.").arg(processInfo.processId)
.arg(Core::Constants::IDE_DISPLAY_NAME));
return nullptr;
}
if (device->type() != PE::DESKTOP_DEVICE_TYPE) {
AsynchronousMessageBox::warning(tr("Not a Desktop Device Type"),
tr("It is only possible to attach to a locally running process."));
AsynchronousMessageBox::warning(Tr::tr("Not a Desktop Device Type"),
Tr::tr("It is only possible to attach to a locally running process."));
return nullptr;
}
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(kit);
//: %1: PID
runControl->setDisplayName(tr("Process %1").arg(processInfo.processId));
runControl->setDisplayName(Tr::tr("Process %1").arg(processInfo.processId));
auto debugger = new DebuggerRunTool(runControl);
debugger->setAttachPid(ProcessHandle(processInfo.processId));
debugger->setInferiorExecutable(device->filePath(processInfo.executable));
@@ -1751,7 +1748,7 @@ void DebuggerPlugin::attachExternalApplication(RunControl *rc)
ProcessHandle pid = rc->applicationProcessHandle();
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setTarget(rc->target());
runControl->setDisplayName(tr("Process %1").arg(pid.pid()));
runControl->setDisplayName(Tr::tr("Process %1").arg(pid.pid()));
auto debugger = new DebuggerRunTool(runControl);
debugger->setInferiorExecutable(rc->targetFilePath());
debugger->setAttachPid(pid);
@@ -1877,20 +1874,20 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
if (gbp) {
// Remove existing breakpoint.
auto act = menu->addAction(tr("Remove Breakpoint"));
auto act = menu->addAction(Tr::tr("Remove Breakpoint"));
connect(act, &QAction::triggered, [gbp] { gbp->deleteBreakpoint(); });
// Enable/disable existing breakpoint.
if (gbp->isEnabled()) {
act = menu->addAction(tr("Disable Breakpoint"));
act = menu->addAction(Tr::tr("Disable Breakpoint"));
connect(act, &QAction::triggered, [gbp] { gbp->setEnabled(false); });
} else {
act = menu->addAction(tr("Enable Breakpoint"));
act = menu->addAction(Tr::tr("Enable Breakpoint"));
connect(act, &QAction::triggered, [gbp] { gbp->setEnabled(true); });
}
// Edit existing breakpoint.
act = menu->addAction(tr("Edit Breakpoint..."));
act = menu->addAction(Tr::tr("Edit Breakpoint..."));
connect(act, &QAction::triggered, [gbp] {
BreakpointManager::editBreakpoint(gbp, ICore::dialogParent());
});
@@ -1898,8 +1895,8 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
} else {
// Handle non-existing breakpoint.
const QString text = args.address
? tr("Set Breakpoint at 0x%1").arg(args.address, 0, 16)
: tr("Set Breakpoint at Line %1").arg(lineNumber);
? Tr::tr("Set Breakpoint at 0x%1").arg(args.address, 0, 16)
: Tr::tr("Set Breakpoint at Line %1").arg(lineNumber);
auto act = menu->addAction(text);
act->setEnabled(args.isValid());
connect(act, &QAction::triggered, [this, args] {
@@ -1908,8 +1905,8 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
// Message trace point
const QString tracePointText = args.address
? tr("Set Message Tracepoint at 0x%1...").arg(args.address, 0, 16)
: tr("Set Message Tracepoint at Line %1...").arg(lineNumber);
? Tr::tr("Set Message Tracepoint at 0x%1...").arg(args.address, 0, 16)
: Tr::tr("Set Message Tracepoint at Line %1...").arg(lineNumber);
act = menu->addAction(tracePointText);
act->setEnabled(args.isValid());
connect(act, &QAction::triggered, [this, args] {
@@ -1923,8 +1920,8 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
menu->addSeparator();
if (engine->hasCapability(RunToLineCapability)) {
auto act = menu->addAction(args.address
? DebuggerEngine::tr("Run to Address 0x%1").arg(args.address, 0, 16)
: DebuggerEngine::tr("Run to Line %1").arg(args.lineNumber));
? Tr::tr("Run to Address 0x%1").arg(args.address, 0, 16)
: Tr::tr("Run to Line %1").arg(args.lineNumber));
connect(act, &QAction::triggered, this, [args, engine] {
QTC_ASSERT(engine, return);
engine->executeRunToLine(args);
@@ -1932,8 +1929,8 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
}
if (engine->hasCapability(JumpToLineCapability)) {
auto act = menu->addAction(args.address
? DebuggerEngine::tr("Jump to Address 0x%1").arg(args.address, 0, 16)
: DebuggerEngine::tr("Jump to Line %1").arg(args.lineNumber));
? Tr::tr("Jump to Address 0x%1").arg(args.address, 0, 16)
: Tr::tr("Jump to Line %1").arg(args.lineNumber));
connect(act, &QAction::triggered, this, [args, engine] {
QTC_ASSERT(engine, return);
engine->executeJumpToLine(args);
@@ -1945,7 +1942,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
frame.function = cppFunctionAt(args.fileName.toString(), lineNumber, 1);
frame.line = 42; // trick gdb into mixed mode.
if (!frame.function.isEmpty()) {
const QString text = tr("Disassemble Function \"%1\"")
const QString text = Tr::tr("Disassemble Function \"%1\"")
.arg(frame.function);
auto act = new QAction(text, menu);
connect(act, &QAction::triggered, this, [frame, engine] {
@@ -2021,7 +2018,7 @@ void DebuggerPluginPrivate::dumpLog()
LogWindow *logWindow = engine->logWindow();
QTC_ASSERT(logWindow, return);
const FilePath filePath = FileUtils::getSaveFilePath(nullptr, tr("Save Debugger Log"),
const FilePath filePath = FileUtils::getSaveFilePath(nullptr, Tr::tr("Save Debugger Log"),
TemporaryDirectory::masterDirectoryFilePath());
if (filePath.isEmpty())
return;
@@ -2231,7 +2228,7 @@ void showCannotStartDialog(const QString &text)
errorDialog->setAttribute(Qt::WA_DeleteOnClose);
errorDialog->setIcon(QMessageBox::Warning);
errorDialog->setWindowTitle(text);
errorDialog->setText(DebuggerPlugin::tr("Cannot start %1 without a project. Please open the project "
errorDialog->setText(Tr::tr("Cannot start %1 without a project. Please open the project "
"and try again.").arg(text));
errorDialog->setStandardButtons(QMessageBox::Ok);
errorDialog->setDefaultButton(QMessageBox::Ok);
@@ -2247,13 +2244,13 @@ bool wantRunTool(ToolMode toolMode, const QString &toolName)
QString currentMode;
switch (buildType) {
case BuildConfiguration::Debug:
currentMode = DebuggerPlugin::tr("Debug");
currentMode = Tr::tr("Debug");
break;
case BuildConfiguration::Profile:
currentMode = DebuggerPlugin::tr("Profile");
currentMode = Tr::tr("Profile");
break;
case BuildConfiguration::Release:
currentMode = DebuggerPlugin::tr("Release");
currentMode = Tr::tr("Release");
break;
default:
QTC_CHECK(false);
@@ -2262,25 +2259,25 @@ bool wantRunTool(ToolMode toolMode, const QString &toolName)
QString toolModeString;
switch (toolMode) {
case DebugMode:
toolModeString = DebuggerPlugin::tr("in Debug mode");
toolModeString = Tr::tr("in Debug mode");
break;
case ProfileMode:
toolModeString = DebuggerPlugin::tr("in Profile mode");
toolModeString = Tr::tr("in Profile mode");
break;
case ReleaseMode:
toolModeString = DebuggerPlugin::tr("in Release mode");
toolModeString = Tr::tr("in Release mode");
break;
case SymbolsMode:
toolModeString = DebuggerPlugin::tr("with debug symbols (Debug or Profile mode)");
toolModeString = Tr::tr("with debug symbols (Debug or Profile mode)");
break;
case OptimizedMode:
toolModeString = DebuggerPlugin::tr("on optimized code (Profile or Release mode)");
toolModeString = Tr::tr("on optimized code (Profile or Release mode)");
break;
default:
QTC_CHECK(false);
}
const QString title = DebuggerPlugin::tr("Run %1 in %2 Mode?").arg(toolName).arg(currentMode);
const QString message = DebuggerPlugin::tr("<html><head/><body><p>You are trying "
const QString title = Tr::tr("Run %1 in %2 Mode?").arg(toolName).arg(currentMode);
const QString message = Tr::tr("<html><head/><body><p>You are trying "
"to run the tool \"%1\" on an application in %2 mode. "
"The tool is designed to be used %3.</p><p>"
"Run-time characteristics differ significantly between "
@@ -2545,7 +2542,7 @@ QVector<QObject *> DebuggerPlugin::createTestObjects() const
#endif // if WITH_TESTS
} // namespace Internal
} // namespace Debugger
} // Internal
} // Debugger
#include "debuggerplugin.moc"

View File

@@ -32,8 +32,7 @@
namespace ProjectExplorer { class RunControl; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerPlugin : public ExtensionSystem::IPlugin
{
@@ -69,7 +68,6 @@ private:
QVector<QObject *> createTestObjects() const override;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_METATYPE(QString *)

View File

@@ -44,8 +44,7 @@
#define QTC_ASSERT(cond, action) if (cond) {} else { QTC_ASSERT_STRING(#cond); action; } do {} while (0)
#define QTC_CHECK(cond) if (cond) {} else { QTC_ASSERT_STRING(#cond); } do {} while (0)
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
static uchar fromhex(uchar c)
{
@@ -983,5 +982,4 @@ QString toHex(const QString &str)
return QString::fromUtf8(str.toUtf8().toHex());
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -32,12 +32,11 @@
#include <QJsonObject>
#include <QVector>
#include <utils/fileutils.h>
#include <utils/filepath.h>
namespace Utils { class ProcessHandle; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerResponse;
@@ -349,7 +348,6 @@ public:
quint64 address = 0;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_OPERATORS_FOR_FLAGS(Debugger::Internal::DebuggerCommand::CommandFlags)

View File

@@ -25,11 +25,12 @@
#include "debuggerrunconfigurationaspect.h"
#include "debuggerconstants.h"
#include "debuggertr.h"
#include <coreplugin/helpmanager.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildsteplist.h>
@@ -38,6 +39,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtbuildaspects.h>
#include <utils/layoutbuilder.h>
@@ -168,7 +170,7 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
: m_target(target)
{
setId("DebuggerAspect");
setDisplayName(tr("Debugger settings"));
setDisplayName(Tr::tr("Debugger settings"));
setConfigWidgetCreator([this] {
Layouting::Form builder;
@@ -188,15 +190,15 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
addDataExtractor(this, &DebuggerRunConfigurationAspect::overrideStartup, &Data::overrideStartup);
m_cppAspect = new DebuggerLanguageAspect;
m_cppAspect->setLabel(tr("Enable C++"));
m_cppAspect->setLabel(Tr::tr("Enable C++"));
m_cppAspect->setSettingsKey("RunConfiguration.UseCppDebugger");
m_cppAspect->setAutoSettingsKey("RunConfiguration.UseCppDebuggerAuto");
m_qmlAspect = new DebuggerLanguageAspect;
m_qmlAspect->setLabel(tr("Enable QML"));
m_qmlAspect->setLabel(Tr::tr("Enable QML"));
m_qmlAspect->setSettingsKey("RunConfiguration.UseQmlDebugger");
m_qmlAspect->setAutoSettingsKey("RunConfiguration.UseQmlDebuggerAuto");
m_qmlAspect->setInfoLabelText(tr("<a href=\""
m_qmlAspect->setInfoLabelText(Tr::tr("<a href=\""
"qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html"
"\">What are the prerequisites?</a>"));
@@ -212,13 +214,13 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
m_multiProcessAspect = new BoolAspect;
m_multiProcessAspect->setSettingsKey("RunConfiguration.UseMultiProcess");
m_multiProcessAspect->setLabel(tr("Enable Debugging of Subprocesses"),
m_multiProcessAspect->setLabel(Tr::tr("Enable Debugging of Subprocesses"),
BoolAspect::LabelPlacement::AtCheckBox);
m_overrideStartupAspect = new StringAspect;
m_overrideStartupAspect->setSettingsKey("RunConfiguration.OverrideDebuggerStartup");
m_overrideStartupAspect->setDisplayStyle(StringAspect::TextEditDisplay);
m_overrideStartupAspect->setLabelText(tr("Additional startup commands:"));
m_overrideStartupAspect->setLabelText(Tr::tr("Additional startup commands:"));
}
DebuggerRunConfigurationAspect::~DebuggerRunConfigurationAspect()

View File

@@ -26,7 +26,6 @@
#pragma once
#include "debugger_global.h"
#include "debuggerconstants.h"
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runconfigurationaspects.h>
@@ -38,8 +37,6 @@ namespace Internal { class DebuggerLanguageAspect; }
class DEBUGGER_EXPORT DebuggerRunConfigurationAspect
: public ProjectExplorer::GlobalOrProjectAspect
{
Q_OBJECT
public:
DebuggerRunConfigurationAspect(ProjectExplorer::Target *target);
~DebuggerRunConfigurationAspect();

View File

@@ -23,22 +23,20 @@
**
****************************************************************************/
#include "debuggermainwindow.h"
#include "debuggerruncontrol.h"
#include "debuggermainwindow.h"
#include "debuggertr.h"
#include "terminal.h"
#include "analyzer/analyzermanager.h"
#include "console/console.h"
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerinternalconstants.h"
#include "debuggerkitinformation.h"
#include "debuggerplugin.h"
#include "debuggerrunconfigurationaspect.h"
#include "breakhandler.h"
#include "enginemanager.h"
#include "shared/peutils.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
@@ -95,12 +93,12 @@ DebuggerEngine *createUvscEngine();
static QString noEngineMessage()
{
return DebuggerPlugin::tr("Unable to create a debugging engine.");
return Tr::tr("Unable to create a debugging engine.");
}
static QString noDebuggerInKitMessage()
{
return DebuggerPlugin::tr("The kit does not have a debugger set.");
return Tr::tr("The kit does not have a debugger set.");
}
class CoreUnpacker final : public RunWorker
@@ -138,7 +136,7 @@ private:
reportFailure("Error unpacking " + m_coreFilePath.toUserOutput());
});
const QString msg = DebuggerRunTool::tr("Unpacking core file to %1");
const QString msg = Tr::tr("Unpacking core file to %1");
appendMessage(msg.arg(m_tempCoreFilePath.toUserOutput()), LogMessageFormat);
if (m_coreFilePath.endsWith(".lzo")) {
@@ -244,7 +242,7 @@ void DebuggerRunTool::setSysRoot(const Utils::FilePath &sysRoot)
void DebuggerRunTool::setSymbolFile(const FilePath &symbolFile)
{
if (symbolFile.isEmpty())
reportFailure(tr("Cannot debug: Local executable is not set."));
reportFailure(Tr::tr("Cannot debug: Local executable is not set."));
m_runParameters.symbolFile = symbolFile;
}
@@ -469,7 +467,7 @@ void DebuggerRunTool::start()
if (m_runParameters.startMode == StartInternal
&& m_runParameters.inferior.command.isEmpty()
&& m_runParameters.interpreter.isEmpty()) {
reportFailure(tr("No executable specified."));
reportFailure(Tr::tr("No executable specified."));
return;
}
@@ -479,7 +477,7 @@ void DebuggerRunTool::start()
// FIXME: Disabled due to Android. Make Android device report available ports instead.
// int portsUsed = portsUsedByDebugger();
// if (portsUsed > device()->freePorts().count()) {
// reportFailure(tr("Cannot debug: Not enough free ports available."));
// reportFailure(Tr::tr("Cannot debug: Not enough free ports available."));
// return;
// }
@@ -493,7 +491,7 @@ void DebuggerRunTool::start()
&& Utils::is64BitWindowsBinary(m_runParameters.inferior.command.executable())
&& !Utils::is64BitWindowsBinary(m_runParameters.debugger.command.executable())) {
reportFailure(
DebuggerPlugin::tr(
Tr::tr(
"%1 is a 64 bit executable which can not be debugged by a 32 bit Debugger.\n"
"Please select a 64 bit Debugger in the kit settings for this kit.")
.arg(m_runParameters.inferior.command.executable().toUserOutput()));
@@ -501,7 +499,7 @@ void DebuggerRunTool::start()
}
Utils::globalMacroExpander()->registerFileVariables(
"DebuggedExecutable", tr("Debugged executable"),
"DebuggedExecutable", Tr::tr("Debugged executable"),
[this] { return m_runParameters.inferior.command.executable(); }
);
@@ -515,7 +513,7 @@ void DebuggerRunTool::start()
break;
case CdbEngineType:
if (!HostOsInfo::isWindowsHost()) {
reportFailure(tr("Unsupported CDB host system."));
reportFailure(Tr::tr("Unsupported CDB host system."));
return;
}
m_engine = createCdbEngine();
@@ -533,7 +531,7 @@ void DebuggerRunTool::start()
default:
if (!m_runParameters.isQmlDebugging) {
reportFailure(noEngineMessage() + '\n' +
DebuggerPlugin::tr("Specify Debugger settings in Projects > Run."));
Tr::tr("Specify Debugger settings in Projects > Run."));
return;
}
// Can happen for pure Qml.
@@ -578,7 +576,7 @@ void DebuggerRunTool::start()
connect(m_engine, &DebuggerEngine::attachToCoreRequested, this, [this](const QString &coreFile) {
auto rc = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
rc->copyDataFromRunControl(runControl());
auto name = QString(tr("%1 - Snapshot %2").arg(runControl()->displayName()).arg(++d->snapshotCounter));
auto name = QString(Tr::tr("%1 - Snapshot %2").arg(runControl()->displayName()).arg(++d->snapshotCounter));
auto debugger = new DebuggerRunTool(rc);
debugger->setStartMode(AttachToCore);
debugger->setRunControlName(name);
@@ -621,14 +619,14 @@ void DebuggerRunTool::start()
}
if (!unhandledIds.isEmpty()) {
QString warningMessage =
DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
Tr::tr("Some breakpoints cannot be handled by the debugger "
"languages currently active, and will be ignored.<p>"
"Affected are breakpoints %1")
.arg(unhandledIds.join(", "));
if (hasQmlBreakpoints) {
warningMessage += "<p>" +
DebuggerPlugin::tr("QML debugging needs to be enabled both in the Build "
Tr::tr("QML debugging needs to be enabled both in the Build "
"and the Run settings.");
}
@@ -637,20 +635,20 @@ void DebuggerRunTool::start()
static bool checked = true;
if (checked)
CheckableMessageBox::information(Core::ICore::dialogParent(),
tr("Debugger"),
Tr::tr("Debugger"),
warningMessage,
tr("&Show this message again."),
Tr::tr("&Show this message again."),
&checked, QDialogButtonBox::Ok);
}
}
appendMessage(tr("Debugging %1 ...").arg(m_runParameters.inferior.command.toUserOutput()),
appendMessage(Tr::tr("Debugging %1 ...").arg(m_runParameters.inferior.command.toUserOutput()),
NormalMessageFormat);
QString debuggerName = m_engine->objectName();
if (m_engine2)
debuggerName += ' ' + m_engine2->objectName();
const QString message = tr("Starting debugger \"%1\" for ABI \"%2\"...")
const QString message = Tr::tr("Starting debugger \"%1\" for ABI \"%2\"...")
.arg(debuggerName).arg(m_runParameters.toolChainAbi.toString());
DebuggerMainWindow::showStatusMessage(message, 10000);
@@ -691,9 +689,9 @@ void DebuggerRunTool::handleEngineFinished(DebuggerEngine *engine)
if (--d->engineStopsNeeded == 0) {
QString cmd = m_runParameters.inferior.command.toUserOutput();
QString msg = engine->runParameters().exitCode // Main engine.
? tr("Debugging of %1 has finished with exit code %2.")
? Tr::tr("Debugging of %1 has finished with exit code %2.")
.arg(cmd).arg(engine->runParameters().exitCode.value())
: tr("Debugging of %1 has finished.").arg(cmd);
: Tr::tr("Debugging of %1 has finished.").arg(cmd);
appendMessage(msg, NormalMessageFormat);
reportStopped();
}
@@ -756,7 +754,7 @@ bool DebuggerRunTool::fixupParameters()
if (rp.qmlServer.port() <= 0) {
rp.qmlServer = Utils::urlFromLocalHostAndFreePort();
if (rp.qmlServer.port() <= 0) {
reportFailure(DebuggerPlugin::tr("Not enough free ports for QML debugging."));
reportFailure(Tr::tr("Not enough free ports for QML debugging."));
return false;
}
}
@@ -816,8 +814,8 @@ bool DebuggerRunTool::fixupParameters()
if (perr != ProcessArgs::SplitOk) {
// perr == BadQuoting is never returned on Windows
// FIXME? QTCREATORBUG-2809
reportFailure(DebuggerPlugin::tr("Debugging complex command lines "
"is currently not supported on Windows."));
reportFailure(Tr::tr("Debugging complex command lines "
"is currently not supported on Windows."));
return false;
}
}
@@ -857,8 +855,8 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
runControl->setIcon(ProjectExplorer::Icons::DEBUG_START_SMALL_TOOLBAR);
runControl->setPromptToStop([](bool *optionalPrompt) {
return RunControl::showPromptToStopDialog(
DebuggerRunTool::tr("Close Debugging Session"),
DebuggerRunTool::tr("A debugging session is still in progress. "
Tr::tr("Close Debugging Session"),
Tr::tr("A debugging session is still in progress. "
"Terminating the session in the current"
" state can leave the target in an inconsistent state."
" Would you still like to terminate it?"),

View File

@@ -46,8 +46,6 @@ class DebugServerPortsGatherer;
class DEBUGGER_EXPORT DebuggerRunTool : public ProjectExplorer::RunWorker
{
Q_OBJECT
public:
enum AllowTerminal { DoAllowTerminal, DoNotAllowTerminal };
explicit DebuggerRunTool(ProjectExplorer::RunControl *runControl,
@@ -146,8 +144,6 @@ private:
class DEBUGGER_EXPORT DebugServerPortsGatherer : public ProjectExplorer::ChannelProvider
{
Q_OBJECT
public:
explicit DebugServerPortsGatherer(ProjectExplorer::RunControl *runControl);
~DebugServerPortsGatherer() override;
@@ -167,8 +163,6 @@ private:
class DEBUGGER_EXPORT DebugServerRunner : public ProjectExplorer::SimpleTargetRunner
{
Q_OBJECT
public:
explicit DebugServerRunner(ProjectExplorer::RunControl *runControl,
DebugServerPortsGatherer *portsGatherer);

View File

@@ -27,6 +27,7 @@
#include "debuggeractions.h"
#include "debuggerengine.h"
#include "debuggertr.h"
#include <utils/buildablehelperlibrary.h>
#include <utils/fancylineedit.h>
@@ -49,8 +50,7 @@
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class SourcePathMappingModel;
@@ -60,8 +60,6 @@ using Mapping = QPair<FilePath, FilePath>;
class DebuggerSourcePathMappingWidget : public QGroupBox
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::DebuggerSourcePathMappingWidget)
public:
DebuggerSourcePathMappingWidget();
@@ -150,12 +148,12 @@ private:
SourcePathMappingModel::SourcePathMappingModel(QObject *parent) :
QStandardItemModel(0, ColumnCount, parent),
m_newSourcePlaceHolder(DebuggerSourcePathMappingWidget::tr("<new source>")),
m_newTargetPlaceHolder(DebuggerSourcePathMappingWidget::tr("<new target>"))
m_newSourcePlaceHolder(Tr::tr("<new source>")),
m_newTargetPlaceHolder(Tr::tr("<new target>"))
{
QStringList headers;
headers.append(DebuggerSourcePathMappingWidget::tr("Source path"));
headers.append(DebuggerSourcePathMappingWidget::tr("Target path"));
headers.append(Tr::tr("Source path"));
headers.append(Tr::tr("Target path"));
setHorizontalHeaderLabels(headers);
}
@@ -243,14 +241,14 @@ void SourcePathMappingModel::setTarget(int row, const QString &t)
DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget() :
m_model(new SourcePathMappingModel(this)),
m_treeView(new QTreeView(this)),
m_addButton(new QPushButton(tr("Add"), this)),
m_addQtButton(new QPushButton(tr("Add Qt sources..."), this)),
m_removeButton(new QPushButton(tr("Remove"), this)),
m_addButton(new QPushButton(Tr::tr("Add"), this)),
m_addQtButton(new QPushButton(Tr::tr("Add Qt sources..."), this)),
m_removeButton(new QPushButton(Tr::tr("Remove"), this)),
m_sourceLineEdit(new QLineEdit(this)),
m_targetChooser(new PathChooser(this))
{
setTitle(tr("Source Paths Mapping"));
setToolTip(tr("<p>Mappings of source file folders to "
setTitle(Tr::tr("Source Paths Mapping"));
setToolTip(Tr::tr("<p>Mappings of source file folders to "
"be used in the debugger can be entered here.</p>"
"<p>This is useful when using a copy of the source tree "
"at a location different from the one "
@@ -275,7 +273,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget() :
buttonLayout->addWidget(m_addButton);
buttonLayout->addWidget(m_addQtButton);
m_addQtButton->setVisible(!qtBuildPaths().isEmpty());
m_addQtButton->setToolTip(tr("<p>Add a mapping for Qt's source folders "
m_addQtButton->setToolTip(Tr::tr("<p>Add a mapping for Qt's source folders "
"when using an unpatched version of Qt."));
buttonLayout->addWidget(m_removeButton);
connect(m_addButton, &QAbstractButton::clicked,
@@ -299,17 +297,17 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget() :
connect(m_targetChooser, &PathChooser::filePathChanged,
this, &DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged);
auto editLayout = new QFormLayout;
const QString sourceToolTip = tr("<p>The source path contained in the "
const QString sourceToolTip = Tr::tr("<p>The source path contained in the "
"debug information of the executable as reported by the debugger");
auto editSourceLabel = new QLabel(tr("&Source path:"));
auto editSourceLabel = new QLabel(Tr::tr("&Source path:"));
editSourceLabel->setToolTip(sourceToolTip);
m_sourceLineEdit->setToolTip(sourceToolTip);
editSourceLabel->setBuddy(m_sourceLineEdit);
editLayout->addRow(editSourceLabel, m_sourceLineEdit);
const QString targetToolTip = tr("<p>The actual location of the source "
const QString targetToolTip = Tr::tr("<p>The actual location of the source "
"tree on the local machine");
auto editTargetLabel = new QLabel(tr("&Target path:"));
auto editTargetLabel = new QLabel(Tr::tr("&Target path:"));
editTargetLabel->setToolTip(targetToolTip);
editTargetLabel->setBuddy(m_targetChooser);
m_targetChooser->setToolTip(targetToolTip);
@@ -405,7 +403,7 @@ void DebuggerSourcePathMappingWidget::slotAdd()
void DebuggerSourcePathMappingWidget::slotAddQt()
{
// Add a mapping for various Qt build locations in case of unpatched builds.
const FilePath qtSourcesPath = FileUtils::getExistingDirectory(this, tr("Qt Sources"));
const FilePath qtSourcesPath = FileUtils::getExistingDirectory(this, Tr::tr("Qt Sources"));
if (qtSourcesPath.isEmpty())
return;
for (const QString &buildPath : qtBuildPaths())
@@ -584,5 +582,4 @@ void SourcePathMapAspect::readSettings(const QSettings *settings)
setValue(QVariant::fromValue(sourcePathMap));
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -28,14 +28,13 @@
#include <QMap>
#include <QString>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerRunParameters;
using SourcePathMap = QMap<QString, QString>;
/* Merge settings for an installed Qt (unless another setting
* is already in the map. */
SourcePathMap mergePlatformQtPath(const DebuggerRunParameters &sp, const SourcePathMap &in);
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -30,6 +30,7 @@
#include "debuggerinternalconstants.h"
#include "debuggermainwindow.h"
#include "debuggerprotocol.h"
#include "debuggertr.h"
#include "sourceutils.h"
#include "stackhandler.h"
#include "watchhandler.h"
@@ -77,8 +78,7 @@ using namespace ProjectExplorer;
using namespace TextEditor;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
//#define DEBUG(x) qDebug() << x
#define DEBUG(x)
@@ -280,9 +280,7 @@ class ToolTipModel : public TreeModel<ToolTipWatchItem>
public:
ToolTipModel()
{
setHeader({DebuggerToolTipManager::tr("Name"),
DebuggerToolTipManager::tr("Value"),
DebuggerToolTipManager::tr("Type")});
setHeader({Tr::tr("Name"), Tr::tr("Value"), Tr::tr("Type")});
m_enabled = true;
auto item = new ToolTipWatchItem;
item->expandable = true;
@@ -550,7 +548,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
pinButton->setIcon(pinIcon);
auto copyButton = new QToolButton;
copyButton->setToolTip(DebuggerToolTipManager::tr("Copy Contents to Clipboard"));
copyButton->setToolTip(Tr::tr("Copy Contents to Clipboard"));
copyButton->setIcon(Utils::Icons::COPY.icon());
titleLabel = new DraggableLabel(this);
@@ -736,7 +734,7 @@ bool DebuggerToolTipContext::isSame(const DebuggerToolTipContext &other) const
QString DebuggerToolTipContext::toolTip() const
{
return DebuggerToolTipManager::tr("Expression %1 in function %2 from line %3 to %4")
return Tr::tr("Expression %1 in function %2 from line %3 to %4")
.arg(expression).arg(function).arg(scopeFromLine).arg(scopeToLine);
}
@@ -884,7 +882,7 @@ void DebuggerToolTipHolder::releaseEngine()
// a valid expression but can't be resolved by the debugger backend.
// (Out of scope items, keywords, ...)
ToolTip::show(context.mousePosition,
DebuggerToolTipManager::tr("No valid expression"),
Tr::tr("No valid expression"),
DebuggerMainWindow::instance());
widget->deleteLater();
return;
@@ -893,7 +891,7 @@ void DebuggerToolTipHolder::releaseEngine()
setState(Released);
widget->model.m_enabled = false;
emit widget->model.layoutChanged();
widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Previous)").arg(context.expression));
widget->titleLabel->setText(Tr::tr("%1 (Previous)").arg(context.expression));
}
void DebuggerToolTipHolder::positionShow(const TextEditorWidget *editorWidget)
@@ -1115,7 +1113,7 @@ void DebuggerToolTipManagerPrivate::loadSessionData()
m_tooltips.push_back(tw);
tw->widget->model.restoreTreeModel(r);
tw->widget->pin();
tw->widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Restored)").arg(context.expression));
tw->widget->titleLabel->setText(Tr::tr("%1 (Restored)").arg(context.expression));
tw->widget->treeView->expandAll();
} else {
r.readElementText(QXmlStreamReader::SkipChildElements); // Skip
@@ -1203,7 +1201,7 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
!= CppEditor::ProjectFile::Unsupported;
if (context.expression.isEmpty()) {
ToolTip::show(point, DebuggerToolTipManager::tr("No valid expression"),
ToolTip::show(point, Tr::tr("No valid expression"),
DebuggerMainWindow::instance());
*handled = true;
return;
@@ -1259,7 +1257,7 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
if (m_engine->canHandleToolTip(context)) {
m_engine->updateItem(context.iname);
} else {
ToolTip::show(point, DebuggerToolTipManager::tr("Expression too complex"),
ToolTip::show(point, Tr::tr("Expression too complex"),
DebuggerMainWindow::instance());
tooltip->destroy();
}
@@ -1382,5 +1380,4 @@ void DebuggerToolTipManagerPrivate::purgeClosedToolTips()
}
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -33,8 +33,7 @@
#include <QDate>
#include <QPoint>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
class StackFrame;
@@ -66,13 +65,13 @@ public:
using DebuggerToolTipContexts = QList<DebuggerToolTipContext>;
class DebuggerToolTipManager : public QObject
class DebuggerToolTipManager
{
Q_OBJECT
Q_DISABLE_COPY_MOVE(DebuggerToolTipManager)
public:
explicit DebuggerToolTipManager(DebuggerEngine *engine);
~DebuggerToolTipManager() override;
~DebuggerToolTipManager();
void deregisterEngine();
void updateToolTips();
@@ -87,5 +86,4 @@ private:
class DebuggerToolTipManagerPrivate *d;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -27,7 +27,6 @@
#include "breakhandler.h"
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerinternalconstants.h"
#include "disassemblerlines.h"
@@ -52,8 +51,7 @@
using namespace Core;
using namespace TextEditor;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
///////////////////////////////////////////////////////////////////////
//
@@ -410,5 +408,4 @@ quint64 DisassemblerAgent::address() const
return d->location.address();
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -29,8 +29,7 @@
#include <QObject>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
class DisassemblerAgentPrivate;
@@ -73,5 +72,4 @@ private:
DisassemblerAgentPrivate *d;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -24,14 +24,12 @@
****************************************************************************/
#include "disassemblerlines.h"
#include "sourceutils.h"
#include <QDebug>
#include <QFile>
#include <QTextStream>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
void DisassemblerLine::fromString(const QString &unparsed)
{
@@ -248,5 +246,4 @@ QString DisassemblerLines::toString() const
return str;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -29,8 +29,7 @@
#include <QHash>
#include <QVector>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
// A DisassemblerLine represents either
// - an assembler instruction (address, offset, function, data fields), or
@@ -89,5 +88,4 @@ private:
QHash<quint64, int> m_rowCache;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,13 +25,11 @@
#include "enginemanager.h"
#include "analyzer/analyzermanager.h"
#include "debuggeractions.h"
#include "debuggerengine.h"
#include "debuggerinternalconstants.h"
#include "debuggericons.h"
#include "debuggercore.h"
#include "debuggerruncontrol.h"
#include "stackhandler.h"
#include "debuggermainwindow.h"
#include "debuggertr.h"
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
@@ -41,6 +39,7 @@
#include <utils/treemodel.h>
#include <utils/qtcassert.h>
#include <QComboBox>
#include <QDebug>
#include <QMenu>
#include <QTimer>
@@ -48,8 +47,7 @@
using namespace Core;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
const bool hideSwitcherUnlessNeeded = false;
@@ -76,9 +74,9 @@ QString SnapshotData::toString() const
{
QString res;
QTextStream str(&res);
/* str << SnapshotHandler::tr("Function:") << ' ' << function() << ' '
<< SnapshotHandler::tr("File:") << ' ' << m_location << ' '
<< SnapshotHandler::tr("Date:") << ' ' << m_date.toString(); */
/* str << Tr::tr("Function:") << ' ' << function() << ' '
<< Tr::tr("File:") << ' ' << m_location << ' '
<< Tr::tr("Date:") << ' ' << m_date.toString(); */
return res;
}
@@ -88,9 +86,9 @@ QString SnapshotData::toToolTip() const
QTextStream str(&res);
str << "<html><body><table>"
/*
<< "<tr><td>" << SnapshotHandler::tr("Function:")
<< "<tr><td>" << Tr::tr("Function:")
<< "</td><td>" << function() << "</td></tr>"
<< "<tr><td>" << SnapshotHandler::tr("File:")
<< "<tr><td>" << Tr::tr("File:")
<< "</td><td>" << QDir::toNativeSeparators(m_location) << "</td></tr>"
<< "</table></body></html>"; */
return res;
@@ -132,8 +130,8 @@ class EngineManagerPrivate : public QObject
public:
EngineManagerPrivate()
{
m_engineModel.setHeader({EngineManager::tr("Perspective"),
EngineManager::tr("Debugged Application")});
m_engineModel.setHeader({Tr::tr("Perspective"), Tr::tr("Debugged Application")});
// The preset case:
auto preset = new EngineItem;
m_engineModel.rootItem()->appendChild(preset);
@@ -264,7 +262,7 @@ QVariant EngineItem::data(int column, int role) const
switch (role) {
case Qt::DisplayRole:
if (column == 0)
return EngineManager::tr("Debugger Preset");
return Tr::tr("Debugger Preset");
return QString("-");
default:
break;
@@ -292,11 +290,11 @@ bool EngineItem::setData(int row, const QVariant &value, int role)
auto menu = new QMenu(ev.view());
QAction *actCreate = menu->addAction(EngineManager::tr("Create Snapshot"));
QAction *actCreate = menu->addAction(Tr::tr("Create Snapshot"));
actCreate->setEnabled(m_engine->hasCapability(SnapshotCapabilityRole));
menu->addSeparator();
QAction *actRemove = menu->addAction(EngineManager::tr("Abort Debugger"));
QAction *actRemove = menu->addAction(Tr::tr("Abort Debugger"));
actRemove->setEnabled(true);
QAction *act = menu->exec(cmev->globalPos());
@@ -502,5 +500,4 @@ bool EngineManager::shutDown()
return anyEngineAborting;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -29,8 +29,7 @@
#include <QPointer>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
@@ -64,5 +63,4 @@ signals:
void currentEngineChanged();
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,31 +25,30 @@
#include "gdbengine.h"
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/disassemblerlines.h>
#include <debugger/breakhandler.h>
#include <debugger/debuggeractions.h>
#include <debugger/debuggercore.h>
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/disassembleragent.h>
#include <debugger/memoryagent.h>
#include <debugger/sourceutils.h>
#include <debugger/terminal.h>
#include <debugger/breakhandler.h>
#include <debugger/moduleshandler.h>
#include <debugger/registerhandler.h>
#include <debugger/sourcefileshandler.h>
#include <debugger/stackhandler.h>
#include <debugger/threadshandler.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggersourcepathmappingwidget.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/debuggertr.h>
#include <debugger/disassembleragent.h>
#include <debugger/disassemblerlines.h>
#include <debugger/logwindow.h>
#include <debugger/memoryagent.h>
#include <debugger/moduleshandler.h>
#include <debugger/procinterrupt.h>
#include <debugger/registerhandler.h>
#include <debugger/shared/hostutils.h>
#include <debugger/sourcefileshandler.h>
#include <debugger/sourceutils.h>
#include <debugger/stackhandler.h>
#include <debugger/terminal.h>
#include <debugger/threadshandler.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
@@ -78,8 +77,7 @@ using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
enum { debugPending = 0 };
@@ -191,7 +189,7 @@ GdbEngine::~GdbEngine()
QString GdbEngine::failedToStartMessage()
{
return tr("The gdb process failed to start.");
return Tr::tr("The gdb process failed to start.");
}
// Parse "~:gdb: unknown target exception 0xc0000139 at 0x77bef04e\n"
@@ -204,14 +202,14 @@ static QString msgWinException(const QString &data, unsigned *exCodeIn = nullptr
const int blankPos = exCodePos != -1 ? data.indexOf(' ', exCodePos + 1) : -1;
const int addressPos = blankPos != -1 ? data.indexOf("0x", blankPos + 1) : -1;
if (addressPos < 0)
return GdbEngine::tr("An exception was triggered.");
return Tr::tr("An exception was triggered.");
const unsigned exCode = data.mid(exCodePos, blankPos - exCodePos).toUInt(nullptr, 0);
if (exCodeIn)
*exCodeIn = exCode;
const quint64 address = data.mid(addressPos).trimmed().toULongLong(nullptr, 0);
QString rc;
QTextStream str(&rc);
str << GdbEngine::tr("An exception was triggered:") << ' ';
str << Tr::tr("An exception was triggered:") << ' ';
formatWindowsException(exCode, address, 0, 0, 0, str);
str << '.';
return rc;
@@ -336,7 +334,7 @@ void GdbEngine::handleResponse(const QString &buff)
// Show some messages to give the impression something happens.
if (data.startsWith("Reading symbols from ")) {
showStatusMessage(tr("Reading %1...").arg(data.mid(21)), 1000);
showStatusMessage(Tr::tr("Reading %1...").arg(data.mid(21)), 1000);
progressPing();
} else if (data.startsWith("[New ") || data.startsWith("[Thread ")) {
if (data.endsWith('\n'))
@@ -479,7 +477,7 @@ void GdbEngine::handleAsyncOutput(const QString &asyncClass, const GdbMi &result
// symbols-loaded="0",thread-group="i1"
QString id = result["id"].data();
if (!id.isEmpty())
showStatusMessage(tr("Library %1 loaded.").arg(id), 1000);
showStatusMessage(Tr::tr("Library %1 loaded.").arg(id), 1000);
progressPing();
Module module;
module.startAddress = 0;
@@ -495,7 +493,7 @@ void GdbEngine::handleAsyncOutput(const QString &asyncClass, const GdbMi &result
QString id = result["id"].data();
modulesHandler()->removeModule(result["target-name"].data());
progressPing();
showStatusMessage(tr("Library %1 unloaded.").arg(id), 1000);
showStatusMessage(Tr::tr("Library %1 unloaded.").arg(id), 1000);
} else if (asyncClass == "thread-group-added") {
// 7.1-symbianelf has "{id="i1"}"
} else if (asyncClass == "thread-group-started") {
@@ -505,13 +503,13 @@ void GdbEngine::handleAsyncOutput(const QString &asyncClass, const GdbMi &result
progressPing();
// 7.1.50 has thread-group-started,id="i1",pid="3529"
QString id = result["id"].data();
showStatusMessage(tr("Thread group %1 created.").arg(id), 1000);
showStatusMessage(Tr::tr("Thread group %1 created.").arg(id), 1000);
notifyInferiorPid(result["pid"].toProcessHandle());
handleThreadGroupCreated(result);
} else if (asyncClass == "thread-created") {
//"{id="1",group-id="28902"}"
QString id = result["id"].data();
showStatusMessage(tr("Thread %1 created.").arg(id), 1000);
showStatusMessage(Tr::tr("Thread %1 created.").arg(id), 1000);
ThreadData thread;
thread.id = id;
thread.groupId = result["group-id"].data();
@@ -519,18 +517,18 @@ void GdbEngine::handleAsyncOutput(const QString &asyncClass, const GdbMi &result
} else if (asyncClass == "thread-group-exited") {
// Archer has "{id="28902"}"
QString id = result["id"].data();
showStatusMessage(tr("Thread group %1 exited.").arg(id), 1000);
showStatusMessage(Tr::tr("Thread group %1 exited.").arg(id), 1000);
handleThreadGroupExited(result);
} else if (asyncClass == "thread-exited") {
//"{id="1",group-id="28902"}"
QString id = result["id"].data();
QString groupid = result["group-id"].data();
showStatusMessage(tr("Thread %1 in group %2 exited.")
showStatusMessage(Tr::tr("Thread %1 in group %2 exited.")
.arg(id).arg(groupid), 1000);
threadsHandler()->removeThread(id);
} else if (asyncClass == "thread-selected") {
QString id = result["id"].data();
showStatusMessage(tr("Thread %1 selected.").arg(id), 1000);
showStatusMessage(Tr::tr("Thread %1 selected.").arg(id), 1000);
//"{id="2"}"
} else if (asyncClass == "breakpoint-modified") {
// New in FSF gdb since 2011-04-27.
@@ -684,7 +682,7 @@ void GdbEngine::interruptInferior()
if (usesExecInterrupt()) {
runCommand({"-exec-interrupt"});
} else {
showStatusMessage(tr("Stop requested..."), 5000);
showStatusMessage(Tr::tr("Stop requested..."), 5000);
showMessage("TRYING TO INTERRUPT INFERIOR");
if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
IDevice::ConstPtr dev = device();
@@ -748,7 +746,7 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
return;
}
if (state() == InferiorRunOk) {
showStatusMessage(tr("Stopping temporarily."), 1000);
showStatusMessage(Tr::tr("Stopping temporarily."), 1000);
m_onStop.append(cmd, wantContinue);
setState(InferiorStopRequested);
interruptInferior();
@@ -834,16 +832,16 @@ void GdbEngine::commandTimeout()
"COMMANDS STILL IN PROGRESS: ") + commands.join(", "));
int timeOut = m_commandTimer.interval();
//m_commandTimer.stop();
const QString msg = tr("The gdb process has not responded "
const QString msg = Tr::tr("The gdb process has not responded "
"to a command within %n seconds. This could mean it is stuck "
"in an endless loop or taking longer than expected to perform "
"the operation.\nYou can choose between waiting "
"longer or aborting debugging.", nullptr, timeOut / 1000);
QMessageBox *mb = showMessageBox(QMessageBox::Critical,
tr("GDB Not Responding"), msg,
Tr::tr("GDB Not Responding"), msg,
QMessageBox::Ok | QMessageBox::Cancel);
mb->button(QMessageBox::Cancel)->setText(tr("Give GDB More Time"));
mb->button(QMessageBox::Ok)->setText(tr("Stop Debugging"));
mb->button(QMessageBox::Cancel)->setText(Tr::tr("Give GDB More Time"));
mb->button(QMessageBox::Ok)->setText(Tr::tr("Stop Debugging"));
if (mb->exec() == QMessageBox::Ok) {
showMessage("KILLING DEBUGGER AS REQUESTED BY USER");
// This is an undefined state, so we just pull the emergency brake.
@@ -883,8 +881,8 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
// with helpers enabled. In this case we get a second response with
// msg="Cannot find new threads: generic error"
showMessage("APPLYING WORKAROUND #1");
AsynchronousMessageBox::critical(tr("Executable Failed"), msg);
showStatusMessage(tr("Process failed to start."));
AsynchronousMessageBox::critical(Tr::tr("Executable Failed"), msg);
showStatusMessage(Tr::tr("Process failed to start."));
//shutdown();
notifyInferiorIll();
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
@@ -905,9 +903,9 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
showMessage("APPLYING WORKAROUND #4");
notifyInferiorStopOk();
//notifyInferiorIll();
//showStatusMessage(tr("Executable failed: %1").arg(msg));
//showStatusMessage(Tr::tr("Executable failed: %1").arg(msg));
//shutdown();
//AsynchronousMessageBox::critical(tr("Executable Failed"), msg);
//AsynchronousMessageBox::critical(Tr::tr("Executable Failed"), msg);
} else if (msg.contains("Cannot insert breakpoint")) {
// For breakpoints set by address to non-existent addresses we
// might get something like "6^error,msg="Warning:\nCannot insert
@@ -920,7 +918,7 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
// long as the breakpoints are enabled.
// FIXME: Should we silently disable the offending breakpoints?
showMessage("APPLYING WORKAROUND #5");
AsynchronousMessageBox::critical(tr("Setting Breakpoints Failed"), msg);
AsynchronousMessageBox::critical(Tr::tr("Setting Breakpoints Failed"), msg);
QTC_CHECK(state() == InferiorRunOk);
notifyInferiorSpontaneousStop();
notifyEngineIll();
@@ -945,8 +943,8 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
if (!m_lastWinException.isEmpty())
logMsg = m_lastWinException + '\n';
logMsg += msg;
AsynchronousMessageBox::critical(tr("Executable Failed"), logMsg);
showStatusMessage(tr("Executable failed: %1").arg(logMsg));
AsynchronousMessageBox::critical(Tr::tr("Executable Failed"), logMsg);
showStatusMessage(Tr::tr("Executable failed: %1").arg(logMsg));
}
}
return;
@@ -1073,7 +1071,7 @@ void GdbEngine::handleExecuteJumpToLine(const DebuggerResponse &response)
notifyInferiorRunOk(); // Only needed for gdb < 7.0.
} else if (response.resultClass == ResultError) {
// Could be "Unreasonable jump request" or similar.
QString out = tr("Cannot jump. Stopped.");
QString out = Tr::tr("Cannot jump. Stopped.");
QString msg = response.data["msg"].data();
if (!msg.isEmpty())
out += ". " + msg;
@@ -1081,7 +1079,7 @@ void GdbEngine::handleExecuteJumpToLine(const DebuggerResponse &response)
notifyInferiorRunFailed();
} else if (response.resultClass == ResultDone) {
// This happens on old gdb. Trigger the effect of a '*stopped'.
showStatusMessage(tr("Jumped. Stopped."));
showStatusMessage(Tr::tr("Jumped. Stopped."));
notifyInferiorSpontaneousStop();
handleStop2(response.data);
}
@@ -1100,7 +1098,7 @@ void GdbEngine::handleExecuteRunToLine(const DebuggerResponse &response)
//>~"testArray () at ../simple/app.cpp:241\n"
//>~"241\t s[1] = \"b\";\n"
//>122^done
showStatusMessage(tr("Target line hit, and therefore stopped."));
showStatusMessage(Tr::tr("Target line hit, and therefore stopped."));
notifyInferiorRunOk();
}
}
@@ -1144,12 +1142,12 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
if (reason == "exited") {
const int exitCode = data["exit-code"].toInt();
notifyExitCode(exitCode);
msg = tr("Application exited with exit code %1").arg(exitCode);
msg = Tr::tr("Application exited with exit code %1").arg(exitCode);
} else if (reason == "exited-signalled" || reason == "signal-received") {
msg = tr("Application exited after receiving signal %1")
msg = Tr::tr("Application exited after receiving signal %1")
.arg(data["signal-name"].toString());
} else {
msg = tr("Application exited normally.");
msg = Tr::tr("Application exited normally.");
}
// Only show the message. Ramp-down will be triggered by -thread-group-exited.
showStatusMessage(msg);
@@ -1398,7 +1396,7 @@ void GdbEngine::handleStop2(const GdbMi &data)
GdbMi newValue = value["new"];
if (oldValue.isValid() && newValue.isValid()) {
msg += ' ';
msg += tr("Value changed from %1 to %2.")
msg += Tr::tr("Value changed from %1 to %2.")
.arg(oldValue.data()).arg(newValue.data());
}
showStatusMessage(msg);
@@ -1505,13 +1503,13 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
int pythonMajor = m_pythonVersion / 10000;
int pythonMinor = (m_pythonVersion / 100) % 100;
QString out = "<p>"
+ tr("The selected build of GDB supports Python scripting, "
+ Tr::tr("The selected build of GDB supports Python scripting, "
"but the used version %1.%2 is not sufficient for "
"%3. Supported versions are Python 2.7 and 3.x.")
.arg(pythonMajor).arg(pythonMinor)
.arg(Core::Constants::IDE_DISPLAY_NAME);
showStatusMessage(out);
AsynchronousMessageBox::critical(tr("Execution Error"), out);
AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out);
}
loadInitScript();
CHECK_STATE(EngineSetupRequested);
@@ -1524,7 +1522,7 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
QString out2 = QStringLiteral("It cannot be used in %1.")
.arg(Core::Constants::IDE_DISPLAY_NAME);
showStatusMessage(out1 + ' ' + out2);
AsynchronousMessageBox::critical(tr("Execution Error"), out1 + "<br>" + out2);
AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out1 + "<br>" + out2);
}
notifyEngineSetupFailed();
}
@@ -1532,8 +1530,8 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
void GdbEngine::showExecutionError(const QString &message)
{
AsynchronousMessageBox::critical(tr("Execution Error"),
tr("Cannot continue debugged process:") + '\n' + message);
AsynchronousMessageBox::critical(Tr::tr("Execution Error"),
Tr::tr("Cannot continue debugged process:") + '\n' + message);
}
void GdbEngine::handleExecuteContinue(const DebuggerResponse &response)
@@ -1550,7 +1548,7 @@ void GdbEngine::handleExecuteContinue(const DebuggerResponse &response)
if (isDying())
return;
CHECK_STATE(InferiorStopOk);
showStatusMessage(tr("Stopped."), 5000);
showStatusMessage(Tr::tr("Stopped."), 5000);
reloadStack();
} else if (msg.startsWith("Cannot access memory at address")) {
// Happens on single step on ARM prolog and epilogs.
@@ -1664,7 +1662,7 @@ void GdbEngine::handleInferiorShutdown(const DebuggerResponse &response)
// It is not really an error from a user's point of view.
showMessage("NOTE: " + msg);
} else if (m_gdbProc.isRunning()) {
AsynchronousMessageBox::critical(tr("Failed to Shut Down Application"),
AsynchronousMessageBox::critical(Tr::tr("Failed to Shut Down Application"),
msgInferiorStopFailed(msg));
}
notifyInferiorShutdownFinished();
@@ -1735,7 +1733,7 @@ void GdbEngine::handleThreadGroupExited(const GdbMi &result)
static QString msgNoGdbBinaryForToolChain(const Abi &tc)
{
return GdbEngine::tr("There is no GDB binary available for binaries in format \"%1\".")
return Tr::tr("There is no GDB binary available for binaries in format \"%1\".")
.arg(tc.toString());
}
@@ -1785,7 +1783,7 @@ void GdbEngine::continueInferiorInternal()
{
CHECK_STATE(InferiorStopOk);
notifyInferiorRunRequested();
showStatusMessage(tr("Running requested..."), 5000);
showStatusMessage(Tr::tr("Running requested..."), 5000);
CHECK_STATE(InferiorRunRequested);
if (isNativeMixedActiveFrame()) {
DebuggerCommand cmd("executeContinue", RunRequest);
@@ -1811,7 +1809,7 @@ void GdbEngine::executeStepIn(bool byInstruction)
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Step requested..."), 5000);
showStatusMessage(Tr::tr("Step requested..."), 5000);
DebuggerCommand cmd;
if (isNativeMixedActiveFrame()) {
@@ -1876,7 +1874,7 @@ void GdbEngine::executeStepOut()
runCommand({"-stack-select-frame 0", Discardable});
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Finish function requested..."), 5000);
showStatusMessage(Tr::tr("Finish function requested..."), 5000);
if (isNativeMixedActiveFrame()) {
runCommand({"executeStepOut", RunRequest});
} else {
@@ -1893,7 +1891,7 @@ void GdbEngine::executeStepOver(bool byInstruction)
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Step next requested..."), 5000);
showStatusMessage(Tr::tr("Step next requested..."), 5000);
DebuggerCommand cmd;
cmd.flags = RunRequest;
@@ -1941,8 +1939,8 @@ void GdbEngine::handleExecuteNext(const DebuggerResponse &response)
notifyInferiorRunFailed();
handleRecordingFailed();
} else {
AsynchronousMessageBox::warning(tr("Execution Error"),
tr("Cannot continue debugged process:") + '\n' + msg);
AsynchronousMessageBox::warning(Tr::tr("Execution Error"),
Tr::tr("Cannot continue debugged process:") + '\n' + msg);
//notifyInferiorIll();
}
}
@@ -1957,7 +1955,7 @@ void GdbEngine::executeRunToLine(const ContextData &data)
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Run to line %1 requested...").arg(data.lineNumber), 5000);
showStatusMessage(Tr::tr("Run to line %1 requested...").arg(data.lineNumber), 5000);
#if 1
QString loc;
if (data.address)
@@ -1980,7 +1978,7 @@ void GdbEngine::executeRunToFunction(const QString &functionName)
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
runCommand({"-break-insert -t " + functionName});
showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000);
showStatusMessage(Tr::tr("Run to function %1 requested...").arg(functionName), 5000);
continueInferiorInternal();
}
@@ -2009,7 +2007,7 @@ void GdbEngine::executeReturn()
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Immediate return from function requested..."), 5000);
showStatusMessage(Tr::tr("Immediate return from function requested..."), 5000);
runCommand({"-exec-return", RunRequest, CB(handleExecuteReturn)});
}
@@ -2892,8 +2890,8 @@ static void handleShowModuleSymbols(const DebuggerResponse &response,
file.remove();
DebuggerEngine::showModuleSymbols(modulePath, symbols);
} else {
AsynchronousMessageBox::critical(GdbEngine::tr("Cannot Read Symbols"),
GdbEngine::tr("Cannot read symbols for module \"%1\".").arg(fileName));
AsynchronousMessageBox::critical(Tr::tr("Cannot Read Symbols"),
Tr::tr("Cannot read symbols for module \"%1\".").arg(fileName));
}
}
@@ -3087,12 +3085,12 @@ void GdbEngine::reloadSourceFiles()
void GdbEngine::selectThread(const Thread &thread)
{
showStatusMessage(tr("Retrieving data for stack view thread %1...")
showStatusMessage(Tr::tr("Retrieving data for stack view thread %1...")
.arg(thread->id()), 10000);
DebuggerCommand cmd("-thread-select " + thread->id(), Discardable);
cmd.callback = [this](const DebuggerResponse &) {
QTC_CHECK(state() == InferiorUnrunnable || state() == InferiorStopOk);
showStatusMessage(tr("Retrieving data for stack view..."), 3000);
showStatusMessage(Tr::tr("Retrieving data for stack view..."), 3000);
reloadStack(); // Will reload registers.
updateLocals();
};
@@ -3255,8 +3253,8 @@ void GdbEngine::createSnapshot()
cmd.callback = [this, fileName](const DebuggerResponse &r) { handleMakeSnapshot(r, fileName); };
runCommand(cmd);
} else {
AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
tr("Cannot create snapshot file."));
AsynchronousMessageBox::critical(Tr::tr("Snapshot Creation Error"),
Tr::tr("Cannot create snapshot file."));
}
}
@@ -3266,8 +3264,8 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri
emit attachToCoreRequested(coreFile);
} else {
QString msg = response.data["msg"].data();
AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),
tr("Cannot create snapshot:") + '\n' + msg);
AsynchronousMessageBox::critical(Tr::tr("Snapshot Creation Error"),
Tr::tr("Cannot create snapshot:") + '\n' + msg);
}
}
@@ -3737,7 +3735,7 @@ void GdbEngine::fetchDisassemblerByCliRangePlain(const DisassemblerAgentCookie &
//76^error,msg="No function contains specified address."
//>568^error,msg="Line number 0 out of range;
QString msg = response.data["msg"].data();
showStatusMessage(tr("Disassembler failed: %1").arg(msg), 5000);
showStatusMessage(Tr::tr("Disassembler failed: %1").arg(msg), 5000);
};
runCommand(cmd);
}
@@ -3827,7 +3825,7 @@ void GdbEngine::setupEngine()
if (usesOutputCollector()) {
if (!m_outputCollector.listen()) {
handleAdapterStartFailed(tr("Cannot set up communication with child process: %1")
handleAdapterStartFailed(Tr::tr("Cannot set up communication with child process: %1")
.arg(m_outputCollector.errorString()));
return;
}
@@ -3928,7 +3926,7 @@ void GdbEngine::handleGdbStarted()
//runCommand("set remotecache on", ConsoleCommand);
//runCommand("set non-stop on", ConsoleCommand);
showStatusMessage(tr("Setting up inferior..."));
showStatusMessage(Tr::tr("Setting up inferior..."));
const DebuggerRunParameters &rp = runParameters();
// Addint executable to modules list.
@@ -4025,8 +4023,8 @@ void GdbEngine::loadInitScript()
runCommand({"source " + script.path()});
} else {
AsynchronousMessageBox::warning(
tr("Cannot Find Debugger Initialization Script"),
tr("The debugger settings point to a script file at \"%1\", "
Tr::tr("Cannot Find Debugger Initialization Script"),
Tr::tr("The debugger settings point to a script file at \"%1\", "
"which is not accessible. If a script file is not needed, "
"consider clearing that entry to avoid this warning."
).arg(script.toUserOutput()));
@@ -4077,7 +4075,7 @@ void GdbEngine::handleGdbDone()
QString msg;
const FilePath wd = m_gdbProc.workingDirectory();
if (!wd.isReadableDir()) {
msg = failedToStartMessage() + ' ' + tr("The working directory \"%1\" is not usable.")
msg = failedToStartMessage() + ' ' + Tr::tr("The working directory \"%1\" is not usable.")
.arg(wd.toUserOutput());
} else {
msg = RunWorker::userMessageForProcessError(QProcess::FailedToStart,
@@ -4099,7 +4097,7 @@ void GdbEngine::handleGdbDone()
if (error == QProcess::FailedToStart)
return; // This should be handled by the code trying to start the process.
AsynchronousMessageBox::critical(tr("GDB I/O Error"), msg);
AsynchronousMessageBox::critical(Tr::tr("GDB I/O Error"), msg);
}
if (m_commandTimer.isActive())
m_commandTimer.stop();
@@ -4131,7 +4129,7 @@ void GdbEngine::handleAdapterStartFailed(const QString &msg, Id settingsIdHint)
{
showMessage("ADAPTER START FAILED");
if (!msg.isEmpty() && !Internal::isTestRun()) {
const QString title = tr("Adapter Start Failed");
const QString title = Tr::tr("Adapter Start Failed");
ICore::showWarningWithOptions(title, msg, QString(), settingsIdHint);
}
notifyEngineSetupFailed();
@@ -4168,13 +4166,13 @@ void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response)
void GdbEngine::notifyInferiorSetupFailedHelper(const QString &msg)
{
showStatusMessage(tr("Failed to start application:") + ' ' + msg);
showStatusMessage(Tr::tr("Failed to start application:") + ' ' + msg);
if (state() == EngineSetupFailed) {
showMessage("INFERIOR START FAILED, BUT ADAPTER DIED ALREADY");
return; // Adapter crashed meanwhile, so this notification is meaningless.
}
showMessage("INFERIOR START FAILED");
AsynchronousMessageBox::critical(tr("Failed to Start Application"), msg);
AsynchronousMessageBox::critical(Tr::tr("Failed to Start Application"), msg);
notifyEngineSetupFailed();
}
@@ -4230,32 +4228,32 @@ void GdbEngine::scheduleTestResponse(int testCase, const QString &response)
QString GdbEngine::msgGdbStopFailed(const QString &why)
{
return tr("The gdb process could not be stopped:\n%1").arg(why);
return Tr::tr("The gdb process could not be stopped:\n%1").arg(why);
}
QString GdbEngine::msgInferiorStopFailed(const QString &why)
{
return tr("Application process could not be stopped:\n%1").arg(why);
return Tr::tr("Application process could not be stopped:\n%1").arg(why);
}
QString GdbEngine::msgInferiorSetupOk()
{
return tr("Application started.");
return Tr::tr("Application started.");
}
QString GdbEngine::msgInferiorRunOk()
{
return tr("Application running.");
return Tr::tr("Application running.");
}
QString GdbEngine::msgAttachedToStoppedInferior()
{
return tr("Attached to stopped application.");
return Tr::tr("Attached to stopped application.");
}
QString GdbEngine::msgConnectRemoteServerFailed(const QString &why)
{
return tr("Connecting to remote server failed:\n%1").arg(why);
return Tr::tr("Connecting to remote server failed:\n%1").arg(why);
}
void GdbEngine::interruptLocalInferior(qint64 pid)
@@ -4329,8 +4327,8 @@ void GdbEngine::claimInitialBreakpoints()
const DebuggerRunParameters &rp = runParameters();
if (rp.startMode != AttachToCore) {
showStatusMessage(tr("Setting breakpoints..."));
showMessage(tr("Setting breakpoints..."));
showStatusMessage(Tr::tr("Setting breakpoints..."));
showMessage(Tr::tr("Setting breakpoints..."));
BreakpointManager::claimBreakpointsForEngine(this);
const DebuggerSettings &s = *debuggerSettings();
@@ -4425,7 +4423,7 @@ void GdbEngine::setupInferior()
runCommand({"set target-async on", CB(handleSetTargetAsync)});
if (symbolFile.isEmpty()) {
showMessage(tr("No symbol file given."), StatusBar);
showMessage(Tr::tr("No symbol file given."), StatusBar);
callTargetRemote();
} else {
runCommand({"-file-exec-and-symbols \"" + symbolFile + '"',
@@ -4442,16 +4440,16 @@ void GdbEngine::setupInferior()
CoreInfo cinfo = CoreInfo::readExecutableNameFromCore(rp.debugger, rp.coreFile);
if (!cinfo.isCore) {
AsynchronousMessageBox::warning(tr("Error Loading Core File"),
tr("The specified file does not appear to be a core file."));
AsynchronousMessageBox::warning(Tr::tr("Error Loading Core File"),
Tr::tr("The specified file does not appear to be a core file."));
notifyEngineSetupFailed();
return;
}
executable = cinfo.foundExecutableName;
if (executable.isEmpty()) {
AsynchronousMessageBox::warning(tr("Error Loading Symbols"),
tr("No executable to load symbols from specified core."));
AsynchronousMessageBox::warning(Tr::tr("Error Loading Symbols"),
Tr::tr("No executable to load symbols from specified core."));
notifyEngineSetupFailed();
return;
}
@@ -4518,7 +4516,7 @@ void GdbEngine::runEngine()
} else if (isLocalAttachEngine()) {
const qint64 pid = rp.attachPID.pid();
showStatusMessage(tr("Attaching to process %1.").arg(pid));
showStatusMessage(Tr::tr("Attaching to process %1.").arg(pid));
runCommand({"attach " + QString::number(pid), [this](const DebuggerResponse &r) {
handleLocalAttach(r);
}});
@@ -4576,7 +4574,7 @@ void GdbEngine::handleLocalAttach(const DebuggerResponse &response)
// Happens e.g. for "Attach to unstarted application"
// We will get a '*stopped' later that we'll interpret as 'spontaneous'
// So acknowledge the current state and put a delayed 'continue' in the pipe.
showMessage(tr("Attached to running application."), StatusBar);
showMessage(Tr::tr("Attached to running application."), StatusBar);
claimInitialBreakpoints();
notifyEngineRunAndInferiorRunOk();
} else {
@@ -4594,17 +4592,17 @@ void GdbEngine::handleLocalAttach(const DebuggerResponse &response)
case ResultError:
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
QString msg = msgPtraceError(runParameters().startMode);
showStatusMessage(tr("Failed to attach to application: %1").arg(msg));
AsynchronousMessageBox::warning(tr("Debugger Error"), msg);
showStatusMessage(Tr::tr("Failed to attach to application: %1").arg(msg));
AsynchronousMessageBox::warning(Tr::tr("Debugger Error"), msg);
notifyEngineIll();
break;
}
showStatusMessage(tr("Failed to attach to application: %1")
showStatusMessage(Tr::tr("Failed to attach to application: %1")
.arg(QString(response.data["msg"].data())));
notifyEngineIll();
break;
default:
showStatusMessage(tr("Failed to attach to application: %1")
showStatusMessage(Tr::tr("Failed to attach to application: %1")
.arg(QString(response.data["msg"].data())));
notifyEngineIll();
break;
@@ -4654,7 +4652,7 @@ void GdbEngine::interruptInferior2()
if (!ok) {
// FIXME: Extra state needed?
showMessage("NOTE: INFERIOR STOP NOT POSSIBLE");
showStatusMessage(tr("Interrupting not possible."));
showStatusMessage(Tr::tr("Interrupting not possible."));
notifyInferiorRunOk();
}
}
@@ -4722,13 +4720,13 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
const FilePath core = runParameters().coreFile;
if (response.resultClass == ResultDone) {
showMessage(tr("Symbols found."), StatusBar);
showMessage(Tr::tr("Symbols found."), StatusBar);
handleInferiorPrepared();
} else {
QString msg = tr("No symbols found in the core file \"%1\".").arg(core.toUserOutput())
+ ' ' + tr("This can be caused by a path length limitation "
QString msg = Tr::tr("No symbols found in the core file \"%1\".").arg(core.toUserOutput())
+ ' ' + Tr::tr("This can be caused by a path length limitation "
"in the core file.")
+ ' ' + tr("Try to specify the binary in "
+ ' ' + Tr::tr("Try to specify the binary in "
"Debug > Start Debugging > Load Core File.");
notifyInferiorSetupFailedHelper(msg);
}
@@ -4741,7 +4739,7 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
QString msg = response.data["msg"].data();
// Extend the message a bit in unknown cases.
if (!msg.endsWith("File format not recognized"))
msg = tr("Starting executable failed:") + '\n' + msg;
msg = Tr::tr("Starting executable failed:") + '\n' + msg;
notifyInferiorSetupFailedHelper(msg);
}
@@ -4829,8 +4827,8 @@ void GdbEngine::handleTargetExtendedRemote(const DebuggerResponse &response)
runCommand({"-gdb-set remote exec-file " + runParameters().inferior.command.executable().toString(),
CB(handleTargetExtendedAttach)});
} else {
const QString title = tr("No Remote Executable or Process ID Specified");
const QString msg = tr(
const QString title = Tr::tr("No Remote Executable or Process ID Specified");
const QString msg = Tr::tr(
"No remote executable could be determined from your build system files.<p>"
"In case you use qmake, consider adding<p>"
"&nbsp;&nbsp;&nbsp;&nbsp;target.path = /tmp/your_executable # path on device<br>"
@@ -4838,8 +4836,8 @@ void GdbEngine::handleTargetExtendedRemote(const DebuggerResponse &response)
"to your .pro file.");
QMessageBox *mb = showMessageBox(QMessageBox::Critical, title, msg,
QMessageBox::Ok | QMessageBox::Cancel);
mb->button(QMessageBox::Cancel)->setText(tr("Continue Debugging"));
mb->button(QMessageBox::Ok)->setText(tr("Stop Debugging"));
mb->button(QMessageBox::Cancel)->setText(Tr::tr("Continue Debugging"));
mb->button(QMessageBox::Ok)->setText(Tr::tr("Stop Debugging"));
if (mb->exec() == QMessageBox::Ok) {
showMessage("KILLING DEBUGGER AS REQUESTED BY USER");
notifyInferiorSetupFailedHelper(title);
@@ -5034,14 +5032,14 @@ void GdbEngine::handleTargetCore(const DebuggerResponse &response)
{
CHECK_STATE(EngineRunRequested);
notifyEngineRunOkAndInferiorUnrunnable();
showMessage(tr("Attached to core."), StatusBar);
showMessage(Tr::tr("Attached to core."), StatusBar);
if (response.resultClass == ResultError) {
// We'll accept any kind of error e.g. &"Cannot access memory at address 0x2abc2a24\n"
// Even without the stack, the user can find interesting stuff by exploring
// the memory, globals etc.
showStatusMessage(tr("Attach to core \"%1\" failed:").arg(runParameters().coreFile.toUserOutput())
+ '\n' + response.data["msg"].data()
+ '\n' + tr("Continuing nevertheless."));
showStatusMessage(
Tr::tr("Attach to core \"%1\" failed:").arg(runParameters().coreFile.toUserOutput())
+ '\n' + response.data["msg"].data() + '\n' + Tr::tr("Continuing nevertheless."));
}
// Due to the auto-solib-add off setting, we don't have any
// symbols yet. Load them in order of importance.
@@ -5138,8 +5136,7 @@ DebuggerEngine *createGdbEngine()
return new GdbEngine;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_METATYPE(Debugger::Internal::GdbMi)
Q_DECLARE_METATYPE(Debugger::Internal::TracepointCaptureData)

View File

@@ -43,8 +43,7 @@
#include <QTextCodec>
#include <QTimer>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class BreakpointParameters;
class DebugInfoTask;
@@ -66,8 +65,6 @@ struct CoreInfo
class GdbEngine final : public CppDebuggerEngine
{
Q_OBJECT
public:
GdbEngine();
~GdbEngine() final;
@@ -434,5 +431,4 @@ private: ////////// General Interface //////////
QString m_errorString;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -24,9 +24,10 @@
****************************************************************************/
#include <debugger/debuggeractions.h>
#include <debugger/debuggerconstants.h>
#include <debugger/debuggercore.h>
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggerconstants.h>
#include <debugger/debuggertr.h>
#include <coreplugin/dialogs/ioptionspage.h>
@@ -35,8 +36,7 @@
using namespace Core;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
/////////////////////////////////////////////////////////////////////////
//
@@ -46,13 +46,11 @@ namespace Internal {
class GdbOptionsPage : public Core::IOptionsPage
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::GdbOptionsPage)
public:
GdbOptionsPage()
{
setId("M.Gdb");
setDisplayName(tr("GDB"));
setDisplayName(Tr::tr("GDB"));
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
setSettings(&debuggerSettings()->page2);
@@ -61,7 +59,7 @@ public:
DebuggerSettings &s = *debuggerSettings();
Group general {
Title { tr("General") },
Title { Tr::tr("General") },
Row { s.gdbWatchdogTimeout, Stretch() },
s.skipKnownFrames,
s.useMessageBoxForSignals,
@@ -76,8 +74,8 @@ public:
};
Column commands {
Group { Title { tr("Additional Startup Commands") }, s.gdbStartupCommands },
Group { Title { tr("Additional Attach Commands") }, s.gdbPostAttachCommands },
Group { Title { Tr::tr("Additional Startup Commands") }, s.gdbStartupCommands },
Group { Title { Tr::tr("Additional Attach Commands") }, s.gdbPostAttachCommands },
Stretch()
};
@@ -99,13 +97,13 @@ public:
GdbOptionsPage2()
{
setId("M.Gdb2");
setDisplayName(GdbOptionsPage::tr("GDB Extended"));
setDisplayName(Tr::tr("GDB Extended"));
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
setSettings(&debuggerSettings()->page3);
setLayouter([](QWidget *w) {
auto labelDangerous = new QLabel("<html><head/><body><i>" +
GdbOptionsPage::tr("The options below give access to advanced "
Tr::tr("The options below give access to advanced "
"or experimental functions of GDB.<br>Enabling them may negatively "
"impact your debugging experience.") + "</i></body></html>");
@@ -113,7 +111,7 @@ public:
DebuggerSettings &s = *debuggerSettings();
Group extended {
Title(GdbOptionsPage::tr("Extended")),
Title(Tr::tr("Extended")),
labelDangerous,
s.targetAsync,
s.autoEnrichParameters,
@@ -137,5 +135,4 @@ void addGdbOptionPages(QList<IOptionsPage *> *opts)
opts->push_back(new GdbOptionsPage2);
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -24,7 +24,9 @@
****************************************************************************/
#include "imageviewer.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -44,6 +46,8 @@
#include <QPainter>
#include <QDir>
namespace Debugger::Internal {
// Widget showing the image in a 1-pixel frame with context menu.
class ImageWidget : public QWidget
{
@@ -80,7 +84,7 @@ void ImageWidget::mousePressEvent(QMouseEvent *ev)
} else {
const QRgb color = m_image.pixel(imagePos);
const QString message =
ImageViewer::tr("Color at %1,%2: red: %3 green: %4 blue: %5 alpha: %6").
Tr::tr("Color at %1,%2: red: %3 green: %4 blue: %5 alpha: %6").
arg(imagePos.x()).arg(imagePos.y()).
arg(qRed(color)).arg(qGreen(color)).arg(qBlue(color)).arg(qAlpha(color));
emit clicked(message);
@@ -125,7 +129,7 @@ void ImageViewer::setInfo(const QString &info)
void ImageViewer::clicked(const QString &message)
{
const QString text = m_info + '\n'
+ (message.isEmpty() ? tr("<Click to display color>") : message);
+ (message.isEmpty() ? Tr::tr("<Click to display color>") : message);
m_infoLabel->setText(text);
}
@@ -150,9 +154,9 @@ void ImageViewer::contextMenuEvent(QContextMenuEvent *ev)
const QImage &image = m_imageWidget->image();
const bool hasImage = !image.isNull();
QMenu menu;
QAction *copyAction = menu.addAction(tr("Copy Image"));
QAction *copyAction = menu.addAction(Tr::tr("Copy Image"));
copyAction->setShortcut(QKeySequence::Copy);
QAction *imageViewerAction = menu.addAction(tr("Open Image Viewer"));
QAction *imageViewerAction = menu.addAction(Tr::tr("Open Image Viewer"));
copyAction->setEnabled(hasImage);
imageViewerAction->setEnabled(hasImage);
QAction *action = menu.exec(ev->globalPos());
@@ -235,4 +239,6 @@ void PlotViewer::paintEvent(QPaintEvent *)
}
}
} // Debugger::Internal
#include "imageviewer.moc"

View File

@@ -36,12 +36,15 @@ class QImage;
class QContextMenuEvent;
QT_END_NAMESPACE
namespace Debugger::Internal {
class ImageWidget;
// Image viewer showing images in scroll area, displays color on click.
class ImageViewer : public QWidget
{
Q_OBJECT
public:
explicit ImageViewer(QWidget *parent = nullptr);
@@ -61,6 +64,7 @@ private:
class PlotViewer : public QWidget
{
Q_OBJECT
public:
explicit PlotViewer(QWidget *parent = nullptr);
@@ -74,3 +78,5 @@ private:
Data m_data;
QString m_info;
};
} // Debugger::Internal

View File

@@ -25,23 +25,23 @@
#include "lldbengine.h"
#include <debugger/breakhandler.h>
#include <debugger/debuggeractions.h>
#include <debugger/debuggercore.h>
#include <debugger/debuggerdialogs.h>
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggeritem.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/terminal.h>
#include <debugger/breakhandler.h>
#include <debugger/debuggeritem.h>
#include <debugger/debuggersourcepathmappingwidget.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/debuggertr.h>
#include <debugger/disassemblerlines.h>
#include <debugger/moduleshandler.h>
#include <debugger/registerhandler.h>
#include <debugger/stackhandler.h>
#include <debugger/sourceutils.h>
#include <debugger/stackhandler.h>
#include <debugger/terminal.h>
#include <debugger/threadshandler.h>
#include <debugger/watchhandler.h>
#include <debugger/watchutils.h>
@@ -68,8 +68,7 @@
using namespace Core;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
static int &currentToken()
{
@@ -137,7 +136,7 @@ void LldbEngine::runCommand(const DebuggerCommand &command)
if (cmd.flags == NeedsFullStop) {
cmd.flags &= ~NeedsFullStop;
if (state() == InferiorRunOk) {
showStatusMessage(tr("Stopping temporarily"), 1000);
showStatusMessage(Tr::tr("Stopping temporarily"), 1000);
m_onStop.append(cmd, false);
interruptInferior();
return;
@@ -191,7 +190,7 @@ void LldbEngine::abortDebuggerProcess()
static QString adapterStartFailed()
{
return LldbEngine::tr("Adapter start failed.");
return Tr::tr("Adapter start failed.");
}
void LldbEngine::setupEngine()
@@ -237,7 +236,7 @@ void LldbEngine::handleLldbStarted()
{
m_lldbProc.waitForReadyRead(1000);
showStatusMessage(tr("Setting up inferior..."));
showStatusMessage(Tr::tr("Setting up inferior..."));
const DebuggerRunParameters &rp = runParameters();
@@ -351,7 +350,7 @@ void LldbEngine::runEngine()
{
const DebuggerRunParameters &rp = runParameters();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state(); return);
showStatusMessage(tr("Running requested..."), 5000);
showStatusMessage(Tr::tr("Running requested..."), 5000);
DebuggerCommand cmd("runEngine");
if (rp.startMode == AttachToCore)
cmd.arg("coreFile", rp.coreFile);
@@ -360,7 +359,7 @@ void LldbEngine::runEngine()
void LldbEngine::interruptInferior()
{
showStatusMessage(tr("Interrupt requested..."), 5000);
showStatusMessage(Tr::tr("Interrupt requested..."), 5000);
runCommand({"interruptInferior"});
}
@@ -789,7 +788,7 @@ void LldbEngine::handleLldbDone()
if (m_lldbProc.result() == ProcessResult::StartFailed) {
notifyEngineSetupFailed();
showMessage("ADAPTER START FAILED");
ICore::showWarningWithOptions(adapterStartFailed(), tr("Unable to start LLDB \"%1\": %2")
ICore::showWarningWithOptions(adapterStartFailed(), Tr::tr("Unable to start LLDB \"%1\": %2")
.arg(runParameters().debugger.command.executable().toUserOutput(),
m_lldbProc.errorString()));
return;
@@ -812,7 +811,7 @@ void LldbEngine::handleLldbDone()
case QProcess::Timedout:
default:
//setState(EngineShutdownRequested, true);
AsynchronousMessageBox::critical(tr("LLDB I/O Error"), errorMessage(error));
AsynchronousMessageBox::critical(Tr::tr("LLDB I/O Error"), errorMessage(error));
break;
}
}
@@ -821,26 +820,26 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const
{
switch (error) {
case QProcess::FailedToStart:
return tr("The LLDB process failed to start. Either the "
return Tr::tr("The LLDB process failed to start. Either the "
"invoked program \"%1\" is missing, or you may have insufficient "
"permissions to invoke the program.")
.arg(runParameters().debugger.command.executable().toUserOutput());
case QProcess::Crashed:
return tr("The LLDB process crashed some time after starting "
return Tr::tr("The LLDB process crashed some time after starting "
"successfully.");
case QProcess::Timedout:
return tr("The last waitFor...() function timed out. "
return Tr::tr("The last waitFor...() function timed out. "
"The state of QProcess is unchanged, and you can try calling "
"waitFor...() again.");
case QProcess::WriteError:
return tr("An error occurred when attempting to write "
return Tr::tr("An error occurred when attempting to write "
"to the LLDB process. For example, the process may not be running, "
"or it may have closed its input channel.");
case QProcess::ReadError:
return tr("An error occurred when attempting to read from "
return Tr::tr("An error occurred when attempting to read from "
"the Lldb process. For example, the process may not be running.");
default:
return tr("An unknown error in the LLDB process occurred.") + ' ';
return Tr::tr("An unknown error in the LLDB process occurred.") + ' ';
}
}
@@ -1131,5 +1130,4 @@ DebuggerEngine *createLldbEngine()
return new LldbEngine;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -40,8 +40,7 @@
#include <QMap>
#include <QVariant>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
/* A debugger engine interfacing the LLDB debugger
* using its Python interface.
@@ -147,7 +146,6 @@ private:
DebuggerCommandSequence m_onStop;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
#endif // DEBUGGER_LLDBENGINE

View File

@@ -26,6 +26,7 @@
#include "loadcoredialog.h"
#include "debuggerkitinformation.h"
#include "debuggertr.h"
#include "gdb/gdbengine.h"
#include <projectexplorer/devicesupport/devicefilesystemmodel.h>
@@ -54,8 +55,7 @@ using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
///////////////////////////////////////////////////////////////////////
//
@@ -65,8 +65,6 @@ namespace Internal {
class SelectRemoteFileDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::SelectRemoteFileDialog)
public:
explicit SelectRemoteFileDialog(QWidget *parent);
@@ -123,10 +121,10 @@ SelectRemoteFileDialog::SelectRemoteFileDialog(QWidget *parent)
&& result.m_exitStatus == QProcess::NormalExit
&& result.m_exitCode == 0;
if (success) {
m_textBrowser->append(tr("Download of remote file succeeded."));
m_textBrowser->append(Tr::tr("Download of remote file succeeded."));
accept();
} else {
m_textBrowser->append(tr("Download of remote file failed: %1")
m_textBrowser->append(Tr::tr("Download of remote file failed: %1")
.arg(result.m_errorString));
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
m_fileSystemView->setEnabled(true);
@@ -222,7 +220,7 @@ public:
AttachCoreDialog::AttachCoreDialog(QWidget *parent)
: QDialog(parent), d(new AttachCoreDialogPrivate)
{
setWindowTitle(tr("Load Core File"));
setWindowTitle(Tr::tr("Load Core File"));
d->buttonBox = new QDialogButtonBox(this);
d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
@@ -235,7 +233,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
d->forceLocalCheckBox = new QCheckBox(this);
d->forceLocalLabel = new QLabel(this);
d->forceLocalLabel->setText(tr("Use local core file:"));
d->forceLocalLabel->setText(Tr::tr("Use local core file:"));
d->forceLocalLabel->setBuddy(d->forceLocalCheckBox);
d->remoteCoreFileName = new PathChooser(this);
@@ -244,27 +242,27 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
d->localCoreFileName = new PathChooser(this);
d->localCoreFileName->setHistoryCompleter("Debugger.CoreFile.History");
d->localCoreFileName->setExpectedKind(PathChooser::File);
d->localCoreFileName->setPromptDialogTitle(tr("Select Core File"));
d->localCoreFileName->setPromptDialogTitle(Tr::tr("Select Core File"));
d->symbolFileName = new PathChooser(this);
d->symbolFileName->setHistoryCompleter("LocalExecutable");
d->symbolFileName->setExpectedKind(PathChooser::File);
d->symbolFileName->setPromptDialogTitle(tr("Select Executable or Symbol File"));
d->symbolFileName->setPromptDialogTitle(Tr::tr("Select Executable or Symbol File"));
d->symbolFileName->setToolTip(
tr("Select a file containing debug information corresponding to the core file. "
Tr::tr("Select a file containing debug information corresponding to the core file. "
"Typically, this is the executable or a *.debug file if the debug "
"information is stored separately from the executable."));
d->overrideStartScriptFileName = new PathChooser(this);
d->overrideStartScriptFileName->setHistoryCompleter("Debugger.StartupScript.History");
d->overrideStartScriptFileName->setExpectedKind(PathChooser::File);
d->overrideStartScriptFileName->setPromptDialogTitle(tr("Select Startup Script"));
d->overrideStartScriptFileName->setPromptDialogTitle(Tr::tr("Select Startup Script"));
d->sysRootDirectory = new PathChooser(this);
d->sysRootDirectory->setHistoryCompleter("Debugger.SysRoot.History");
d->sysRootDirectory->setExpectedKind(PathChooser::Directory);
d->sysRootDirectory->setPromptDialogTitle(tr("Select SysRoot Directory"));
d->sysRootDirectory->setToolTip(tr(
d->sysRootDirectory->setPromptDialogTitle(Tr::tr("Select SysRoot Directory"));
d->sysRootDirectory->setToolTip(Tr::tr(
"This option can be used to override the kit's SysRoot setting"));
auto coreLayout = new QHBoxLayout;
@@ -276,12 +274,12 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
formLayout->setContentsMargins(0, 0, 0, 0);
formLayout->setHorizontalSpacing(6);
formLayout->setVerticalSpacing(6);
formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(Tr::tr("Kit:"), d->kitChooser);
formLayout->addRow(d->forceLocalLabel, d->forceLocalCheckBox);
formLayout->addRow(tr("Core file:"), coreLayout);
formLayout->addRow(tr("&Executable or symbol file:"), d->symbolFileName);
formLayout->addRow(tr("Override &start script:"), d->overrideStartScriptFileName);
formLayout->addRow(tr("Override S&ysRoot:"), d->sysRootDirectory);
formLayout->addRow(Tr::tr("Core file:"), coreLayout);
formLayout->addRow(Tr::tr("&Executable or symbol file:"), d->symbolFileName);
formLayout->addRow(Tr::tr("Override &start script:"), d->overrideStartScriptFileName);
formLayout->addRow(Tr::tr("Override S&ysRoot:"), d->sysRootDirectory);
auto line = new QFrame(this);
line->setFrameShape(QFrame::HLine);
@@ -381,7 +379,7 @@ void AttachCoreDialog::selectRemoteCoreFile()
changed();
QTC_ASSERT(!isLocalKit(), return);
SelectRemoteFileDialog dlg(this);
dlg.setWindowTitle(tr("Select Remote Core File"));
dlg.setWindowTitle(Tr::tr("Select Remote Core File"));
dlg.attachToDevice(d->kitChooser->currentKit());
if (dlg.exec() == QDialog::Rejected)
return;
@@ -460,5 +458,4 @@ void AttachCoreDialog::setSysRoot(const FilePath &sysRoot)
d->sysRootDirectory->setFilePath(sysRoot);
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -32,13 +32,10 @@
namespace ProjectExplorer { class Kit; }
namespace Utils { class FilePath; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class AttachCoreDialog : public QDialog
{
Q_OBJECT
public:
explicit AttachCoreDialog(QWidget *parent);
~AttachCoreDialog() override;
@@ -72,5 +69,4 @@ private:
class AttachCoreDialogPrivate *d;
};
} // namespace Debugger
} // namespace Internal
} // Debugger::Internal

View File

@@ -30,8 +30,7 @@
#include <QVBoxLayout>
#include <QStackedWidget>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
enum { LocalsIndex = 0, InspectorIndex = 1 };
@@ -72,5 +71,4 @@ void LocalsAndInspectorWindow::setShowLocals(bool showLocals)
m_timer.start();
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -28,8 +28,7 @@
#include <QWidget>
#include <QTimer>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class LocalsAndInspectorWindow : public QWidget
{
@@ -44,5 +43,4 @@ private:
bool m_showLocals = false;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -26,10 +26,10 @@
#include "logwindow.h"
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include <QDebug>
#include <QTime>
@@ -58,8 +58,7 @@
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
GlobalLogWindow *theGlobalLog = nullptr;
@@ -96,7 +95,7 @@ static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent)
{
bool success = false;
while (!success) {
const FilePath filePath = FileUtils::getSaveFilePath(parent, LogWindow::tr("Log File"));
const FilePath filePath = FileUtils::getSaveFilePath(parent, Tr::tr("Log File"));
if (filePath.isEmpty())
break;
FileSaver saver(filePath, QIODevice::Text);
@@ -195,8 +194,6 @@ private:
class DebuggerPane : public QPlainTextEdit
{
Q_OBJECT
public:
explicit DebuggerPane()
{
@@ -204,11 +201,11 @@ public:
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_clearContentsAction = new QAction(this);
m_clearContentsAction->setText(tr("Clear Contents"));
m_clearContentsAction->setText(Tr::tr("Clear Contents"));
m_clearContentsAction->setEnabled(true);
m_saveContentsAction = new QAction(this);
m_saveContentsAction->setText(tr("Save Contents"));
m_saveContentsAction->setText(Tr::tr("Save Contents"));
m_saveContentsAction->setEnabled(true);
connect(m_saveContentsAction, &QAction::triggered,
this, &DebuggerPane::saveContents);
@@ -320,7 +317,7 @@ private:
void focusInEvent(QFocusEvent *ev) override
{
emit statusMessageRequested(tr("Type Ctrl-<Return> to execute a line."), -1);
emit statusMessageRequested(Tr::tr("Type Ctrl-<Return> to execute a line."), -1);
QPlainTextEdit::focusInEvent(ev);
}
@@ -340,7 +337,6 @@ private:
class CombinedPane : public DebuggerPane
{
Q_OBJECT
public:
CombinedPane(LogWindow *logWindow)
{
@@ -386,7 +382,7 @@ public:
LogWindow::LogWindow(DebuggerEngine *engine)
: m_engine(engine)
{
setWindowTitle(tr("Debugger &Log"));
setWindowTitle(Tr::tr("Debugger &Log"));
setObjectName("Log");
m_ignoreNextInputEcho = false;
@@ -410,11 +406,11 @@ LogWindow::LogWindow(DebuggerEngine *engine)
auto repeatButton = new QToolButton(this);
repeatButton->setIcon(Icons::STEP_OVER.icon());
repeatButton->setFixedSize(QSize(18, 18));
repeatButton->setToolTip(tr("Repeat last command for debug reasons."));
repeatButton->setToolTip(Tr::tr("Repeat last command for debug reasons."));
auto commandBox = new QHBoxLayout;
commandBox->addWidget(repeatButton);
commandBox->addWidget(new QLabel(tr("Command:"), this));
commandBox->addWidget(new QLabel(Tr::tr("Command:"), this));
commandBox->addWidget(m_commandEdit);
commandBox->setContentsMargins(2, 2, 2, 2);
commandBox->setSpacing(6);
@@ -465,7 +461,7 @@ LogWindow::LogWindow(DebuggerEngine *engine)
setMinimumHeight(60);
showOutput(LogWarning,
tr("Note: This log contains possibly confidential information about your machine, "
Tr::tr("Note: This log contains possibly confidential information about your machine, "
"environment variables, in-memory data of the processes you are debugging, and more. "
"It is never transferred over the internet by %1, and only stored "
"to disk if you manually use the respective option from the context menu, or through "
@@ -505,7 +501,7 @@ void LogWindow::sendCommand()
if (m_engine->acceptsDebuggerCommands())
m_engine->executeDebuggerCommand(m_commandEdit->text());
else
showOutput(LogError, tr("User commands are not accepted in the current state."));
showOutput(LogError, Tr::tr("User commands are not accepted in the current state."));
}
void LogWindow::showOutput(int channel, const QString &output)
@@ -660,7 +656,7 @@ GlobalLogWindow::GlobalLogWindow()
{
theGlobalLog = this;
setWindowTitle(tr("Global Debugger &Log"));
setWindowTitle(Tr::tr("Global Debugger &Log"));
setObjectName("GlobalLog");
auto m_splitter = new Core::MiniSplitter(Qt::Horizontal);
@@ -747,7 +743,6 @@ void GlobalLogWindow::clearUndoRedoStacks()
m_rightPane->clearUndoRedoStacks();
}
} // namespace Internal
} // namespace Debugger
} // namespace Debugger::Internal
#include "logwindow.moc"

View File

@@ -25,8 +25,6 @@
#pragma once
#include "debuggerconstants.h"
#include <QWidget>
#include <QTimer>
@@ -37,8 +35,7 @@ QT_END_NAMESPACE
namespace Utils { class FancyLineEdit; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
class DebuggerPane;
@@ -87,8 +84,6 @@ private:
class GlobalLogWindow final : public QWidget
{
Q_OBJECT
public:
explicit GlobalLogWindow();
~GlobalLogWindow() final;
@@ -105,5 +100,4 @@ private:
DebuggerPane *m_leftPane; // combined input
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internla

View File

@@ -27,8 +27,8 @@
#include "breakhandler.h"
#include "debuggerengine.h"
#include "debuggercore.h"
#include "debuggerinternalconstants.h"
#include "debuggertr.h"
#include "registerhandler.h"
#include <bineditor/bineditorservice.h>
@@ -51,8 +51,7 @@
using namespace Core;
using namespace ProjectExplorer;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
enum { BinBlockSize = 1024 };
enum { DataRange = 1024 * 1024 };
@@ -155,13 +154,12 @@ private:
QString registerViewTitle(const QString &registerName, quint64 addr)
{
return MemoryAgent::tr("Memory at Register \"%1\" (0x%2)").arg(registerName).arg(addr, 0, 16);
return Tr::tr("Memory at Register \"%1\" (0x%2)").arg(registerName).arg(addr, 0, 16);
}
QList<MemoryMarkup> registerViewMarkup(quint64 a, const QString &regName)
{
return {MemoryMarkup(a, 1, QColor(Qt::blue).lighter(),
MemoryAgent::tr("Register \"%1\"").arg(regName))};
return {MemoryMarkup(a, 1, QColor(Qt::blue).lighter(), Tr::tr("Register \"%1\"").arg(regName))};
}
///////////////////////////////////////////////////////////////////////
@@ -213,7 +211,7 @@ MemoryAgent::MemoryAgent(const MemoryViewSetupData &data, DebuggerEngine *engine
if (!factory)
return;
QString title = data.title.isEmpty() ? tr("Memory at 0x%1").arg(data.startAddress, 0, 16) : data.title;
QString title = data.title.isEmpty() ? Tr::tr("Memory at 0x%1").arg(data.startAddress, 0, 16) : data.title;
if (!data.separateView && !title.endsWith('$'))
title.append(" $");
@@ -314,6 +312,5 @@ bool MemoryAgent::isUsable()
return m_service != nullptr;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -34,8 +34,7 @@
namespace BinEditor { class EditorService; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
@@ -70,8 +69,6 @@ public:
class MemoryAgent : public QObject
{
Q_OBJECT
public:
MemoryAgent(const MemoryViewSetupData &data, DebuggerEngine *engine);
~MemoryAgent() override;
@@ -94,5 +91,4 @@ private:
QList<MemoryMarkup> registerViewMarkup(quint64 address, const QString &regName);
QString registerViewTitle(const QString &registerName, quint64 address = 0);
} // namespace Internal
} // namespace Debugger
} // Debugger::Intenal

View File

@@ -29,6 +29,7 @@
#include "debuggerconstants.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggertr.h"
#include <utils/basetreeview.h>
#include <utils/hostosinfo.h>
@@ -45,13 +46,10 @@
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class ModuleItem : public TreeItem
{
Q_DECLARE_TR_FUNCTIONS(Debuggger::Internal::ModulesHandler)
public:
QVariant data(int column, int role) const override;
@@ -85,39 +83,39 @@ QVariant ModuleItem::data(int column, int role) const
case 2:
if (role == Qt::DisplayRole)
switch (module.symbolsRead) {
case Module::UnknownReadState: return tr("Unknown");
case Module::ReadFailed: return tr("No");
case Module::ReadOk: return tr("Yes");
case Module::UnknownReadState: return Tr::tr("Unknown");
case Module::ReadFailed: return Tr::tr("No");
case Module::ReadOk: return Tr::tr("Yes");
}
break;
case 3:
if (role == Qt::DisplayRole)
switch (module.elfData.symbolsType) {
case UnknownSymbols: return tr("Unknown");
case NoSymbols: return tr("None");
case PlainSymbols: return tr("Plain");
case FastSymbols: return tr("Fast");
case LinkedSymbols: return tr("debuglnk");
case BuildIdSymbols: return tr("buildid");
case UnknownSymbols: return Tr::tr("Unknown");
case NoSymbols: return Tr::tr("None");
case PlainSymbols: return Tr::tr("Plain");
case FastSymbols: return Tr::tr("Fast");
case LinkedSymbols: return Tr::tr("debuglnk");
case BuildIdSymbols: return Tr::tr("buildid");
}
else if (role == Qt::ToolTipRole)
switch (module.elfData.symbolsType) {
case UnknownSymbols:
return tr("It is unknown whether this module contains debug "
return Tr::tr("It is unknown whether this module contains debug "
"information.\nUse \"Examine Symbols\" from the "
"context menu to initiate a check.");
case NoSymbols:
return tr("This module neither contains nor references debug "
return Tr::tr("This module neither contains nor references debug "
"information.\nStepping into the module or setting "
"breakpoints by file and line will not work.");
case PlainSymbols:
case FastSymbols:
return tr("This module contains debug information.\nStepping "
return Tr::tr("This module contains debug information.\nStepping "
"into the module or setting breakpoints by file and "
"line is expected to work.");
case LinkedSymbols:
case BuildIdSymbols:
return tr("This module does not contain debug information "
return Tr::tr("This module does not contain debug information "
"itself, but contains a reference to external "
"debug information.");
}
@@ -132,7 +130,7 @@ QVariant ModuleItem::data(int column, int role) const
if (module.endAddress)
return QString("0x" + QString::number(module.endAddress, 16));
//: End address of loaded module
return tr("<unknown>", "address");
return Tr::tr("<unknown>", "address");
}
break;
}
@@ -147,8 +145,6 @@ QVariant ModuleItem::data(int column, int role) const
class ModulesModel : public TreeModel<TypedTreeItem<ModuleItem>, ModuleItem>
{
Q_DECLARE_TR_FUNCTIONS(Debuggger::Internal::ModulesHandler)
public:
bool setData(const QModelIndex &idx, const QVariant &data, int role) override
{
@@ -180,46 +176,46 @@ bool ModulesModel::contextMenuEvent(const ItemViewEvent &ev)
auto menu = new QMenu;
addAction(this, menu, tr("Update Module List"),
addAction(this, menu, Tr::tr("Update Module List"),
enabled && canReload,
[this] { engine->reloadModules(); });
addAction(this, menu, tr("Show Source Files for Module \"%1\"").arg(moduleName),
tr("Show Source Files for Module"),
addAction(this, menu, Tr::tr("Show Source Files for Module \"%1\"").arg(moduleName),
Tr::tr("Show Source Files for Module"),
moduleNameValid && enabled && canReload,
[this, modulePath] { engine->loadSymbols(modulePath); });
// FIXME: Dependencies only available on Windows, when "depends" is installed.
addAction(this, menu, tr("Show Dependencies of \"%1\"").arg(moduleName),
tr("Show Dependencies"),
addAction(this, menu, Tr::tr("Show Dependencies of \"%1\"").arg(moduleName),
Tr::tr("Show Dependencies"),
moduleNameValid && !moduleName.isEmpty() && HostOsInfo::isWindowsHost(),
[modulePath] { QtcProcess::startDetached({{"depends"}, {modulePath}}); });
addAction(this, menu, tr("Load Symbols for All Modules"),
addAction(this, menu, Tr::tr("Load Symbols for All Modules"),
enabled && canLoadSymbols,
[this] { engine->loadAllSymbols(); });
addAction(this, menu, tr("Examine All Modules"),
addAction(this, menu, Tr::tr("Examine All Modules"),
enabled && canLoadSymbols,
[this] { engine->examineModules(); });
addAction(this, menu, tr("Load Symbols for Module \"%1\"").arg(moduleName),
tr("Load Symbols for Module"),
addAction(this, menu, Tr::tr("Load Symbols for Module \"%1\"").arg(moduleName),
Tr::tr("Load Symbols for Module"),
moduleNameValid && canLoadSymbols,
[this, modulePath] { engine->loadSymbols(modulePath); });
addAction(this, menu, tr("Edit File \"%1\"").arg(moduleName),
tr("Edit File"),
addAction(this, menu, Tr::tr("Edit File \"%1\"").arg(moduleName),
Tr::tr("Edit File"),
moduleNameValid,
[this, modulePath] { engine->gotoLocation(FilePath::fromString(modulePath)); });
addAction(this, menu, tr("Show Symbols in File \"%1\"").arg(moduleName),
tr("Show Symbols"),
addAction(this, menu, Tr::tr("Show Symbols in File \"%1\"").arg(moduleName),
Tr::tr("Show Symbols"),
canShowSymbols && moduleNameValid,
[this, modulePath] { engine->requestModuleSymbols(modulePath); });
addAction(this, menu, tr("Show Sections in File \"%1\"").arg(moduleName),
tr("Show Sections"),
addAction(this, menu, Tr::tr("Show Sections in File \"%1\"").arg(moduleName),
Tr::tr("Show Sections"),
canShowSymbols && moduleNameValid,
[this, modulePath] { engine->requestModuleSections(modulePath); });
@@ -243,12 +239,12 @@ ModulesHandler::ModulesHandler(DebuggerEngine *engine)
m_model->engine = engine;
m_model->setObjectName("ModulesModel");
m_model->setHeader(QStringList({
tr("Module Name") + pad,
tr("Module Path") + pad,
tr("Symbols Read") + pad,
tr("Symbols Type") + pad,
tr("Start Address") + pad,
tr("End Address") + pad}));
Tr::tr("Module Name") + pad,
Tr::tr("Module Path") + pad,
Tr::tr("Symbols Read") + pad,
Tr::tr("Symbols Type") + pad,
Tr::tr("Start Address") + pad,
Tr::tr("End Address") + pad}));
m_proxyModel = new QSortFilterProxyModel(this);
m_proxyModel->setObjectName("ModulesProxyModel");
@@ -333,5 +329,4 @@ void ModulesHandler::endUpdateAll()
m_model->destroyItem(item);
}
} // namespace Internal
} // namespace Debugger
} // namespace Debugger::Internal

View File

@@ -33,8 +33,7 @@ class QAbstractItemModel;
class QSortFilterProxyModel;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
class ModuleItem;
@@ -138,5 +137,4 @@ private:
QSortFilterProxyModel *m_proxyModel;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,6 +25,8 @@
#include "outputcollector.h"
#include "debuggertr.h"
#ifdef Q_OS_WIN
#include <QLocalServer>
@@ -52,8 +54,7 @@
#endif
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
OutputCollector::~OutputCollector()
{
@@ -78,7 +79,7 @@ bool OutputCollector::listen()
{
Utils::TemporaryFile tf("outputcollector");
if (!tf.open()) {
m_errorString = tr("Cannot create temporary file: %1").arg(tf.errorString());
m_errorString = Tr::tr("Cannot create temporary file: %1").arg(tf.errorString());
m_serverPath.clear();
return false;
}
@@ -89,14 +90,14 @@ bool OutputCollector::listen()
if (!::mkfifo(codedServerPath.constData(), 0600))
break;
if (errno != EEXIST) {
m_errorString = tr("Cannot create FiFo %1: %2").
m_errorString = Tr::tr("Cannot create FiFo %1: %2").
arg(m_serverPath, QString::fromLocal8Bit(strerror(errno)));
m_serverPath.clear();
return false;
}
}
if ((m_serverFd = ::open(codedServerPath.constData(), O_RDONLY|O_NONBLOCK)) < 0) {
m_errorString = tr("Cannot open FiFo %1: %2").
m_errorString = Tr::tr("Cannot open FiFo %1: %2").
arg(m_serverPath, QString::fromLocal8Bit(strerror(errno)));
m_serverPath.clear();
return false;
@@ -170,5 +171,4 @@ void OutputCollector::bytesAvailable()
#endif
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -33,14 +33,7 @@ class QLocalSocket;
class QSocketNotifier;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// OutputCollector
//
///////////////////////////////////////////////////////////////////////
namespace Debugger::Internal {
class OutputCollector : public QObject
{
@@ -71,5 +64,4 @@ private:
#endif
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -25,20 +25,20 @@
#include "pdbengine.h"
#include <debugger/breakhandler.h>
#include <debugger/debuggeractions.h>
#include <debugger/debuggercore.h>
#include <debugger/debuggerdialogs.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/threaddata.h>
#include <debugger/breakhandler.h>
#include <debugger/debuggertr.h>
#include <debugger/moduleshandler.h>
#include <debugger/procinterrupt.h>
#include <debugger/registerhandler.h>
#include <debugger/stackhandler.h>
#include <debugger/sourceutils.h>
#include <debugger/stackhandler.h>
#include <debugger/threaddata.h>
#include <debugger/watchhandler.h>
#include <debugger/watchutils.h>
@@ -61,8 +61,7 @@
using namespace Core;
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
PdbEngine::PdbEngine()
{
@@ -128,8 +127,9 @@ void PdbEngine::setupEngine()
const FilePath scriptFile = runParameters().mainScript;
if (!scriptFile.isReadableFile()) {
AsynchronousMessageBox::critical(tr("Python Error"),
QString("Cannot open script file %1").arg(scriptFile.toUserOutput()));
AsynchronousMessageBox::critical(Tr::tr("Python Error"),
QString("Cannot open script file %1")
.arg(scriptFile.toUserOutput()));
notifyEngineSetupFailed();
}
@@ -146,7 +146,7 @@ void PdbEngine::handlePdbStarted()
notifyEngineSetupOk();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
showStatusMessage(tr("Running requested..."), 5000);
showStatusMessage(Tr::tr("Running requested..."), 5000);
BreakpointManager::claimBreakpointsForEngine(this);
notifyEngineRunAndInferiorStopOk();
updateAll();
@@ -387,26 +387,26 @@ QString PdbEngine::errorMessage(QProcess::ProcessError error) const
{
switch (error) {
case QProcess::FailedToStart:
return tr("The Pdb process failed to start. Either the "
return Tr::tr("The Pdb process failed to start. Either the "
"invoked program \"%1\" is missing, or you may have insufficient "
"permissions to invoke the program.")
.arg(m_interpreter.toUserOutput());
case QProcess::Crashed:
return tr("The Pdb process crashed some time after starting "
return Tr::tr("The Pdb process crashed some time after starting "
"successfully.");
case QProcess::Timedout:
return tr("The last waitFor...() function timed out. "
return Tr::tr("The last waitFor...() function timed out. "
"The state of QProcess is unchanged, and you can try calling "
"waitFor...() again.");
case QProcess::WriteError:
return tr("An error occurred when attempting to write "
return Tr::tr("An error occurred when attempting to write "
"to the Pdb process. For example, the process may not be running, "
"or it may have closed its input channel.");
case QProcess::ReadError:
return tr("An error occurred when attempting to read from "
return Tr::tr("An error occurred when attempting to read from "
"the Pdb process. For example, the process may not be running.");
default:
return tr("An unknown error in the Pdb process occurred.") + ' ';
return Tr::tr("An unknown error in the Pdb process occurred.") + ' ';
}
}
@@ -415,7 +415,7 @@ void PdbEngine::handlePdbDone()
if (m_proc.result() == ProcessResult::StartFailed) {
notifyEngineSetupFailed();
showMessage("ADAPTER START FAILED");
ICore::showWarningWithOptions(tr("Adapter start failed"), m_proc.exitMessage());
ICore::showWarningWithOptions(Tr::tr("Adapter start failed"), m_proc.exitMessage());
return;
}
@@ -423,7 +423,7 @@ void PdbEngine::handlePdbDone()
if (error != QProcess::UnknownError) {
showMessage("HANDLE PDB ERROR");
if (error != QProcess::Crashed)
AsynchronousMessageBox::critical(tr("Pdb I/O Error"), errorMessage(error));
AsynchronousMessageBox::critical(Tr::tr("Pdb I/O Error"), errorMessage(error));
if (error == QProcess::FailedToStart)
return;
}
@@ -585,5 +585,4 @@ DebuggerEngine *createPdbEngine()
return new PdbEngine;
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -30,8 +30,8 @@
#include <QVariant>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerCommand;
class GdbMi;
@@ -41,8 +41,6 @@ class GdbMi;
class PdbEngine : public DebuggerEngine
{
Q_OBJECT
public:
PdbEngine();
@@ -115,5 +113,4 @@ private:
Utils::FilePath m_interpreter;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -27,7 +27,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerdialogs.h"
#include "debuggertr.h"
#include <utils/basetreeview.h>
@@ -41,10 +41,8 @@
using namespace Utils;
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
namespace {
// Keys of a properties in SVD file.
constexpr char kAccess[] = "access";
constexpr char kAddressOffset[] = "addressOffset";
@@ -71,7 +69,6 @@ constexpr char kRegisters[] = "registers";
constexpr char kResetvalue[] = "resetValue";
constexpr char kSize[] = "size";
constexpr char kWritOnlye[] = "write-only";
} // namespace
enum PeripheralRegisterColumns
{
@@ -90,13 +87,13 @@ static QString accessName(PeripheralRegisterAccess access)
{
switch (access) {
case PeripheralRegisterAccess::ReadOnly:
return PeripheralRegisterHandler::tr("RO");
return Tr::tr("RO");
case PeripheralRegisterAccess::WriteOnly:
return PeripheralRegisterHandler::tr("WO");
return Tr::tr("WO");
case PeripheralRegisterAccess::ReadWrite:
return PeripheralRegisterHandler::tr("RW");
return Tr::tr("RW");
default:
return PeripheralRegisterHandler::tr("N/A");
return Tr::tr("N/A");
}
}
@@ -173,7 +170,7 @@ QString PeripheralRegisterField::bitRangeString() const
{
const int from = bitOffset;
const int to = bitOffset + bitWidth - 1;
return PeripheralRegisterHandler::tr("[%1..%2]").arg(to).arg(from);
return Tr::tr("[%1..%2]").arg(to).arg(from);
}
QString PeripheralRegisterField::bitValueString(quint64 regValue) const
@@ -562,7 +559,7 @@ PeripheralRegisterHandler::PeripheralRegisterHandler(DebuggerEngine *engine)
: m_engine(engine)
{
setObjectName("PeripheralRegisterModel");
setHeader({tr("Name"), tr("Value"), tr("Access")});
setHeader({Tr::tr("Name"), Tr::tr("Value"), Tr::tr("Access")});
}
static void handleField(QXmlStreamReader &in, PeripheralRegister &reg)
@@ -804,7 +801,7 @@ bool PeripheralRegisterHandler::contextMenuEvent(const ItemViewEvent &ev)
QMenu *PeripheralRegisterHandler::createRegisterGroupsMenu(DebuggerState state) const
{
const auto groupMenu = new QMenu(tr("View Groups"));
const auto groupMenu = new QMenu(Tr::tr("View Groups"));
const auto actionGroup = new QActionGroup(groupMenu);
bool hasActions = false;
for (const PeripheralRegisterGroup &group : qAsConst(m_peripheralRegisterGroups)) {
@@ -830,7 +827,7 @@ QMenu *PeripheralRegisterHandler::createRegisterGroupsMenu(DebuggerState state)
QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
DebuggerState state, PeripheralRegisterItem *item) const
{
const auto fmtMenu = new QMenu(tr("Format"));
const auto fmtMenu = new QMenu(Tr::tr("Format"));
const auto actionGroup = new QActionGroup(fmtMenu);
const bool on = m_engine->hasCapability(RegisterCapability)
@@ -840,7 +837,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
// Hexadecimal action.
const auto hexAct = addCheckableAction(
this, fmtMenu, tr("Hexadecimal"), on,
this, fmtMenu, Tr::tr("Hexadecimal"), on,
fmt == PeripheralRegisterFormat::Hexadecimal,
[item] {
item->m_reg.format = PeripheralRegisterFormat::Hexadecimal;
@@ -850,7 +847,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
// Decimal action.
const auto decAct = addCheckableAction(
this, fmtMenu, tr("Decimal"), on,
this, fmtMenu, Tr::tr("Decimal"), on,
fmt == PeripheralRegisterFormat::Decimal,
[item] {
item->m_reg.format = PeripheralRegisterFormat::Decimal;
@@ -860,7 +857,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
// Octal action.
const auto octAct = addCheckableAction(
this, fmtMenu, tr("Octal"), on,
this, fmtMenu, Tr::tr("Octal"), on,
fmt == PeripheralRegisterFormat::Octal,
[item] {
item->m_reg.format = PeripheralRegisterFormat::Octal;
@@ -870,7 +867,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
// Binary action.
const auto binAct = addCheckableAction(
this, fmtMenu, tr("Binary"), on,
this, fmtMenu, Tr::tr("Binary"), on,
fmt == PeripheralRegisterFormat::Binary,
[item] {
item->m_reg.format = PeripheralRegisterFormat::Binary;
@@ -884,7 +881,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFormatMenu(
QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
DebuggerState state, PeripheralRegisterFieldItem *item) const
{
const auto fmtMenu = new QMenu(tr("Format"));
const auto fmtMenu = new QMenu(Tr::tr("Format"));
const auto actionGroup = new QActionGroup(fmtMenu);
const bool on = m_engine->hasCapability(RegisterCapability)
@@ -894,7 +891,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
// Hexadecimal action.
const auto hexAct = addCheckableAction(
this, fmtMenu, tr("Hexadecimal"), on,
this, fmtMenu, Tr::tr("Hexadecimal"), on,
fmt == PeripheralRegisterFormat::Hexadecimal,
[item] {
item->m_fld.format = PeripheralRegisterFormat::Hexadecimal;
@@ -904,7 +901,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
// Decimal action.
const auto decAct = addCheckableAction(
this, fmtMenu, tr("Decimal"), on,
this, fmtMenu, Tr::tr("Decimal"), on,
fmt == PeripheralRegisterFormat::Decimal,
[item] {
item->m_fld.format = PeripheralRegisterFormat::Decimal;
@@ -914,7 +911,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
// Octal action.
const auto octAct = addCheckableAction(
this, fmtMenu, tr("Octal"), on,
this, fmtMenu, Tr::tr("Octal"), on,
fmt == PeripheralRegisterFormat::Octal,
[item] {
item->m_fld.format = PeripheralRegisterFormat::Octal;
@@ -924,7 +921,7 @@ QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
// Binary action.
const auto binAct = addCheckableAction(
this, fmtMenu, tr("Binary"), on,
this, fmtMenu, Tr::tr("Binary"), on,
fmt == PeripheralRegisterFormat::Binary,
[item] {
item->m_fld.format = PeripheralRegisterFormat::Binary;
@@ -977,5 +974,4 @@ void PeripheralRegisterHandler::deactivateGroups()
m_activeRegisters.clear();
}
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -37,8 +37,7 @@ QT_END_NAMESPACE
namespace Utils { class ItemViewEvent; }
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerEngine;
@@ -152,7 +151,6 @@ using PeripheralRegisterModel = Utils::TreeModel<PeripheralRegisterRootItem,
class PeripheralRegisterHandler final : public PeripheralRegisterModel
{
Q_OBJECT
public:
explicit PeripheralRegisterHandler(DebuggerEngine *engine);
@@ -181,5 +179,4 @@ private:
DebuggerEngine * const m_engine;
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -27,11 +27,9 @@
#include <QString>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
bool interruptProcess(qint64 pID, int engineType, QString *errorMessage,
const bool engineExecutableIs64Bit = false);
} // Internal
} // GdbDebugger
} // Debugger::Internal

Some files were not shown because too many files have changed in this diff Show More