Merge remote-tracking branch 'origin/4.11'

Change-Id: Ie9859185470ae46e49a25e732336c4a95eaad4ed
This commit is contained in:
Eike Ziller
2019-09-26 15:23:51 +02:00
7 changed files with 142 additions and 70 deletions

View File

@@ -553,6 +553,7 @@ void PerspectivePrivate::resetPerspective()
} else {
op.setupLayout();
op.dock->setVisible(op.visibleByDefault);
theMainWindow->d->m_persistentChangedDocks.remove(op.name());
qCDebug(perspectivesLog) << "SETTING " << op.name()
<< " TO ACTIVE: " << op.visibleByDefault;
}
@@ -937,12 +938,10 @@ void PerspectivePrivate::restoreLayout()
qCDebug(perspectivesLog) << "PERSPECTIVE STATE AVAILABLE BY FULL ID.";
}
if (state.isEmpty()) {
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORE NOT POSSIBLE, NO STORED STATE";
} else {
bool result = theMainWindow->restoreState(state);
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORED. SUCCESS: " << result;
}
// The order is important here: While QMainWindow can restore layouts with
// not-existing docks (some placeholders are used internally), later
// replacements with restoreDockWidget(dock) trigger a re-layout, resulting
// in different sizes. So make sure all docks exist first before restoring state.
qCDebug(perspectivesLog) << "PERSPECTIVE" << m_id << "RESTORING LAYOUT FROM " << settingsId();
for (DockOperation &op : m_dockOperations) {
@@ -955,6 +954,13 @@ void PerspectivePrivate::restoreLayout()
<< (active == op.visibleByDefault ? "DEFAULT USER" : "*** NON-DEFAULT USER");
}
}
if (state.isEmpty()) {
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORE NOT POSSIBLE, NO STORED STATE";
} else {
bool result = theMainWindow->restoreState(state);
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORED, SUCCESS: " << result;
}
}
void PerspectivePrivate::saveLayout()