From d6a687060d80321158459442b1192a07253c281d Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen <richard.gustavsen@digia.com> Date: Tue, 26 Mar 2013 10:24:09 +0100 Subject: [PATCH] StackView: rename initialPage to initialItem Change-Id: Ic156bd94a6bdc2068a6cfcf92c79c16baac31d50 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> --- examples/stackview/main.qml | 2 +- examples/touch/main.qml | 2 +- src/controls/StackView.qml | 18 +++++++++--------- tests/manual/StackView.qml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/stackview/main.qml b/examples/stackview/main.qml index 7c67a3690..af016fb28 100644 --- a/examples/stackview/main.qml +++ b/examples/stackview/main.qml @@ -50,7 +50,7 @@ ApplicationWindow { StackView { id: stackView anchors.fill: parent - initialPage: componentPage + initialItem: componentPage } Component { diff --git a/examples/touch/main.qml b/examples/touch/main.qml index c0db38f61..342d4f2d1 100644 --- a/examples/touch/main.qml +++ b/examples/touch/main.qml @@ -133,7 +133,7 @@ ApplicationWindow { id: pageStack anchors.fill: parent - initialPage: Item { + initialItem: Item { width: parent.width height: parent.height ListView { diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml index e4cea2e0a..4e42b62ae 100644 --- a/src/controls/StackView.qml +++ b/src/controls/StackView.qml @@ -66,7 +66,7 @@ import "Private/StackView.js" as JSArray anchored to the edges of the window, except at the top or bottom where it might be anchored to a status bar, or some other similar UI component. The stack can then be used by invoking its navigation methods. The first page - to show in the StackView is commonly loaded assigning it to \l initialPage. + to show in the StackView is commonly loaded assigning it to \l initialItem. \section1 Basic Navigation There are three primary navigation operations in StackView: push(), pop() and @@ -460,20 +460,20 @@ Item { readonly property alias currentItem: root.__currentItem /*! The first \l Page that should be shown when the StackView is created. - \a initialPage can take same value as the first argument to \l{StackView::push()} + \a initialItem can take same value as the first argument to \l{StackView::push()} {StackView.push()}. Note that this is just a convenience for writing \c{Component.onCompleted: pageStack.push(myInitialPage)} Examples: \list - \li initialPage: Qt.resolvedUrl("MyPage.qml") - \li initialPage: myItem - \li initialPage: {"page" : Qt.resolvedUrl("MyPage.qml"), "properties" : {"color" : "red"}} + \li initialItem: Qt.resolvedUrl("MyPage.qml") + \li initialItem: myItem + \li initialItem: {"page" : Qt.resolvedUrl("MyPage.qml"), "properties" : {"color" : "red"}} \endlist \sa push */ - property var initialPage: null + property var initialItem: null /*! \readonly \a busy is \c true if a page transition is running, and \c false otherwise. */ @@ -528,7 +528,7 @@ Item { Returns the page that became current. - \sa initialPage + \sa initialItem \sa {Pushing pages} */ function push(page) { @@ -742,8 +742,8 @@ Item { /*! \internal */ Component.onCompleted: { - if (initialPage) - push(initialPage) + if (initialItem) + push(initialItem) } /*! \internal */ diff --git a/tests/manual/StackView.qml b/tests/manual/StackView.qml index cf771be05..3b5fdf6b1 100644 --- a/tests/manual/StackView.qml +++ b/tests/manual/StackView.qml @@ -49,7 +49,7 @@ Window { StackView { id: stackView anchors.fill: parent - initialPage: pageComponent + initialItem: pageComponent } property StackViewDelegate fadeTransition: StackViewDelegate { -- GitLab