diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-10 08:46:52 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-10 22:16:07 +0000 |
commit | 3eac688ec005833509bffc7097c378af9c5b515f (patch) | |
tree | e8c169654e6bb08f6094d35deb5d887a9be51bf3 /src/widgets/itemviews | |
parent | 574b56913f3d1ca6ad05617c32bd275807613c6b (diff) |
Documentation: Add \nullptr macro and use where applicable
Qt for Python users reading the documentation assume that int(0) can
be passed for pointer parameters. Use the newly introduced \nullptr to
disambiguate this.
In a follow-up step, the \nullptr macro can be defined as None
when generating the Qt for Python documentation.
Task-number: PYSIDE-903
Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemdelegate.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qlistwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qtablewidget.cpp | 6 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreewidget.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp index 7bc0ece4b3..9508aed3d3 100644 --- a/src/widgets/itemviews/qabstractitemdelegate.cpp +++ b/src/widgets/itemviews/qabstractitemdelegate.cpp @@ -240,7 +240,7 @@ QAbstractItemDelegate::~QAbstractItemDelegate() model being used. The editor's parent widget is specified by \a parent, and the item options by \a option. - The base implementation returns 0. If you want custom editing you + The base implementation returns \nullptr. If you want custom editing you will need to reimplement this function. The returned editor widget should have Qt::StrongFocus; diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index 72e0a67a64..b9c0e0a4b7 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -1375,7 +1375,7 @@ void QListWidget::setSelectionModel(QItemSelectionModel *selectionModel) /*! Returns the item that occupies the given \a row in the list if one has been - set; otherwise returns 0. + set; otherwise returns \nullptr. \sa row() */ @@ -1442,7 +1442,7 @@ void QListWidget::insertItems(int row, const QStringList &labels) /*! Removes and returns the item from the given \a row in the list widget; - otherwise returns 0. + otherwise returns \nullptr. Items removed from a list widget will not be managed by Qt, and will need to be deleted manually. diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp index 2d539e10ba..eee3e91ac3 100644 --- a/src/widgets/itemviews/qtablewidget.cpp +++ b/src/widgets/itemviews/qtablewidget.cpp @@ -1936,7 +1936,7 @@ int QTableWidget::column(const QTableWidgetItem *item) const /*! Returns the item for the given \a row and \a column if one has been set; otherwise - returns 0. + returns \nullptr. \sa setItem() */ @@ -2029,7 +2029,7 @@ QTableWidgetItem *QTableWidget::takeVerticalHeaderItem(int row) /*! Returns the horizontal header item for column, \a column, if one has been - set; otherwise returns 0. + set; otherwise returns \nullptr. */ QTableWidgetItem *QTableWidget::horizontalHeaderItem(int column) const { @@ -2435,7 +2435,7 @@ int QTableWidget::visualColumn(int logicalColumn) const /*! \fn QTableWidgetItem *QTableWidget::itemAt(const QPoint &point) const - Returns a pointer to the item at the given \a point, or returns 0 if + Returns a pointer to the item at the given \a point, or returns \nullptr if \a point is not covered by an item in the table widget. \sa item() diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp index a0af27115d..9fbfb50029 100644 --- a/src/widgets/itemviews/qtreewidget.cpp +++ b/src/widgets/itemviews/qtreewidget.cpp @@ -2688,7 +2688,7 @@ void QTreeWidget::addTopLevelItem(QTreeWidgetItem *item) /*! Removes the top-level item at the given \a index in the tree and - returns it, otherwise returns 0; + returns it, otherwise returns \nullptr; \sa insertTopLevelItem(), topLevelItem(), topLevelItemCount() */ |