| 561 | |
| 562 | #if defined(HAVE_QT) |
| 563 | void |
| 564 | Action::menu_about_to_show () |
| 565 | { |
| 566 | // keeps a reference to self in case the action handler code removes actions |
| 567 | tl::shared_ptr<Action> self_holder (this); |
| 568 | |
| 569 | BEGIN_PROTECTED |
| 570 | |
| 571 | on_menu_opening_event (); |
| 572 | menu_opening (); |
| 573 | |
| 574 | if (! mp_dispatcher || ! mp_dispatcher->menu ()) { |
| 575 | return; |
| 576 | } |
| 577 | AbstractMenuItem *item = mp_dispatcher->menu ()->find_item_for_action (this); |
| 578 | if (! item ) { |
| 579 | return; |
| 580 | } |
| 581 | |
| 582 | for (auto i = item->children.begin (); i != item->children.end (); ++i) { |
| 583 | if (i->action ()) { |
| 584 | i->action ()->sync_qaction (); |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | END_PROTECTED |
| 589 | } |
| 590 | #endif |
| 591 | |
| 592 | #if defined(HAVE_QT) |
nothing calls this directly
no test coverage detected