From 63d0b54df365380107cea7017c7893c7d04df13e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 15 Jul 2010 20:26:23 +0200 Subject: Fix compilation after merge viewport has been renamed contentItem in 4.7 (commit 9d6ccfea89ae99b747f70ece71185868f189d0f9) (the code in master was added in commit 8c08c737837389f5ff2641219eb901ad217d3f24) --- .../graphicsitems/qdeclarativeflickable.cpp | 20 ++++++++++---------- 1 file 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 int QDeclarativeFlickablePrivate::data_count(QDeclarativeListProperty *property) { - QDeclarativeItem *viewport = static_cast(property->data)->viewport; - return viewport->childItems().count() + viewport->children().count(); + QDeclarativeItem *contentItem= static_cast(property->data)->contentItem; + return contentItem->childItems().count() + contentItem->children().count(); } QObject *QDeclarativeFlickablePrivate::data_at(QDeclarativeListProperty *property, int index) { - QDeclarativeItem *viewport = static_cast(property->data)->viewport; + QDeclarativeItem *contentItem = static_cast(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 void QDeclarativeFlickablePrivate::data_clear(QDeclarativeListProperty *property) { - QDeclarativeItem *viewport = static_cast(property->data)->viewport; + QDeclarativeItem *contentItem = static_cast(property->data)->contentItem; - const QList graphicsItems = viewport->childItems(); + const QList graphicsItems = contentItem->childItems(); for (int i = 0; i < graphicsItems.count(); i++) - viewport->scene()->removeItem(graphicsItems[i]); + contentItem->scene()->removeItem(graphicsItems[i]); - const QList objects = viewport->children(); + const QList objects = contentItem->children(); for (int i = 0; i < objects.count(); i++) objects[i]->setParent(0); } -- cgit v0.12