Commit 587c2c00 authored by Jan Arve Saether's avatar Jan Arve Saether Committed by The Qt Project
Browse files

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: default avatarRichard Moe Gustavsen <richard.gustavsen@digia.com>
parent a6b01ff8
Showing with 2 additions and 5 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment