| 628 | } |
| 629 | |
| 630 | IPluginGame* PluginContainer::managedGame() const |
| 631 | { |
| 632 | // TODO: This const_cast is safe but ugly. Most methods require a IPlugin*, so |
| 633 | // returning a const-version if painful. This should be fixed by making methods accept |
| 634 | // a const IPlugin* instead, but there are a few tricks with qobject_cast and const. |
| 635 | return m_Organizer ? const_cast<IPluginGame*>(m_Organizer->managedGame()) : nullptr; |
| 636 | } |
| 637 | |
| 638 | bool PluginContainer::isEnabled(IPlugin* plugin) const |
| 639 | { |