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

Method addProject

src/plugins/container/container.cpp:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62ContainerError Container::addProject(const QString &projectPath)
63{
64 qInfo() << __FUNCTION__;
65 ContainerError error;
66 auto cachePath = CustomPaths::user(CustomPaths::Flags::Configures);
67 QFile containersUuid(cachePath + QDir::separator() + QString{"containers"});
68 QString containerId = QUuid::createUuid().toString().remove("{").remove("}").remove("-");
69 if (containersUuid.open(QIODevice::ReadWrite | QIODevice::Append)) {
70 QString pathUuidPair = projectPath + " " + containerId + "\n";
71 containersUuid.write(pathUuidPair.toStdString().c_str());
72 pathUuidMap[projectPath] = pathUuidPair.toStdString().c_str();
73 }
74 containersUuid.close();
75
76 return error;
77}
78
79ContainerError Container::initContainer(const QString &projectPath)
80{

Callers

nothing calls this directly

Calls 6

c_strMethod · 0.80
removeMethod · 0.45
toStringMethod · 0.45
openMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected