summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qsizepolicy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qsizepolicy.h')
-rw-r--r--src/widgets/kernel/qsizepolicy.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index f26923eeb0..f275add923 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -133,9 +133,10 @@ public:
Q_DECL_RELAXED_CONSTEXPR void setVerticalPolicy(Policy d) noexcept { bits.verPolicy = d; }
void setControlType(ControlType type) noexcept;
+ // ### Qt 7: consider making Policy a QFlags and removing these casts
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const noexcept {
- return ( (verticalPolicy() & ExpandFlag) ? Qt::Vertical : Qt::Orientations() )
- | ( (horizontalPolicy() & ExpandFlag) ? Qt::Horizontal : Qt::Orientations() ) ;
+ return ( (verticalPolicy() & static_cast<Policy>(ExpandFlag)) ? Qt::Vertical : Qt::Orientations() )
+ | ( (horizontalPolicy() & static_cast<Policy>(ExpandFlag)) ? Qt::Horizontal : Qt::Orientations() ) ;
}
Q_DECL_RELAXED_CONSTEXPR void setHeightForWidth(bool b) noexcept { bits.hfw = b; }