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

In-class included contents in included files don't get parsed for autocompletion

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • Qt Creator 2.4.1, Qt Creator 2.8.0-beta
    • C/C++/Obj-C++ Support
    • None
    • linux but likely doesn't matter

    Description

      If you create a class definition that includes components from another file via an #include directive, then the auto-complete system doesn't pick up the additional information from the included file. For example, in A.h put:

         class A {
           int methodA();
           #include "otherFile.h"
         };
      

      Then in "otherFile.h" you put:

         int methodB();
      

      When you include A.h into some other file so you can use the A definition:

        #include "A.h"
        // ...
        A myA;
        qDebug() << myA.[TAB_HERE]
      

      Normally when you hit the period (.) (or TAB at TAB_HERE), qtcreator prompts with completion possibilities. But in the case above only the methodA() will get shown as an available function.

      [Yes, I realize this is slightly a weird way of doing function definitions, but for auto-generated stuff it's helpful]

      Attachments

        Issue Links

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

          Activity

            People

              erikv Erik Verbruggen
              hardaker Wes Hardaker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes