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