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

Refactor virtual method does not work for already derived classes base classes

    XMLWordPrintable

Details

    • Windows
    • a7756a72fd3c5ec86d2c42402636b26466333e23 (qt-creator/qt-creator/5.0)

    Description

      Using the Refactor => "Insert virtual functions of base class" does not insert virtual functions for base classes which are itself base classes (and do not re-declare the virtual function).

      E.g in this example I filtered to find the headerData() method and it pops up in three derived classes (red arrows). As you can see, I've chosen the direct base class method of my class.

      After pressing "Ok" nothing was inserted.

       

      If I choose the top most listing of headerData() ( the on in QAbstractItemModel) in get the method inserted in my code.

       

      I attached the test code.

      Attachments

        Issue Links

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

          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