diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 74fc1403af08677cfe8a037326e0ee53ee6c7235..c429db5cce7a2a64250b2aa44337383800647910 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -35,8 +35,13 @@ #include #include +#include #include +#include +#include +#include +#include #include #include @@ -47,9 +52,41 @@ using namespace ProjectExplorer; namespace Debugger { namespace Internal { +class CommonOptionsPageWidget : public QWidget +{ +public: + explicit CommonOptionsPageWidget(const QSharedPointer &group); + + GlobalDebuggerOptions globalOptions() const; + void setGlobalOptions(const GlobalDebuggerOptions &go); + +private: + QCheckBox *checkBoxUseAlternatingRowColors; + QCheckBox *checkBoxFontSizeFollowsEditor; + QCheckBox *checkBoxUseToolTipsInMainEditor; + QCheckBox *checkBoxListSourceFiles; + QCheckBox *checkBoxCloseBuffersOnExit; + QCheckBox *checkBoxSwitchModeOnExit; + QCheckBox *checkBoxBringToForegroundOnInterrrupt; + QCheckBox *checkBoxShowQmlObjectTree; + QCheckBox *checkBoxBreakpointsFullPath; + QCheckBox *checkBoxRegisterForPostMortem; + QCheckBox *checkBoxWarnOnReleaseBuilds; + QCheckBox *checkBoxKeepEditorStationaryWhileStepping; + QLabel *labelMaximalStackDepth; + QLabel *labelDisplayStringLimit; + QLabel *labelMaximalStringLength; + QSpinBox *spinBoxMaximalStackDepth; + QSpinBox *spinBoxMaximalStringLength; + QSpinBox *spinBoxDisplayStringLimit; + + DebuggerSourcePathMappingWidget *sourcesMappingWidget; + const QSharedPointer m_group; +}; + CommonOptionsPageWidget::CommonOptionsPageWidget - (const QSharedPointer &group, QWidget *parent) - : QWidget(parent), m_group(group) + (const QSharedPointer &group) + : m_group(group) { QGroupBox *behaviorBox = new QGroupBox(this); behaviorBox->setTitle(tr("Behavior")); @@ -309,6 +346,7 @@ QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *functio return result; } + /////////////////////////////////////////////////////////////////////// // // LocalsAndExpressionsOptionsPage @@ -340,28 +378,62 @@ QWidget *LocalsAndExpressionsOptionsPage::widget() { if (!m_widget) { m_widget = new QWidget; - m_ui.setupUi(m_widget); - - m_group.clear(); DebuggerCore *dc = debuggerCore(); - m_group.insert(dc->action(UseDebuggingHelpers), - m_ui.debuggingHelperGroupBox); - - m_group.insert(dc->action(UseCodeModel), - m_ui.checkBoxUseCodeModel); - m_ui.checkBoxUseCodeModel->setToolTip(dc->action(UseCodeModel)->toolTip()); - - m_group.insert(dc->action(ShowThreadNames), - m_ui.checkBoxShowThreadNames); - m_group.insert(dc->action(ShowStdNamespace), m_ui.checkBoxShowStdNamespace); - m_group.insert(dc->action(ShowQtNamespace), m_ui.checkBoxShowQtNamespace); + QGroupBox *debuggingHelperGroupBox = new QGroupBox(m_widget); + debuggingHelperGroupBox->setTitle(tr("Use Debugging Helper")); + debuggingHelperGroupBox->setCheckable(true); + + QLabel *label = new QLabel(debuggingHelperGroupBox); + label->setTextFormat(Qt::AutoText); + label->setWordWrap(true); + label->setText(QLatin1String("\n

") + + tr("The debugging helper is only used to produce a nice " + "display of objects of certain types like QString or " + "std::map in the "Locals and Expressions" view. " + "It is not strictly necessary for debugging with Qt Creator.") + + QLatin1String("

")); + + QCheckBox *checkBoxUseCodeModel = new QCheckBox(debuggingHelperGroupBox); + checkBoxUseCodeModel->setText(tr("Use code model")); + checkBoxUseCodeModel->setToolTip(dc->action(UseCodeModel)->toolTip()); + checkBoxUseCodeModel->setToolTip(tr("Makes use of Qt Creator's code model " + "to find out if a variable has already been assigned a " + "value at the point the debugger interrupts.")); + + QCheckBox *checkBoxShowThreadNames = new QCheckBox(debuggingHelperGroupBox); + checkBoxShowThreadNames->setToolTip(tr("Displays names of QThread based threads.")); + checkBoxShowThreadNames->setText(tr("Display thread names")); + + QCheckBox *checkBoxShowStdNamespace = new QCheckBox(m_widget); + checkBoxShowStdNamespace->setToolTip(tr("Shows 'std::' prefix for types from the standard library.")); + checkBoxShowStdNamespace->setText(tr("Show \"std::\" namespace for types")); + + QCheckBox *checkBoxShowQtNamespace = new QCheckBox(m_widget); + checkBoxShowQtNamespace->setToolTip(tr("Shows Qt namespace prefix for Qt types. This is only relevant if Qt was configured with '-qtnamespace'.")); + checkBoxShowQtNamespace->setText(tr("Qt's namespace for types")); + + QVBoxLayout *verticalLayout = new QVBoxLayout(debuggingHelperGroupBox); + verticalLayout->addWidget(label); + verticalLayout->addWidget(checkBoxUseCodeModel); + verticalLayout->addWidget(checkBoxShowThreadNames); + + QVBoxLayout *layout = new QVBoxLayout(m_widget); + layout->addWidget(debuggingHelperGroupBox); + layout->addWidget(checkBoxShowStdNamespace); + layout->addWidget(checkBoxShowQtNamespace); + layout->addStretch(); + m_group.clear(); + m_group.insert(dc->action(UseDebuggingHelpers), debuggingHelperGroupBox); + m_group.insert(dc->action(UseCodeModel), checkBoxUseCodeModel); + m_group.insert(dc->action(ShowThreadNames), checkBoxShowThreadNames); + m_group.insert(dc->action(ShowStdNamespace), checkBoxShowStdNamespace); + m_group.insert(dc->action(ShowQtNamespace), checkBoxShowQtNamespace); #ifndef QT_DEBUG #if 0 - cmd = am->registerAction(m_dumpLogAction, - DUMP_LOG, globalcontext); + cmd = am->registerAction(m_dumpLogAction, DUMP_LOG, globalcontext); //cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L"))); cmd->setDefaultKeySequence(QKeySequence(QCoreApplication::translate("Debugger", "Ctrl+Shift+F11"))); mdebug->addAction(cmd); diff --git a/src/plugins/debugger/commonoptionspage.h b/src/plugins/debugger/commonoptionspage.h index b3823de55cdd84aae5f3f80564abcb864bd02351..ea87caa9c20dbb91119d8af145c5c7644523b5f9 100644 --- a/src/plugins/debugger/commonoptionspage.h +++ b/src/plugins/debugger/commonoptionspage.h @@ -31,7 +31,6 @@ #define DEBUGGER_COMMONOPTIONSPAGE_H #include "debuggersourcepathmappingwidget.h" -#include "ui_localsandexpressionsoptionspage.h" #include #include @@ -47,6 +46,7 @@ namespace Debugger { namespace Internal { class GlobalDebuggerOptions; +class CommonOptionsPageWidget; /////////////////////////////////////////////////////////////////////// // @@ -54,39 +54,6 @@ class GlobalDebuggerOptions; // /////////////////////////////////////////////////////////////////////// -class CommonOptionsPageWidget : public QWidget -{ - Q_OBJECT -public: - explicit CommonOptionsPageWidget(const QSharedPointer &group, QWidget *parent = 0); - - GlobalDebuggerOptions globalOptions() const; - void setGlobalOptions(const GlobalDebuggerOptions &go); - -private: - QCheckBox *checkBoxUseAlternatingRowColors; - QCheckBox *checkBoxFontSizeFollowsEditor; - QCheckBox *checkBoxUseToolTipsInMainEditor; - QCheckBox *checkBoxListSourceFiles; - QCheckBox *checkBoxCloseBuffersOnExit; - QCheckBox *checkBoxSwitchModeOnExit; - QCheckBox *checkBoxBringToForegroundOnInterrrupt; - QCheckBox *checkBoxShowQmlObjectTree; - QCheckBox *checkBoxBreakpointsFullPath; - QCheckBox *checkBoxRegisterForPostMortem; - QCheckBox *checkBoxWarnOnReleaseBuilds; - QCheckBox *checkBoxKeepEditorStationaryWhileStepping; - QLabel *labelMaximalStackDepth; - QLabel *labelDisplayStringLimit; - QLabel *labelMaximalStringLength; - QSpinBox *spinBoxMaximalStackDepth; - QSpinBox *spinBoxMaximalStringLength; - QSpinBox *spinBoxDisplayStringLimit; - - DebuggerSourcePathMappingWidget *sourcesMappingWidget; - const QSharedPointer m_group; -}; - class CommonOptionsPage : public Core::IOptionsPage { Q_OBJECT @@ -129,7 +96,6 @@ public: private: QPointer m_widget; - Ui::DebuggingHelperOptionPage m_ui; Utils::SavedActionSet m_group; }; diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index 580a4948b0b237c2d3c2772e7922f2041264b91c..f79b57952ee0a0620d34c4868baf61266b38c5ba 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -133,9 +133,6 @@ SOURCES += \ simplifytype.cpp \ unstartedappwatcherdialog.cpp -FORMS += \ - localsandexpressionsoptionspage.ui - RESOURCES += debugger.qrc false { diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index 4334c2fa3747e3422ff86240c664f9d82854b0db..41f7fb707b5b450735d482199894d39afb0b4b6d 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -63,7 +63,6 @@ QtcPlugin { "disassemblerlines.cpp", "disassemblerlines.h", "imageviewer.cpp", "imageviewer.h", "loadcoredialog.cpp", "loadcoredialog.h", - "localsandexpressionsoptionspage.ui", "localsandexpressionswindow.cpp", "localsandexpressionswindow.h", "logwindow.cpp", "logwindow.h", "memoryagent.cpp", "memoryagent.h", diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 72f25eb5504bf07eafd87348205051b60e5298b2..8b5a7c923fdf048a57f3ff58ecb61a3a05281c8f 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -108,9 +108,12 @@ #include #include +#include #include #include #include +#include +#include #include #include #include diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index 5836ecf30295e2281a93c66da999b72108f5813a..71b570945b7e6338107d7f4f89b7fcc0e4346069 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -35,9 +35,11 @@ #include +#include +#include #include - #include +#include #include #include diff --git a/src/plugins/debugger/localsandexpressionsoptionspage.ui b/src/plugins/debugger/localsandexpressionsoptionspage.ui deleted file mode 100644 index d2b320ddaa7a9171277125ce66b21fd4190f7a8c..0000000000000000000000000000000000000000 --- a/src/plugins/debugger/localsandexpressionsoptionspage.ui +++ /dev/null @@ -1,97 +0,0 @@ - - - Debugger::Internal::DebuggingHelperOptionPage - - - - 0 - 0 - 529 - 303 - - - - - - - Use Debugging Helper - - - true - - - - - - <html><head/><body> -<p>The debugging helper is only used to produce a nice display of objects of certain types like QString or std::map in the &quot;Locals and Expressions&quot; view. It is not strictly necessary for debugging with Qt Creator. </p></body></html> - - - Qt::AutoText - - - true - - - - - - - Makes use of Qt Creator's code model to find out if a variable has already been assigned a value at the point the debugger interrupts. - - - Use code model - - - - - - - Displays names of QThread based threads. - - - Display thread names - - - - - - - - - - Shows 'std::' prefix for types from the standard library. - - - Show "std::" namespace for types - - - - - - - Shows Qt namespace prefix for Qt types. This is only relevant if Qt was configured with '-qtnamespace'. - - - Show Qt's namespace for types - - - - - - - Qt::Vertical - - - - 10 - 1 - - - - - - - - -