diff data/model/WritableWaveFileModel.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 c01cbe41aeb5
children 26da177d7266
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.h	Wed Mar 27 11:26:22 2019 +0000
+++ b/data/model/WritableWaveFileModel.h	Wed Mar 27 13:15:16 2019 +0000
@@ -139,7 +139,6 @@
     int getWriteProportion() const;
     
     bool isOK() const override;
-    bool isReady(int *) const override;
     
     /**
      * Return the generation completion percentage of this model. This
@@ -147,7 +146,7 @@
      * -- it just contains varying amounts of data depending on how
      * much has been written.
      */
-    virtual int getCompletion() const { return 100; }
+    int getCompletion() const override { return 100; }
 
     const ZoomConstraint *getZoomConstraint() const override {
         static PowerOfSqrtTwoZoomConstraint zc;