From 3eac688ec005833509bffc7097c378af9c5b515f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 10 Jan 2019 08:46:52 +0100 Subject: 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 Reviewed-by: Christian Tismer Reviewed-by: Venugopal Shivashankar Reviewed-by: Paul Wicking --- src/gui/itemmodels/qstandarditemmodel.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/itemmodels/qstandarditemmodel.cpp') 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() */ -- cgit v1.2.3