Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48701

Don't return COW types by-pointer

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.15
    • 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

          For Gerrit Dashboard: QTBUG-48701
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              jksh Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: