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

[add definition] for defaulted functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 9.0.0
    • C/C++/Obj-C++ Support

    Description

      i came across a small issue with the refactoring tools: if i'm having this code:

      struct foo
      {
          virtual ~foo() = default;
      };
      

      the refactoring tools provide an option "add definition". "add definition outside class" will generate code like this:

      struct foo
      {
          virtual ~foo() = default;
      };
      
      inline foo::~foo()
      {}
      

      seems that the `= default` isn't handled by the code model so the defaulted dtor is treated as declaration, not as definition.

      expected behaviour: "move definition" in the context menu and resulting in something like:

      struct foo
      {
          virtual ~foo();
      };
      
      inline foo::~foo() = default;
      

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes