diff -r 5bb26aa33ad5 -r 719b909a7d2b src/documentmanager.h --- a/src/documentmanager.h Wed Jul 20 21:35:55 2022 +0300 +++ b/src/documentmanager.h Wed Jul 20 21:48:46 2022 +0300 @@ -48,8 +48,8 @@ auto begin() const { return this->openModels.begin(); } auto end() const { return this->openModels.end(); } ModelId newModel(); - Model* findDependencyByName(const ModelId modelId, const QString& name); - Model* getModelById(ModelId modelId); + QTextDocument* findDependencyByName(const ModelId modelId, const QString& name); + QTextDocument* getModelById(ModelId modelId); std::optional openModel(const QString& path, QTextStream& errorStream, const OpenType openType); std::map loadDependenciesForAllModels(const LibrariesModel &libraries); void closeDocument(const ModelId modelId); @@ -60,7 +60,7 @@ const LibrariesModel &libraries, QTextStream &errorStream); bool saveModel(const ModelId modelId, QTextStream& errors); - std::optional findIdForModel(const Model* model) const; + std::optional findIdForModel(const QTextDocument* model) const; PolygonCache* getPolygonCacheForModel(ModelId modelId); const ModelInfo* find(ModelId modelId) const; void setModelPayload(ModelId modelId, QObject* object); @@ -75,7 +75,7 @@ private: int modelIdCounter = 0; std::map openModels; - void collectReferences(QSet &referenced, const QString& name, const Model* model); + void collectReferences(QSet &referenced, const QString& name, const QTextDocument* model); void updateDependencies(ModelInfo* model); void prune(); void makePolygonCacheForModel(const ModelId modelId);