summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-29 10:33:06 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-29 10:33:06 (GMT)
commite62f0aec863147682fcfcb651d13e0e7cff6d363 (patch)
tree49a5055ba465e412dba76a60c5f81c20a7ffe674 /src/gui
parent65642dd343bf61510117cd7e13f69e7138247932 (diff)
parent940b5b23268193d58d7e229bf97a22276098790b (diff)
downloadQt-e62f0aec863147682fcfcb651d13e0e7cff6d363.zip
Qt-e62f0aec863147682fcfcb651d13e0e7cff6d363.tar.gz
Qt-e62f0aec863147682fcfcb651d13e0e7cff6d363.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: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( d521d7d81e8f0297c94be9ebd8af67ee130d0edb ) Workaround for QTBUG-8013: Do not return an ascent of 0 Fix crash when all the items in a QListView are hidden Removed QEXPECT_FAIL macros from test cases which now pass Ensure backing store is deleted before top-level window One more .pro fix for deprecated INCPATH Fix Rhys' qmake warnings Fixed QVideoSurfaceFormat::isValid()
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qlistview.cpp7
-rw-r--r--src/gui/text/qfontengine_s60.cpp5
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 1869093..76d7642 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2782,7 +2782,10 @@ QPoint QIconModeViewBase::initDynamicLayout(const QListViewLayoutInfo &info)
y = info.bounds.y() + info.spacing;
items.reserve(rowCount() - hiddenCount());
} else {
- const QListViewItem item = items.at(info.first - 1);
+ int idx = info.first - 1;
+ while (idx > 0 && !items.at(idx).isValid())
+ --idx;
+ const QListViewItem &item = items.at(idx);
x = item.x;
y = item.y;
if (info.flow == QListView::LeftToRight)
@@ -2913,6 +2916,8 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
else
contentsSize.rwidth() += info.spacing;
}
+ if (rect.size().isEmpty())
+ return;
// resize tree
int insertFrom = info.first;
if (done || info.first == 0) {
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 74ef646..52a1fe7 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -374,7 +374,10 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph)
QFixed QFontEngineS60::ascent() const
{
- return m_originalFont->FontMaxAscent();
+ // Workaround for QTBUG-8013
+ // Stroke based fonts may return an incorrect FontMaxAscent of 0.
+ const QFixed ascent = m_originalFont->FontMaxAscent();
+ return (ascent > 0) ? ascent : QFixed::fromReal(m_originalFontSizeInPixels) - descent();
}
QFixed QFontEngineS60::descent() const