diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-12-17 16:19:27 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-01-28 07:46:27 +0000 |
commit | 8b9b27bced5227fae0f44a92a24183f38c944c02 (patch) | |
tree | 22ae2dfdb993ed237ffab8dedce7bb348896e4eb /src/plugins/platforms/eglfs/api/api.pri | |
parent | ce3402b5efc929b99d6ecb27f47e671cdcfae393 (diff) |
QSizePolicy: add a transposed() method
In some situations, this allows for nicer code. It's also possible to
make this constexpr in C++11, whereas the mutable transpose() would
require C++14-style constexpr.
The new function should also be faster, since it just swaps the member
variables.
Because of constexpr-function limitations, the way the return value is
constructed needs to depend on the level of the compiler's C++11 support.
This is not the only class that requires uniform init to provide a fully
constexpr interface (QUuid and QBasicAtomic come to mind), so this should
probably be generalized across Qt at some point.
Added tests.
[ChangeLog][QtWidgets][QSizePolicy] Added transposed() method.
Change-Id: Ic1077a0d5a861e7c63bd1daeeb42b97c3a2f71ef
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/api/api.pri')
0 files changed, 0 insertions, 0 deletions