| 136 | } |
| 137 | |
| 138 | std::shared_ptr<Model> ModelLibraryLocal::addModel(const Model& model, const QString& path) |
| 139 | { |
| 140 | QString filePath = getRelativePath(path); |
| 141 | QFileInfo info(filePath); |
| 142 | std::shared_ptr<Model> newModel = std::make_shared<Model>(model); |
| 143 | newModel->setLibrary(getptr()); |
| 144 | newModel->setDirectory(getLibraryPath(filePath, info.fileName())); |
| 145 | newModel->setFilename(info.fileName()); |
| 146 | |
| 147 | (*_modelPathMap)[filePath] = newModel; |
| 148 | |
| 149 | return newModel; |
| 150 | } |
nothing calls this directly
no test coverage detected