summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qlayout.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-03 10:23:56 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-03 10:23:56 +0200
commite2f66f921594b7be4af4a058c959557489e86879 (patch)
treecc44931708b57bd5a761906797c7dee0360d1d6b /src/widgets/kernel/qlayout.cpp
parent933bf178aab88ab5df8a68cbf02611d6d8744b1b (diff)
parent754efa57d89c62d1796e01b407e9222e67450f52 (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
Diffstat (limited to 'src/widgets/kernel/qlayout.cpp')
-rw-r--r--src/widgets/kernel/qlayout.cpp81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index dcacea4777..e74f17b6f7 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1470,85 +1470,4 @@ QSize QLayout::closestAcceptableSize(const QWidget *widget, const QSize &size)
return result;
}
-void QSizePolicy::setControlType(ControlType type)
-{
- /*
- The control type is a flag type, with values 0x1, 0x2, 0x4, 0x8, 0x10,
- etc. In memory, we pack it onto the available bits (CTSize) in
- setControlType(), and unpack it here.
-
- Example:
-
- 0x00000001 maps to 0
- 0x00000002 maps to 1
- 0x00000004 maps to 2
- 0x00000008 maps to 3
- etc.
- */
-
- int i = 0;
- while (true) {
- if (type & (0x1 << i)) {
- bits.ctype = i;
- return;
- }
- ++i;
- }
-}
-
-QSizePolicy::ControlType QSizePolicy::controlType() const
-{
- return QSizePolicy::ControlType(1 << bits.ctype);
-}
-
-#ifndef QT_NO_DATASTREAM
-
-/*!
- \relates QSizePolicy
- \since 4.2
-
- Writes the size \a policy to the data stream \a stream.
-
- \sa{Serializing Qt Data Types}{Format of the QDataStream operators}
-*/
-QDataStream &operator<<(QDataStream &stream, const QSizePolicy &policy)
-{
- // The order here is for historical reasons. (compatibility with Qt4)
- quint32 data = (policy.bits.horPolicy | // [0, 3]
- policy.bits.verPolicy << 4 | // [4, 7]
- policy.bits.hfw << 8 | // [8]
- policy.bits.ctype << 9 | // [9, 13]
- policy.bits.wfh << 14 | // [14]
- policy.bits.retainSizeWhenHidden << 15 | // [15]
- policy.bits.verStretch << 16 | // [16, 23]
- policy.bits.horStretch << 24); // [24, 31]
- return stream << data;
-}
-
-#define VALUE_OF_BITS(data, bitstart, bitcount) ((data >> bitstart) & ((1 << bitcount) -1))
-
-/*!
- \relates QSizePolicy
- \since 4.2
-
- Reads the size \a policy from the data stream \a stream.
-
- \sa{Serializing Qt Data Types}{Format of the QDataStream operators}
-*/
-QDataStream &operator>>(QDataStream &stream, QSizePolicy &policy)
-{
- quint32 data;
- stream >> data;
- policy.bits.horPolicy = VALUE_OF_BITS(data, 0, 4);
- policy.bits.verPolicy = VALUE_OF_BITS(data, 4, 4);
- policy.bits.hfw = VALUE_OF_BITS(data, 8, 1);
- policy.bits.ctype = VALUE_OF_BITS(data, 9, 5);
- policy.bits.wfh = VALUE_OF_BITS(data, 14, 1);
- policy.bits.retainSizeWhenHidden = VALUE_OF_BITS(data, 15, 1);
- policy.bits.verStretch = VALUE_OF_BITS(data, 16, 8);
- policy.bits.horStretch = VALUE_OF_BITS(data, 24, 8);
- return stream;
-}
-#endif // QT_NO_DATASTREAM
-
QT_END_NAMESPACE