debugger: some gui & code cosmetics

This commit is contained in:
hjk
2010-04-06 16:42:24 +02:00
parent a9a880d984
commit f773f4295d
11 changed files with 86 additions and 68 deletions

View File

@@ -33,10 +33,10 @@
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>C++</string> <string>Gui behavior</string>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxListSourceFiles"> <widget class="QCheckBox" name="checkBoxListSourceFiles">
<property name="toolTip"> <property name="toolTip">
<string>Checking this will populate the source file view automatically but might slow down debugger startup considerably.</string> <string>Checking this will populate the source file view automatically but might slow down debugger startup considerably.</string>
@@ -46,46 +46,21 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseMessageBoxForSignals">
<property name="text">
<string>Show a message box when receiving a signal</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseAlternatingRowColors"> <widget class="QCheckBox" name="checkBoxUseAlternatingRowColors">
<property name="text"> <property name="text">
<string>Use alternating row colors in debug views</string> <string>Use alternating row colors in debug views</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseToolTipsInMainEditor"> <widget class="QCheckBox" name="checkBoxUseToolTipsInMainEditor">
<property name="text"> <property name="text">
<string>Use tooltips in main editor while debugging</string> <string>Use tooltips in main editor while debugging</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
<property name="toolTip">
<string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.</string>
</property>
<property name="text">
<string>Skip known frames when stepping</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxEnableReverseDebugging">
<property name="text">
<string>Enable reverse debugging</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxRegisterForPostMortem"> <widget class="QCheckBox" name="checkBoxRegisterForPostMortem">
<property name="toolTip"> <property name="toolTip">
<string>Register Qt Creator for debugging crashed applications.</string> <string>Register Qt Creator for debugging crashed applications.</string>
@@ -95,14 +70,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="4" column="0">
<widget class="QLabel" name="labelMaximalStackDepth"> <widget class="QLabel" name="labelMaximalStackDepth">
<property name="text"> <property name="text">
<string>Maximal stack depth:</string> <string>Maximal stack depth:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="4" column="1">
<widget class="QSpinBox" name="spinBoxMaximalStackDepth"> <widget class="QSpinBox" name="spinBoxMaximalStackDepth">
<property name="layoutDirection"> <property name="layoutDirection">
<enum>Qt::LeftToRight</enum> <enum>Qt::LeftToRight</enum>

View File

@@ -56,7 +56,7 @@ const char * const GDBRUNNING = "Gdb.Running";
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common"; const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
const char * const DEBUGGER_COMMON_SETTINGS_NAME = const char * const DEBUGGER_COMMON_SETTINGS_NAME =
QT_TRANSLATE_NOOP("Debugger", "Common"); QT_TRANSLATE_NOOP("Debugger", "General");
const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger"; const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
const char * const DEBUGGER_SETTINGS_TR_CATEGORY = const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
QT_TRANSLATE_NOOP("Debugger", "Debugger"); QT_TRANSLATE_NOOP("Debugger", "Debugger");

View File

@@ -368,10 +368,6 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
m_ui.checkBoxListSourceFiles); m_ui.checkBoxListSourceFiles);
m_group.insert(theDebuggerAction(UseAlternatingRowColors), m_group.insert(theDebuggerAction(UseAlternatingRowColors),
m_ui.checkBoxUseAlternatingRowColors); m_ui.checkBoxUseAlternatingRowColors);
m_group.insert(theDebuggerAction(UseMessageBoxForSignals),
m_ui.checkBoxUseMessageBoxForSignals);
m_group.insert(theDebuggerAction(SkipKnownFrames),
m_ui.checkBoxSkipKnownFrames);
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor), m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
m_ui.checkBoxUseToolTipsInMainEditor); m_ui.checkBoxUseToolTipsInMainEditor);
m_group.insert(theDebuggerAction(AutoDerefPointers), 0); m_group.insert(theDebuggerAction(AutoDerefPointers), 0);
@@ -379,11 +375,8 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0); m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0);
m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0); m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0);
m_group.insert(theDebuggerAction(UseAddressInStackView), 0); m_group.insert(theDebuggerAction(UseAddressInStackView), 0);
m_group.insert(theDebuggerAction(EnableReverseDebugging),
m_ui.checkBoxEnableReverseDebugging);
m_group.insert(theDebuggerAction(MaximalStackDepth), m_group.insert(theDebuggerAction(MaximalStackDepth),
m_ui.spinBoxMaximalStackDepth); m_ui.spinBoxMaximalStackDepth);
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
m_group.insert(theDebuggerAction(ShowStdNamespace), 0); m_group.insert(theDebuggerAction(ShowStdNamespace), 0);
m_group.insert(theDebuggerAction(ShowQtNamespace), 0); m_group.insert(theDebuggerAction(ShowQtNamespace), 0);
m_group.insert(theDebuggerAction(LogTimeStamps), 0); m_group.insert(theDebuggerAction(LogTimeStamps), 0);
@@ -403,11 +396,8 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
QTextStream(&m_searchKeywords) << ' ' QTextStream(&m_searchKeywords) << ' '
<< m_ui.checkBoxChangeLanguageAutomatically->text() << m_ui.checkBoxChangeLanguageAutomatically->text()
<< m_ui.checkBoxListSourceFiles->text() << m_ui.checkBoxListSourceFiles->text()
<< ' ' << m_ui.checkBoxUseMessageBoxForSignals->text()
<< ' ' << m_ui.checkBoxUseAlternatingRowColors->text() << ' ' << m_ui.checkBoxUseAlternatingRowColors->text()
<< ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text() << ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text()
<< ' ' << m_ui.checkBoxSkipKnownFrames->text()
<< ' ' << m_ui.checkBoxEnableReverseDebugging->text()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
<< ' ' << m_ui.checkBoxRegisterForPostMortem->text() << ' ' << m_ui.checkBoxRegisterForPostMortem->text()
#endif #endif
@@ -453,7 +443,7 @@ public:
DebuggingHelperOptionPage() {} DebuggingHelperOptionPage() {}
// IOptionsPage // IOptionsPage
QString id() const { return _("B.DebuggingHelper"); } QString id() const { return _("Z.DebuggingHelper"); }
QString displayName() const { return tr("Debugging Helper"); } QString displayName() const { return tr("Debugging Helper"); }
QString category() const { return _(DEBUGGER_SETTINGS_CATEGORY); } QString category() const { return _(DEBUGGER_SETTINGS_CATEGORY); }
QString displayCategory() const { return QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY); } QString displayCategory() const { return QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY); }
@@ -942,11 +932,11 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
editorContextMenu->addAction(cmd); editorContextMenu->addAction(cmd);
cmd->setAttribute(Command::CA_Hide); cmd->setAttribute(Command::CA_Hide);
// FIXME:
addAutoReleasedObject(new CommonOptionsPage); addAutoReleasedObject(new CommonOptionsPage);
addAutoReleasedObject(new DebuggingHelperOptionPage);
foreach (Core::IOptionsPage *op, engineOptionPages) foreach (Core::IOptionsPage *op, engineOptionPages)
addAutoReleasedObject(op); addAutoReleasedObject(op);
addAutoReleasedObject(new DebuggingHelperOptionPage);
addAutoReleasedObject(new DebuggerListener); addAutoReleasedObject(new DebuggerListener);
m_locationMark = 0; m_locationMark = 0;

View File

@@ -67,15 +67,13 @@
#include <QtCore/QSettings> #include <QtCore/QSettings>
namespace Debugger { namespace Debugger {
namespace Internal {
} // namespace Internal
using namespace Debugger::Internal; using namespace Debugger::Internal;
// first: language id, second: menu item // first: language id, second: menu item
typedef QPair<int, QAction *> ViewsMenuItems; typedef QPair<int, QAction *> ViewsMenuItems;
struct DebuggerUISwitcherPrivate { struct DebuggerUISwitcherPrivate
{
explicit DebuggerUISwitcherPrivate(DebuggerUISwitcher *q); explicit DebuggerUISwitcherPrivate(DebuggerUISwitcher *q);
QList<ViewsMenuItems> m_viewsMenuItems; QList<ViewsMenuItems> m_viewsMenuItems;
@@ -493,4 +491,4 @@ QList<Internal::DebugToolWindow* > DebuggerUISwitcher::i_mw_debugToolWindows() c
return d->m_dockWidgets; return d->m_dockWidgets;
} }
} } // namespace Debugger

View File

@@ -6,15 +6,35 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>417</width> <width>736</width>
<height>203</height> <height>198</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt; The debugging helper in only used to produce a nice display of objects of certain type like QString or std::map in the &amp;quot;Locals and Watchers&amp;quot; view.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;It is not strictly necessary for debugging with Qt Creator.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="debuggingHelperGroupBox"> <widget class="QGroupBox" name="debuggingHelperGroupBox">
<property name="title"> <property name="title">
<string>Use Debugging helper</string> <string>Use debugging helper</string>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@@ -40,7 +60,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="Utils::PathChooser" name="dumperLocationChooser"/> <widget class="Utils::PathChooser" name="dumperLocationChooser" native="true"/>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@@ -88,6 +88,13 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
m_ui.spinBoxGdbWatchdogTimeout); m_ui.spinBoxGdbWatchdogTimeout);
m_group.insert(theDebuggerAction(UseMessageBoxForSignals),
m_ui.checkBoxUseMessageBoxForSignals);
m_group.insert(theDebuggerAction(SkipKnownFrames),
m_ui.checkBoxSkipKnownFrames);
m_group.insert(theDebuggerAction(EnableReverseDebugging),
m_ui.checkBoxEnableReverseDebugging);
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
#if 1 #if 1
m_ui.groupBoxPluginDebugging->hide(); m_ui.groupBoxPluginDebugging->hide();
@@ -114,6 +121,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
if (m_searchKeywords.isEmpty()) { if (m_searchKeywords.isEmpty()) {
// TODO: Add breakpoints, environment? // TODO: Add breakpoints, environment?
QTextStream(&m_searchKeywords) << ' ' << m_ui.labelGdbLocation->text() QTextStream(&m_searchKeywords) << ' ' << m_ui.labelGdbLocation->text()
<< ' ' << m_ui.checkBoxSkipKnownFrames->text()
<< ' ' << m_ui.checkBoxEnableReverseDebugging->text()
<< ' ' << m_ui.checkBoxUseMessageBoxForSignals->text()
<< ' ' << m_ui.labelEnvironment->text() << ' ' << m_ui.labelEnvironment->text()
<< ' ' << m_ui.labelGdbStartupScript->text(); << ' ' << m_ui.labelGdbStartupScript->text();
m_searchKeywords.remove(QLatin1Char('&')); m_searchKeywords.remove(QLatin1Char('&'));

View File

@@ -14,7 +14,7 @@
<item> <item>
<widget class="QGroupBox" name="groupBoxLocations"> <widget class="QGroupBox" name="groupBoxLocations">
<property name="title"> <property name="title">
<string>Gdb interaction</string> <string>Gdb</string>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<property name="horizontalSpacing"> <property name="horizontalSpacing">
@@ -65,7 +65,32 @@
<item row="2" column="1"> <item row="2" column="1">
<widget class="Utils::PathChooser" name="scriptFileChooser"/> <widget class="Utils::PathChooser" name="scriptFileChooser"/>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxEnableReverseDebugging">
<property name="text">
<string>Enable reverse debugging</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
<property name="toolTip">
<string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.</string>
</property>
<property name="text">
<string>Skip known frames when stepping</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseMessageBoxForSignals">
<property name="text">
<string>Show a message box when receiving a signal</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUsePreciseBreakpoints"> <widget class="QCheckBox" name="checkBoxUsePreciseBreakpoints">
<property name="toolTip"> <property name="toolTip">
<string>When this option is checked, the debugger plugin attempts <string>When this option is checked, the debugger plugin attempts
@@ -78,14 +103,14 @@ name in different directories.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<widget class="QLabel" name="labelGdbWatchdogTimeout"> <widget class="QLabel" name="labelGdbWatchdogTimeout">
<property name="text"> <property name="text">
<string>Gdb timeout:</string> <string>Gdb timeout:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="spinBoxGdbWatchdogTimeout"> <widget class="QSpinBox" name="spinBoxGdbWatchdogTimeout">
<property name="toolTip"> <property name="toolTip">
<string>This is the number of seconds Qt Creator will wait before <string>This is the number of seconds Qt Creator will wait before

View File

@@ -56,7 +56,7 @@ QString TrkOptionsPage::settingsId()
QString TrkOptionsPage::displayName() const QString TrkOptionsPage::displayName() const
{ {
return tr("Symbian TRK"); return tr("Symbian");
} }
QString TrkOptionsPage::category() const QString TrkOptionsPage::category() const

View File

@@ -39,7 +39,7 @@
<item> <item>
<widget class="QGroupBox" name="commGroupBox"> <widget class="QGroupBox" name="commGroupBox">
<property name="title"> <property name="title">
<string>Communication</string> <string>Device Communication</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>

View File

@@ -114,7 +114,7 @@ MaemoGdbSettingsPage::~MaemoGdbSettingsPage()
QString MaemoGdbSettingsPage::id() const QString MaemoGdbSettingsPage::id() const
{ {
return QLatin1String("ZZ.Maemo"); return QLatin1String("Y.Maemo");
} }
QString MaemoGdbSettingsPage::displayName() const QString MaemoGdbSettingsPage::displayName() const