| 45 | } |
| 46 | |
| 47 | void CodePortingManager::slotPortingStart(const QString &project, const QString &srcCPU, const QString &destCPU) |
| 48 | { |
| 49 | if (codeporting.isRunning()) |
| 50 | return; |
| 51 | |
| 52 | resetUI(); |
| 53 | |
| 54 | QString projectSrcPath; |
| 55 | QString buildDir; |
| 56 | auto &ctx = dpfInstance.serviceContext(); |
| 57 | ProjectService *projectService = ctx.service<ProjectService>(ProjectService::name()); |
| 58 | if (projectService && projectService->getAllProjectInfo) { |
| 59 | auto allInfo = projectService->getAllProjectInfo(); |
| 60 | if (allInfo.isEmpty()) { |
| 61 | return; |
| 62 | } else { |
| 63 | for (auto projInfo : allInfo) { |
| 64 | QString path = projInfo.workspaceFolder(); |
| 65 | QString dirName = path.split("/").back(); |
| 66 | if (dirName == project) { |
| 67 | projectSrcPath = path; |
| 68 | buildDir = projInfo.buildFolder(); |
| 69 | break; |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | AsynInvoke(codeporting.start(projectSrcPath, srcCPU, buildDir, destCPU)); |
| 75 | } |
| 76 | |
| 77 | void CodePortingManager::slotPortingStatus(CodePorting::PortingStatus status) |
| 78 | { |
nothing calls this directly
no test coverage detected