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/accessible/qaccessible.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index a3f53e149b..46dec7f28d 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -654,7 +654,7 @@ void QAccessible::removeActivationObserver(ActivationObserver *observer) /*! If a QAccessibleInterface implementation exists for the given \a object, this function returns a pointer to the implementation; otherwise it - returns 0. + returns \nullptr. The function calls all installed factory functions (from most recently installed to least recently installed) until one is found @@ -770,7 +770,7 @@ QAccessible::Id QAccessible::uniqueId(QAccessibleInterface *iface) /*! Returns the QAccessibleInterface belonging to the \a id. - Returns 0 if the id is invalid. + Returns \nullptr if the id is invalid. */ QAccessibleInterface *QAccessible::accessibleInterface(Id id) { @@ -1119,7 +1119,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const \fn QAccessibleInterface *QAccessibleInterface::childAt(int x, int y) const Returns the QAccessibleInterface of a child that contains the screen coordinates (\a x, \a y). - If there are no children at this position this function returns 0. + If there are no children at this position this function returns \nullptr. The returned accessible must be a child, but not necessarily a direct child. This function is only relyable for visible objects (invisible @@ -1139,7 +1139,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const Returns the QAccessibleInterface of the parent in the accessible object hierarchy. - Returns 0 if no parent exists (e.g. for the top level application object). + Returns \nullptr if no parent exists (e.g. for the top level application object). \sa child() */ @@ -1150,7 +1150,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const Returns the accessible child with index \a index. 0-based index. The number of children of an object can be checked with childCount. - Returns 0 when asking for an invalid child (e.g. when the child became invalid in the meantime). + Returns \nullptr when asking for an invalid child (e.g. when the child became invalid in the meantime). \sa childCount(), parent() */ @@ -1356,7 +1356,7 @@ QAccessibleEvent::~QAccessibleEvent() \internal Returns the uniqueId of the QAccessibleInterface represented by this event. - In case the object() function returns 0 this is the only way to access the + In case the object() function returns \nullptr, this is the only way to access the interface. */ QAccessible::Id QAccessibleEvent::uniqueId() const @@ -1786,7 +1786,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const (This means that at least one interface among the ancestors should return a valid QWindow pointer). - The default implementation returns 0. + The default implementation returns \nullptr. */ QWindow *QAccessibleInterface::window() const { -- cgit v1.2.3