tests/auto/qwidgetaction/tst_qwidgetaction.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   393 {
   393 {
   394     // this should not crash!
   394     // this should not crash!
   395     QMainWindow *w = new QMainWindow;
   395     QMainWindow *w = new QMainWindow;
   396     QAction *a = new CrashedAction(w);
   396     QAction *a = new CrashedAction(w);
   397     QMenu *menu = w->menuBar()->addMenu("Test");
   397     QMenu *menu = w->menuBar()->addMenu("Test");
       
   398     menu->addAction("foo");
   398     menu->addAction(a);
   399     menu->addAction(a);
       
   400     menu->addAction("bar");
   399     delete w;
   401     delete w;
   400 }
   402 }
   401 
   403 
   402 QTEST_MAIN(tst_QWidgetAction)
   404 QTEST_MAIN(tst_QWidgetAction)
   403 #include "tst_qwidgetaction.moc"
   405 #include "tst_qwidgetaction.moc"