Commit 9fb498a7 authored by Kai Koehne's avatar Kai Koehne

DebuggerMainWindow: Fix issues with default layout

Make sure all docks are properly tabified, even when not visible.

Change-Id: I4c7eb0016d95c8c75d63db939569e6d9e32e57ae
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 45b642cb
......@@ -629,6 +629,7 @@ void DebuggerMainWindowPrivate::setSimpleDockWidgetArrangement()
dockWidget->hide();
}
QDockWidget *toolBarDock = q->toolBarDockWidget();
QDockWidget *breakDock = q->dockWidget(DOCKWIDGET_BREAK);
QDockWidget *stackDock = q->dockWidget(DOCKWIDGET_STACK);
QDockWidget *watchDock = q->dockWidget(DOCKWIDGET_WATCHERS);
......@@ -652,52 +653,38 @@ void DebuggerMainWindowPrivate::setSimpleDockWidgetArrangement()
QTC_ASSERT(registerDock, return);
QTC_ASSERT(sourceFilesDock, return);
if (m_activeDebugLanguages.testFlag(Debugger::CppLanguage)
&& m_activeDebugLanguages.testFlag(Debugger::QmlLanguage)) {
// cpp + qml
q->toolBarDockWidget()->show();
stackDock->show();
watchDock->show();
breakDock->show();
// make sure main docks are visible so that split equally divides the space
toolBarDock->show();
stackDock->show();
breakDock->show();
watchDock->show();
// toolBar
// --------------------------------------------------------------------------------
// stack,qmlinspector | breakpoints,modules,register,threads,sourceFiles,snapshots,scriptconsole
//
q->splitDockWidget(toolBarDock, stackDock, Qt::Vertical);
q->splitDockWidget(stackDock, breakDock, Qt::Horizontal);
if (qmlInspectorDock)
q->tabifyDockWidget(stackDock, qmlInspectorDock);
q->tabifyDockWidget(breakDock, modulesDock);
q->tabifyDockWidget(breakDock, registerDock);
q->tabifyDockWidget(breakDock, threadsDock);
q->tabifyDockWidget(breakDock, sourceFilesDock);
q->tabifyDockWidget(breakDock, snapshotsDock);
q->tabifyDockWidget(breakDock, scriptConsoleDock);
if (m_activeDebugLanguages.testFlag(Debugger::QmlLanguage)) {
if (qmlInspectorDock)
qmlInspectorDock->show();
q->splitDockWidget(q->toolBarDockWidget(), stackDock, Qt::Vertical);
q->splitDockWidget(stackDock, breakDock, Qt::Horizontal);
q->tabifyDockWidget(stackDock, snapshotsDock);
q->tabifyDockWidget(stackDock, threadsDock);
if (qmlInspectorDock)
q->splitDockWidget(stackDock, qmlInspectorDock, Qt::Horizontal);
} else {
q->toolBarDockWidget()->show();
stackDock->show();
breakDock->show();
watchDock->show();
// CPP only
threadsDock->show();
snapshotsDock->show();
if ((m_activeDebugLanguages.testFlag(CppLanguage)
&& !m_activeDebugLanguages.testFlag(QmlLanguage))
|| m_activeDebugLanguages == AnyLanguage) {
threadsDock->show();
snapshotsDock->show();
} else {
scriptConsoleDock->show();
}
q->splitDockWidget(q->toolBarDockWidget(), stackDock, Qt::Vertical);
q->splitDockWidget(stackDock, breakDock, Qt::Horizontal);
q->tabifyDockWidget(breakDock, modulesDock);
q->tabifyDockWidget(breakDock, registerDock);
q->tabifyDockWidget(breakDock, threadsDock);
q->tabifyDockWidget(breakDock, sourceFilesDock);
q->tabifyDockWidget(breakDock, snapshotsDock);
q->tabifyDockWidget(breakDock, scriptConsoleDock);
}
breakDock->raise(); // Raise something sensible.
q->setTrackingEnabled(true);
q->update();
}
......
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