Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.3.0 RC1
-
None
-
OS X 10.9, qtbase/release (ee85cdee67d164315e52a05462b03fe7091cc26d)
-
8605f44097a986e10c2ddaf4b4eae0b2331d98d1
Description
crashes on the second right click. Works with Qt 5.2.1.
#include <QApplication> #include <QContextMenuEvent> #include <QMainWindow> #include <QMenu> class MainWindow : public QMainWindow { public: MainWindow(QWidget *parent = 0) : QMainWindow(parent) { submenu = new QMenu("Submenu", this); } virtual void contextMenuEvent(QContextMenuEvent *event) { submenu->clear(); QAction *action = submenu->addAction("Test"); action->setData(0); // Crash happens here second time... QMenu menu; menu.addMenu(submenu); menu.exec(event->globalPos()); } private: QMenu *submenu; }; int main (int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; window.show(); return app.exec(); }
Attachments
Issue Links
- is required for
-
QTBUG-37065 Issues to be fixed before 5.3.0 RC1 release
- Closed
- relates to
-
QTBUG-38044 Qt Quick Designer crashes on Mac OS X (Qt 5.3 Beta, regression from 5.2)
- Closed
For Gerrit Dashboard: QTBUG-38685 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
84376,1 | Cocoa QPA Menu: Clear menu items' Cocoa ancestor on destruction | release | qt/qtbase | Status: MERGED | +2 | 0 |