From ae44da62ef30503a5380e5d1ee8b0cadd5960994 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 27 Jan 2019 17:49:29 +0100 Subject: QtGui: 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: Ieffbfffa76e3018257b667a3e8ad6e3b88486cde Reviewed-by: Paul Wicking --- src/gui/image/qimageiohandler.cpp | 2 +- src/gui/image/qimagereader.cpp | 6 +++--- src/gui/image/qimagewriter.cpp | 4 ++-- src/gui/image/qmovie.cpp | 2 +- src/gui/image/qpicture.cpp | 6 +++--- src/gui/kernel/qcursor.cpp | 8 ++++---- src/gui/kernel/qopenglcontext.cpp | 7 +++---- src/gui/kernel/qplatformwindow.cpp | 4 ++-- src/gui/painting/qpainter.cpp | 2 +- src/gui/text/qtextdocumentwriter.cpp | 4 ++-- src/gui/text/qtextobject.cpp | 12 ++++++------ 11 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/gui/image/qimageiohandler.cpp b/src/gui/image/qimageiohandler.cpp index 9fe3b863b3..0e7b541cf2 100644 --- a/src/gui/image/qimageiohandler.cpp +++ b/src/gui/image/qimageiohandler.cpp @@ -340,7 +340,7 @@ void QImageIOHandler::setDevice(QIODevice *device) /*! Returns the device currently assigned to the QImageIOHandler. If - not device has been assigned, 0 is returned. + not device has been assigned, \nullptr is returned. */ QIODevice *QImageIOHandler::device() const { diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 3f1297c81a..61f20e0c65 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -756,13 +756,13 @@ void QImageReader::setDevice(QIODevice *device) d->device = device; d->deleteDevice = false; delete d->handler; - d->handler = 0; + d->handler = nullptr; d->text.clear(); } /*! - Returns the device currently assigned to QImageReader, or 0 if no - device has been assigned. + Returns the device currently assigned to QImageReader, or \nullptr + if no device has been assigned. */ QIODevice *QImageReader::device() const { diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 41048fa681..ec66588ddf 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -407,8 +407,8 @@ void QImageWriter::setDevice(QIODevice *device) } /*! - Returns the device currently assigned to QImageWriter, or 0 if no - device has been assigned. + Returns the device currently assigned to QImageWriter, or \nullptr + if no device has been assigned. */ QIODevice *QImageWriter::device() const { diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp index 7d17b7d5ef..79203c7b98 100644 --- a/src/gui/image/qmovie.cpp +++ b/src/gui/image/qmovie.cpp @@ -659,7 +659,7 @@ void QMovie::setDevice(QIODevice *device) /*! Returns the device QMovie reads image data from. If no device has - currently been assigned, 0 is returned. + currently been assigned, \nullptr is returned. \sa setDevice(), fileName() */ diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index 51a9575fd0..6e57f679d8 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -1200,8 +1200,8 @@ QT_END_INCLUDE_NAMESPACE \obsolete Returns a string that specifies the picture format of the file \a - fileName, or 0 if the file cannot be read or if the format is not - recognized. + fileName, or \nullptr if the file cannot be read or if the format + is not recognized. \sa load(), save() */ @@ -1543,7 +1543,7 @@ const QPicture &QPictureIO::picture() const { return d->pi; } int QPictureIO::status() const { return d->iostat; } /*! - Returns the picture format string or 0 if no format has been + Returns the picture format string or \nullptr if no format has been explicitly set. */ const char *QPictureIO::format() const { return d->frmt; } diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index bb81ca109a..9e4787589f 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -564,8 +564,8 @@ void QCursor::setShape(Qt::CursorShape shape) } /*! - Returns the cursor bitmap, or 0 if it is one of the standard - cursors. + Returns the cursor bitmap, or \nullptr if it is one of the + standard cursors. */ const QBitmap *QCursor::bitmap() const { @@ -575,8 +575,8 @@ const QBitmap *QCursor::bitmap() const } /*! - Returns the cursor bitmap mask, or 0 if it is one of the standard - cursors. + Returns the cursor bitmap mask, or \nullptr if it is one of the + standard cursors. */ const QBitmap *QCursor::mask() const diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index be04513de6..4847a62b0f 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -414,15 +414,14 @@ int QOpenGLContextPrivate::maxTextureSize() /*! Returns the last context which called makeCurrent in the current thread, - or 0, if no context is current. + or \nullptr, if no context is current. */ QOpenGLContext* QOpenGLContext::currentContext() { QGuiGLThreadContext *threadContext = qwindow_context_storage()->localData(); - if (threadContext) { + if (threadContext) return threadContext->context; - } - return 0; + return nullptr; } /*! diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index 50f05721f7..d6f90c9254 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -90,11 +90,11 @@ QWindow *QPlatformWindow::window() const } /*! - Returns the parent platform window (or 0 if orphan). + Returns the parent platform window (or \nullptr if orphan). */ QPlatformWindow *QPlatformWindow::parent() const { - return window()->parent() ? window()->parent()->handle() : 0; + return window()->parent() ? window()->parent()->handle() : nullptr; } /*! diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 36f0d1d5b9..c746df9dd6 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1521,7 +1521,7 @@ QPainter::~QPainter() /*! Returns the paint device on which this painter is currently - painting, or 0 if the painter is not active. + painting, or \nullptr if the painter is not active. \sa isActive() */ diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp index 5ea04fe9e9..ee72300bc7 100644 --- a/src/gui/text/qtextdocumentwriter.cpp +++ b/src/gui/text/qtextdocumentwriter.cpp @@ -206,8 +206,8 @@ void QTextDocumentWriter::setDevice (QIODevice *device) } /*! - Returns the device currently assigned, or 0 if no device has been - assigned. + Returns the device currently assigned, or \nullptr if no device + has been assigned. */ QIODevice *QTextDocumentWriter::device () const { diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 0ed8be8530..18c5a4f3dd 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -704,8 +704,8 @@ QTextFrame::iterator &QTextFrame::iterator::operator=(const iterator &other) Q_D #endif /*! - Returns the current frame pointed to by the iterator, or 0 if the - iterator currently points to a block. + Returns the current frame pointed to by the iterator, or \nullptr + if the iterator currently points to a block. \sa currentBlock() */ @@ -1291,12 +1291,12 @@ QVector QTextBlock::textFormats() const } /*! - Returns the text document this text block belongs to, or 0 if the - text block does not belong to any document. + Returns the text document this text block belongs to, or \nullptr + if the text block does not belong to any document. */ const QTextDocument *QTextBlock::document() const { - return p ? p->document() : 0; + return p ? p->document() : nullptr; } /*! @@ -1306,7 +1306,7 @@ const QTextDocument *QTextBlock::document() const QTextList *QTextBlock::textList() const { if (!isValid()) - return 0; + return nullptr; const QTextBlockFormat fmt = blockFormat(); QTextObject *obj = p->document()->objectForFormat(fmt); -- cgit v1.2.3