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

QPointer can not be used with forward-declared types.

XMLWordPrintable

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

      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.

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

            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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes