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

Using the refactor feature modifies stock Qt headers without being open

    XMLWordPrintable

Details

    • e51b2a28eaf14817931cd35fe9e2996c7f5cc4f3

    Description

      How was the bug discovered:
      I refactored a mouseReleaseEvent() to a mousePressEvent(), hit rebuild and got a load of redefinition errors in the following Qt headers:

      qabstractscrollarea
      qabstractspinbox
      qlabel
      qgroupbox
      qabstractitemview
      qheaderview
      qabstractbutton
      qtextedit
      qplaintextedit
      qtabbar
      qslider
      qcombobox
      qlineedit
      qwidget

      Which coincidentally correspond to all the UI elements that were used in the Designer UI form of another opened, but inactive project.

      My assumption is that refactoring somehow leaked through a source, generated from the form.

      To reiterate:

      • the headers that were modified were not opened in Creator
      • they were not even used in the active project
      • regular includes do not seem to leak as did the form generated source

      The refactoring feature should be limited only to files that belong to the active project.

      The bug appears to be due to a consideration that was not made when the refactor feature was implemented.

      It has a lot of potential for creating problems in widget and derived library headers when refactoring commonly used identifiers or overloaded methods. The changes appear to be automatically saved upon attempts to rebuild the active project after the refactoring, rendering the headers corrupt due to potential redefinitions or resulting missing implementations.

      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
              utcenter Dian Obreshkov
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes