comparison data/model/Model.cpp @ 1507:fe579dc6a713 import-audio-data

Merge from default branch
author Chris Cannam
date Tue, 04 Sep 2018 13:19:20 +0100
parents 9d37c8cf9686
children d3814e07b8aa
comparison
equal deleted inserted replaced
1493:f0c2b8b31609 1507:fe579dc6a713
38 m_alignment->aboutToDelete(); 38 m_alignment->aboutToDelete();
39 delete m_alignment; 39 delete m_alignment;
40 } 40 }
41 } 41 }
42 42
43 int
44 Model::getNextId()
45 {
46 static int nextId = 0;
47 static QMutex mutex;
48 QMutexLocker locker(&mutex);
49 int i = nextId;
50 if (nextId == INT_MAX) {
51 nextId = INT_MIN;
52 }
53 ++nextId;
54 return i;
55 }
56
43 void 57 void
44 Model::setSourceModel(Model *model) 58 Model::setSourceModel(Model *model)
45 { 59 {
46 if (m_sourceModel) { 60 if (m_sourceModel) {
47 disconnect(m_sourceModel, SIGNAL(aboutToBeDeleted()), 61 disconnect(m_sourceModel, SIGNAL(aboutToBeDeleted()),