Mercurial > hg > svcore
diff data/model/ReadOnlyWaveFileModel.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 | 78fe29adfd16 |
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.h Wed Mar 27 11:26:22 2019 +0000 +++ b/data/model/ReadOnlyWaveFileModel.h Wed Mar 27 13:15:16 2019 +0000 @@ -54,6 +54,11 @@ bool isOK() const override; bool isReady(int *) const override; + int getCompletion() const override { + int c = 0; + (void)isReady(&c); + return c; + } const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; }