Commit 89642119 authored by con's avatar con
Browse files

Remove unused code path for signal-slot editor yes/no.

parent 5146d231
...@@ -41,8 +41,6 @@ using namespace Designer::Constants; ...@@ -41,8 +41,6 @@ using namespace Designer::Constants;
enum { ActionEditorTab, SignalSlotEditorTab }; enum { ActionEditorTab, SignalSlotEditorTab };
enum { wantSignalSlotEditor = 1 };
namespace Designer { namespace Designer {
namespace Internal { namespace Internal {
...@@ -156,27 +154,21 @@ EditorWidget::EditorWidget(QWidget *formWindow) : ...@@ -156,27 +154,21 @@ EditorWidget::EditorWidget(QWidget *formWindow) :
// Get shared sub windows from Form Editor // Get shared sub windows from Form Editor
FormEditorW *few = FormEditorW::instance(); FormEditorW *few = FormEditorW::instance();
QWidget * const*subs = few->designerSubWindows(); QWidget * const*subs = few->designerSubWindows();
// Create shared sub windows except SignalSlotEditor // Create shared sub windows
qFill(m_designerSubWindows, m_designerSubWindows + DesignerSubWindowCount, static_cast<SharedSubWindow*>(0));
for (int i=0; i < DesignerSubWindowCount; i++) 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 // Create splitter
addWidget(m_designerSubWindows[WidgetBoxSubWindow]); addWidget(m_designerSubWindows[WidgetBoxSubWindow]);
// center // center
m_centerVertSplitter->addWidget(formWindow); m_centerVertSplitter->addWidget(formWindow);
if (wantSignalSlotEditor) { m_bottomTab = new QTabWidget;
m_bottomTab = new QTabWidget; m_bottomTab->setTabPosition(QTabWidget::South);
m_bottomTab->setTabPosition(QTabWidget::South); m_bottomTab->setDocumentMode(true);
m_bottomTab->setDocumentMode(true); m_bottomTab->addTab(m_designerSubWindows[ActionEditorSubWindow], tr("Action editor"));
m_bottomTab->addTab(m_designerSubWindows[ActionEditorSubWindow], tr("Action editor")); m_bottomTab->addTab(m_designerSubWindows[SignalSlotEditorSubWindow], tr("Signals and slots editor"));
m_bottomTab->addTab(m_designerSubWindows[SignalSlotEditorSubWindow], tr("Signals and slots editor")); m_centerVertSplitter->addWidget(m_bottomTab);
m_centerVertSplitter->addWidget(m_bottomTab);
} else {
m_centerVertSplitter->addWidget(m_designerSubWindows[ActionEditorSubWindow]);
}
addWidget(m_centerVertSplitter); addWidget(m_centerVertSplitter);
...@@ -215,8 +207,7 @@ void EditorWidget::setInitialSizes() ...@@ -215,8 +207,7 @@ void EditorWidget::setInitialSizes()
void EditorWidget::activate() void EditorWidget::activate()
{ {
for (int i=0; i < DesignerSubWindowCount; i++) for (int i=0; i < DesignerSubWindowCount; i++)
if (SharedSubWindow *sw = m_designerSubWindows[i]) // Signal slot might be deactivated m_designerSubWindows[i]->activate();
sw->activate();
if (!restore(*editorWidgetState())) if (!restore(*editorWidgetState()))
setInitialSizes(); setInitialSizes();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment