Doc: Use the \nullptr macro instead of 0

This enables overriding the macro so that it translates
to 'None' in the Qt for Python context.

Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
Venugopal Shivashankar 2019-03-28 16:06:16 +01:00 committed by Christian Ehrlicher
parent a65800cc68
commit 05d9195669
12 changed files with 16 additions and 16 deletions

View File

@ -1083,7 +1083,7 @@ QAbstractAnimation::State QAbstractAnimation::state() const
/*!
If this animation is part of a QAnimationGroup, this function returns a
pointer to the group; otherwise, it returns 0.
pointer to the group; otherwise, it returns \nullptr.
\sa QAnimationGroup::addAnimation()
*/

View File

@ -1244,7 +1244,7 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
\obsolete
Returns the codec used by QObject::tr() on its argument. If this
function returns 0 (the default), tr() assumes Latin-1.
function returns \nullptr (the default), tr() assumes Latin-1.
*/
/*!

View File

@ -162,7 +162,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
event dispatcher exists for the specified thread, this function
returns 0.
returns \nullptr.
\b{Note:} If Qt is built without thread support, the \a thread
argument is ignored.

View File

@ -2923,7 +2923,7 @@ bool QCoreApplication::hasPendingEvents()
/*!
Returns a pointer to the event dispatcher object for the main thread. If no
event dispatcher exists for the thread, this function returns 0.
event dispatcher exists for the thread, this function returns \nullptr.
*/
QAbstractEventDispatcher *QCoreApplication::eventDispatcher()
{

View File

@ -349,7 +349,7 @@ bool QMetaObject::inherits(const QMetaObject *metaObject) const Q_DECL_NOEXCEPT
\internal
Returns \a obj if object \a obj inherits from this
meta-object; otherwise returns 0.
meta-object; otherwise returns \nullptr.
*/
QObject *QMetaObject::cast(QObject *obj) const
{
@ -361,7 +361,7 @@ QObject *QMetaObject::cast(QObject *obj) const
\internal
Returns \a obj if object \a obj inherits from this
meta-object; otherwise returns 0.
meta-object; otherwise returns \nullptr.
*/
const QObject *QMetaObject::cast(const QObject *obj) const
{

View File

@ -2342,7 +2342,7 @@ static void err_info_about_objects(const char * func,
/*!
Returns a pointer to the object that sent the signal, if called in
a slot activated by a signal; otherwise it returns 0. The pointer
a slot activated by a signal; otherwise it returns \nullptr. The pointer
is valid only during the execution of the slot that calls this
function from this object's thread context.

View File

@ -999,7 +999,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
/*!
Returns the address of the exported symbol \a symbol. The library is
loaded if necessary. The function returns 0 if the symbol could
loaded if necessary. The function returns \nullptr if the symbol could
not be resolved or if the library could not be loaded.
Example:
@ -1032,7 +1032,7 @@ QFunctionPointer QLibrary::resolve(const char *symbol)
include the platform-specific file suffix; (see \l{fileName}). The
library remains loaded until the application exits.
The function returns 0 if the symbol could not be resolved or if
The function returns \nullptr if the symbol could not be resolved or if
the library could not be loaded.
\sa resolve()
@ -1052,7 +1052,7 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, const char *symbol)
(see \l{fileName}). The library remains loaded until the application exits.
\a verNum is ignored on Windows.
The function returns 0 if the symbol could not be resolved or if
The function returns \nullptr if the symbol could not be resolved or if
the library could not be loaded.
\sa resolve()
@ -1073,7 +1073,7 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, int verNum, const ch
(see \l{fileName}). The library remains loaded until the application exits.
\a version is ignored on Windows.
The function returns 0 if the symbol could not be resolved or if
The function returns \nullptr if the symbol could not be resolved or if
the library could not be loaded.
\sa resolve()

View File

@ -174,7 +174,7 @@ QPluginLoader::~QPluginLoader()
/*!
Returns the root component object of the plugin. The plugin is
loaded if necessary. The function returns 0 if the plugin could
loaded if necessary. The function returns \nullptr if the plugin could
not be loaded or if the root component object could not be
instantiated.

View File

@ -920,7 +920,7 @@ QThreadPrivate::~QThreadPrivate()
\since 5.0
Returns a pointer to the event dispatcher object for the thread. If no event
dispatcher exists for the thread, this function returns 0.
dispatcher exists for the thread, this function returns \nullptr.
*/
QAbstractEventDispatcher *QThread::eventDispatcher() const
{

View File

@ -875,7 +875,7 @@
\b without ensuring that it cannot get deleted. To have that guarantee,
use toStrongRef(), which returns a QSharedPointer object. If this
function can determine that the pointer has already been deleted, it
returns 0.
returns \nullptr.
It is ok to obtain the value of the pointer and using that value itself,
like for example in debugging statements:

View File

@ -286,7 +286,7 @@
QStyleOption to a subclass (e.g., QStyleOptionFocusRect). For
safety, you can use qstyleoption_cast() to ensure that the
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
qstyleoption_cast() returns \nullptr. For example:
\snippet code/doc_src_qt4-styles.cpp 0

View File

@ -1813,7 +1813,7 @@ void QTableWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
\fn QTableWidgetItem *QTableWidget::itemAt(int ax, int ay) const
Returns the item at the position equivalent to QPoint(\a{ax}, \a{ay}) in
the table widget's coordinate system, or returns 0 if the specified point
the table widget's coordinate system, or returns \nullptr if the specified point
is not covered by an item in the table widget.
\sa item()