diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-10-31 14:03:00 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-10-31 14:03:00 (GMT) |
commit | 8da9881989ca55f7d5e9e74c91e3abc98ce8a1b5 (patch) | |
tree | f8ea3bac554266d7f74cf5495dc2de4c6a524c58 /src | |
parent | cf5695691682957b68b67fd951addf4a52bfba84 (diff) | |
parent | da8a056dbb0e4b0a65d94857cdd65ddcb8633341 (diff) | |
download | Qt-8da9881989ca55f7d5e9e74c91e3abc98ce8a1b5.zip Qt-8da9881989ca55f7d5e9e74c91e3abc98ce8a1b5.tar.gz Qt-8da9881989ca55f7d5e9e74c91e3abc98ce8a1b5.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
doc/src/declarative/declarativeui.qdoc
doc/src/mainpage.qdoc
doc/src/platforms/supported-platforms.qdoc
doc/src/qt-webpages.qdoc
src/network/access/qnetworkdiskcache.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 10 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 15 | ||||
-rw-r--r-- | src/network/access/qnetworkdiskcache.cpp | 2 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 0a74910..16518f4 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2855,6 +2855,11 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxGridItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(index, item); item->setPosition(colPos, rowPos); added.append(item); @@ -3045,6 +3050,11 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count) FxGridItem *movedItem = moved.take(item->index); if (!movedItem) movedItem = d->createItem(item->index); + if (!movedItem) { + // broken or no delegate + d->clear(); + return; + } it = d->visibleItems.insert(it, movedItem); if (it == d->visibleItems.begin() && firstItem) movedItem->setPosition(firstItem->colPos(), firstItem->rowPos()); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 7638b2b..7b4dc5c 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3285,6 +3285,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxListItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(insertionIdx, item); pos -= item->size() + d->spacing; item->setPosition(pos); @@ -3315,6 +3320,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxListItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(index, item); item->setPosition(pos); added.append(item); @@ -3518,6 +3528,11 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count) FxListItem *movedItem = moved.take(item->index); if (!movedItem) movedItem = d->createItem(item->index); + if (!movedItem) { + // broken or no delegate + d->clear(); + return; + } if (item->index <= firstVisible->index) moveBy -= movedItem->size(); it = d->visibleItems.insert(it, movedItem); diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index 1c515c2..af6ba1d 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -429,7 +429,7 @@ QIODevice *QNetworkDiskCache::data(const QUrl &url) // ### verify that QFile uses the fd size and not the file name qint64 size = file->size() - file->pos(); const uchar *p = 0; -#if !defined(Q_OS_WINCE) && !defined(Q_OS_INTEGRITY) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_SYMBIAN) p = file->map(file->pos(), size); #endif if (p) { |