| 60 | } |
| 61 | |
| 62 | ContainerError 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 | |
| 79 | ContainerError Container::initContainer(const QString &projectPath) |
| 80 | { |