Commit a3e54f76 authored by Nikita Baryshnikov's avatar Nikita Baryshnikov Committed by hjk
Browse files

Debugger: Word wrap several action tooltips



Change-Id: I87e8049869b3d10d205c2e25e7c1e83eb99a4407
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 508da18c
...@@ -206,7 +206,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) ...@@ -206,7 +206,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
m_labelOneShot->setBuddy(m_checkBoxOneShot); m_labelOneShot->setBuddy(m_checkBoxOneShot);
const QString pathToolTip = const QString pathToolTip =
tr("<html><head/><body><p>Determines how the path is specified " tr("<p>Determines how the path is specified "
"when setting breakpoints:</p><ul>" "when setting breakpoints:</p><ul>"
"<li><i>Use Engine Default</i>: Preferred setting of the " "<li><i>Use Engine Default</i>: Preferred setting of the "
"debugger engine.</li>" "debugger engine.</li>"
...@@ -217,8 +217,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) ...@@ -217,8 +217,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
"useful when using a source tree whose location does " "useful when using a source tree whose location does "
"not match the one used when building the modules. " "not match the one used when building the modules. "
"It is the engine default for GDB as using full paths can " "It is the engine default for GDB as using full paths can "
"be slow with this engine.</li>" "be slow with this engine.</li></ul>");
"</ul></body></html>");
m_comboBoxPathUsage = new QComboBox(groupBoxAdvanced); m_comboBoxPathUsage = new QComboBox(groupBoxAdvanced);
m_comboBoxPathUsage->addItem(tr("Use Engine Default")); m_comboBoxPathUsage->addItem(tr("Use Engine Default"));
m_comboBoxPathUsage->addItem(tr("Use Full Path")); m_comboBoxPathUsage->addItem(tr("Use Full Path"));
...@@ -229,8 +228,8 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) ...@@ -229,8 +228,8 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
m_labelUseFullPath->setToolTip(pathToolTip); m_labelUseFullPath->setToolTip(pathToolTip);
const QString moduleToolTip = const QString moduleToolTip =
tr("Specifying the module (base name of the library or executable)\n" tr("<p>Specifying the module (base name of the library or executable) "
"for function or file type breakpoints can significantly speed up\n" "for function or file type breakpoints can significantly speed up "
"debugger start-up times (CDB, LLDB)."); "debugger start-up times (CDB, LLDB).");
m_lineEditModule = new QLineEdit(groupBoxAdvanced); m_lineEditModule = new QLineEdit(groupBoxAdvanced);
m_lineEditModule->setToolTip(moduleToolTip); m_lineEditModule->setToolTip(moduleToolTip);
...@@ -239,7 +238,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent) ...@@ -239,7 +238,7 @@ BreakpointDialog::BreakpointDialog(Breakpoint b, QWidget *parent)
m_labelModule->setToolTip(moduleToolTip); m_labelModule->setToolTip(moduleToolTip);
const QString commandsToolTip = const QString commandsToolTip =
tr("Debugger commands to be executed when the breakpoint is hit.\n" tr("<p>Debugger commands to be executed when the breakpoint is hit. "
"This feature is only available for GDB."); "This feature is only available for GDB.");
m_textEditCommands = new SmallTextEdit(groupBoxAdvanced); m_textEditCommands = new SmallTextEdit(groupBoxAdvanced);
m_textEditCommands->setToolTip(commandsToolTip); m_textEditCommands->setToolTip(commandsToolTip);
......
...@@ -177,7 +177,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -177,7 +177,7 @@ DebuggerSettings::DebuggerSettings()
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
item->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_singleinstructionmode.png"))); item->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_singleinstructionmode.png")));
item->setToolTip(tr("This switches the debugger to instruction-wise " item->setToolTip(tr("<p>This switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single " "operation mode. In this mode, stepping operates on single "
"instructions and the source location view also shows the " "instructions and the source location view also shows the "
"disassembled instructions.")); "disassembled instructions."));
...@@ -189,7 +189,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -189,7 +189,7 @@ DebuggerSettings::DebuggerSettings()
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(true); item->setDefaultValue(true);
item->setIcon(QIcon(QLatin1String(Core::Constants::ICON_LINK))); item->setIcon(QIcon(QLatin1String(Core::Constants::ICON_LINK)));
item->setToolTip(tr("This switches the debugger to native-mixed " item->setToolTip(tr("<p>This switches the debugger to native-mixed "
"operation mode. In this mode, stepping and data display will " "operation mode. In this mode, stepping and data display will "
"be handled by the native debugger backend (GDB, LLDB or CDB) " "be handled by the native debugger backend (GDB, LLDB or CDB) "
"for C++, QML and JS sources.")); "for C++, QML and JS sources."));
...@@ -201,7 +201,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -201,7 +201,7 @@ DebuggerSettings::DebuggerSettings()
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(true); item->setDefaultValue(true);
item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers")); item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers"));
item->setToolTip(tr("This switches the Locals&&Watchers view to " item->setToolTip(tr("<p>This switches the Locals&&Watchers view to "
"automatically dereference pointers. This saves a level in the " "automatically dereference pointers. This saves a level in the "
"tree view, but also loses data for the now-missing intermediate " "tree view, but also loses data for the now-missing intermediate "
"level.")); "level."));
...@@ -262,7 +262,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -262,7 +262,7 @@ DebuggerSettings::DebuggerSettings()
item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace")); item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace"));
item->setText(tr("Show \"std::\" Namespace in Types")); item->setText(tr("Show \"std::\" Namespace in Types"));
item->setDialogText(tr("Show \"std::\" namespace in types")); item->setDialogText(tr("Show \"std::\" namespace in types"));
item->setToolTip(tr("Shows \"std::\" prefix for types from the standard library.")); item->setToolTip(tr("<p>Shows \"std::\" prefix for types from the standard library."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(true); item->setDefaultValue(true);
item->setValue(true); item->setValue(true);
...@@ -272,7 +272,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -272,7 +272,7 @@ DebuggerSettings::DebuggerSettings()
item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace")); item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace"));
item->setText(tr("Show Qt's Namespace in Types")); item->setText(tr("Show Qt's Namespace in Types"));
item->setDialogText(tr("Show Qt's namespace in types")); item->setDialogText(tr("Show Qt's namespace in types"));
item->setToolTip(tr("Shows Qt namespace prefix for Qt types. This is only " item->setToolTip(tr("<p>Shows Qt namespace prefix for Qt types. This is only "
"relevant if Qt was configured with \"-qtnamespace\".")); "relevant if Qt was configured with \"-qtnamespace\"."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(true); item->setDefaultValue(true);
...@@ -302,7 +302,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -302,7 +302,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel")); item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
item->setDialogText(tr("Use code model")); item->setDialogText(tr("Use code model"));
item->setToolTip(tr("Selecting this causes the C++ Code Model being asked " item->setToolTip(tr("<p>Selecting this causes the C++ Code Model being asked "
"for variable scope information. This might result in slightly faster " "for variable scope information. This might result in slightly faster "
"debugger operation but may fail for optimized code.")); "debugger operation but may fail for optimized code."));
item->setCheckable(true); item->setCheckable(true);
...@@ -312,7 +312,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -312,7 +312,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("ShowThreadNames")); item->setSettingsKey(debugModeGroup, QLatin1String("ShowThreadNames"));
item->setToolTip(tr("Displays names of QThread based threads.")); item->setToolTip(tr("<p>Displays names of QThread based threads."));
item->setDialogText(tr("Display thread names")); item->setDialogText(tr("Display thread names"));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
...@@ -329,7 +329,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -329,7 +329,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setText(tr("Adjust Breakpoint Locations")); item->setText(tr("Adjust Breakpoint Locations"));
item->setToolTip(tr("Not all source code lines generate " item->setToolTip(tr("<p>Not all source code lines generate "
"executable code. Putting a breakpoint on such a line acts as " "executable code. Putting a breakpoint on such a line acts as "
"if the breakpoint was set on the next line that generated code. " "if the breakpoint was set on the next line that generated code. "
"Selecting 'Adjust Breakpoint Locations' shifts the red " "Selecting 'Adjust Breakpoint Locations' shifts the red "
...@@ -514,7 +514,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -514,7 +514,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips")); item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
item->setText(tr("Use tooltips in main editor when debugging")); item->setText(tr("Use tooltips in main editor when debugging"));
item->setToolTip(tr("Checking this will enable tooltips for variable " item->setToolTip(tr("<p>Checking this will enable tooltips for variable "
"values during debugging. Since this can slow down debugging and " "values during debugging. Since this can slow down debugging and "
"does not provide reliable information as it does not use scope " "does not provide reliable information as it does not use scope "
"information, it is switched off by default.")); "information, it is switched off by default."));
...@@ -525,7 +525,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -525,7 +525,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView")); item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView"));
item->setText(tr("Use Tooltips in Locals View when Debugging")); item->setText(tr("Use Tooltips in Locals View when Debugging"));
item->setToolTip(tr("Checking this will enable tooltips in the locals " item->setToolTip(tr("<p>Checking this will enable tooltips in the locals "
"view during debugging.")); "view during debugging."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
...@@ -534,7 +534,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -534,7 +534,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView")); item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
item->setText(tr("Use Tooltips in Breakpoints View when Debugging")); item->setText(tr("Use Tooltips in Breakpoints View when Debugging"));
item->setToolTip(tr("Checking this will enable tooltips in the breakpoints " item->setToolTip(tr("<p>Checking this will enable tooltips in the breakpoints "
"view during debugging.")); "view during debugging."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
...@@ -543,7 +543,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -543,7 +543,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView")); item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
item->setText(tr("Use Tooltips in Stack View when Debugging")); item->setText(tr("Use Tooltips in Stack View when Debugging"));
item->setToolTip(tr("Checking this will enable tooltips in the stack " item->setToolTip(tr("<p>Checking this will enable tooltips in the stack "
"view during debugging.")); "view during debugging."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(true); item->setDefaultValue(true);
...@@ -552,7 +552,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -552,7 +552,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView")); item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView"));
item->setText(tr("Show Address Data in Breakpoints View when Debugging")); item->setText(tr("Show Address Data in Breakpoints View when Debugging"));
item->setToolTip(tr("Checking this will show a column with address " item->setToolTip(tr("<p>Checking this will show a column with address "
"information in the breakpoint view during debugging.")); "information in the breakpoint view during debugging."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
...@@ -561,7 +561,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -561,7 +561,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView")); item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView"));
item->setText(tr("Show Address Data in Stack View when Debugging")); item->setText(tr("Show Address Data in Stack View when Debugging"));
item->setToolTip(tr("Checking this will show a column with address " item->setToolTip(tr("<p>Checking this will show a column with address "
"information in the stack view during debugging.")); "information in the stack view during debugging."));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
...@@ -624,7 +624,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -624,7 +624,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit")); item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit"));
item->setToolTip(tr("The maximum length of string entries in the " item->setToolTip(tr("<p>The maximum length of string entries in the "
"Locals and Expressions pane. Longer than that are cut off " "Locals and Expressions pane. Longer than that are cut off "
"and displayed with an ellipsis attached.")); "and displayed with an ellipsis attached."));
item->setDefaultValue(100); item->setDefaultValue(100);
...@@ -632,7 +632,7 @@ DebuggerSettings::DebuggerSettings() ...@@ -632,7 +632,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength")); item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength"));
item->setToolTip(tr("The maximum length for strings in separated windows. " item->setToolTip(tr("<p>The maximum length for strings in separated windows. "
"Longer strings are cut off and displayed with an ellipsis attached.")); "Longer strings are cut off and displayed with an ellipsis attached."));
item->setDefaultValue(10000); item->setDefaultValue(10000);
insertItem(MaximalStringLength, item); insertItem(MaximalStringLength, item);
......
...@@ -210,7 +210,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent ...@@ -210,7 +210,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
m_targetChooser(new PathChooser(this)) m_targetChooser(new PathChooser(this))
{ {
setTitle(tr("Source Paths Mapping")); setTitle(tr("Source Paths Mapping"));
setToolTip(tr("<html><head/><body><p>Mappings of source file folders to " setToolTip(tr("<p>Mappings of source file folders to "
"be used in the debugger can be entered here.</p>" "be used in the debugger can be entered here.</p>"
"<p>This is useful when using a copy of the source tree " "<p>This is useful when using a copy of the source tree "
"at a location different from the one " "at a location different from the one "
...@@ -220,8 +220,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent ...@@ -220,8 +220,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
"open parenthesis, Qt Creator matches the paths in the ELF with the " "open parenthesis, Qt Creator matches the paths in the ELF with the "
"regular expression to automatically determine the source path.</p>" "regular expression to automatically determine the source path.</p>"
"<p>Example: <b>(/home/.*/Project)/KnownSubDir -> D:\\Project</b> will " "<p>Example: <b>(/home/.*/Project)/KnownSubDir -> D:\\Project</b> will "
"substitute ELF built by any user to your local project directory.</p>" "substitute ELF built by any user to your local project directory.</p>"));
"</body></html>"));
// Top list/left part. // Top list/left part.
m_treeView->setRootIsDecorated(false); m_treeView->setRootIsDecorated(false);
m_treeView->setUniformRowHeights(true); m_treeView->setUniformRowHeights(true);
...@@ -236,7 +235,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent ...@@ -236,7 +235,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
buttonLayout->addWidget(m_addButton); buttonLayout->addWidget(m_addButton);
buttonLayout->addWidget(m_addQtButton); buttonLayout->addWidget(m_addQtButton);
m_addQtButton->setVisible(sizeof(qtBuildPaths) > 0); m_addQtButton->setVisible(sizeof(qtBuildPaths) > 0);
m_addQtButton->setToolTip(tr("Add a mapping for Qt's source folders " m_addQtButton->setToolTip(tr("<p>Add a mapping for Qt's source folders "
"when using an unpatched version of Qt.")); "when using an unpatched version of Qt."));
buttonLayout->addWidget(m_removeButton); buttonLayout->addWidget(m_removeButton);
connect(m_addButton, &QAbstractButton::clicked, connect(m_addButton, &QAbstractButton::clicked,
...@@ -260,7 +259,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent ...@@ -260,7 +259,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
connect(m_targetChooser, &PathChooser::changed, connect(m_targetChooser, &PathChooser::changed,
this, &DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged); this, &DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged);
auto editLayout = new QFormLayout; auto editLayout = new QFormLayout;
const QString sourceToolTip = tr("The source path contained in the " const QString sourceToolTip = tr("<p>The source path contained in the "
"debug information of the executable as reported by the debugger"); "debug information of the executable as reported by the debugger");
auto editSourceLabel = new QLabel(tr("&Source path:")); auto editSourceLabel = new QLabel(tr("&Source path:"));
editSourceLabel->setToolTip(sourceToolTip); editSourceLabel->setToolTip(sourceToolTip);
...@@ -268,7 +267,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent ...@@ -268,7 +267,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
editSourceLabel->setBuddy(m_sourceLineEdit); editSourceLabel->setBuddy(m_sourceLineEdit);
editLayout->addRow(editSourceLabel, m_sourceLineEdit); editLayout->addRow(editSourceLabel, m_sourceLineEdit);
const QString targetToolTip = tr("The actual location of the source " const QString targetToolTip = tr("<p>The actual location of the source "
"tree on the local machine"); "tree on the local machine");
auto editTargetLabel = new QLabel(tr("&Target path:")); auto editTargetLabel = new QLabel(tr("&Target path:"));
editTargetLabel->setToolTip(targetToolTip); editTargetLabel->setToolTip(targetToolTip);
......
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