summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qdockarealayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qdockarealayout.cpp')
-rw-r--r--src/gui/widgets/qdockarealayout.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index dffec11..953edab 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -1841,7 +1841,6 @@ void QDockAreaLayoutInfo::saveState(QDataStream &stream) const
}
}
-#ifdef Q_WS_MAC
static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
{
switch (pos) {
@@ -1853,7 +1852,6 @@ static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
}
return Qt::NoDockWidgetArea;
}
-#endif
static QRect constrainedRect(QRect rect, const QRect &desktop)
{
@@ -1933,6 +1931,9 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
item_list.append(item);
} else {
QDockAreaLayoutItem item(new QDockWidgetItem(widget));
+ if (!testing) {
+ item_list.append(item);
+ }
if (flags & StateFlagFloating) {
bool drawer = false;
#ifdef Q_WS_MAC // drawer support
@@ -1977,12 +1978,10 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
if (!testing) {
widget->setFloating(false);
widget->setVisible(flags & StateFlagVisible);
+ emit widget->dockLocationChanged(toDockWidgetArea(dockPos));
}
}
- if (!testing) {
- item_list.append(item);
- }
}
} else if (nextMarker == SequenceMarker) {
int dummy;