diff data/model/AggregateWaveModel.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 78fe29adfd16
line wrap: on
line diff
--- a/data/model/AggregateWaveModel.h	Wed Mar 27 11:26:22 2019 +0000
+++ b/data/model/AggregateWaveModel.h	Wed Mar 27 13:15:16 2019 +0000
@@ -41,6 +41,11 @@
 
     bool isOK() const override;
     bool isReady(int *) const override;
+    int getCompletion() const override {
+        int c = 0;
+        (void)isReady(&c);
+        return c;
+    }
 
     QString getTypeName() const override { return tr("Aggregate Wave"); }