summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-09-11 00:54:11 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-09-11 00:54:11 (GMT)
commit7051254771882e88f64f9b5578d975f29efab0b6 (patch)
treef71981bafba35a768a63b243920a590ce29e6c18
parent804c9ef64085fafe6f12b92e5dd40e595ed3460f (diff)
downloadQt-7051254771882e88f64f9b5578d975f29efab0b6.zip
Qt-7051254771882e88f64f9b5578d975f29efab0b6.tar.gz
Qt-7051254771882e88f64f9b5578d975f29efab0b6.tar.bz2
current -> currentItem property in ListView and GridView
-rw-r--r--examples/declarative/listview/highlight.qml2
-rw-r--r--examples/declarative/loader/Browser.qml2
-rw-r--r--src/declarative/QmlChanges.txt2
-rw-r--r--src/declarative/fx/qfxgridview.cpp4
-rw-r--r--src/declarative/fx/qfxgridview.h2
-rw-r--r--src/declarative/fx/qfxlistview.cpp4
-rw-r--r--src/declarative/fx/qfxlistview.h2
7 files changed, 10 insertions, 8 deletions
diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml
index e707ac0..cb92ad9 100644
--- a/examples/declarative/listview/highlight.qml
+++ b/examples/declarative/listview/highlight.qml
@@ -44,7 +44,7 @@ Rectangle {
id: PetHighlight
Rectangle {
width: 200; height: 50; color: "#FFFF88"
- y: SpringFollow { source: List1.current.y; spring: 3; damping: 0.1 }
+ y: SpringFollow { source: List1.currentItem.y; spring: 3; damping: 0.1 }
}
}
ListView {
diff --git a/examples/declarative/loader/Browser.qml b/examples/declarative/loader/Browser.qml
index 196cdc5..6711de4 100644
--- a/examples/declarative/loader/Browser.qml
+++ b/examples/declarative/loader/Browser.qml
@@ -82,7 +82,7 @@ Rectangle {
focus: true
Keys.onPressed: {
if (event.key == Qt.Key_Return || event.key == Qt.Key_Select) {
- View.current.launch();
+ View.currentItem.launch();
event.accepted = true;
}
}
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index eace089..fe923a7 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -64,6 +64,8 @@ WebView: mouseY -> clickY (parameter to onDoubleClick)
WebView: cacheSize -> pixelCacheSize
Repeater: component -> delegate
Repeater: dataSource -> model
+ListView: current -> currentItem
+GridView: current -> currentItem
Additions:
MouseRegion: add "acceptedButtons" property
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index f49375a..d4cf691 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -795,10 +795,10 @@ void QFxGridView::setDelegate(QmlComponent *delegate)
/*!
\qmlproperty int GridView::currentIndex
- \qmlproperty Item GridView::current
+ \qmlproperty Item GridView::currentItem
\c currentIndex holds the index of the current item.
- \c current is the current item. Note that the position of the current item
+ \c currentItem is the current item. Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
int QFxGridView::currentIndex() const
diff --git a/src/declarative/fx/qfxgridview.h b/src/declarative/fx/qfxgridview.h
index 734039c..e08ba9e 100644
--- a/src/declarative/fx/qfxgridview.h
+++ b/src/declarative/fx/qfxgridview.h
@@ -60,7 +60,7 @@ class Q_DECLARATIVE_EXPORT QFxGridView : public QFxFlickable
Q_PROPERTY(QVariant model READ model WRITE setModel)
Q_PROPERTY(QmlComponent *delegate READ delegate WRITE setDelegate)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
- Q_PROPERTY(QFxItem *current READ currentItem NOTIFY currentIndexChanged) //### currentItem
+ Q_PROPERTY(QFxItem *currentItem READ currentItem NOTIFY currentIndexChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QmlComponent *highlight READ highlight WRITE setHighlight)
Q_PROPERTY(bool autoHighlight READ autoHighlight WRITE setAutoHighlight)
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index a07b3c0..6596735 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -983,10 +983,10 @@ void QFxListView::setDelegate(QmlComponent *delegate)
/*!
\qmlproperty int ListView::currentIndex
- \qmlproperty Item ListView::current
+ \qmlproperty Item ListView::currentItem
\c currentIndex holds the index of the current item.
- \c current is the current item. Note that the position of the current item
+ \c currentItem is the current item. Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
int QFxListView::currentIndex() const
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/fx/qfxlistview.h
index 829e202..4a124cb 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/fx/qfxlistview.h
@@ -67,7 +67,7 @@ class Q_DECLARATIVE_EXPORT QFxListView : public QFxFlickable
Q_PROPERTY(QVariant model READ model WRITE setModel)
Q_PROPERTY(QmlComponent *delegate READ delegate WRITE setDelegate) //### what happens if delegate is not a QFxItem?
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
- Q_PROPERTY(QFxItem *current READ currentItem NOTIFY currentIndexChanged) //### currentItem
+ Q_PROPERTY(QFxItem *currentItem READ currentItem NOTIFY currentIndexChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QmlComponent *highlight READ highlight WRITE setHighlight)
Q_PROPERTY(bool autoHighlight READ autoHighlight WRITE setAutoHighlight) //### highlightFollowsCurrentItem