Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0
-
None
-
I4c2c3edb3f63ce914b7b57cd0fbcec20488c8315
Description
Hello,
I had report a similar issue: https://bugreports.qt.nokia.com/browse/QTBUG-19592
But this problem seems more serious than I had thought.
The contextmenu of QTextEdit/QPlainTextEdit/QLineEdit/QLabel etc all have the save memory leak.
follow code can be used to reproduce the issue:
#include <QtWidgets> class Widget:public QLineEdit { public: Widget(const QString &t){ this->setText(t); } protected: void mouseDoubleClickEvent(QMouseEvent *){ this->dumpObjectTree(); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); Widget w("Right clicked on me several times, Then double clicked me"); w.show(); return a.exec(); }
or
#include <QtWidgets> int main(int argc, char *argv[]) { QApplication a(argc, argv); QMessageBox msgBox; msgBox.setDetailedText("Right clicked on Me several times, then close me ... "); msgBox.exec(); msgBox.dumpObjectTree(); return a.exec(); }
And I had figure out that: the problem is caused by the solution which used to fix https://bugreports.qt.nokia.com/browse/QTBUG-7902
Attachments
Issue Links
- replaces
-
QTBUG-19592 Memory leak caused by the default content menu of QMainWindow
- Closed
For Gerrit Dashboard: QTBUG-22817 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
9288,2 | Fix Memory leak related to Content Menu | master | qt/qtbase | Status: MERGED | +2 | 0 |