QSizePolicy: prepare for constexpr'ifcation
...by bringing expandingDirections() into a (C++11) constexpr'able form. Change-Id: I1922329a6f579df2b3504c8ae048224f9b229d6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
bac0796308
commit
5b720fbf5d
@ -101,12 +101,8 @@ public:
|
||||
void setControlType(ControlType type);
|
||||
|
||||
Qt::Orientations expandingDirections() const {
|
||||
Qt::Orientations result;
|
||||
if (verticalPolicy() & ExpandFlag)
|
||||
result |= Qt::Vertical;
|
||||
if (horizontalPolicy() & ExpandFlag)
|
||||
result |= Qt::Horizontal;
|
||||
return result;
|
||||
return ( (verticalPolicy() & ExpandFlag) ? Qt::Vertical : Qt::Orientations() )
|
||||
| ( (horizontalPolicy() & ExpandFlag) ? Qt::Horizontal : Qt::Orientations() ) ;
|
||||
}
|
||||
|
||||
void setHeightForWidth(bool b) { bits.hfw = b; }
|
||||
|
Loading…
Reference in New Issue
Block a user