diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-27 17:47:01 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-28 19:37:26 +0000 |
commit | 9f971ca816ea0aac7b0f639c031a379731632722 (patch) | |
tree | 45f9a542a2e9760096f4d3fd31245241a0d70225 /src/widgets/widgets/qmenu.cpp | |
parent | 6298850293f5674f43fc0ef28363bb97a4f8ea5f (diff) |
QtWidgets: 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: I8d7e9c838da1399988a830669d58fc7f2f010696
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 9b30ec4619..7dc67c8efe 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2196,7 +2196,7 @@ void QMenu::setActiveAction(QAction *act) /*! - Returns the currently highlighted action, or 0 if no + Returns the currently highlighted action, or \nullptr if no action is currently highlighted. */ QAction *QMenu::activeAction() const @@ -2564,8 +2564,8 @@ void QMenu::popup(const QPoint &p, QAction *atAction) This is equivalent to \c{exec(pos())}. This returns the triggered QAction in either the popup menu or one - of its submenus, or 0 if no item was triggered (normally because - the user pressed Esc). + of its submenus, or \nullptr if no item was triggered (normally + because the user pressed Esc). In most situations you'll want to specify the position yourself, for example, the current mouse position: @@ -2591,8 +2591,8 @@ QAction *QMenu::exec() coordinates into global coordinates, use QWidget::mapToGlobal(). This returns the triggered QAction in either the popup menu or one - of its submenus, or 0 if no item was triggered (normally because - the user pressed Esc). + of its submenus, or \nullptr if no item was triggered (normally + because the user pressed Esc). Note that all signals are emitted as usual. If you connect a QAction to a slot and call the menu's exec(), you get the result @@ -2628,11 +2628,11 @@ QAction *QMenu::exec(const QPoint &p, QAction *action) QPointer<QObject> guard = this; (void) eventLoop.exec(); if (guard.isNull()) - return 0; + return nullptr; action = d->syncAction; - d->syncAction = 0; - d->eventLoop = 0; + d->syncAction = nullptr; + d->eventLoop = nullptr; return action; } @@ -2650,7 +2650,7 @@ QAction *QMenu::exec(const QPoint &p, QAction *action) QGraphicsView). The function returns the triggered QAction in either the popup - menu or one of its submenus, or 0 if no item was triggered + menu or one of its submenus, or \nullptr if no item was triggered (normally because the user pressed Esc). This is equivalent to: |