diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-07-15 18:26:23 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-07-15 18:30:44 (GMT) |
commit | 63d0b54df365380107cea7017c7893c7d04df13e (patch) | |
tree | 0919c82a21e0b0056f0eb180ce139c8ab99eb633 | |
parent | 4e0d2169790f91348c59432f651878e604923dae (diff) | |
download | Qt-63d0b54df365380107cea7017c7893c7d04df13e.zip Qt-63d0b54df365380107cea7017c7893c7d04df13e.tar.gz Qt-63d0b54df365380107cea7017c7893c7d04df13e.tar.bz2 |
Fix compilation after merge
viewport has been renamed contentItem in 4.7
(commit 9d6ccfea89ae99b747f70ece71185868f189d0f9)
(the code in master was added in commit 8c08c737837389f5ff2641219eb901ad217d3f24)
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeflickable.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index f32d62b..4dc011e 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1030,23 +1030,23 @@ void QDeclarativeFlickablePrivate::data_append(QDeclarativeListProperty<QObject> int QDeclarativeFlickablePrivate::data_count(QDeclarativeListProperty<QObject> *property) { - QDeclarativeItem *viewport = static_cast<QDeclarativeFlickablePrivate*>(property->data)->viewport; - return viewport->childItems().count() + viewport->children().count(); + QDeclarativeItem *contentItem= static_cast<QDeclarativeFlickablePrivate*>(property->data)->contentItem; + return contentItem->childItems().count() + contentItem->children().count(); } QObject *QDeclarativeFlickablePrivate::data_at(QDeclarativeListProperty<QObject> *property, int index) { - QDeclarativeItem *viewport = static_cast<QDeclarativeFlickablePrivate*>(property->data)->viewport; + QDeclarativeItem *contentItem = static_cast<QDeclarativeFlickablePrivate*>(property->data)->contentItem; - int childItemCount = viewport->childItems().count(); + int childItemCount = contentItem->childItems().count(); if (index < 0) return 0; if (index < childItemCount) { - return viewport->childItems().at(index)->toGraphicsObject(); + return contentItem->childItems().at(index)->toGraphicsObject(); } else { - return viewport->children().at(index - childItemCount); + return contentItem->children().at(index - childItemCount); } return 0; @@ -1054,13 +1054,13 @@ QObject *QDeclarativeFlickablePrivate::data_at(QDeclarativeListProperty<QObject> void QDeclarativeFlickablePrivate::data_clear(QDeclarativeListProperty<QObject> *property) { - QDeclarativeItem *viewport = static_cast<QDeclarativeFlickablePrivate*>(property->data)->viewport; + QDeclarativeItem *contentItem = static_cast<QDeclarativeFlickablePrivate*>(property->data)->contentItem; - const QList<QGraphicsItem*> graphicsItems = viewport->childItems(); + const QList<QGraphicsItem*> graphicsItems = contentItem->childItems(); for (int i = 0; i < graphicsItems.count(); i++) - viewport->scene()->removeItem(graphicsItems[i]); + contentItem->scene()->removeItem(graphicsItems[i]); - const QList<QObject*> objects = viewport->children(); + const QList<QObject*> objects = contentItem->children(); for (int i = 0; i < objects.count(); i++) objects[i]->setParent(0); } |