From 9f971ca816ea0aac7b0f639c031a379731632722 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 27 Jan 2019 17:47:01 +0100 Subject: 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 Reviewed-by: Paul Wicking --- src/widgets/widgets/qmenu.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/widgets/widgets/qmenu.cpp') 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 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: -- cgit v1.2.3