From eceefe1e6cdc34f9d80c03fa6ca60c4335468be7 Mon Sep 17 00:00:00 2001 From: Caroline Chao <caroline.chao@digia.com> Date: Wed, 13 Mar 2013 10:51:51 +0100 Subject: [PATCH] Replace variant with var in qml files Change-Id: I98b48b6dd50d1a693fb947509a9f6b05c893df83 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> --- src/controls/PageStack.qml | 2 +- src/controls/TableView.qml | 22 +++++++++++----------- src/private/ScrollBar.qml | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/controls/PageStack.qml b/src/controls/PageStack.qml index 6f9765e66..c40f22ea5 100644 --- a/src/controls/PageStack.qml +++ b/src/controls/PageStack.qml @@ -485,7 +485,7 @@ Item { \endlist \sa push */ - property variant initialPage: null + property var initialPage: null /*! \readonly \a busy is \c true if a page transition is running, and \c false otherwise. */ diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 0416217bd..696b41dc0 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -112,7 +112,7 @@ ScrollView { \endcode \sa {qml-data-models}{Data Models} */ - property variant model + property var model /*! This property is set to \c true if the view alternates the row color. The default value is \c true. */ @@ -338,8 +338,8 @@ ScrollView { sourceComponent: root.rowDelegate property bool alternateBackground: (index + rowCount) % 2 === 1 property bool rowSelected: false - property variant model: listView.model - property variant modelData: null + property var model: listView.model + property var modelData: null } } } @@ -367,8 +367,8 @@ ScrollView { property int rowIndex: model.index property bool alternateBackground: alternatingRowColors && rowIndex % 2 == 1 - property variant itemModelData: typeof modelData == "undefined" ? null : modelData - property variant itemModel: model + property var itemModelData: typeof modelData == "undefined" ? null : modelData + property var itemModel: model Loader { id: rowstyle @@ -383,9 +383,9 @@ ScrollView { property bool alternateBackground: rowitem.alternateBackground property bool rowSelected: rowitem.ListView.isCurrentItem property int index: rowitem.rowIndex - property variant model: listView.model - property variant modelData: rowitem.itemModelData - property variant itemModel: rowitem.itemModel + property var model: listView.model + property var modelData: rowitem.itemModelData + property var itemModel: rowitem.itemModel } Row { id: row @@ -402,10 +402,10 @@ ScrollView { sourceComponent: columns[index].delegate ? columns[index].delegate : itemDelegate // these properties are exposed to the item delegate - property variant model: listView.model - property variant modelData: itemModelData + property var model: listView.model + property var modelData: itemModelData - property variant itemValue: __getValue() + property var itemValue: __getValue() property bool itemSelected: rowitem.ListView.isCurrentItem property color itemTextColor: itemSelected ? rowstyleitem.highlightedTextColor : rowstyleitem.textColor property int rowIndex: rowitem.rowIndex diff --git a/src/private/ScrollBar.qml b/src/private/ScrollBar.qml index 8c09d040c..3d4a5d1f9 100644 --- a/src/private/ScrollBar.qml +++ b/src/private/ScrollBar.qml @@ -93,9 +93,9 @@ Item { onMouseXChanged: styleItem.activeControl = styleItem.hitTest(mouseX, mouseY) hoverEnabled: true - property variant control - property variant pressedX - property variant pressedY + property var control + property var pressedX + property var pressedY property int oldPosition property int grooveSize -- GitLab