Don't implicit cast the enum to a bool
Casting a QLayoutPolicy::Fixed to bool was fine since that would return
false.
However, casting a QLayoutPolicy::Shrink to bool would return true,
which would give wrong results. (The conditions only want to check if
the item can grow).
There were no bugs because of this, simply because the Qt Quick Layouts
API does not allow setting *only* the shrink flag.
However, it would become a bug if we ever added such a feature.
Change-Id: I781aec85117f45e12e49ba27f7ed8f5724f71bd9
Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
Showing
Please register or sign in to comment