summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controls/Private/qquicktreemodeladaptor.cpp6
-rw-r--r--src/controls/Private/qquicktreemodeladaptor_p.h12
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);