Mercurial > hg > svcore
comparison data/model/AlignmentModel.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 | ad5f892c0c4d |
children | 0d89abd631ac |
comparison
equal
deleted
inserted
replaced
1670:623231712470 | 1671:82d03c9661f9 |
---|---|
39 bool isOK() const override; | 39 bool isOK() const override; |
40 sv_frame_t getStartFrame() const override; | 40 sv_frame_t getStartFrame() const override; |
41 sv_frame_t getEndFrame() const override; | 41 sv_frame_t getEndFrame() const override; |
42 sv_samplerate_t getSampleRate() const override; | 42 sv_samplerate_t getSampleRate() const override; |
43 bool isReady(int *completion = 0) const override; | 43 bool isReady(int *completion = 0) const override; |
44 int getCompletion() const override { | |
45 int c = 0; | |
46 (void)isReady(&c); | |
47 return c; | |
48 } | |
44 const ZoomConstraint *getZoomConstraint() const override; | 49 const ZoomConstraint *getZoomConstraint() const override; |
45 | 50 |
46 QString getTypeName() const override { return tr("Alignment"); } | 51 QString getTypeName() const override { return tr("Alignment"); } |
47 | 52 |
48 const Model *getReferenceModel() const; | 53 const Model *getReferenceModel() const; |