| 506 | } |
| 507 | |
| 508 | void EditorTest::clearModels() |
| 509 | { |
| 510 | QString file_xml = readFile(":/crossdoor_with_subtree.xml"); |
| 511 | main_win->on_actionClear_triggered(); |
| 512 | main_win->loadFromXML( file_xml ); |
| 513 | |
| 514 | file_xml = readFile(":/show_all.xml"); |
| 515 | main_win->on_actionClear_triggered(); |
| 516 | main_win->loadFromXML( file_xml ); |
| 517 | |
| 518 | auto container = main_win->currentTabInfo(); |
| 519 | // auto view = container->view(); |
| 520 | |
| 521 | auto abs_tree = getAbstractTree(); |
| 522 | auto node = abs_tree.findFirstNode( "DoSequenceStar" ); |
| 523 | |
| 524 | QTimer::singleShot(300, [&]() |
| 525 | { |
| 526 | // No message box expected |
| 527 | QWidget* modal_widget = QApplication::activeModalWidget(); |
| 528 | |
| 529 | if (dynamic_cast<QMessageBox*>(modal_widget)) |
| 530 | { |
| 531 | QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); |
| 532 | QCoreApplication::postEvent(modal_widget, event); |
| 533 | QFAIL("no QMessageBox"); |
| 534 | } |
| 535 | }); |
| 536 | |
| 537 | container->createSubtree( *node->graphic_node, "DoorClosed" ); |
| 538 | } |
| 539 | |
| 540 | void EditorTest::undoWithSubtreeExpanded() |
| 541 | { |
nothing calls this directly
no test coverage detected