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 24db99354b..5e948175f3 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -108,9 +108,10 @@ public:
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
constexpr Qt::Orientations expandingDirections() const noexcept {
- return ( (verticalPolicy() & int(ExpandFlag)) ? Qt::Vertical : Qt::Orientations() )
- | ( (horizontalPolicy() & int(ExpandFlag)) ? Qt::Horizontal : Qt::Orientations() ) ;
+ return ( (verticalPolicy() & static_cast<Policy>(ExpandFlag)) ? Qt::Vertical : Qt::Orientations() )
+ | ( (horizontalPolicy() & static_cast<Policy>(ExpandFlag)) ? Qt::Horizontal : Qt::Orientations() ) ;
}
constexpr void setHeightForWidth(bool b) noexcept { bits.hfw = b; }