Mercurial > hg > svcore
comparison data/model/NoteModel.h @ 1671:82d03c9661f9 single-point
Rework isReady()/getCompletion() on models. Previously the new overhauled models were implementing getCompletion() but inheriting a version of isReady() (from the Model base) that didn't call it, referring only to isOK(). So they were reporting completion as soon as they had begun. Instead hoist getCompletion() to abstract base and call it from Model::isReady().
author | Chris Cannam |
---|---|
date | Wed, 27 Mar 2019 13:15:16 +0000 |
parents | 8bf3a52a1604 |
children | f97d64b8674f |
comparison
equal
deleted
inserted
replaced
1670:623231712470 | 1671:82d03c9661f9 |
---|---|
127 void setValueQuantization(float q) { m_valueQuantization = q; } | 127 void setValueQuantization(float q) { m_valueQuantization = q; } |
128 | 128 |
129 float getValueMinimum() const { return m_valueMinimum; } | 129 float getValueMinimum() const { return m_valueMinimum; } |
130 float getValueMaximum() const { return m_valueMaximum; } | 130 float getValueMaximum() const { return m_valueMaximum; } |
131 | 131 |
132 int getCompletion() const { return m_completion; } | 132 int getCompletion() const override { return m_completion; } |
133 | 133 |
134 void setCompletion(int completion, bool update = true) { | 134 void setCompletion(int completion, bool update = true) { |
135 | 135 |
136 { QMutexLocker locker(&m_mutex); | 136 { QMutexLocker locker(&m_mutex); |
137 if (m_completion == completion) return; | 137 if (m_completion == completion) return; |