| 247 | } |
| 248 | |
| 249 | QAction *ActionContainer::actionForItem(QObject *item) const |
| 250 | { |
| 251 | if (auto cmd = qobject_cast<Command *>(item)) { |
| 252 | return cmd->action(); |
| 253 | } else if (auto container = qobject_cast<ActionContainer *>(item)) { |
| 254 | if (container->containerAction()) |
| 255 | return container->containerAction(); |
| 256 | } |
| 257 | QTC_ASSERT(false, return nullptr); |
| 258 | } |
| 259 | |
| 260 | void ActionContainer::insertAction(QAction *before, Command *command) |
| 261 | { |
no test coverage detected