diff data/model/FFTModel.h @ 1784:4eac4bf35b45

More graceful handling of failure to construct FFT models in the case where the source model has already been deleted before this occurs
author Chris Cannam
date Tue, 17 Sep 2019 11:21:33 +0100
parents 6d6740b075c3
children dd51797e528e
line wrap: on
line diff
--- a/data/model/FFTModel.h	Tue Sep 17 10:42:55 2019 +0100
+++ b/data/model/FFTModel.h	Tue Sep 17 11:21:33 2019 +0100
@@ -78,7 +78,7 @@
     QString getBinName(int n) const override;
     bool shouldUseLogValueScale() const override { return true; }
     int getCompletion() const override;
-    virtual QString getError() const { return ""; } //!!!???
+    virtual QString getError() const { return m_error; }
     virtual sv_frame_t getFillExtent() const { return getEndFrame(); }
     QString toDelimitedDataString(QString, DataExportOptions,
                                   sv_frame_t, sv_frame_t) const override {
@@ -152,6 +152,7 @@
     Window<float> m_windower;
     mutable breakfastquay::FFT m_fft;
     double m_maximumFrequency;
+    mutable QString m_error;
     
     int getPeakPickWindowSize(PeakPickType type, sv_samplerate_t sampleRate,
                               int bin, double &dist) const;