Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.6.0 Alpha, 6.0
-
None
Description
These functions should return by-value, not by-pointer:
- QLabel::pixmap()
- QLabel::picture()
QBrush::gradient()[*EDIT*: QGradient is not implicitly-shared]- QCursor::bitmap()
- QCursor::mask()
The old API design is from the days of Qt 1, where the return types were not implicitly-shared. However, this is no longer the case.
Here's an abandoned initial attempt: https://codereview.qt-project.org/#/c/101233/10//ALL
Attachments
Issue Links
- relates to
-
QTBUG-80305 Adopt C++ smart pointer to indicate ownership of pointers in Qt
-
- Closed
-
For Gerrit Dashboard: QTBUG-48701 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
272365,10 | QLabel: Allow pixmap() and picture() to return by-value | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
274029,4 | QCursor: Allow bitmap() and mask() to return by-value | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
287897,4 | tst_QDataStream::readQCursor(): Replace deprecated QCursor API | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
287899,2 | Rename Qt::ReturnByValue_t -> Qt::ReturnByValueConstant | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
288763,3 | QXcbCursor: Replace deprecated QCursor API | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
288764,2 | Examples: Replace deprecated QLabel API | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
288795,2 | Designer: Replace deprecated QLabel API | 5.15 | qt/qttools | Status: ABANDONED | 0 | 0 |