Commit 06f5d28a authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

gdb: add more UI context marker for strings, fix some style

GIT_SILENT
parent 89a5d248
......@@ -125,11 +125,11 @@ void CppDebuggerPlugin::setupToolViews()
this, QStringLiteral("org.kdevelop.debugger.ConsoleView"),Qt::BottomDockWidgetArea);
core()->uiController()->addToolView(
i18n("Disassemble/Registers"),
i18nc("@title:window", "Disassemble/Registers"),
disassemblefactory);
core()->uiController()->addToolView(
i18n("GDB"),
i18nc("@title:window", "GDB"),
gdbfactory);
#ifndef KDEV_WITH_MEMVIEW
......@@ -138,7 +138,7 @@ void CppDebuggerPlugin::setupToolViews()
memoryviewerfactory = new DebuggerToolFactory<MemoryViewerWidget, CppDebuggerPlugin>(
this, QStringLiteral("org.kdevelop.debugger.MemoryView"), Qt::BottomDockWidgetArea);
core()->uiController()->addToolView(
i18n("Memory"),
i18nc("@title:window", "Memory"),
memoryviewerfactory);
#endif
}
......
......@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Tracing Configuration</string>
<string comment="@title:window">Tracing Configuration</string>
</property>
<layout class="QGridLayout">
<item row="4" column="0" colspan="2">
......@@ -20,7 +20,7 @@
<bool>false</bool>
</property>
<property name="whatsThis">
<string>&lt;b&gt;Custom format string&lt;/b&gt;
<string comment="@info:whatsthis">&lt;b&gt;Custom format string&lt;/b&gt;
&lt;p&gt;Specify a C-style format string that will be used when printing the chosen expression. For example:
&lt;p align=&quot;center&quot;&gt; &lt;tt&gt;Tracepoint 1: g = %d&lt;/tt&gt;&lt;/p&gt;
If custom format string is not enabled, names and values of all expressions will be printed, using &quot;%d&quot; as format specifier for all expressions.</string>
......@@ -33,7 +33,7 @@ If custom format string is not enabled, names and values of all expressions will
<bool>false</bool>
</property>
<property name="text">
<string>Expressions to print:</string>
<string comment="@label">Expressions to print:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -43,11 +43,11 @@ If custom format string is not enabled, names and values of all expressions will
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="enable">
<property name="whatsThis">
<string>&lt;b&gt;Enable tracing&lt;/b&gt;
<string comment="@info:whatthis">&lt;b&gt;Enable tracing&lt;/b&gt;
&lt;p&gt;Tracing is a mechanism to automatically print values of the chosen expressions and continue execution when breakpoint is hit. You can think of it as printf debugging that does not require modifying the source.&lt;/p&gt;</string>
</property>
<property name="text">
<string>Enable tracing</string>
<string comment="@option:check">Enable tracing</string>
</property>
</widget>
</item>
......@@ -57,7 +57,7 @@ If custom format string is not enabled, names and values of all expressions will
<bool>false</bool>
</property>
<property name="text">
<string>Custom format string</string>
<string comment="@option:check">Custom format string</string>
</property>
</widget>
</item>
......
......@@ -105,7 +105,7 @@ void GdbConfigPage::saveToConfiguration( KConfigGroup cfg, KDevelop::IProject* )
QString GdbConfigPage::title() const
{
return i18n( "GDB Configuration" );
return i18nc("@title:tab", "GDB Configuration");
}
......
......@@ -26,13 +26,13 @@
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Debugger</string>
<string comment="@title:group">Debugger</string>
</property>
<layout class="QFormLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="gdbPath_label">
<property name="text">
<string>Debugger e&amp;xecutable:</string>
<string comment="@label:chooser">Debugger e&amp;xecutable:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -45,26 +45,23 @@
<item row="0" column="1">
<widget class="KUrlRequester" name="kcfg_gdbPath" native="true">
<property name="toolTip">
<string>Gdb executable</string>
<string comment="@info:tooltip">Gdb executable</string>
</property>
<property name="whatsThis">
<string>To run &quot;gdb&quot; executable from $PATH, leave this field empty. To run custom gdb, for example, for a different architecture, enter the executable name here. You can either run gdb from $PATH, but with a different name (say, &quot;arm-gdb&quot;), by typing the name here, or specify full path to the gdb executable.</string>
<string comment="@info:whatsthis">To run &quot;gdb&quot; executable from $PATH, leave this field empty. To run custom gdb, for example, for a different architecture, enter the executable name here. You can either run gdb from $PATH, but with a different name (say, &quot;arm-gdb&quot;), by typing the name here, or specify full path to the gdb executable.</string>
</property>
<property name="placeholderText" stdset="0">
<string>Override path to gdb executable</string>
<string comment="@info:placeholder">Override path to gdb executable...</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="debuggingShell_label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments&lt;/p&gt;&lt;p&gt;Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debugger --debuggerArguments. So script.sh &lt;span style=&quot; font-weight:600;&quot;&gt;must&lt;/span&gt; invoke &amp;quot;debugger&amp;quot; executable manually.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments&lt;/p&gt;&lt;p&gt;Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debugger --debuggerArguments. So script.sh &lt;span style=&quot; font-weight:600;&quot;&gt;must&lt;/span&gt; invoke &amp;quot;debugger&amp;quot; executable manually.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>She&amp;ll script:</string>
<string comment="@label:chooser">She&amp;ll script:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -77,10 +74,7 @@
<item row="1" column="1">
<widget class="KUrlRequester" name="kcfg_debuggingShell" native="true">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments&lt;/p&gt;&lt;p&gt;Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debugger --debuggerArguments. So script.sh &lt;span style=&quot; font-weight:600;&quot;&gt;must&lt;/span&gt; invoke &amp;quot;debugger&amp;quot; executable manually.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you want gdb to be executed by a special shell script, which for example properly sets the library path, insert it here e.g.: /path/to/script.sh --scriptArguments&lt;/p&gt;&lt;p&gt;Note: your script'll be invoked like this: /path/to/script.sh --scriptArguments debugger --debuggerArguments. So script.sh &lt;span style=&quot; font-weight:600;&quot;&gt;must&lt;/span&gt; invoke &amp;quot;debugger&amp;quot; executable manually.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
......@@ -90,7 +84,7 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Options</string>
<string comment="@title:group">Options</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
......@@ -99,7 +93,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Display static &amp;members:</string>
<string comment="@option:check">Display static &amp;members:</string>
</property>
<property name="buddy">
<cstring>kcfg_displayStaticMembers</cstring>
......@@ -109,8 +103,8 @@
<item row="0" column="1">
<widget class="QCheckBox" name="kcfg_displayStaticMembers">
<property name="whatsThis">
<string>Displaying static members makes GDB slower in
producing data within KDE and Qt.
<string comment="@info:whatsthis">Displaying static members makes GDB slower in
producing data with Qt-based code.
It may change the &quot;signature&quot; of the data
which QString and friends rely on,
but if you need to debug into these values then
......@@ -124,7 +118,7 @@ check this option.</string>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Display &amp;demangled names:</string>
<string comment="@option:check">Display &amp;demangled names:</string>
</property>
<property name="buddy">
<cstring>kcfg_asmDemangle</cstring>
......@@ -134,7 +128,7 @@ check this option.</string>
<item row="1" column="1">
<widget class="QCheckBox" name="kcfg_asmDemangle">
<property name="whatsThis">
<string>When displaying the disassembled code you
<string comment="@info:whatthis">When displaying the disassembled code you
can select to see the methods' mangled names.
However, non-mangled names are easier to read.</string>
</property>
......@@ -146,7 +140,7 @@ However, non-mangled names are easier to read.</string>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>S&amp;tart debugger with:</string>
<string comment="@label:listbox">S&amp;tart debugger with:</string>
</property>
<property name="buddy">
<cstring>kcfg_startWith</cstring>
......@@ -157,17 +151,17 @@ However, non-mangled names are easier to read.</string>
<widget class="QComboBox" name="kcfg_startWith">
<item>
<property name="text">
<string>Application Output</string>
<string comment="@item:inlistbox start debugger with">Application Output</string>
</property>
</item>
<item>
<property name="text">
<string>GDB Console</string>
<string comment="@item:inlistbox start debugger with">GDB Console</string>
</property>
</item>
<item>
<property name="text">
<string>Frame Stack</string>
<string comment="@item:inlistbox start debugger with">Frame Stack</string>
</property>
</item>
</widget>
......@@ -178,22 +172,22 @@ However, non-mangled names are easier to read.</string>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="whatsThis">
<string>This script is intended for the actual commands needed to connect to a remotely running executable.
<string comment="@info:whatsthis">This script is intended for the actual commands needed to connect to a remotely running executable.
shell sleep 5 wait for remote program to start
target remote ... connect to the remote debugger
continue [optional] run debugging to the first breakpoint</string>
</property>
<property name="title">
<string>Remote Debugging</string>
<string comment="@title:group">Remote Debugging</string>
</property>
<layout class="QFormLayout">
<item row="1" column="0">
<widget class="QLabel" name="runShellScript_label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to start remote application&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This shell script is run after the Gdb Config script has been sourced by gdb.&lt;/p&gt;&lt;p&gt;It's purpose is to actually start the remote process.&lt;/p&gt;&lt;p&gt;1) Find a way to execute a command remotely - rsh, ssh, telnet, ...&lt;/p&gt;&lt;p&gt;2a) Execute &amp;quot;gdbserver ... application&amp;quot; on target.&lt;/p&gt;&lt;p&gt;or if your executable contains the gdb stub:&lt;/p&gt;&lt;p&gt;2b) Execute &amp;quot;application&amp;quot; on target.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to start remote application&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This shell script is run after the Gdb Config script has been sourced by gdb.&lt;/p&gt;&lt;p&gt;It's purpose is to actually start the remote process.&lt;/p&gt;&lt;p&gt;1) Find a way to execute a command remotely - rsh, ssh, telnet, ...&lt;/p&gt;&lt;p&gt;2a) Execute &amp;quot;gdbserver ... application&amp;quot; on target.&lt;/p&gt;&lt;p&gt;or if your executable contains the gdb stub:&lt;/p&gt;&lt;p&gt;2b) Execute &amp;quot;application&amp;quot; on target.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string comment="Shell script to be executed at run time">R&amp;un shell script:</string>
<string comment="@label:chooser Shell script to be executed at run time">R&amp;un shell script:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -206,20 +200,17 @@ However, non-mangled names are easier to read.</string>
<item row="1" column="1">
<widget class="KUrlRequester" name="kcfg_runShellScript" native="true">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to start remote application&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This shell script is run after the Gdb Config script has been sourced by gdb.&lt;/p&gt;&lt;p&gt;It's purpose is to actually start the remote process.&lt;/p&gt;&lt;p&gt;1) Find a way to execute a command remotely - rsh, ssh, telnet, ...&lt;/p&gt;&lt;p&gt;2a) Execute &amp;quot;gdbserver ... application&amp;quot; on target.&lt;/p&gt;&lt;p&gt;or if your executable contains the gdb stub:&lt;/p&gt;&lt;p&gt;2b) Execute &amp;quot;application&amp;quot; on target.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to start remote application&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This shell script is run after the Gdb Config script has been sourced by gdb.&lt;/p&gt;&lt;p&gt;It's purpose is to actually start the remote process.&lt;/p&gt;&lt;p&gt;1) Find a way to execute a command remotely - rsh, ssh, telnet, ...&lt;/p&gt;&lt;p&gt;2a) Execute &amp;quot;gdbserver ... application&amp;quot; on target.&lt;/p&gt;&lt;p&gt;or if your executable contains the gdb stub:&lt;/p&gt;&lt;p&gt;2b) Execute &amp;quot;application&amp;quot; on target.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="configGdbScript_label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This script is sourced by gdb when the debugging starts.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string comment="@info:tooltip">This script is sourced by gdb when the debugging starts.</string>
</property>
<property name="text">
<string>Gdb &amp;config script:</string>
<string comment="@label:chooser">Gdb &amp;config script:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -232,20 +223,17 @@ However, non-mangled names are easier to read.</string>
<item row="2" column="1">
<widget class="KUrlRequester" name="kcfg_runGdbScript" native="true">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to connect with remote application&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;p&gt; shell sleep 5 #wait for remote program to start&lt;/p&gt;&lt;p&gt; target remote ... #connect to the remote debugger&lt;/p&gt;&lt;p&gt; continue #[optional] run debugging to the first breakpoint.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to connect with remote application&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;p&gt; shell sleep 5 #wait for remote program to start&lt;/p&gt;&lt;p&gt; target remote ... #connect to the remote debugger&lt;/p&gt;&lt;p&gt; continue #[optional] run debugging to the first breakpoint.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="runGdbScript_label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to connect with remote application&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;p&gt; shell sleep 5 #wait for remote program to start&lt;/p&gt;&lt;p&gt; target remote ... #connect to the remote debugger&lt;/p&gt;&lt;p&gt; continue #[optional] run debugging to the first breakpoint.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string comment="@info:tooltip">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Script to connect with remote application&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;p&gt; shell sleep 5 #wait for remote program to start&lt;/p&gt;&lt;p&gt; target remote ... #connect to the remote debugger&lt;/p&gt;&lt;p&gt; continue #[optional] run debugging to the first breakpoint.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string comment="Gdb script to be executed at run time.">Run &amp;gdb script:</string>
<string comment="@label:chooser Gdb script to be executed at run time.">Run &amp;gdb script:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
......@@ -258,10 +246,7 @@ However, non-mangled names are easier to read.</string>
<item row="0" column="1">
<widget class="KUrlRequester" name="kcfg_configGdbScript" native="true">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This script is sourced by gdb when the debugging starts.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
<string comment="@info:tooltip">This script is sourced by gdb when the debugging starts.</string>
</property>
</widget>
</item>
......
......@@ -59,10 +59,10 @@ GDBOutputWidget::GDBOutputWidget(CppDebuggerPlugin* plugin, QWidget *parent) :
m_maxLines(5000)
{
setWindowIcon(QIcon::fromTheme(QStringLiteral("dialog-scripts"), windowIcon()));
setWindowTitle(i18n("GDB Output"));
setWhatsThis(i18n("<b>GDB output</b><p>"
"Shows all gdb commands being executed. "
"You can also issue any other gdb command while debugging.</p>"));
setWindowTitle(i18nc("@title:window", "GDB Output"));
setWhatsThis(i18nc("@info:whatsthis", "<b>GDB output</b><p>"
"Shows all GDB commands being executed. "
"You can also issue any other GDB command while debugging.</p>"));
m_gdbView = new OutputTextEdit(this);
m_gdbView->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
......@@ -70,12 +70,12 @@ GDBOutputWidget::GDBOutputWidget(CppDebuggerPlugin* plugin, QWidget *parent) :
m_userGDBCmdEditor = new KHistoryComboBox (this);
auto* label = new QLabel(i18n("&GDB cmd:"), this);
auto* label = new QLabel(i18nc("@label:listbox", "&GDB command:"), this);
label->setBuddy(m_userGDBCmdEditor);
m_Interrupt = new QToolButton( this );
m_Interrupt->setIcon ( QIcon::fromTheme( QStringLiteral("media-playback-pause") ) );
m_Interrupt->setToolTip( i18n ( "Pause execution of the app to enter gdb commands" ) );
m_Interrupt->setToolTip(i18nc("@info:tooltip", "Pause execution of the app to enter GDB commands"));
auto *topLayout = new QVBoxLayout(this);
topLayout->addWidget(m_gdbView);
......@@ -381,19 +381,19 @@ void GDBOutputWidget::contextMenuEvent(QContextMenuEvent * e)
{
QScopedPointer<QMenu> popup(new QMenu(this));
QAction* action = popup->addAction(i18n("Show Internal Commands"),
QAction* action = popup->addAction(i18nc("@action:inmenu", "Show Internal Commands"),
this,
SLOT(toggleShowInternalCommands()));
action->setCheckable(true);
action->setChecked(m_showInternalCommands);
action->setWhatsThis(i18n(
action->setWhatsThis(i18nc("@info:tooltip",
"Controls if commands issued internally by KDevelop "
"will be shown or not.<br>"
"This option will affect only future commands, it will not "
"add or remove already issued commands from the view."));
popup->addAction(i18n("Copy All"),
popup->addAction(i18nc("@action:inmenu", "Copy All"),
this,
SLOT(copyAll()));
......@@ -429,13 +429,13 @@ void OutputTextEdit::contextMenuEvent(QContextMenuEvent * event)
{
QScopedPointer<QMenu> popup(createStandardContextMenu());
QAction* action = popup->addAction(i18n("Show Internal Commands"),
QAction* action = popup->addAction(i18nc("@action:inmenu", "Show Internal Commands"),
parent(),
SLOT(toggleShowInternalCommands()));
action->setCheckable(true);
action->setChecked(static_cast<GDBOutputWidget*>(parent())->showInternalCommands());
action->setWhatsThis(i18n(
action->setWhatsThis(i18nc("@info:tooltip",
"Controls if commands issued internally by KDevelop "
"will be shown or not.<br>"
"This option will affect only future commands, it will not "
......
......@@ -71,10 +71,10 @@ class MemoryRangeSelector : public QWidget
l->addLayout(formLayout);
startAddressLineEdit = new QLineEdit(this);
formLayout->addRow(i18n("Start:"), startAddressLineEdit);
formLayout->addRow(i18nc("@label:textbox", "Start:"), startAddressLineEdit);
amountLineEdit = new QLineEdit(this);
formLayout->addRow(i18n("Amount:"), amountLineEdit);
formLayout->addRow(i18nc("@label:textbox", "Amount:"), amountLineEdit);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, this);
l->addWidget(buttonBox);
......@@ -101,7 +101,7 @@ MemoryView::MemoryView(QWidget* parent)
m_memViewView(nullptr),
m_debuggerState(0)
{
setWindowTitle(i18n("Memory view"));
setWindowTitle(i18nc("@title:window", "Memory View"));
initWidget();
......@@ -267,7 +267,7 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
bool app_running = !(m_debuggerState & s_appNotStarted);
QAction* reload = menu.addAction(i18n("&Reload"));
QAction* reload = menu.addAction(i18nc("@action::inmenu", "&Reload"));
reload->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
reload->setEnabled(app_running && !m_memData.isEmpty() );
......@@ -276,25 +276,25 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
if (m_memViewModel && m_memViewView)
{
// make Format menu with action group
QMenu* formatMenu = menu.addMenu(i18n("&Format"));
QMenu* formatMenu = menu.addMenu(i18nc("@title:menu", "&Format"));
formatGroup = new QActionGroup(formatMenu);
QAction *binary = formatGroup->addAction(i18n("&Binary"));
QAction *binary = formatGroup->addAction(i18nc("@item:inmenu display format", "&Binary"));
binary->setData(Okteta::ByteArrayColumnView::BinaryCoding);
binary->setShortcut(Qt::Key_B);
formatMenu->addAction(binary);
QAction *octal = formatGroup->addAction(i18n("&Octal"));
QAction *octal = formatGroup->addAction(i18nc("@item:inmenu display format", "&Octal"));
octal->setData(Okteta::ByteArrayColumnView::OctalCoding);
octal->setShortcut(Qt::Key_O);
formatMenu->addAction(octal);
QAction *decimal = formatGroup->addAction(i18n("&Decimal"));
QAction *decimal = formatGroup->addAction(i18nc("@item:inmenu display format", "&Decimal"));
decimal->setData(Okteta::ByteArrayColumnView::DecimalCoding);
decimal->setShortcut(Qt::Key_D);
formatMenu->addAction(decimal);
QAction *hex = formatGroup->addAction(i18n("&Hexadecimal"));
QAction *hex = formatGroup->addAction(i18nc("@item:inmenu display format", "&Hexadecimal"));
hex->setData(Okteta::ByteArrayColumnView::HexadecimalCoding);
hex->setShortcut(Qt::Key_H);
formatMenu->addAction(hex);
......@@ -308,35 +308,35 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
// make Grouping menu with action group
QMenu* groupingMenu = menu.addMenu(i18n("&Grouping"));
QMenu* groupingMenu = menu.addMenu(i18nc("@title:menu", "&Grouping"));
groupingGroup = new QActionGroup(groupingMenu);
QAction *group0 = groupingGroup->addAction(i18n("&0"));
QAction *group0 = groupingGroup->addAction(i18nc("@item:inmenu no byte grouping", "&0"));
group0->setData(0);
group0->setShortcut(Qt::Key_0);
groupingMenu->addAction(group0);
QAction *group1 = groupingGroup->addAction(i18n("&1"));
QAction *group1 = groupingGroup->addAction(i18nc("@item:inmenu byte group size", "&1"));
group1->setData(1);
group1->setShortcut(Qt::Key_1);
groupingMenu->addAction(group1);
QAction *group2 = groupingGroup->addAction(i18n("&2"));
QAction *group2 = groupingGroup->addAction(i18nc("@item:inmenu byte group size", "&2"));
group2->setData(2);
group2->setShortcut(Qt::Key_2);
groupingMenu->addAction(group2);
QAction *group4 = groupingGroup->addAction(i18n("&4"));
QAction *group4 = groupingGroup->addAction(i18nc("@item:inmenu byte group size", "&4"));
group4->setData(4);
group4->setShortcut(Qt::Key_4);
groupingMenu->addAction(group4);
QAction *group8 = groupingGroup->addAction(i18n("&8"));
QAction *group8 = groupingGroup->addAction(i18nc("@item:inmenu byte group size", "&8"));
group8->setData(8);
group8->setShortcut(Qt::Key_8);
groupingMenu->addAction(group8);
QAction *group16 = groupingGroup->addAction(i18n("1&6"));
QAction *group16 = groupingGroup->addAction(i18nc("@item:inmenu byte group size", "1&6"));
group16->setData(16);
group16->setShortcut(Qt::Key_6);
groupingMenu->addAction(group16);
......@@ -349,15 +349,15 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
}
}
QAction* write = menu.addAction(i18n("Write changes"));
QAction* write = menu.addAction(i18nc("@action:inmenu", "Write Changes"));
write->setIcon(QIcon::fromTheme(QStringLiteral("document-save")));
write->setEnabled(app_running && m_memViewView && m_memViewView->isModified());
QAction* range = menu.addAction(i18n("Change memory range"));
QAction* range = menu.addAction(i18nc("@action:inmenu", "Change Memory Range"));
range->setEnabled(app_running && !m_rangeSelector->isVisible());
range->setIcon(QIcon::fromTheme(QStringLiteral("document-edit")));
QAction* close = menu.addAction(i18n("Close this view"));
QAction* close = menu.addAction(i18nc("@action:inmenu", "Close View"));
close->setIcon(QIcon::fromTheme(QStringLiteral("window-close")));
......@@ -424,12 +424,12 @@ MemoryViewerWidget::MemoryViewerWidget(CppDebuggerPlugin* /*plugin*/, QWidget* p
: QWidget(parent)
{
setWindowIcon(QIcon::fromTheme(QStringLiteral("server-database"), windowIcon()));
setWindowTitle(i18n("Memory viewer"));
setWindowTitle(i18nc("@title:window", "Memory Viewer"));
auto * newMemoryViewerAction = new QAction(this);
newMemoryViewerAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
newMemoryViewerAction->setText(i18n("New memory viewer"));
newMemoryViewerAction->setToolTip(i18nc("@info:tooltip", "Open a new memory viewer."));
newMemoryViewerAction->setText(i18nc("@action", "New Memory Viewer"));
newMemoryViewerAction->setToolTip(i18nc("@info:tooltip", "Open a new memory viewer"));
newMemoryViewerAction->setIcon(QIcon::fromTheme(QStringLiteral("window-new")));
connect(newMemoryViewerAction, &QAction::triggered, this , &MemoryViewerWidget::slotAddMemoryView);
addAction(newMemoryViewerAction);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment