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

Method toShortProjectPath

src/plugins/project/locator/basefilelocator.cpp:109–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109QString baseFileLocator::toShortProjectPath(const QString &path)
110{
111 QMap<QString, QString> projectList;
112 QString nativePath = path;
113 if (projectService->getAllProjectInfo) {
114 auto allProject = projectService->getAllProjectInfo();
115 foreach (auto project, allProject) {
116 auto projectRootPath = project.workspaceFolder();
117 if (path.startsWith(projectRootPath)) {
118 nativePath.replace(0, projectRootPath.size(), QFileInfo(projectRootPath).fileName() + ':');
119 break;
120 }
121 }
122 }
123
124 return nativePath;
125}

Callers

nothing calls this directly

Calls 1

getAllProjectInfoMethod · 0.80

Tested by

no test coverage detected