qt5base-lts/tests/auto/widgets/kernel
Marc Mutz 8b9b27bced 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>
2017-01-28 07:46:27 +00:00
..
qaction Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-01 06:02:55 +01:00
qactiongroup Updated license headers 2016-01-21 18:55:18 +00:00
qapplication Merge remote-tracking branch 'origin/5.8' into dev 2016-11-02 09:24:11 +01:00
qboxlayout Merge remote-tracking branch 'origin/5.6' into 5.7 2016-09-28 11:51:35 +02:00
qdesktopwidget Updated license headers 2016-01-21 18:55:18 +00:00
qformlayout Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-24 10:31:21 +01:00
qgridlayout Merge remote-tracking branch 'origin/5.7' into 5.8 2016-09-29 00:38:01 +02:00
qlayout tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
qshortcut Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-08 17:15:55 +02:00
qsizepolicy QSizePolicy: add a transposed() method 2017-01-28 07:46:27 +00:00
qstackedlayout Plug memleaks in tst_QStackedLayout 2017-01-14 18:17:47 +00:00
qtooltip Updated license headers 2016-01-21 18:55:18 +00:00
qwidget Widgets: report focus object change to QtGui before sending widget events 2017-01-10 23:24:57 +00:00
qwidget_window Add support for Apple watchOS 2016-08-19 21:05:55 +00:00
qwidgetaction Updated license headers 2016-01-21 18:55:18 +00:00
qwidgetmetatype Updated license headers 2016-01-21 18:55:18 +00:00
qwidgetsvariant Updated license headers 2016-01-21 18:55:18 +00:00
qwindowcontainer Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
kernel.pro Introducing QWidget::createWindowContainer() 2013-01-25 14:11:07 +01:00