Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-7373

Auto-completion does not work with pointers to typedef'ed structs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 2.5.0-rc
    • C/C++/Obj-C++ Support
    • None

      Auto-completion of typedef structs doesn't work with pointers. Example that triggers it:

      typedef struct FooInternal Foo;
      struct FooInternal {
          int a;
      };
      
      int main()
      {
          Foo* f;
          f-> // No auto completion is happening here.
      }
      

      Note that when doing the typedef after the struct has been defined does work. But not when the typedef precedes the struct definition. The code cannot be rearranged to put the typedef after the definition: the typedef is in a header file because 'Foo' is part of the public API (it's an opaque type that needs to be passed around), while the actual definition is in a *.c file.

      (This is related to QTCREATORBUG-6783, but no one replied there.)

        For Gerrit Dashboard: QTCREATORBUG-7373
        # Subject Branch Project Status CR V

            erikv Erik Verbruggen
            realnc Nikos Chantziaras
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes