diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-10 08:46:52 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-10 22:16:07 +0000 |
commit | 3eac688ec005833509bffc7097c378af9c5b515f (patch) | |
tree | e8c169654e6bb08f6094d35deb5d887a9be51bf3 /src/gui/text | |
parent | 574b56913f3d1ca6ad05617c32bd275807613c6b (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/text')
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qtextobject.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index af8fcf369c..7719a2e6da 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -2116,7 +2116,7 @@ QTextList *QTextCursor::createList(QTextListFormat::Style style) /*! Returns the current list if the cursor position() is inside a - block that is part of a list; otherwise returns 0. + block that is part of a list; otherwise returns \nullptr. \sa insertList(), createList() */ @@ -2176,7 +2176,7 @@ QTextTable *QTextCursor::insertTable(int rows, int cols, const QTextTableFormat /*! Returns a pointer to the current table if the cursor position() - is inside a block that is part of a table; otherwise returns 0. + is inside a block that is part of a table; otherwise returns \nullptr. \sa insertTable() */ @@ -2213,7 +2213,7 @@ QTextFrame *QTextCursor::insertFrame(const QTextFrameFormat &format) } /*! - Returns a pointer to the current frame. Returns 0 if the cursor is invalid. + Returns a pointer to the current frame. Returns \nullptr if the cursor is invalid. \sa insertFrame() */ diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index e2130a09d9..0ed8be8530 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1301,7 +1301,7 @@ const QTextDocument *QTextBlock::document() const /*! If the block represents a list item, returns the list that the item belongs - to; otherwise returns 0. + to; otherwise returns \nullptr. */ QTextList *QTextBlock::textList() const { |