GridView sometimes lays out one less column than expected
authorMartin Jones <martin.jones@nokia.com>
Wed, 9 Nov 2011 22:53:04 +0000 (08:53 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 Nov 2011 00:54:26 +0000 (01:54 +0100)
commit8eb0e48a051771fe99bce75497e803d98d9253ad
tree6c52e678a3b4d37e20288d022e65250374dce028
parentd81059e4f8d42869e1b9842a3b07e83c7da198be
GridView sometimes lays out one less column than expected

If the cellWidth/cellHeight was not a whole number the wrapping was
unreliable.  Calulate column positions more robustly, i.e. avoid
comparing values subject to rounding errors.

Task-number: QTBUG-21846
Change-Id: Ic3a90b36d542ce8af49461bd524e4405c74aece5
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/declarative/items/qquickgridview.cpp
tests/auto/declarative/qquickgridview/data/unaligned.qml [new file with mode: 0644]
tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp