Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 2.6.1
-
None
-
Qt5.0 MSVC2012 x64
Windows 7 x64
Creator 2.6.1
-
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
- is duplicated by
-
QTCREATORBUG-24119 Refactoring destroys entire Qt installation, new installation required afterwards
-
- Closed
-
-
QTCREATORBUG-23805 Renaming a method also renames in Qt header
-
- Closed
-
-
QTCREATORBUG-6598 Ability to 'lock' Qt classes
-
- Closed
-
- relates to
-
QTCREATORBUG-20315 Linker failure to unused method
-
- Closed
-
- resulted in
-
QTBUG-72766 Install headers as read-only to prevent accidently modifications
-
- Reported
-
For Gerrit Dashboard: QTCREATORBUG-8561 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
335922,4 | CppTools: Do not pre-select "external" files in "rename symbol" widget | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |