Fix crash when column is inserted before rowspanned cell
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 12 Jul 2012 10:55:04 +0000 (12:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 12 Jul 2012 16:29:25 +0000 (18:29 +0200)
commitf94d0ea1dca36d5a93c83564cb873537edf6e2c7
tree108d9c14600f0f17f4d7b69e2b5ce765d59e36b2
parent89a558d6b0fac4281153e80470e393ba227494c4
Fix crash when column is inserted before rowspanned cell

When you're inserting a column in front of a rowspanned cell
and this cell is not the first in the rowspan, we would get
the wrong logical index of the new cell (putting it in
front of the initial cell with the rowspan). If the cell
does not span all rows, the table will get into a broken state
and trigger asserts in update(). To fix this, we search for
the first cell after the insertion point which has a logical
index higher than the cell directly before the insertion point.

Change-Id: I42e91a20d77b2ba9c5607f6cab23f51ed888cbd3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
src/gui/text/qtexttable.cpp
tests/auto/gui/text/qtexttable/tst_qtexttable.cpp