From 2bfb89e133b8dcb138e046700ef4fbecb9da8fa0 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 27 Jan 2019 17:48:33 +0100 Subject: QtWidgets: replace 0 with \nullptr in documentation Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: Id8056dc2364a372e40bc04e8cb9fcc443e49fb18 Reviewed-by: Paul Wicking --- src/widgets/graphicsview/qgraphicslayoutitem.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/widgets/graphicsview/qgraphicslayoutitem.cpp') diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.cpp b/src/widgets/graphicsview/qgraphicslayoutitem.cpp index aed154a95f..1192bad51e 100644 --- a/src/widgets/graphicsview/qgraphicslayoutitem.cpp +++ b/src/widgets/graphicsview/qgraphicslayoutitem.cpp @@ -193,7 +193,7 @@ QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint) /*! \internal - Returns the parent item of this layout, or 0 if this layout is + Returns the parent item of this layout, or \nullptr if this layout is not installed on any widget. If this is the item that the layout is installed on, it will return "itself". @@ -214,7 +214,7 @@ QGraphicsItem *QGraphicsLayoutItemPrivate::parentItem() const while (parent && parent->isLayout()) { parent = parent->parentLayoutItem(); } - return parent ? parent->graphicsItem() : 0; + return parent ? parent->graphicsItem() : nullptr; } /*! @@ -368,7 +368,7 @@ bool QGraphicsLayoutItemPrivate::hasWidthForHeight() const passing a QGraphicsLayoutItem pointer to QGraphicsLayoutItem's protected constructor, or by calling setParentLayoutItem(). The parentLayoutItem() function returns a pointer to the item's layoutItem - parent. If the item's parent is 0 or if the parent does not inherit + parent. If the item's parent is \nullptr or if the parent does not inherit from QGraphicsItem, the parentLayoutItem() function then returns \nullptr. isLayout() returns \c true if the QGraphicsLayoutItem subclass is itself a layout, or false otherwise. @@ -737,7 +737,7 @@ QRectF QGraphicsLayoutItem::geometry() const This virtual function provides the \a left, \a top, \a right and \a bottom contents margins for this QGraphicsLayoutItem. The default implementation assumes all contents margins are 0. The parameters point to values stored - in qreals. If any of the pointers is 0, that value will not be updated. + in qreals. If any of the pointers is \nullptr, that value will not be updated. \sa QGraphicsWidget::setContentsMargins() */ @@ -826,8 +826,8 @@ void QGraphicsLayoutItem::updateGeometry() } /*! - Returns the parent of this QGraphicsLayoutItem, or 0 if there is no parent, - or if the parent does not inherit from QGraphicsLayoutItem + Returns the parent of this QGraphicsLayoutItem, or \nullptr if there is + no parent, or if the parent does not inherit from QGraphicsLayoutItem (QGraphicsLayoutItem is often used through multiple inheritance with QObject-derived classes). @@ -917,7 +917,7 @@ QGraphicsItem *QGraphicsLayoutItem::graphicsItem() const * advantage of the automatic reparenting capabilities of QGraphicsLayout it * should set this value. * Note that if you delete \a item and not delete the layout item, you are - * responsible of calling setGraphicsItem(0) in order to avoid having a + * responsible of calling setGraphicsItem(\nullptr) in order to avoid having a * dangling pointer. * * \sa graphicsItem() -- cgit v1.2.3