From f773f4295d3f68916ae72955d68051cd8bbdee29 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Tue, 6 Apr 2010 16:42:24 +0200
Subject: [PATCH] debugger: some gui & code cosmetics

---
 src/plugins/debugger/commonoptionspage.ui     | 39 ++++---------------
 src/plugins/debugger/debuggerconstants.h      |  2 +-
 src/plugins/debugger/debuggerplugin.cpp       | 18 ++-------
 src/plugins/debugger/debuggeruiswitcher.cpp   | 16 ++++----
 src/plugins/debugger/debuggeruiswitcher.h     |  2 +-
 src/plugins/debugger/dumperoptionpage.ui      | 28 +++++++++++--
 src/plugins/debugger/gdb/gdboptionspage.cpp   | 10 +++++
 src/plugins/debugger/gdb/gdboptionspage.ui    | 33 ++++++++++++++--
 src/plugins/debugger/gdb/trkoptionspage.cpp   |  2 +-
 src/plugins/debugger/gdb/trkoptionswidget.ui  |  2 +-
 .../qt-maemo/maemogdbsettingspage.cpp         |  2 +-
 11 files changed, 86 insertions(+), 68 deletions(-)

diff --git a/src/plugins/debugger/commonoptionspage.ui b/src/plugins/debugger/commonoptionspage.ui
index 370dd882ddc..692c8253c58 100644
--- a/src/plugins/debugger/commonoptionspage.ui
+++ b/src/plugins/debugger/commonoptionspage.ui
@@ -33,10 +33,10 @@
    <item>
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
-      <string>C++</string>
+      <string>Gui behavior</string>
      </property>
      <layout class="QFormLayout" name="formLayout">
-      <item row="0" column="0" colspan="2">
+      <item row="2" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxListSourceFiles">
         <property name="toolTip">
          <string>Checking this will populate the source file view automatically but might slow down debugger startup considerably.</string>
@@ -46,46 +46,21 @@
         </property>
        </widget>
       </item>
-      <item row="1" 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">
+      <item row="0" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxUseAlternatingRowColors">
         <property name="text">
          <string>Use alternating row colors in debug views</string>
         </property>
        </widget>
       </item>
-      <item row="3" column="0" colspan="2">
+      <item row="1" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxUseToolTipsInMainEditor">
         <property name="text">
          <string>Use tooltips in main editor while debugging</string>
         </property>
        </widget>
       </item>
-      <item row="4" 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">
+      <item row="3" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxRegisterForPostMortem">
         <property name="toolTip">
          <string>Register Qt Creator for debugging crashed applications.</string>
@@ -95,14 +70,14 @@
         </property>
        </widget>
       </item>
-      <item row="7" column="0">
+      <item row="4" column="0">
        <widget class="QLabel" name="labelMaximalStackDepth">
         <property name="text">
          <string>Maximal stack depth:</string>
         </property>
        </widget>
       </item>
-      <item row="7" column="1">
+      <item row="4" column="1">
        <widget class="QSpinBox" name="spinBoxMaximalStackDepth">
         <property name="layoutDirection">
          <enum>Qt::LeftToRight</enum>
diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h
index cfd55b915cb..d6077bf8e6b 100644
--- a/src/plugins/debugger/debuggerconstants.h
+++ b/src/plugins/debugger/debuggerconstants.h
@@ -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_NAME =
-    QT_TRANSLATE_NOOP("Debugger", "Common");
+    QT_TRANSLATE_NOOP("Debugger", "General");
 const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
 const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
     QT_TRANSLATE_NOOP("Debugger", "Debugger");
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 0dc8aa0d619..4e4b5d58c42 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -368,10 +368,6 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
         m_ui.checkBoxListSourceFiles);
     m_group.insert(theDebuggerAction(UseAlternatingRowColors),
         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_ui.checkBoxUseToolTipsInMainEditor);
     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(UseAddressInBreakpointsView), 0);
     m_group.insert(theDebuggerAction(UseAddressInStackView), 0);
-    m_group.insert(theDebuggerAction(EnableReverseDebugging),
-        m_ui.checkBoxEnableReverseDebugging);
     m_group.insert(theDebuggerAction(MaximalStackDepth),
         m_ui.spinBoxMaximalStackDepth);
-    m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
     m_group.insert(theDebuggerAction(ShowStdNamespace), 0);
     m_group.insert(theDebuggerAction(ShowQtNamespace), 0);
     m_group.insert(theDebuggerAction(LogTimeStamps), 0);
@@ -403,11 +396,8 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
         QTextStream(&m_searchKeywords) << ' '
                 << m_ui.checkBoxChangeLanguageAutomatically->text()
                 << m_ui.checkBoxListSourceFiles->text()
-                << ' ' << m_ui.checkBoxUseMessageBoxForSignals->text()
                 << ' ' << m_ui.checkBoxUseAlternatingRowColors->text()
                 << ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text()
-                << ' ' << m_ui.checkBoxSkipKnownFrames->text()
-                << ' ' << m_ui.checkBoxEnableReverseDebugging->text()
 #ifdef Q_OS_WIN
                 << ' ' << m_ui.checkBoxRegisterForPostMortem->text()
 #endif
@@ -453,7 +443,7 @@ public:
     DebuggingHelperOptionPage() {}
 
     // IOptionsPage
-    QString id() const { return _("B.DebuggingHelper"); }
+    QString id() const { return _("Z.DebuggingHelper"); }
     QString displayName() const { return tr("Debugging Helper"); }
     QString category() const { return _(DEBUGGER_SETTINGS_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);
     cmd->setAttribute(Command::CA_Hide);
 
-    // FIXME:
     addAutoReleasedObject(new CommonOptionsPage);
-    addAutoReleasedObject(new DebuggingHelperOptionPage);
-    foreach (Core::IOptionsPage* op, engineOptionPages)
+    foreach (Core::IOptionsPage *op, engineOptionPages)
         addAutoReleasedObject(op);
+    addAutoReleasedObject(new DebuggingHelperOptionPage);
+
     addAutoReleasedObject(new DebuggerListener);
     m_locationMark = 0;
 
diff --git a/src/plugins/debugger/debuggeruiswitcher.cpp b/src/plugins/debugger/debuggeruiswitcher.cpp
index 4d50b87ec6b..7497abafb21 100644
--- a/src/plugins/debugger/debuggeruiswitcher.cpp
+++ b/src/plugins/debugger/debuggeruiswitcher.cpp
@@ -67,19 +67,17 @@
 #include <QtCore/QSettings>
 
 namespace Debugger {
-namespace Internal {
-
-} // namespace Internal
 using namespace Debugger::Internal;
 
 // first: language id, second: menu item
-typedef QPair<int, QAction* > ViewsMenuItems;
+typedef QPair<int, QAction *> ViewsMenuItems;
 
-struct DebuggerUISwitcherPrivate {
+struct DebuggerUISwitcherPrivate
+{
     explicit DebuggerUISwitcherPrivate(DebuggerUISwitcher *q);
 
-    QList< ViewsMenuItems > m_viewsMenuItems;
-    QList< Internal::DebugToolWindow* > m_dockWidgets;
+    QList<ViewsMenuItems> m_viewsMenuItems;
+    QList<Internal::DebugToolWindow *> m_dockWidgets;
 
     QMap<QString, QWidget *> m_toolBars;
     QStringList m_languages;
@@ -106,7 +104,7 @@ struct DebuggerUISwitcherPrivate {
     Core::ActionContainer *m_viewsMenu;
     Core::ActionContainer *m_debugMenu;
 
-    QMultiHash< int, Core::Command *> m_menuCommands;
+    QMultiHash<int, Core::Command *> m_menuCommands;
 
     static DebuggerUISwitcher *m_instance;
 };
@@ -493,4 +491,4 @@ QList<Internal::DebugToolWindow* > DebuggerUISwitcher::i_mw_debugToolWindows() c
     return d->m_dockWidgets;
 }
 
-}
+} // namespace Debugger
diff --git a/src/plugins/debugger/debuggeruiswitcher.h b/src/plugins/debugger/debuggeruiswitcher.h
index b4f568acd91..f2c9ee80989 100644
--- a/src/plugins/debugger/debuggeruiswitcher.h
+++ b/src/plugins/debugger/debuggeruiswitcher.h
@@ -108,7 +108,7 @@ private slots:
 private:
     // Used by MainWindow
     friend class Internal::DebuggerMainWindow;
-    QList<Internal::DebugToolWindow* > i_mw_debugToolWindows() const;
+    QList<Internal::DebugToolWindow *> i_mw_debugToolWindows() const;
 
     void hideInactiveWidgets();
     void createViewsMenuItems();
diff --git a/src/plugins/debugger/dumperoptionpage.ui b/src/plugins/debugger/dumperoptionpage.ui
index a7ac27cfcd6..90803cb56c2 100644
--- a/src/plugins/debugger/dumperoptionpage.ui
+++ b/src/plugins/debugger/dumperoptionpage.ui
@@ -6,15 +6,35 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>417</width>
-    <height>203</height>
+    <width>736</width>
+    <height>198</height>
    </rect>
   </property>
   <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>
     <widget class="QGroupBox" name="debuggingHelperGroupBox">
      <property name="title">
-      <string>Use Debugging helper</string>
+      <string>Use debugging helper</string>
      </property>
      <property name="checkable">
       <bool>true</bool>
@@ -40,7 +60,7 @@
           </widget>
          </item>
          <item row="0" column="1">
-          <widget class="Utils::PathChooser" name="dumperLocationChooser"/>
+          <widget class="Utils::PathChooser" name="dumperLocationChooser" native="true"/>
          </item>
         </layout>
        </widget>
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index d32936f4390..6747e7aeb34 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -88,6 +88,13 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
     m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
         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
     m_ui.groupBoxPluginDebugging->hide();
@@ -114,6 +121,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
     if (m_searchKeywords.isEmpty()) {
         // TODO: Add breakpoints, environment?
         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.labelGdbStartupScript->text();
         m_searchKeywords.remove(QLatin1Char('&'));
diff --git a/src/plugins/debugger/gdb/gdboptionspage.ui b/src/plugins/debugger/gdb/gdboptionspage.ui
index 31fe770d10a..451c532974c 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.ui
+++ b/src/plugins/debugger/gdb/gdboptionspage.ui
@@ -14,7 +14,7 @@
    <item>
     <widget class="QGroupBox" name="groupBoxLocations">
      <property name="title">
-      <string>Gdb interaction</string>
+      <string>Gdb</string>
      </property>
      <layout class="QFormLayout" name="formLayout">
       <property name="horizontalSpacing">
@@ -65,7 +65,32 @@
       <item row="2" column="1">
        <widget class="Utils::PathChooser" name="scriptFileChooser"/>
       </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">
         <property name="toolTip">
          <string>When this option is checked, the debugger plugin attempts
@@ -78,14 +103,14 @@ name in different directories.</string>
         </property>
        </widget>
       </item>
-      <item row="4" column="0">
+      <item row="3" column="0">
        <widget class="QLabel" name="labelGdbWatchdogTimeout">
         <property name="text">
          <string>Gdb timeout:</string>
         </property>
        </widget>
       </item>
-      <item row="4" column="1">
+      <item row="3" column="1">
        <widget class="QSpinBox" name="spinBoxGdbWatchdogTimeout">
         <property name="toolTip">
          <string>This is the number of seconds Qt Creator will wait before
diff --git a/src/plugins/debugger/gdb/trkoptionspage.cpp b/src/plugins/debugger/gdb/trkoptionspage.cpp
index fd4c33c6d86..de56e0865c6 100644
--- a/src/plugins/debugger/gdb/trkoptionspage.cpp
+++ b/src/plugins/debugger/gdb/trkoptionspage.cpp
@@ -56,7 +56,7 @@ QString TrkOptionsPage::settingsId()
 
 QString TrkOptionsPage::displayName() const
 {
-    return tr("Symbian TRK");
+    return tr("Symbian");
 }
 
 QString TrkOptionsPage::category() const
diff --git a/src/plugins/debugger/gdb/trkoptionswidget.ui b/src/plugins/debugger/gdb/trkoptionswidget.ui
index 4af063e9b53..8aa52ef24af 100644
--- a/src/plugins/debugger/gdb/trkoptionswidget.ui
+++ b/src/plugins/debugger/gdb/trkoptionswidget.ui
@@ -39,7 +39,7 @@
    <item>
     <widget class="QGroupBox" name="commGroupBox">
      <property name="title">
-      <string>Communication</string>
+      <string>Device Communication</string>
      </property>
      <layout class="QHBoxLayout" name="horizontalLayout">
       <item>
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemogdbsettingspage.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemogdbsettingspage.cpp
index ec2115ae71a..5e089702d08 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemogdbsettingspage.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemogdbsettingspage.cpp
@@ -114,7 +114,7 @@ MaemoGdbSettingsPage::~MaemoGdbSettingsPage()
 
 QString MaemoGdbSettingsPage::id() const
 {
-    return QLatin1String("ZZ.Maemo");
+    return QLatin1String("Y.Maemo");
 }
 
 QString MaemoGdbSettingsPage::displayName() const
-- 
GitLab