diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-12-04 05:15:15 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-12-04 05:15:15 (GMT) |
commit | 898ccd0b94cf8c6b7fe3b33f85fb40ee7ea759b7 (patch) | |
tree | 7e8b2440b2a5410ae83a27f8439a0d4e66baf92c /src/declarative | |
parent | f78ca8adb35a6ce95563e7e6b80c22705eaf57ef (diff) | |
parent | 5d3db0fbfa96964b9448705d9edd4c0cd9e65816 (diff) | |
download | Qt-898ccd0b94cf8c6b7fe3b33f85fb40ee7ea759b7.zip Qt-898ccd0b94cf8c6b7fe3b33f85fb40ee7ea759b7.tar.gz Qt-898ccd0b94cf8c6b7fe3b33f85fb40ee7ea759b7.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 39 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstext.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp | 3 |
3 files changed, 18 insertions, 26 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index 658cfaa..2711059 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -497,10 +497,8 @@ void QmlGraphicsListViewPrivate::init() QObject::connect(q, SIGNAL(widthChanged()), q, SLOT(refill())); QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped())); q->setFlickDirection(QmlGraphicsFlickable::VerticalFlick); - if (itemResizedIdx == -1) { + if (itemResizedIdx == -1) itemResizedIdx = QmlGraphicsListView::staticMetaObject.indexOfSlot("itemResized()"); - qDebug() << "ri" << itemResizedIdx; - } } void QmlGraphicsListViewPrivate::clear() @@ -1914,26 +1912,23 @@ void QmlGraphicsListView::viewportMoved() } } - if ((d->haveHighlightRange && d->highlightRange == QmlGraphicsListView::StrictlyEnforceRange) - || d->snapMode == QmlGraphicsListView::SnapToItem) { - if (d->flicked && d->correctFlick) { - // Near an end and it seems that the extent has changed? - // Recalculate the flick so that we don't end up in an odd position. - if (d->velocityY > 0) { - if (d->flickTargetY - d->_moveY.value() < height()/2 && minYExtent() != d->flickTargetY) - d->flickY(-d->verticalVelocity.value()); - } else if (d->velocityY < 0) { - if (d->_moveY.value() - d->flickTargetY < height()/2 && maxYExtent() != d->flickTargetY) - d->flickY(-d->verticalVelocity.value()); - } + if (d->flicked && d->correctFlick) { + // Near an end and it seems that the extent has changed? + // Recalculate the flick so that we don't end up in an odd position. + if (d->velocityY > 0) { + if (d->flickTargetY - d->_moveY.value() < height()/2 && minYExtent() != d->flickTargetY) + d->flickY(-d->verticalVelocity.value()); + } else if (d->velocityY < 0) { + if (d->_moveY.value() - d->flickTargetY < height()/2 && maxYExtent() != d->flickTargetY) + d->flickY(-d->verticalVelocity.value()); + } - if (d->velocityX > 0) { - if (d->flickTargetX - d->_moveX.value() < height()/2 && minXExtent() != d->flickTargetX) - d->flickX(-d->verticalVelocity.value()); - } else if (d->velocityX < 0) { - if (d->_moveX.value() - d->flickTargetX < height()/2 && maxXExtent() != d->flickTargetX) - d->flickX(-d->verticalVelocity.value()); - } + if (d->velocityX > 0) { + if (d->flickTargetX - d->_moveX.value() < height()/2 && minXExtent() != d->flickTargetX) + d->flickX(-d->verticalVelocity.value()); + } else if (d->velocityX < 0) { + if (d->_moveX.value() - d->flickTargetX < height()/2 && maxXExtent() != d->flickTargetX) + d->flickX(-d->verticalVelocity.value()); } } } diff --git a/src/declarative/graphicsitems/qmlgraphicstext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp index 854d503..ad12189 100644 --- a/src/declarative/graphicsitems/qmlgraphicstext.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp @@ -121,8 +121,6 @@ QmlGraphicsText::~QmlGraphicsText() QmlGraphicsTextPrivate::~QmlGraphicsTextPrivate() { - delete control; - delete doc; } /*! diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index b973d6c..a6c40c5 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -761,8 +761,7 @@ QmlGraphicsVisualDataModel::ReleaseFlags QmlGraphicsVisualDataModel::release(Qml if (inPackage) emit destroyingPackage(qobject_cast<QmlPackage*>(obj)); stat |= Destroyed; - obj->setParent(0); - obj->deleteLater(); + delete obj; } else if (!inPackage) { stat |= Referenced; } |