Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/kernel/qsizepolicy.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | QSizePolicy::ControlType QSizePolicy::controlType() const | - | ||||||
5 | { | - | ||||||
6 | return never executed: QSizePolicy::ControlType(1 << bits.ctype);return QSizePolicy::ControlType(1 << bits.ctype); never executed: return QSizePolicy::ControlType(1 << bits.ctype); | 0 | ||||||
7 | } | - | ||||||
8 | void QSizePolicy::setControlType(ControlType type) | - | ||||||
9 | { | - | ||||||
10 | int i = 0; | - | ||||||
11 | while (true) { | - | ||||||
12 | if (type & (0x1 << i)
| 0 | ||||||
13 | bits.ctype = i; | - | ||||||
14 | return; never executed: return; | 0 | ||||||
15 | } | - | ||||||
16 | ++i; | - | ||||||
17 | } never executed: end of block | 0 | ||||||
18 | } never executed: end of block | 0 | ||||||
19 | QSizePolicy::operator QVariant() const | - | ||||||
20 | { | - | ||||||
21 | return never executed: QVariant(QVariant::SizePolicy, this);return QVariant(QVariant::SizePolicy, this); never executed: return QVariant(QVariant::SizePolicy, this); | 0 | ||||||
22 | } | - | ||||||
23 | QDataStream &operator<<(QDataStream &stream, const QSizePolicy &policy) | - | ||||||
24 | { | - | ||||||
25 | - | |||||||
26 | quint32 data = (policy.bits.horPolicy | | - | ||||||
27 | policy.bits.verPolicy << 4 | | - | ||||||
28 | policy.bits.hfw << 8 | | - | ||||||
29 | policy.bits.ctype << 9 | | - | ||||||
30 | policy.bits.wfh << 14 | | - | ||||||
31 | policy.bits.retainSizeWhenHidden << 15 | | - | ||||||
32 | policy.bits.verStretch << 16 | | - | ||||||
33 | policy.bits.horStretch << 24); | - | ||||||
34 | return never executed: stream << data;return stream << data; never executed: return stream << data; | 0 | ||||||
35 | } | - | ||||||
36 | QDataStream &operator>>(QDataStream &stream, QSizePolicy &policy) | - | ||||||
37 | { | - | ||||||
38 | quint32 data; | - | ||||||
39 | stream >> data; | - | ||||||
40 | policy.bits.horPolicy = ((data >> 0) & ((1 << 4) -1)); | - | ||||||
41 | policy.bits.verPolicy = ((data >> 4) & ((1 << 4) -1)); | - | ||||||
42 | policy.bits.hfw = ((data >> 8) & ((1 << 1) -1)); | - | ||||||
43 | policy.bits.ctype = ((data >> 9) & ((1 << 5) -1)); | - | ||||||
44 | policy.bits.wfh = ((data >> 14) & ((1 << 1) -1)); | - | ||||||
45 | policy.bits.retainSizeWhenHidden = ((data >> 15) & ((1 << 1) -1)); | - | ||||||
46 | policy.bits.verStretch = ((data >> 16) & ((1 << 8) -1)); | - | ||||||
47 | policy.bits.horStretch = ((data >> 24) & ((1 << 8) -1)); | - | ||||||
48 | return never executed: stream;return stream; never executed: return stream; | 0 | ||||||
49 | } | - | ||||||
50 | - | |||||||
51 | - | |||||||
52 | - | |||||||
53 | QDebug operator<<(QDebug dbg, const QSizePolicy &p) | - | ||||||
54 | { | - | ||||||
55 | QDebugStateSaver saver(dbg); | - | ||||||
56 | dbg.nospace() << "QSizePolicy(horizontalPolicy = " << p.horizontalPolicy() | - | ||||||
57 | << ", verticalPolicy = " << p.verticalPolicy() << ')'; | - | ||||||
58 | return never executed: dbg;return dbg; never executed: return dbg; | 0 | ||||||
59 | } | - | ||||||
60 | - | |||||||
61 | - | |||||||
62 | - | |||||||
63 | - | |||||||
Switch to Source code | Preprocessed file |