summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-08-16 14:55:29 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-20 21:10:02 +0200
commiteb0e960e74da6b799c4d8f95cb6a22412c4c9466 (patch)
treed5e2240655eb2e2755c76aba06e1c064a9ae3266 /src/widgets/itemviews
parentfe0a6e57a045b9db7ad812025ed65a6ba011c68d (diff)
Fix the doc errors in itemmodels and itemviews.
Other errors remain, but they appear to be due to missing links to QtCore documentation (a generic error not specific to itemviews). Change-Id: I7b83380c3754c26d3d42be9ef0c0721ce3127562 Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp5
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp6
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp2
-rw-r--r--src/widgets/itemviews/qheaderview.cpp6
4 files changed, 13 insertions, 6 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 92cf0b0c38..6c02147c1d 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -245,14 +245,15 @@ QWidget *QAbstractItemDelegate::createEditor(QWidget *,
/*!
\since 5.0
- A function called when the editor is no longer needed and should be
+ A function called when the \a editor is no longer needed for \a index and should be
destroyed. The default behavior is a call to deleteLater on the editor.
It possible e.g. to avoid this delete by reimplementing this function.
\sa createEditor()
*/
-void QAbstractItemDelegate::destroyEditor(QWidget *editor, const QModelIndex &) const
+void QAbstractItemDelegate::destroyEditor(QWidget *editor, const QModelIndex &index) const
{
+ Q_UNUSED(index);
editor->deleteLater();
}
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 929f7db406..3402b4f3fe 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -3222,9 +3222,13 @@ void QAbstractItemView::update(const QModelIndex &index)
changed items are those from \a topLeft to \a bottomRight
inclusive. If just one item is changed \a topLeft == \a
bottomRight.
+
+ The \a roles which have been changed can either be an empty container (meaning everything
+ has changed), or a non-empty container with the subset of roles which have changed.
*/
-void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &)
+void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
{
+ Q_UNUSED(roles);
// Single item changed
Q_D(QAbstractItemView);
if (topLeft == bottomRight && topLeft.isValid()) {
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index db2f437890..d96fa3fc30 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -566,6 +566,8 @@ QMimeData *QDirModel::mimeData(const QModelIndexList &indexes) const
the given \a action over the row in the model specified by the \a row and
\a column and by the \a parent index.
+ Returns true if the drop was successful, and false otherwise.
+
\sa supportedDropActions()
*/
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 8ba5d74946..2f20bdd896 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -471,7 +471,7 @@ void QHeaderView::setOffset(int newOffset)
\since 4.2
Sets the offset to the start of the section at the given \a visualSectionNumber.
\a visualSectionNumber is the actual visible section when hiddenSections are
- not considered. That is not always the same as \a visualIndex.
+ not considered. That is not always the same as visualIndex().
\sa setOffset(), sectionPosition()
*/
@@ -1081,7 +1081,7 @@ int QHeaderView::logicalIndex(int visualIndex) const
}
/*!
- If \a sectionsMovable is true, the header may be moved by the user; otherwise it
+ If \a movable is true, the header may be moved by the user; otherwise it
is fixed in place.
\sa sectionsMovable(), sectionMoved()
@@ -1119,7 +1119,7 @@ bool QHeaderView::sectionsMovable() const
// ### Qt 6 - remove this obsolete function
/*!
\obsolete
- \fn bool QHeaderView::isMovable(bool movable)
+ \fn bool QHeaderView::isMovable(bool movable) const
Use sectionsMovable instead.