summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtoolbararealayout.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-28 13:54:13 +0100
committerLars Knoll <lars.knoll@digia.com>2014-10-31 21:16:54 +0100
commit17e5b577b0a18d0612ddce3d8f26a09049b38a15 (patch)
tree0b409eb53bd40ee57feb44019de7494bdd1bf3e8 /src/widgets/widgets/qtoolbararealayout.cpp
parent6336ae831dcbe287e5aeeb73dc160bd067e63176 (diff)
Cleanup: Remove some obsolete code supporting a pre-4.3 format
Loading a dock window state saved by a Qt 4.2 app is not something we need to support anymore. Change-Id: I9ee6e2c742b31114081852e7236cfc8696b9b270 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/widgets/widgets/qtoolbararealayout.cpp')
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index 5494d49232..1dd39174ac 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -1286,21 +1286,15 @@ void QToolBarAreaLayout::saveState(QDataStream &stream) const
}
}
-static inline int getInt(QDataStream &stream, Qt::Orientation o, bool pre43)
+static inline int getInt(QDataStream &stream)
{
- if (pre43) {
- QPoint p;
- stream >> p;
- return pick(o, p);
- } else {
- int x;
- stream >> x;
- return x;
- }
+ int x;
+ stream >> x;
+ return x;
}
-bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*> &_toolBars, uchar tmarker, bool pre43, bool testing)
+bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*> &_toolBars, uchar tmarker, bool testing)
{
QList<QToolBar*> toolBars = _toolBars;
int lines;
@@ -1325,8 +1319,8 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
stream >> objectName;
uchar shown;
stream >> shown;
- item.pos = getInt(stream, dock.o, pre43);
- item.size = getInt(stream, dock.o, pre43);
+ item.pos = getInt(stream);
+ item.size = getInt(stream);
/*
4.3.0 added floating toolbars, but failed to add the ability to restore them.
@@ -1339,9 +1333,9 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
QRect rect;
bool floating = false;
uint geom0, geom1;
- geom0 = getInt(stream, dock.o, pre43);
+ geom0 = getInt(stream);
if (tmarker == ToolBarStateMarkerEx) {
- geom1 = getInt(stream, dock.o, pre43);
+ geom1 = getInt(stream);
rect = unpackRect(geom0, geom1, &floating);
}