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

Prototype of friend method creates(hit alt + enter on method declaration) wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 4.13.0-beta1
    • Qt Creator 2.4.1
    • C/C++/Obj-C++ Support
    • None
    • Qt 4.7.4
      kde 4.6.5
      Debian squeeze
      linux 3.2.0-2-686-pae
    • d811e7773f7d7431fe58fd997da1a3a15ba53f85 (qt-creator/qt-creator/master)

      1. Make friend function declaration in class in *.h file
      e.g.

      class fooclass
      {
      public:
      friend int foo();
      };

      2. Put cursor on declaration of friend int foo(), enter alt + enter and hit enter again to create a prototype in associated *.cpp file
      3. It creates:

      int fooclass::foo()
      {
      }

      But must create:

      int foo()
      {
      }

      Where you can see the confirmation:
      https://en.wikipedia.org/wiki/Friend_function
      http://www.cplusplus.com/doc/tutorial/inheritance/

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

            kandeler Christian Kandeler
            freemanoid alex
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes