Skip to content

Commit

Permalink
Doc: Replace some usages of 0/zero/null with \nullptr
Browse files Browse the repository at this point in the history
Change-Id: Ibe7de11fc6fc41477c35e7d653c6a911855deabb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
  • Loading branch information
JKSH committed Jan 27, 2020
1 parent a436303 commit 582311d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/sql/doc/src/drilldown.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@

The \c findWindow() function simply searches through the list of
existing windows, returning a pointer to the window that matches
the given item ID, or 0 if the window doesn't exists.
the given item ID, or \nullptr if the window doesn't exists.

Finally, let's take a quick look at our custom \c ImageItem class:

Expand Down
2 changes: 1 addition & 1 deletion src/corelib/kernel/qabstracteventdispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ QAbstractEventDispatcher::~QAbstractEventDispatcher()

/*!
Returns a pointer to the event dispatcher object for the specified
\a thread. If \a thread is zero, the current thread is used. If no
\a thread. If \a thread is \nullptr, the current thread is used. If no
event dispatcher exists for the specified thread, this function
returns \nullptr.
Expand Down
4 changes: 2 additions & 2 deletions src/corelib/kernel/qmetaobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ static bool methodMatch(const QMetaObject *m, int handle,
* \internal
* helper function for indexOf{Method,Slot,Signal}, returns the relative index of the method within
* the baseObject
* \a MethodType might be MethodSignal or MethodSlot, or 0 to match everything.
* \a MethodType might be MethodSignal or MethodSlot, or \nullptr to match everything.
*/
template<int MethodType>
static inline int indexOfMethodRelative(const QMetaObject **baseObject,
Expand Down Expand Up @@ -731,7 +731,7 @@ int QMetaObject::indexOfSignal(const char *signal) const
\internal
Same as QMetaObject::indexOfSignal, but the result is the local offset to the base object.
\a baseObject will be adjusted to the enclosing QMetaObject, or 0 if the signal is not found
\a baseObject will be adjusted to the enclosing QMetaObject, or \nullptr if the signal is not found
*/
int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject,
const QByteArray &name, int argc,
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/thread/qmutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ QRecursiveMutex::~QRecursiveMutex()
\fn QMutexLocker::QMutexLocker(QMutex *mutex)
Constructs a QMutexLocker and locks \a mutex. The mutex will be
unlocked when the QMutexLocker is destroyed. If \a mutex is zero,
unlocked when the QMutexLocker is destroyed. If \a mutex is \nullptr,
QMutexLocker does nothing.
\sa QMutex::lock()
Expand Down
6 changes: 3 additions & 3 deletions src/gui/image/qimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3683,8 +3683,8 @@ QImage QImage::fromData(const uchar *data, int size, const char *format)
/*!
Saves the image to the file with the given \a fileName, using the
given image file \a format and \a quality factor. If \a format is
0, QImage will attempt to guess the format by looking at \a fileName's
suffix.
\nullptr, QImage will attempt to guess the format by looking at
\a fileName's suffix.
The \a quality factor must be in the range 0 to 100 or -1. Specify
0 to obtain small compressed files, 100 for large uncompressed
Expand Down Expand Up @@ -4099,7 +4099,7 @@ void QImage::setText(const QString &key, const QString &value)
\l{http://www.libpng.org/pub/png/spec/1.2/png-1.2-pdg.html#C.Anc-text}
{the PNG specification}. \a s can be any text. \a lang should
specify the language code (see
\l{http://www.rfc-editor.org/rfc/rfc1766.txt}{RFC 1766}) or 0.
\l{http://www.rfc-editor.org/rfc/rfc1766.txt}{RFC 1766}) or \nullptr.
\endomit
*/

Expand Down
4 changes: 2 additions & 2 deletions src/gui/rhi/qrhi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,7 @@ QRhiResource::Type QRhiRenderPassDescriptor::resourceType() const

/*!
\return a pointer to a backend-specific QRhiNativeHandles subclass, such as
QRhiVulkanRenderPassNativeHandles. The returned value is null when exposing
QRhiVulkanRenderPassNativeHandles. The returned value is \nullptr when exposing
the underlying native resources is not supported by the backend.
\sa QRhiVulkanRenderPassNativeHandles
Expand Down Expand Up @@ -4933,7 +4933,7 @@ void QRhiCommandBuffer::dispatch(int x, int y, int z)

/*!
\return a pointer to a backend-specific QRhiNativeHandles subclass, such as
QRhiVulkanCommandBufferNativeHandles. The returned value is null when
QRhiVulkanCommandBufferNativeHandles. The returned value is \nullptr when
exposing the underlying native resources is not supported by, or not
applicable to, the backend.
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/styles/qproxystyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ QStyle *QProxyStyle::baseStyle() const
Ownership of \a style is transferred to QProxyStyle.
If style is zero, a desktop-dependant style will be
If style is \nullptr, a desktop-dependent style will be
assigned automatically.
*/
void QProxyStyle::setBaseStyle(QStyle *style)
Expand Down

0 comments on commit 582311d

Please sign in to comment.