| 23 | } |
| 24 | |
| 25 | bool BuilderCore::start() |
| 26 | { |
| 27 | auto &ctx = dpfInstance.serviceContext(); |
| 28 | auto windowService = ctx.service<WindowService>(WindowService::name()); |
| 29 | auto builderService = ctx.service<BuilderService>(BuilderService::name()); |
| 30 | if (!windowService || !builderService) { |
| 31 | qCritical() << "Failed, can't found window service or build service"; |
| 32 | abort(); |
| 33 | } |
| 34 | |
| 35 | windowService->addContextWidget(tr("&Build"), |
| 36 | new AbstractWidget(BuildManager::instance()->getCompileWidget()), |
| 37 | false); |
| 38 | |
| 39 | using namespace std::placeholders; |
| 40 | builderService->runbuilderCommand = std::bind(&BuildManager::handleCommand, BuildManager::instance(), _1, _2); |
| 41 | return true; |
| 42 | } |
| 43 | |
| 44 | dpf::Plugin::ShutdownFlag BuilderCore::stop() |
| 45 | { |
no test coverage detected