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

QPointer can not be used with forward-declared types.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P2: Important
    • 6.0
    • 5.0.0
    • Core: Object Model
    • None
    • 5

    Description

      struct Holder;
      
      int main(int, char **)
      {
        QPointer<Holder> hp;
        hp.data();
      }
      

      fails, but using the QWeakPointer works. Something to think about fixing in Qt 6. Seen in porting KDE solid.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes