diff -r 4787d05e9c89 -r e17e07661f4c src/documentmanager.h --- a/src/documentmanager.h Sat Jul 23 01:38:06 2022 +0300 +++ b/src/documentmanager.h Sat Jul 23 01:38:43 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);