Debugger: Rename Perspective::Split to Perspective::Operation

We have 'raise' in there now, that's not a split anymore.

Change-Id: Id45c606056dfab1317fad37b2fe37216b0eacf85
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2016-03-02 14:39:20 +01:00
parent b0c8a68aba
commit 65d7aedd27
4 changed files with 37 additions and 29 deletions

View File

@@ -100,16 +100,20 @@ void MainWindowBase::loadPerspectiveHelper(Id perspectiveId, bool fromStoredSett
m_currentPerspectiveId = perspectiveId;
QTC_ASSERT(m_perspectiveForPerspectiveId.contains(perspectiveId), return);
const auto splits = m_perspectiveForPerspectiveId.value(perspectiveId).splits();
for (const Perspective::Split &split : splits) {
QDockWidget *dock = m_dockForDockId.value(split.dockId);
const auto operations = m_perspectiveForPerspectiveId.value(perspectiveId).operations();
for (const Perspective::Operation &operation : operations) {
QDockWidget *dock = m_dockForDockId.value(operation.dockId);
QTC_ASSERT(dock, continue);
addDockWidget(split.area, dock);
QDockWidget *existing = m_dockForDockId.value(split.existing);
if (!existing && split.area == Qt::BottomDockWidgetArea)
if (operation.operationType == Perspective::Raise) {
dock->raise();
continue;
}
addDockWidget(operation.area, dock);
QDockWidget *existing = m_dockForDockId.value(operation.existing);
if (!existing && operation.area == Qt::BottomDockWidgetArea)
existing = toolBarDockWidget();
if (existing) {
switch (split.splitType) {
switch (operation.operationType) {
case Perspective::AddToTab:
tabifyDockWidget(existing, dock);
break;
@@ -119,9 +123,11 @@ void MainWindowBase::loadPerspectiveHelper(Id perspectiveId, bool fromStoredSett
case Perspective::SplitVertical:
splitDockWidget(existing, dock, Qt::Vertical);
break;
default:
break;
}
}
if (!split.visibleByDefault)
if (!operation.visibleByDefault)
dock->hide();
else
dock->show();