Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.3.0
-
None
-
Windows 7 64 bit
-
c64a3891a20719c66c671ecfea6081d013fcab8b
Description
- Open a C++-file with the following lines:
auto s = new QString; s->length();
Note that s is of type QString*.
- Right-click on the declaration of s and select "Refactor" -> "Convert to Pointer" from the context menu.
The code will be changed to:auto *s = new QString; s->>length();
This is invalid code.
The code should remain valid. It could be change to this instead:
auto *s = new QString;
s->length();
Attachments
Issue Links
- resulted in
-
QTCREATORBUG-14279 "Convert to Stack Variable" generates invalid code
- Closed
For Gerrit Dashboard: QTCREATORBUG-13605 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
101747,4 | CppEditor: make convert from/to pointer aware of auto | 3.3 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |