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

Generate Getter and Setter leads to "out of line definition ..." errors

    XMLWordPrintable

Details

    • Windows

    Description

      Have a class.h file add a memeber (float _f) to a class.

      Request "Generate Getter and Setter" for _f (e.g. with Alt+Enter)

      This will generate the getter and setter in the class.cpp file.

      But both methods are marked: Out-of-line ...

      The culprit is that the class.h file is not saved after the refactoring.

      This in turn leads to a failure in error detection.

      Switching back to the class.h file to save it removes the error indication in the class.cpp file.

      Maybe save the class.h file automatically after refacoring.

      ps: I can remember that I read in some blog that with the new clangd code model this might happen. But the experience is not nice to have error texts as result for an refactoring action.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            moellney Michael Möllney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes