diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-02-18 15:44:31 +0100 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-02-18 17:43:16 +0000 |
commit | 02168a09d09b9a6dff6071817ec89b1e7a477382 (patch) | |
tree | 534f143dc8cecd7e76fe841f80cb88e77054e101 /src | |
parent | b522189aabe58b02b63f5eb28880a50d4f69dc44 (diff) | |
download | qtquickcontrols-02168a09d09b9a6dff6071817ec89b1e7a477382.tar.gz |
TreeModelAdaptor: Fix slots and signal parameter type qualifiers
Change-Id: I328faac14adf32512ced9bba5a7ee33b8acdfaec
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/Private/qquicktreemodeladaptor.cpp | 6 | ||||
-rw-r--r-- | src/controls/Private/qquicktreemodeladaptor_p.h | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp index 70e038fe..5ab8467e 100644 --- a/src/controls/Private/qquicktreemodeladaptor.cpp +++ b/src/controls/Private/qquicktreemodeladaptor.cpp @@ -362,7 +362,7 @@ void QQuickTreeModelAdaptor::showModelChildItems(const TreeItem &parentItem, int } -void QQuickTreeModelAdaptor::expand(QModelIndex idx) +void QQuickTreeModelAdaptor::expand(const QModelIndex &idx) { ASSERT_CONSISTENCY(); if (!idx.isValid() || !m_model->hasChildren(idx)) @@ -380,7 +380,7 @@ void QQuickTreeModelAdaptor::expand(QModelIndex idx) emit expanded(idx); } -void QQuickTreeModelAdaptor::collapse(QModelIndex idx) +void QQuickTreeModelAdaptor::collapse(const QModelIndex &idx) { ASSERT_CONSISTENCY(); if (!idx.isValid() || !m_model->hasChildren(idx)) @@ -398,7 +398,7 @@ void QQuickTreeModelAdaptor::collapse(QModelIndex idx) emit collapsed(idx); } -bool QQuickTreeModelAdaptor::isExpanded(QModelIndex index) const +bool QQuickTreeModelAdaptor::isExpanded(const QModelIndex &index) const { ASSERT_CONSISTENCY(); return !index.isValid() || m_expandedItems.contains(index); diff --git a/src/controls/Private/qquicktreemodeladaptor_p.h b/src/controls/Private/qquicktreemodeladaptor_p.h index 838ab805..98b1e49e 100644 --- a/src/controls/Private/qquicktreemodeladaptor_p.h +++ b/src/controls/Private/qquicktreemodeladaptor_p.h @@ -88,7 +88,7 @@ public: const QModelIndex &mapToModel(const QModelIndex &index) const; Q_INVOKABLE QModelIndex mapRowToModelIndex(int row) const; - Q_INVOKABLE QItemSelection selectionForRowRange(int form, int to) const; + Q_INVOKABLE QItemSelection selectionForRowRange(int from, int to) const; void showModelTopLevelItems(bool doInsertRows = true); void showModelChildItems(const TreeItem &parent, int start, int end, bool doInsertRows = true, bool doExpandPendingRows = true); @@ -102,19 +102,19 @@ public: void collapseRow(int n); bool isExpanded(int row) const; - Q_INVOKABLE bool isExpanded(QModelIndex) const; + Q_INVOKABLE bool isExpanded(const QModelIndex &) const; void dump() const; bool testConsistency(bool dumpOnFail = false) const; signals: void modelChanged(QAbstractItemModel *model); - void expanded(QModelIndex index); - void collapsed(QModelIndex index); + void expanded(const QModelIndex &index); + void collapsed(const QModelIndex &index); public slots: - void expand(QModelIndex); - void collapse(QModelIndex); + void expand(const QModelIndex &); + void collapse(const QModelIndex &); void setModel(QAbstractItemModel *model); |