QSizePolicy: implement transpose() via transposed()
Having two implementations was nice for testing, but now remove one of them. Change-Id: I70dc7d16496427dd36ba2464c9f650ec865202b1 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>bb10
parent
f66319faa1
commit
714100f631
|
|
@ -158,7 +158,7 @@ public:
|
|||
QT_SIZEPOLICY_CONSTEXPR bool retainSizeWhenHidden() const { return bits.retainSizeWhenHidden; }
|
||||
void setRetainSizeWhenHidden(bool retainSize) { bits.retainSizeWhenHidden = retainSize; }
|
||||
|
||||
void transpose();
|
||||
void transpose() { *this = transposed(); }
|
||||
#ifndef Q_QDOC
|
||||
QT_SIZEPOLICY_CONSTEXPR_AND_UNIFORM_INIT
|
||||
#endif
|
||||
|
|
@ -220,16 +220,6 @@ Q_WIDGETS_EXPORT QDataStream &operator>>(QDataStream &, QSizePolicy &);
|
|||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug dbg, const QSizePolicy &);
|
||||
#endif
|
||||
|
||||
inline void QSizePolicy::transpose() {
|
||||
Policy hData = horizontalPolicy();
|
||||
Policy vData = verticalPolicy();
|
||||
int hStretch = horizontalStretch();
|
||||
int vStretch = verticalStretch();
|
||||
setHorizontalPolicy(vData);
|
||||
setVerticalPolicy(hData);
|
||||
setHorizontalStretch(vStretch);
|
||||
setVerticalStretch(hStretch);
|
||||
}
|
||||
|
||||
#undef QT_SIZEPOLICY_CONSTEXPR
|
||||
#undef QT_SIZEPOLICY_CONSTEXPR_AND_UNIFORM_INIT
|
||||
|
|
|
|||
Loading…
Reference in New Issue