summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-08 09:18:54 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-08 09:18:54 (GMT)
commitf46883a6c507b0d6cf6a736fd90c016f82560435 (patch)
treef55cf8d9687045187c683ff3d362796efe6f4178 /src/declarative/graphicsitems
parentbef397bb2e08a66d1471e8c56bb7e2e1e7abfaa2 (diff)
parentddeae91ab54bb92b813304778ab8dc4037937274 (diff)
downloadQt-f46883a6c507b0d6cf6a736fd90c016f82560435.zip
Qt-f46883a6c507b0d6cf6a736fd90c016f82560435.tar.gz
Qt-f46883a6c507b0d6cf6a736fd90c016f82560435.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: ListView: Fix calculation of currentItem position when out of view. Update QtGui def files Fix openDatabaseSync() to not create unused directory Document support for QVariantList and QVariantMap type conversion Some doc clarification for components and javascript integration Cursor shouldn't blink while dragging cursor position Qt.include() docs weren't being picked up by qdoc Doc: make it clear that "z" affects sibling stacking order.
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp1
3 files changed, 11 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 9d6fe12..932e68f 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -1809,9 +1809,9 @@ void QDeclarativeItem::setClip(bool c)
/*!
\qmlproperty real Item::z
- Sets the stacking order of the item. By default the stacking order is 0.
+ Sets the stacking order of sibling items. By default the stacking order is 0.
- Items with a higher stacking value are drawn on top of items with a
+ Items with a higher stacking value are drawn on top of siblings with a
lower stacking order. Items with the same stacking value are drawn
bottom up in the order they appear. Items with a negative stacking
value are drawn under their parent's content.
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 845da79..2dfee3b 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -739,16 +739,20 @@ void QDeclarativeListViewPrivate::layout()
return;
}
if (!visibleItems.isEmpty()) {
- qreal oldEnd = visibleItems.last()->endPosition();
+ bool fixedCurrent = currentItem && visibleItems.first()->item == currentItem->item;
+ qreal sum = visibleItems.first()->size();
qreal pos = visibleItems.first()->position() + visibleItems.first()->size() + spacing;
for (int i=1; i < visibleItems.count(); ++i) {
FxListItem *item = visibleItems.at(i);
item->setPosition(pos);
pos += item->size() + spacing;
+ sum += item->size();
+ fixedCurrent = fixedCurrent || (currentItem && item->item == currentItem->item);
}
- // move current item if it is after the visible items.
- if (currentItem && currentIndex > lastVisibleIndex())
- currentItem->setPosition(currentItem->position() + (visibleItems.last()->endPosition() - oldEnd));
+ averageSize = qRound(sum / visibleItems.count());
+ // move current item if it is not a visible item.
+ if (currentIndex >= 0 && currentItem && !fixedCurrent)
+ currentItem->setPosition(positionAt(currentIndex));
}
q->refill();
minExtentDirty = true;
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index f8421a3..df103de 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1479,6 +1479,7 @@ void QDeclarativeTextInput::cursorPosChanged()
updateRect();//TODO: Only update rect between pos's
updateMicroFocus();
emit cursorPositionChanged();
+ d->control->resetCursorBlinkTimer();
if(!d->control->hasSelectedText()){
if(d->lastSelectionStart != d->control->cursor()){