From 69f6cab0af78285472deb8d91c862c600685e618 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 28 Apr 2019 12:52:19 +0200 Subject: Doc: replace even more null/0/nullptr with \nullptr macro Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne --- src/widgets/dialogs/qfilesystemmodel.cpp | 4 ++-- src/widgets/itemviews/qlistwidget.cpp | 4 ++-- src/widgets/itemviews/qtablewidget.cpp | 4 ++-- src/widgets/itemviews/qtreewidget.cpp | 4 ++-- src/widgets/itemviews/qtreewidgetitemiterator.cpp | 8 ++++---- src/widgets/kernel/qapplication.cpp | 4 ++-- src/widgets/kernel/qlayout.cpp | 8 ++++---- src/widgets/util/qundoview.cpp | 2 +- src/widgets/widgets/qmainwindow.cpp | 6 +++--- src/widgets/widgets/qmdiarea.cpp | 6 +++--- src/widgets/widgets/qmenubar.cpp | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index d29f74e93d..e486037e08 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1197,8 +1197,8 @@ QStringList QFileSystemModel::mimeTypes() const \a indexes. The format used to describe the items corresponding to the indexes is obtained from the mimeTypes() function. - If the list of indexes is empty, 0 is returned rather than a serialized - empty list. + If the list of indexes is empty, \nullptr is returned rather than a + serialized empty list. */ QMimeData *QFileSystemModel::mimeData(const QModelIndexList &indexes) const { diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index e46d25bef1..37bb370e73 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -1902,8 +1902,8 @@ QStringList QListWidget::mimeTypes() const \a items. The format used to describe the items is obtained from the mimeTypes() function. - If the list of items is empty, 0 is returned instead of a serialized empty - list. + If the list of items is empty, \nullptr is returned instead of a + serialized empty list. */ #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QMimeData *QListWidget::mimeData(const QList &items) const diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp index ec4897a7ae..0fb9e28385 100644 --- a/src/widgets/itemviews/qtablewidget.cpp +++ b/src/widgets/itemviews/qtablewidget.cpp @@ -2633,8 +2633,8 @@ QStringList QTableWidget::mimeTypes() const \a items. The format used to describe the items is obtained from the mimeTypes() function. - If the list of items is empty, 0 is returned rather than a serialized - empty list. + If the list of items is empty, \nullptr is returned rather than a + serialized empty list. */ #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QMimeData *QTableWidget::mimeData(const QList &items) const diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp index 29cc199526..d2dc91b18c 100644 --- a/src/widgets/itemviews/qtreewidget.cpp +++ b/src/widgets/itemviews/qtreewidget.cpp @@ -3395,8 +3395,8 @@ QStringList QTreeWidget::mimeTypes() const \a items. The format used to describe the items is obtained from the mimeTypes() function. - If the list of items is empty, 0 is returned rather than a serialized - empty list. + If the list of items is empty, \nullptr is returned rather than a + serialized empty list. */ #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QMimeData *QTreeWidget::mimeData(const QList &items) const diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.cpp b/src/widgets/itemviews/qtreewidgetitemiterator.cpp index 1c1f60bc37..14c19fcb9c 100644 --- a/src/widgets/itemviews/qtreewidgetitemiterator.cpp +++ b/src/widgets/itemviews/qtreewidgetitemiterator.cpp @@ -170,7 +170,7 @@ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator=(const QTreeWidgetIte /*! The prefix ++ operator (++it) advances the iterator to the next matching item and returns a reference to the resulting iterator. - Sets the current pointer to 0 if the current item is the last matching item. + Sets the current pointer to \nullptr if the current item is the last matching item. */ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator++() @@ -185,7 +185,7 @@ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator++() /*! The prefix -- operator (--it) advances the iterator to the previous matching item and returns a reference to the resulting iterator. - Sets the current pointer to 0 if the current item is the first matching item. + Sets the current pointer to \nullptr if the current item is the first matching item. */ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator--() @@ -395,7 +395,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem * iterator goes backward.) If the current item is beyond the last item, the current item pointer is - set to 0. Returns the resulting iterator. + set to \nullptr. Returns the resulting iterator. */ /*! @@ -411,7 +411,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem * iterator goes forward.) If the current item is ahead of the last item, the current item pointer is - set to 0. Returns the resulting iterator. + set to \nullptr. Returns the resulting iterator. */ /*! diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index b4a091765b..8f339a23f6 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1904,8 +1904,8 @@ void QApplication::aboutQt() This signal is emitted when the widget that has keyboard focus changed from \a old to \a now, i.e., because the user pressed the tab-key, clicked into - a widget or changed the active window. Both \a old and \a now can be the - null-pointer. + a widget or changed the active window. Both \a old and \a now can be \nullptr. + The signal is emitted after both widget have been notified about the change through QFocusEvent. diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp index e3f6a56875..53c4de49c6 100644 --- a/src/widgets/kernel/qlayout.cpp +++ b/src/widgets/kernel/qlayout.cpp @@ -109,7 +109,7 @@ static int menuBarHeightForWidth(QWidget *menubar, int w) /*! Constructs a new top-level QLayout, with parent \a parent. - \a parent may not be a \nullptr. + \a parent may not be \nullptr. The layout is set directly as the top-level layout for \a parent. There can be only one top-level layout for a @@ -419,9 +419,9 @@ void QLayout::setContentsMargins(const QMargins &margins) /*! \since 4.3 - Extracts the left, top, right, and bottom margins used around the - layout, and assigns them to *\a left, *\a top, *\a right, and *\a - bottom (unless they are null pointers). + For each of \a left, \a top, \a right and \a bottom that is not + \nullptr, stores the size of the margin named in the location the + pointer refers to. By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions. diff --git a/src/widgets/util/qundoview.cpp b/src/widgets/util/qundoview.cpp index c862cbcea5..f59d87fb9d 100644 --- a/src/widgets/util/qundoview.cpp +++ b/src/widgets/util/qundoview.cpp @@ -361,7 +361,7 @@ QUndoStack *QUndoView::stack() const Sets the stack displayed by this view to \a stack. If \a stack is 0, the view will be empty. - If the view was previously looking at a QUndoGroup, the group is set to 0. + If the view was previously looking at a QUndoGroup, the group is set to \nullptr. \sa stack(), setGroup() */ diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index fae3aebba4..9c4c46f2d6 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -596,7 +596,7 @@ QStatusBar *QMainWindow::statusBar() const /*! Sets the status bar for the main window to \a statusbar. - Setting the status bar to 0 will remove it from the main window. + Setting the status bar to \nullptr will remove it from the main window. Note that QMainWindow takes ownership of the \a statusbar pointer and deletes it at the appropriate time. @@ -1464,8 +1464,8 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event) #if QT_CONFIG(menu) /*! Returns a popup menu containing checkable entries for the toolbars and - dock widgets present in the main window. If there are no toolbars and - dock widgets present, this function returns a null pointer. + dock widgets present in the main window. If there are no toolbars and + dock widgets present, this function returns \nullptr. By default, this function is called by the main window when the user activates a context menu, typically by right-clicking on a toolbar or a dock diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index feea7cd050..8b201dcf9d 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -1998,9 +1998,9 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla Removes \a widget from the MDI area. The \a widget must be either a QMdiSubWindow or a widget that is the internal widget of a subwindow. Note \a widget is never actually deleted by QMdiArea. - If a QMdiSubWindow is passed in its parent is set to 0 and it is - removed, but if an internal widget is passed in the child widget - is set to 0 but the QMdiSubWindow is not removed. + If a QMdiSubWindow is passed in, its parent is set to \nullptr and it is + removed; but if an internal widget is passed in, the child widget + is set to \nullptr and the QMdiSubWindow is \e not removed. \sa addSubWindow() */ diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index e7984078de..a53d7841f4 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -897,8 +897,8 @@ QAction *QMenuBar::insertMenu(QAction *before, QMenu *menu) } /*! - Returns the QAction that is currently highlighted. A null pointer - will be returned if no action is currently selected. + Returns the QAction that is currently highlighted, if any, + else \nullptr. */ QAction *QMenuBar::activeAction() const { -- cgit v1.2.3