| 22 | } |
| 23 | |
| 24 | bool CodePortingPlugin::start() |
| 25 | { |
| 26 | auto &ctx = dpfInstance.serviceContext(); |
| 27 | windowService = ctx.service<WindowService>(WindowService::name()); |
| 28 | if (!windowService) { |
| 29 | qCritical() << "Failed, can't found window service"; |
| 30 | abort(); |
| 31 | } |
| 32 | |
| 33 | // Add code porting item in tool menu. |
| 34 | auto mTools = ActionManager::instance()->actionContainer(M_TOOLS); |
| 35 | |
| 36 | QAction *action = new QAction(tr("Code Porting"), mTools); |
| 37 | auto cmd = ActionManager::instance()->registerAction(action, A_CODE_PORTING); |
| 38 | mTools->addAction(cmd); |
| 39 | connect(action, &QAction::triggered, CodePortingManager::instance(), &CodePortingManager::slotShowConfigWidget); |
| 40 | |
| 41 | return true; |
| 42 | } |
| 43 | |
| 44 | dpf::Plugin::ShutdownFlag CodePortingPlugin::stop() |
| 45 | { |
nothing calls this directly
no test coverage detected