comparison data/model/Model.cpp @ 383:94fc0591ea43 1.2-stable

* merge from trunk (1.2 ended up being tracked from trunk, but we may want this branch for fixes later)
author Chris Cannam
date Wed, 27 Feb 2008 10:32:45 +0000
parents 700cd3350391
children
comparison
equal deleted inserted replaced
349:f39d33b0b265 383:94fc0591ea43
23 23
24 const int Model::COMPLETION_UNKNOWN = -1; 24 const int Model::COMPLETION_UNKNOWN = -1;
25 25
26 Model::~Model() 26 Model::~Model()
27 { 27 {
28 // std::cerr << "Model::~Model(" << this << ")" << std::endl; 28 std::cerr << "Model::~Model(" << this << ")" << std::endl;
29 29
30 if (!m_aboutToDelete) { 30 if (!m_aboutToDelete) {
31 std::cerr << "NOTE: Model::~Model(" << this << ", \"" 31 std::cerr << "NOTE: Model::~Model(" << this << ", \""
32 << objectName().toStdString() << "\"): Model deleted " 32 << objectName().toStdString() << "\"): Model deleted "
33 << "with no aboutToDelete notification" << std::endl; 33 << "with no aboutToDelete notification" << std::endl;
64 } 64 }
65 65
66 void 66 void
67 Model::aboutToDelete() 67 Model::aboutToDelete()
68 { 68 {
69 std::cerr << "Model(" << this << ")::aboutToDelete()" << std::endl;
70
69 if (m_aboutToDelete) { 71 if (m_aboutToDelete) {
70 std::cerr << "WARNING: Model(" << this << ", \"" 72 std::cerr << "WARNING: Model(" << this << ", \""
71 << objectName().toStdString() << "\")::aboutToDelete: " 73 << objectName().toStdString() << "\")::aboutToDelete: "
72 << "aboutToDelete called more than once for the same model" 74 << "aboutToDelete called more than once for the same model"
73 << std::endl; 75 << std::endl;
98 const Model * 100 const Model *
99 Model::getAlignmentReference() const 101 Model::getAlignmentReference() const
100 { 102 {
101 if (!m_alignment) { 103 if (!m_alignment) {
102 if (m_sourceModel) return m_sourceModel->getAlignmentReference(); 104 if (m_sourceModel) return m_sourceModel->getAlignmentReference();
103 return this; 105 return 0;
104 } 106 }
105 return m_alignment->getReferenceModel(); 107 return m_alignment->getReferenceModel();
106 } 108 }
107 109
108 size_t 110 size_t