MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / slotPortingStart

Method slotPortingStart

src/plugins/codeporting/codeportingmanager.cpp:47–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void 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
77void CodePortingManager::slotPortingStatus(CodePorting::PortingStatus status)
78{

Callers

nothing calls this directly

Calls 5

getAllProjectInfoMethod · 0.80
nameFunction · 0.50
isRunningMethod · 0.45
isEmptyMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected