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

Go to class definition out of scope

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 1.3.85 (2.0.0-rc1)
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu 10.04

    Description

      If a class is used only by a pointer to a class, in header can be used forward declaration.
      However, it is not very informative to see only this in "Follow under cursor". The best behavior is to point to this forward declaration by "F2", and but some other key, point to the full class definition.
      Of course, if there is more than one class definition in one project, some error should be reported. But I don't think it is a normal case.

      Example of code:
      a.h:

      #ifndef A_H
      #define A_H
      
      class B;
      
      class A
      {
          B* pointer;
      };
      
      #endif // A_H
      

      b.h:

      #ifndef B_H
      #define B_H
      
      class B
      {
        unsigned int member;
      };
      
      #endif // B_H
      

      Attachments

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

        Activity

          People

            con Eike Ziller
            arseny Arseny Klimovsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes