From ea4b837fa169c21afb79488b669d30bca2fcb94f Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 25 Jan 2020 20:15:19 +0100 Subject: Doc/QtGui: replace some 0 with \nullptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ic18d0c8bcf64159b4c8fae8c9499839954a98884 Reviewed-by: André Hartmann Reviewed-by: Sze Howe Koh --- src/gui/accessible/qaccessible.cpp | 2 +- src/gui/image/qimage.cpp | 4 ++-- src/gui/image/qpixmap.cpp | 4 ++-- src/gui/kernel/qevent.cpp | 2 +- src/gui/kernel/qopenglcontext.cpp | 2 +- src/gui/text/qfontmetrics.cpp | 4 ++-- src/gui/text/qtextlayout.cpp | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 7922d6fb06..a789e65284 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -2029,7 +2029,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface() \fn void QAccessibleTextInterface::selection(int selectionIndex, int *startOffset, int *endOffset) const Returns a selection. The size of the selection is returned in \a startOffset and \a endOffset. - If there is no selection both \a startOffset and \a endOffset are 0. + If there is no selection both \a startOffset and \a endOffset are \nullptr. The accessibility APIs support multiple selections. For most widgets though, only one selection is supported with \a selectionIndex equal to 0. diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 62d2d0e948..23facb8517 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4058,7 +4058,7 @@ void QImage::setText(const QString &key, const QString &value) \obsolete Returns the text recorded for the given \a key in the given \a - language, or in a default language if \a language is 0. + language, or in a default language if \a language is \nullptr. Use text() instead. @@ -4085,7 +4085,7 @@ void QImage::setText(const QString &key, const QString &value) Sets the image text to the given \a text and associate it with the given \a key. The text is recorded in the specified \a language, - or in a default language if \a language is 0. + or in a default language if \a language is \nullptr. Use setText() instead. diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index e914d7697f..adadba2057 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -813,8 +813,8 @@ bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::I 0 to obtain small compressed files, 100 for large uncompressed files, and -1 to use the default settings. - If \a format is 0, an image format will be chosen from \a fileName's - suffix. + If \a format is \nullptr, an image format will be chosen from + \a fileName's suffix. \sa {QPixmap#Reading and Writing Image Files}{Reading and Writing Image Files} diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index da77290c30..04970a942b 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3366,7 +3366,7 @@ QWhatsThisClickedEvent::~QWhatsThisClickedEvent() \a action is the action that is changed, added, or removed. If \a type is ActionAdded, the action is to be inserted before the - action \a before. If \a before is 0, the action is appended. + action \a before. If \a before is \nullptr, the action is appended. */ QActionEvent::QActionEvent(int type, QAction *action, QAction *before) : QEvent(static_cast(type)), act(action), bef(before) diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 124b39f2a9..ac5e279a79 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -941,7 +941,7 @@ GLuint QOpenGLContext::defaultFramebufferObject() const The latter may happen if the surface is not exposed, or the graphics hardware is not available due to e.g. the application being suspended. - If \a surface is 0 this is equivalent to calling doneCurrent(). + If \a surface is \nullptr this is equivalent to calling doneCurrent(). Avoid calling this function from a different thread than the one the QOpenGLContext instance lives in. If you wish to use QOpenGLContext from a diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index de9cae0c91..73fcc4bc78 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -161,7 +161,7 @@ QFontMetrics::QFontMetrics(const QFont &font) Constructs a font metrics object for \a font and \a paintdevice. The font metrics will be compatible with the paintdevice passed. - If the \a paintdevice is 0, the metrics will be screen-compatible, + If the \a paintdevice is \nullptr, the metrics will be screen-compatible, ie. the metrics you get if you use the font for drawing text on a \l{QWidget}{widgets} or \l{QPixmap}{pixmaps}, not on a QPicture or QPrinter. @@ -1154,7 +1154,7 @@ QFontMetricsF::QFontMetricsF(const QFont &font) Constructs a font metrics object for \a font and \a paintdevice. The font metrics will be compatible with the paintdevice passed. - If the \a paintdevice is 0, the metrics will be screen-compatible, + If the \a paintdevice is \nullptr, the metrics will be screen-compatible, ie. the metrics you get if you use the font for drawing text on a \l{QWidget}{widgets} or \l{QPixmap}{pixmaps}, not on a QPicture or QPrinter. diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index fc256d72f3..02c42eaf03 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -350,7 +350,7 @@ QTextLayout::QTextLayout(const QString& text) \a font. All the metric and layout calculations will be done in terms of - the paint device, \a paintdevice. If \a paintdevice is 0 the + the paint device, \a paintdevice. If \a paintdevice is \nullptr the calculations will be done in screen metrics. */ -- cgit v1.2.3