diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-05-12 17:03:34 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-05-17 07:45:21 +0000 |
commit | dfa7e492a192cc376ba153bcfdc855aead6b8cf9 (patch) | |
tree | 999d1bd3eab0a5793b596879be7f8d8cf65acba7 /src/plugins/debugger/commonoptionspage.cpp | |
parent | b60c02bcc00a4a8549e16dd780bc74c0f8468c4d (diff) |
Debugger: Move debugging helpers settings to Locals & Expressions
They're no longer GDB only.
Change-Id: I3aa00be50c85a90c8f81ab9c04c6bb0ec74b7785
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/debugger/commonoptionspage.cpp')
-rw-r--r-- | src/plugins/debugger/commonoptionspage.cpp | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 644fdabbda6..2f510a4184f 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -30,9 +30,12 @@ #include "debuggercore.h" #include <coreplugin/icore.h> +#include <coreplugin/variablechooser.h> + #include <utils/hostosinfo.h> -#include <utils/savedaction.h> +#include <utils/pathchooser.h> #include <utils/qtcassert.h> +#include <utils/savedaction.h> #include <QCheckBox> #include <QCoreApplication> @@ -40,6 +43,7 @@ #include <QHBoxLayout> #include <QLabel> #include <QSpinBox> +#include <QTextEdit> #include <QTextStream> using namespace Core; @@ -307,6 +311,25 @@ QWidget *LocalsAndExpressionsOptionsPage::widget() "std::map in the "Locals and Expressions" view. ") + QLatin1String("</p></body></html>")); + auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox); + groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization")); + groupBoxCustomDumperCommands->setToolTip(tr( + "<html><head/><body><p>Python commands entered here will be executed after Qt Creator's " + "debugging helpers have been loaded and fully initialized. You can load additional " + "debugging helpers or modify existing ones here.</p></body></html>")); + + auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands); + textEditCustomDumperCommands->setAcceptRichText(false); + textEditCustomDumperCommands->setToolTip(groupBoxCustomDumperCommands->toolTip()); + + auto groupBoxExtraDumperFile = new QGroupBox(debuggingHelperGroupBox); + groupBoxExtraDumperFile->setTitle(tr("Extra Debugging Helpers")); + groupBoxExtraDumperFile->setToolTip(tr( + "Path to a Python file containing additional data dumpers.")); + + auto pathChooserExtraDumperFile = new Utils::PathChooser(groupBoxExtraDumperFile); + pathChooserExtraDumperFile->setExpectedKind(Utils::PathChooser::File); + auto checkBoxUseCodeModel = new QCheckBox(debuggingHelperGroupBox); auto checkBoxShowThreadNames = new QCheckBox(debuggingHelperGroupBox); auto checkBoxShowStdNamespace = new QCheckBox(m_widget); @@ -325,10 +348,16 @@ QWidget *LocalsAndExpressionsOptionsPage::widget() spinBoxDisplayStringLimit->setSingleStep(10); spinBoxDisplayStringLimit->setValue(100); - auto verticalLayout = new QVBoxLayout(debuggingHelperGroupBox); - verticalLayout->addWidget(label); - verticalLayout->addWidget(checkBoxUseCodeModel); - verticalLayout->addWidget(checkBoxShowThreadNames); + auto chooser = new VariableChooser(m_widget); + chooser->addSupportedWidget(textEditCustomDumperCommands); + chooser->addSupportedWidget(pathChooserExtraDumperFile->lineEdit()); + + auto gridLayout = new QGridLayout(debuggingHelperGroupBox); + gridLayout->addWidget(label, 0, 0, 1, 1); + gridLayout->addWidget(checkBoxUseCodeModel, 1, 0, 1, 1); + gridLayout->addWidget(checkBoxShowThreadNames, 2, 0, 1, 1); + gridLayout->addWidget(groupBoxExtraDumperFile, 3, 0, 1, 1); + gridLayout->addWidget(groupBoxCustomDumperCommands, 0, 1, 4, 1); auto layout1 = new QFormLayout; layout1->addItem(new QSpacerItem(10, 10)); @@ -348,8 +377,16 @@ QWidget *LocalsAndExpressionsOptionsPage::widget() layout->addLayout(lowerLayout); layout->addStretch(); + auto customDumperLayout = new QGridLayout(groupBoxCustomDumperCommands); + customDumperLayout->addWidget(textEditCustomDumperCommands, 0, 0, 1, 1); + + auto extraDumperLayout = new QGridLayout(groupBoxExtraDumperFile); + extraDumperLayout->addWidget(pathChooserExtraDumperFile, 0, 0, 1, 1); + m_group.clear(); m_group.insert(action(UseDebuggingHelpers), debuggingHelperGroupBox); + m_group.insert(action(ExtraDumperFile), pathChooserExtraDumperFile); + m_group.insert(action(ExtraDumperCommands), textEditCustomDumperCommands); m_group.insert(action(UseCodeModel), checkBoxUseCodeModel); m_group.insert(action(ShowThreadNames), checkBoxShowThreadNames); m_group.insert(action(ShowStdNamespace), checkBoxShowStdNamespace); |