# HG changeset patch # User Chris Cannam # Date 1562342127 -3600 # Node ID 8529763e2258dc018ec1586365fa6d124ad29779 # Parent d954dfccd9228e44e000efada4be76f6d1a6c4f1 Tidy diff -r d954dfccd922 -r 8529763e2258 data/model/Model.cpp --- a/data/model/Model.cpp Fri Jul 05 16:55:20 2019 +0100 +++ b/data/model/Model.cpp Fri Jul 05 16:55:27 2019 +0100 @@ -25,15 +25,6 @@ Model::~Model() { SVDEBUG << "Model::~Model: " << this << " with id " << getId() << endl; -/*!!! - if (!m_aboutToDelete) { - SVDEBUG << "NOTE: Model(" << this << ", \"" - << objectName() << "\", type uri <" - << m_typeUri << ">)::~Model(): Model deleted " - << "with no aboutToDelete notification" - << endl; - } -*/ //!!! see notes in header - sort this out /* if (!m_alignmentModel.isNone()) { @@ -45,13 +36,6 @@ void Model::setSourceModel(ModelId modelId) { -/*!!! - if (m_sourceModel) { - disconnect(m_sourceModel, SIGNAL(aboutToBeDeleted()), - this, SLOT(sourceModelAboutToBeDeleted())); - } -*/ - m_sourceModel = modelId; auto model = ModelById::get(m_sourceModel); @@ -59,45 +43,9 @@ connect(model.get(), SIGNAL(alignmentCompletionChanged(ModelId)), this, SIGNAL(alignmentCompletionChanged(ModelId))); } - - -/* - if (m_sourceModel) { - connect(m_sourceModel, SIGNAL(alignmentCompletionChanged()), - this, SIGNAL(alignmentCompletionChanged())); - connect(m_sourceModel, SIGNAL(aboutToBeDeleted()), - this, SLOT(sourceModelAboutToBeDeleted())); - } -*/ -} -/*!!! -void -Model::aboutToDelete() -{ - SVDEBUG << "Model(" << this << ", \"" - << objectName() << "\", type name \"" - << getTypeName() << "\", type uri <" - << m_typeUri << ">)::aboutToDelete()" << endl; - - if (m_aboutToDelete) { - SVDEBUG << "WARNING: Model(" << this << ", \"" - << objectName() << "\", type uri <" - << m_typeUri << ">)::aboutToDelete: " - << "aboutToDelete called more than once for the same model" - << endl; - } - - emit aboutToBeDeleted(); - m_aboutToDelete = true; } void -Model::sourceModelAboutToBeDeleted() -{ - m_sourceModel = nullptr; -} -*/ -void Model::setAlignment(ModelId alignmentModel) { SVDEBUG << "Model(" << this << "): accepting alignment model " diff -r d954dfccd922 -r 8529763e2258 data/model/Model.h --- a/data/model/Model.h Fri Jul 05 16:55:20 2019 +0100 +++ b/data/model/Model.h Fri Jul 05 16:55:27 2019 +0100 @@ -133,31 +133,6 @@ virtual bool isSparse() const { return false; } /** - * Mark the model as abandoning. This means that the application - * no longer needs it, so it can stop doing any background - * calculations it may be involved in. Note that as far as the - * model API is concerned, this does nothing more than tell the - * model to return true from isAbandoning(). The actual response - * to this will depend on the model's context -- it's possible - * nothing at all will change. - */ - //!!! aim to lose this (???) - /*!!! - virtual void abandon() { - m_abandoning = true; - } - */ - - /** - * Query whether the model has been marked as abandoning. - */ - //!!! aim to lose this - /*!!! - virtual bool isAbandoning() const { - return m_abandoning; - } - */ - /** * Return true if the model has finished loading or calculating * all its data, for a model that is capable of calculating in a * background thread. @@ -329,7 +304,6 @@ protected: Model() : -//!!! m_abandoning(false), m_extendTo(0) { } // Not provided. @@ -339,7 +313,6 @@ ModelId m_sourceModel; ModelId m_alignmentModel; QString m_typeUri; -//!!! bool m_abandoning; sv_frame_t m_extendTo; };