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

implementation helper creates incorrect code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2: Important P2: Important
    • Qt Creator 2.1.0-beta2
    • Qt Creator 2.1.0
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu Linux, gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

      create a new class Foo.
      in foo.h declare a public function

      bool isBaz(int value) const;

      now move cursor onto "isBaz", press Alt+Enter and let QtCreator create the implementation of the function in foo.cpp.
      the helper creates the definition

      bool Foo::isBaz(int value)
      {
      }

      but without the "const"
      now compile - the compiler claims that the prototype for the function does not match any in class Foo.
      Add the "const" manually in foo.cpp, and it works.

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

            erikv Erik Verbruggen
            droetker Christian Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes