Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 8.0.0-beta1
-
None
-
d09081d07c (qt-creator/qt-creator/8.0) d09081d07c (qt-creator/tqtc-qt-creator/8.0)
Description
If I'm writing a property with a pointer type, like this
Q_PROPERTY(QWindow* window READ window WRITE setWindow NOTIFY windowChanged)
it should generate the storage variable like this
private:
QWindow *m_window = nullptr;
Currently it's leaving it unintialized, so if I modify the setter to undo something with the previous one (like disconnecting signals or whatever), boom... it's a random dangling pointer.
Attachments
For Gerrit Dashboard: QTCREATORBUG-27770 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
419494,2 | CppEditor: Initialize pointer member with nullptr | 8.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |