summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-12 17:09:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-12 17:09:04 (GMT)
commite9a0067ef4b272f1893522959dc15561970590ea (patch)
tree234241d0d6dbbf29857c4e66d2723f77239f31ee /src/gui/itemviews
parent6f736694461edc25b6e757f40ab9cad6a9207ad4 (diff)
parentb3fd9918d2c2d46780d3f924888a67d33f246233 (diff)
downloadQt-e9a0067ef4b272f1893522959dc15561970590ea.zip
Qt-e9a0067ef4b272f1893522959dc15561970590ea.tar.gz
Qt-e9a0067ef4b272f1893522959dc15561970590ea.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (54 commits) Improved support for OPTION and LINKEROPTION statements in MMP files Fix crash with QTextEdit::textChanged() when deleting a character econd half of the crash fix for codecs on Symbian Autotest: Use the file in the non-writeable area Autotest: moved these to the qtest/ dir Fix problem with accessibility clients not getting info from QFileDialog Fix a crash with global static objects Autotest: same as previous commit Autotest: fix network test failure Doc: we don't ship a qconfig executable in the Windows CE packages Enable preserved swap behavior when surface is created due to resize. Fixed possible data corruption in the triangulating stroker. Generate triggered signal even the action launches menu in Symbian. Symbian emulator: unload file server so apps can be recompiled. Clear QFontCache TLS content before nullifying TLS pointer. Fixed focus and window activation events on Symbian when opening menu. Fixed caching of QPainter patterns in the GL 2 engine. Fixes CursorChange and TooltipChange events delivery for QGraphicsWidget QTableView: fix spans corruption when removing spans. Fixes painting artifacts when scaling a QGraphicsProxyWidget. ...
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qtableview.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 43445b4..31be224 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -114,15 +114,14 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height)
}
} else if (old_height > span->height()) {
//remove the span from all the subspans lists that intersect the columns not covered anymore
- Index::iterator it_y = index.lowerBound(-span->bottom());
- if (it_y == index.end())
- it_y = index.find(-span->top()); // This is the only span remaining and we are deleting it.
+ Index::iterator it_y = index.lowerBound(-qMax(span->bottom(), span->top())); //qMax usefull if height is 0
Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list
while (-it_y.key() <= span->top() + old_height -1) {
if (-it_y.key() > span->bottom()) {
- (*it_y).remove(-span->left());
+ int removed = (*it_y).remove(-span->left());
+ Q_ASSERT(removed == 1); Q_UNUSED(removed);
if (it_y->isEmpty()) {
- it_y = index.erase(it_y) - 1;
+ it_y = index.erase(it_y);
}
}
if(it_y == index.begin())