diff 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
line wrap: on
line diff
--- a/data/model/AlignmentModel.h	Wed Mar 27 11:26:22 2019 +0000
+++ b/data/model/AlignmentModel.h	Wed Mar 27 13:15:16 2019 +0000
@@ -41,6 +41,11 @@
     sv_frame_t getEndFrame() const override;
     sv_samplerate_t getSampleRate() const override;
     bool isReady(int *completion = 0) const override;
+    int getCompletion() const override {
+        int c = 0;
+        (void)isReady(&c);
+        return c;
+    }
     const ZoomConstraint *getZoomConstraint() const override;
 
     QString getTypeName() const override { return tr("Alignment"); }