Mercurial > hg > svcore
changeset 1754:8529763e2258 by-id
Tidy
author | Chris Cannam |
---|---|
date | Fri, 05 Jul 2019 16:55:27 +0100 |
parents | d954dfccd922 |
children | fd7f127ecd89 |
files | data/model/Model.cpp data/model/Model.h |
diffstat | 2 files changed, 0 insertions(+), 79 deletions(-) [+] |
line wrap: on
line diff
--- 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 "
--- 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; };