summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-10 08:46:52 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-10 22:16:07 +0000
commit3eac688ec005833509bffc7097c378af9c5b515f (patch)
treee8c169654e6bb08f6094d35deb5d887a9be51bf3 /src/gui/itemmodels
parent574b56913f3d1ca6ad05617c32bd275807613c6b (diff)
Documentation: Add \nullptr macro and use where applicable
Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/gui/itemmodels')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 430ba152a9..7afad95bd9 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.
@@ -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()
*/