comparison data/model/TextModel.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 69ab62d378bf
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
67 } 67 }
68 68
69 sv_samplerate_t getSampleRate() const override { return m_sampleRate; } 69 sv_samplerate_t getSampleRate() const override { return m_sampleRate; }
70 int getResolution() const { return m_resolution; } 70 int getResolution() const { return m_resolution; }
71 71
72 int getCompletion() const { return m_completion; } 72 int getCompletion() const override { return m_completion; }
73 73
74 void setCompletion(int completion, bool update = true) { 74 void setCompletion(int completion, bool update = true) {
75 75
76 { QMutexLocker locker(&m_mutex); 76 { QMutexLocker locker(&m_mutex);
77 if (m_completion == completion) return; 77 if (m_completion == completion) return;