summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels/qstandarditemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemmodels/qstandarditemmodel.cpp')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index aa640f4d7e..3e3c7a6211 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -879,8 +879,8 @@ QStandardItem::~QStandardItem()
}
/*!
- Returns the item's parent item, or 0 if the item has no parent.
- \note For toplevel items parent() returns 0. To receive toplevel
+ Returns the item's parent item, or \nullptr if the item has no parent.
+ \note For toplevel items parent() returns \nullptr. To receive toplevel
item's parent use QStandardItemModel::invisibleRootItem() instead.
\sa child(), QStandardItemModel::invisibleRootItem()
@@ -1548,7 +1548,7 @@ QModelIndex QStandardItem::index() const
Returns the QStandardItemModel that this item belongs to.
If the item is not a child of another item that belongs to the model, this
- function returns 0.
+ function returns \nullptr.
\sa index()
*/
@@ -1865,7 +1865,7 @@ void QStandardItem::setChild(int row, int column, QStandardItem *item)
/*!
Returns the child item at (\a row, \a column) if one has been set; otherwise
- returns 0.
+ returns \nullptr.
\sa setChild(), takeChild(), parent()
*/
@@ -1881,7 +1881,7 @@ QStandardItem *QStandardItem::child(int row, int column) const
/*!
Removes the child item at (\a row, \a column) without deleting it, and returns
a pointer to the item. If there was no child at the given location, then
- this function returns 0.
+ this function returns \nullptr.
Note that this function, unlike takeRow() and takeColumn(), does not affect
the dimensions of the child table.
@@ -1905,7 +1905,7 @@ QStandardItem *QStandardItem::takeChild(int row, int column)
/*!
Removes \a row without deleting the row items, and returns a list of
pointers to the removed items. For items in the row that have not been
- set, the corresponding pointers in the list will be 0.
+ set, the corresponding pointers in the list will be \nullptr.
\sa removeRow(), insertRow(), takeColumn()
*/
@@ -1939,7 +1939,7 @@ QList<QStandardItem*> QStandardItem::takeRow(int row)
/*!
Removes \a column without deleting the column items, and returns a list of
pointers to the removed items. For items in the column that have not been
- set, the corresponding pointers in the list will be 0.
+ set, the corresponding pointers in the list will be \nullptr.
\sa removeColumn(), insertColumn(), takeRow()
*/
@@ -2283,7 +2283,7 @@ void QStandardItemModel::clear()
itemPrototype()), and set it in the parent item's child table, if no item
already exists at that index.
- If \a index is an invalid index, this function returns 0.
+ If \a index is an invalid index, this function returns \nullptr.
\sa indexFromItem()
*/
@@ -2380,7 +2380,7 @@ void QStandardItemModel::setItem(int row, int column, QStandardItem *item)
\since 4.2
Returns the item for the given \a row and \a column if one has been set;
- otherwise returns 0.
+ otherwise returns \nullptr.
\sa setItem(), takeItem(), itemFromIndex()
*/
@@ -2453,7 +2453,7 @@ void QStandardItemModel::setHorizontalHeaderItem(int column, QStandardItem *item
\since 4.2
Returns the horizontal header item for \a column if one has been set;
- otherwise returns 0.
+ otherwise returns \nullptr.
\sa setHorizontalHeaderItem(), verticalHeaderItem()
*/
@@ -2509,7 +2509,7 @@ void QStandardItemModel::setVerticalHeaderItem(int row, QStandardItem *item)
\since 4.2
Returns the vertical header item for row \a row if one has been set;
- otherwise returns 0.
+ otherwise returns \nullptr.
\sa setVerticalHeaderItem(), horizontalHeaderItem()
*/
@@ -2718,7 +2718,7 @@ QStandardItem *QStandardItemModel::takeItem(int row, int column)
Removes the given \a row without deleting the row items, and returns a
list of pointers to the removed items. The model releases ownership of the
items. For items in the row that have not been set, the corresponding
- pointers in the list will be 0.
+ pointers in the list will be \nullptr.
\sa takeColumn()
*/
@@ -2734,7 +2734,7 @@ QList<QStandardItem*> QStandardItemModel::takeRow(int row)
Removes the given \a column without deleting the column items, and returns
a list of pointers to the removed items. The model releases ownership of
the items. For items in the column that have not been set, the
- corresponding pointers in the list will be 0.
+ corresponding pointers in the list will be \nullptr.
\sa takeRow()
*/
@@ -3018,6 +3018,9 @@ bool QStandardItemModel::setData(const QModelIndex &index, const QVariant &value
/*!
\since 5.12
Removes the data stored in all the roles for the given \a index.
+ Returns \c true if \a index is valid and data was cleared, \c false
+ otherwise.
+
\sa setData(), data()
*/
#endif