comparison data/model/SparseOneDimensionalModel.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 353a2d15f213
children f97d64b8674f
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
79 79
80 bool canPlay() const override { return true; } 80 bool canPlay() const override { return true; }
81 QString getDefaultPlayClipId() const override { return "tap"; } 81 QString getDefaultPlayClipId() const override { return "tap"; }
82 82
83 bool hasTextLabels() const { return m_haveTextLabels; } 83 bool hasTextLabels() const { return m_haveTextLabels; }
84 84
85 int getCompletion() const { return m_completion; } 85 int getCompletion() const override { return m_completion; }
86 86
87 void setCompletion(int completion, bool update = true) { 87 void setCompletion(int completion, bool update = true) {
88 88
89 { QMutexLocker locker(&m_mutex); 89 { QMutexLocker locker(&m_mutex);
90 if (m_completion == completion) return; 90 if (m_completion == completion) return;