From 89642119c0bb8962e5dcaddea5fe044e8f97c72b Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Thu, 6 Aug 2009 12:50:04 +0200
Subject: [PATCH] Remove unused code path for signal-slot editor yes/no.

---
 src/plugins/designer/editorwidget.cpp | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/plugins/designer/editorwidget.cpp b/src/plugins/designer/editorwidget.cpp
index 0b17cefe5b5..5a619e192c2 100644
--- a/src/plugins/designer/editorwidget.cpp
+++ b/src/plugins/designer/editorwidget.cpp
@@ -41,8 +41,6 @@ using namespace Designer::Constants;
 
 enum { ActionEditorTab, SignalSlotEditorTab };
 
-enum { wantSignalSlotEditor = 1 };
-
 namespace Designer {
 namespace Internal {
 
@@ -156,27 +154,21 @@ EditorWidget::EditorWidget(QWidget *formWindow) :
     // Get shared sub windows from Form Editor
     FormEditorW *few = FormEditorW::instance();
     QWidget * const*subs = few->designerSubWindows();
-    // Create shared sub windows except SignalSlotEditor
-    qFill(m_designerSubWindows, m_designerSubWindows + DesignerSubWindowCount, static_cast<SharedSubWindow*>(0));
+    // Create shared sub windows
     for (int i=0; i < DesignerSubWindowCount; i++)
-        if (wantSignalSlotEditor || i != SignalSlotEditorSubWindow)
-            m_designerSubWindows[i] = new SharedSubWindow(subs[i]);
+        m_designerSubWindows[i] = new SharedSubWindow(subs[i]);
     // Create splitter
     addWidget(m_designerSubWindows[WidgetBoxSubWindow]);
 
     // center
     m_centerVertSplitter->addWidget(formWindow);
 
-    if (wantSignalSlotEditor) {
-        m_bottomTab = new QTabWidget;
-        m_bottomTab->setTabPosition(QTabWidget::South);
-        m_bottomTab->setDocumentMode(true);
-        m_bottomTab->addTab(m_designerSubWindows[ActionEditorSubWindow], tr("Action editor"));
-        m_bottomTab->addTab(m_designerSubWindows[SignalSlotEditorSubWindow], tr("Signals and slots editor"));
-        m_centerVertSplitter->addWidget(m_bottomTab);
-    } else {
-        m_centerVertSplitter->addWidget(m_designerSubWindows[ActionEditorSubWindow]);
-    }
+    m_bottomTab = new QTabWidget;
+    m_bottomTab->setTabPosition(QTabWidget::South);
+    m_bottomTab->setDocumentMode(true);
+    m_bottomTab->addTab(m_designerSubWindows[ActionEditorSubWindow], tr("Action editor"));
+    m_bottomTab->addTab(m_designerSubWindows[SignalSlotEditorSubWindow], tr("Signals and slots editor"));
+    m_centerVertSplitter->addWidget(m_bottomTab);
 
     addWidget(m_centerVertSplitter);
 
@@ -215,8 +207,7 @@ void EditorWidget::setInitialSizes()
 void EditorWidget::activate()
 {
     for (int i=0; i < DesignerSubWindowCount; i++)
-        if (SharedSubWindow *sw = m_designerSubWindows[i]) // Signal slot might be deactivated
-            sw->activate();
+        m_designerSubWindows[i]->activate();
     if (!restore(*editorWidgetState()))
         setInitialSizes();
 }
-- 
GitLab