diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-07 14:12:34 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-07 14:12:34 (GMT) |
commit | ea6ce3eb29ce41e017d71699b08d10c3eca76b52 (patch) | |
tree | 36e3873667b6f10ff50026697b930489be32a2db /src/declarative/graphicsitems/qdeclarativepathview.cpp | |
parent | 8082a800a55875fd2e64cf2ab5c6fa2c26722132 (diff) | |
parent | f9a8c4ec598a0070b9d2d861efe5ee69d5045a1f (diff) | |
download | Qt-ea6ce3eb29ce41e017d71699b08d10c3eca76b52.zip Qt-ea6ce3eb29ce41e017d71699b08d10c3eca76b52.tar.gz Qt-ea6ce3eb29ce41e017d71699b08d10c3eca76b52.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Support device orientation in harmattan
Connect property alias change signals on use
Doc fix.
Fix setting PathView offset when all visible items are removed.
Rename toolbar button.
Update import statement.
Fixes assert in QDeclarativeWebView
Do not show 'More' button when in fullscreen view.
Set reasonable QT_GUI_DRAG_DISTANCE in mkspecs/linux-g++-maemo/qplatformdefs.h
Allow default QApplication::startDragDistance() to be defined in platformdefs.h
Autotest
Ensure the TextInput cursor blinks immediately when enabled.
Fix minehunt execution from QtDemo
Update QtGui def files
Ensure PathView updates positions when path changes.
Create Loader components in correct context
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index d134929..31943b2 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -300,6 +300,19 @@ void QDeclarativePathViewPrivate::setHighlightPosition(qreal pos) } } +void QDeclarativePathView::pathUpdated() +{ + Q_D(QDeclarativePathView); + QList<QDeclarativeItem*>::iterator it = d->items.begin(); + while (it != d->items.end()) { + QDeclarativeItem *item = *it; + if (QDeclarativePathViewAttached *att = d->attached(item)) + att->m_percent = -1; + ++it; + } + refill(); +} + void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal percent) { if (QDeclarativePathViewAttached *att = attached(item)) { @@ -526,9 +539,9 @@ void QDeclarativePathView::setPath(QDeclarativePath *path) if (d->path == path) return; if (d->path) - disconnect(d->path, SIGNAL(changed()), this, SLOT(refill())); + disconnect(d->path, SIGNAL(changed()), this, SLOT(pathUpdated())); d->path = path; - connect(d->path, SIGNAL(changed()), this, SLOT(refill())); + connect(d->path, SIGNAL(changed()), this, SLOT(pathUpdated())); if (d->isValid() && isComponentComplete()) { d->clear(); if (d->attType) { @@ -1318,6 +1331,8 @@ void QDeclarativePathView::refill() if (idx >= d->modelCount) idx = 0; } + if (!d->items.count()) + d->firstIndex = -1; if (d->modelCount) { // add items to beginning and end |