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

Refactor | Add public declaration: add the override keyword when appropriate

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

      Let's say I'm creating a QAIM subclass. In my .cpp file I start typing the signature of the data() function:

      In older versions of Creator I think it used to fill in the arguments when I select the right one; now it doesn't. So that's a separate bug. Anyway... I resorted to copying the function signature from docs and then replacing the class name. Then select Refactor | Add public declaration:

      It does that, but I immediately get the clazy warning that it overrides a virtual function without declaring the override:

      so it seems like that's something the code model could have detected, and added the override keyword.

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes