changeset 634:163573a73ebe fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:53:26 +0000
parents 4612d44ae753
children 26a0cb8335e3
files audio/AudioCallbackPlaySource.h audio/PlaySpeedRangeMapper.h framework/Document.h framework/MainWindowBase.h framework/SVFileReader.h framework/TransformUserConfigurator.h
diffstat 6 files changed, 33 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/audio/AudioCallbackPlaySource.h	Mon Nov 26 13:53:26 2018 +0000
@@ -431,7 +431,7 @@
             Thread(Thread::NonRTThread),
             m_source(source) { }
 
-        virtual void run();
+        void run() override;
 
     protected:
         AudioCallbackPlaySource &m_source;
--- a/audio/PlaySpeedRangeMapper.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/audio/PlaySpeedRangeMapper.h	Mon Nov 26 13:53:26 2018 +0000
@@ -26,11 +26,11 @@
     int getMinPosition() const { return m_minpos; }
     int getMaxPosition() const { return m_maxpos; }
     
-    virtual int getPositionForValue(double value) const;
-    virtual int getPositionForValueUnclamped(double value) const;
+    int getPositionForValue(double value) const override;
+    int getPositionForValueUnclamped(double value) const override;
 
-    virtual double getValueForPosition(int position) const;
-    virtual double getValueForPositionUnclamped(int position) const;
+    double getValueForPosition(int position) const override;
+    double getValueForPositionUnclamped(int position) const override;
 
     int getPositionForFactor(double factor) const;
     double getValueForFactor(double factor) const;
@@ -38,7 +38,7 @@
     double getFactorForPosition(int position) const;
     double getFactorForValue(double value) const;
 
-    virtual QString getUnit() const;
+    QString getUnit() const override;
     
 protected:
     int m_minpos;
--- a/framework/Document.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/framework/Document.h	Mon Nov 26 13:53:26 2018 +0000
@@ -302,7 +302,7 @@
 
     void setIncomplete(bool i) { m_isIncomplete = i; }
 
-    void toXml(QTextStream &, QString indent, QString extraAttributes) const;
+    void toXml(QTextStream &, QString indent, QString extraAttributes) const override;
     void toXmlAsTemplate(QTextStream &, QString indent, QString extraAttributes) const;
 
 signals:
@@ -396,9 +396,9 @@
         AddLayerCommand(Document *d, View *view, Layer *layer);
         virtual ~AddLayerCommand();
         
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         Document *m_d;
@@ -414,9 +414,9 @@
         RemoveLayerCommand(Document *d, View *view, Layer *layer);
         virtual ~RemoveLayerCommand();
         
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         Document *m_d;
--- a/framework/MainWindowBase.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/framework/MainWindowBase.h	Mon Nov 26 13:53:26 2018 +0000
@@ -136,7 +136,7 @@
     virtual bool saveSessionTemplate(QString path);
 
     /// Implementation of FrameTimer interface method
-    virtual sv_frame_t getFrame() const;
+    sv_frame_t getFrame() const override;
 
     void setDefaultFfwdRwdStep(RealTime step) {
         m_defaultFfwdRwdStep = step;
@@ -357,7 +357,7 @@
     {
     public:
         OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { }
-        virtual void run() {
+        void run() override {
             OSCQueue *queue = new OSCQueue(); // can take a long time
             m_mwb->m_oscQueue = queue;
         }
@@ -421,11 +421,11 @@
     {
     public:
         PaneCallback(MainWindowBase *mw) : m_mw(mw) { }
-        virtual Pane *addPane() { return m_mw->addPaneToStack(); }
-        virtual void setWindowSize(int width, int height) {
+        Pane *addPane() override { return m_mw->addPaneToStack(); }
+        void setWindowSize(int width, int height) override {
             m_mw->resizeConstrained(QSize(width, height));
         }
-        virtual void addSelection(sv_frame_t start, sv_frame_t end) {
+        void addSelection(sv_frame_t start, sv_frame_t end) override {
             m_mw->m_viewManager->addSelectionQuietly(Selection(start, end));
         }
     protected:
@@ -438,9 +438,9 @@
         AddPaneCommand(MainWindowBase *mw);
         virtual ~AddPaneCommand();
         
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
         Pane *getPane() { return m_pane; }
 
@@ -457,9 +457,9 @@
         RemovePaneCommand(MainWindowBase *mw, Pane *pane);
         virtual ~RemovePaneCommand();
         
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         MainWindowBase *m_mw;
--- a/framework/SVFileReader.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/framework/SVFileReader.h	Mon Nov 26 13:53:26 2018 +0000
@@ -181,19 +181,19 @@
     // For loading a single layer onto an existing pane
     void setCurrentPane(Pane *pane) { m_currentPane = pane; }
     
-    virtual bool startElement(const QString &namespaceURI,
+    bool startElement(const QString &namespaceURI,
                               const QString &localName,
                               const QString &qName,
-                              const QXmlAttributes& atts);
+                              const QXmlAttributes& atts) override;
 
-    virtual bool characters(const QString &);
+    bool characters(const QString &) override;
 
-    virtual bool endElement(const QString &namespaceURI,
+    bool endElement(const QString &namespaceURI,
                             const QString &localName,
-                            const QString &qName);
+                            const QString &qName) override;
 
-    bool error(const QXmlParseException &exception);
-    bool fatalError(const QXmlParseException &exception);
+    bool error(const QXmlParseException &exception) override;
+    bool fatalError(const QXmlParseException &exception) override;
 
     enum FileType
     {
--- a/framework/TransformUserConfigurator.h	Thu Nov 22 14:55:43 2018 +0000
+++ b/framework/TransformUserConfigurator.h	Mon Nov 26 13:53:26 2018 +0000
@@ -22,7 +22,7 @@
 public:
     // This is of course absolutely gross
 
-    virtual bool configure(ModelTransformer::Input &input,
+    bool configure(ModelTransformer::Input &input,
                            Transform &transform,
                            Vamp::PluginBase *plugin,
                            Model *&inputModel,
@@ -31,7 +31,7 @@
                            sv_frame_t duration,
                            const QMap<QString, Model *> &modelMap,
                            QStringList candidateModelNames,
-                           QString defaultModelName);
+                           QString defaultModelName) override;
 
     static void setParentWidget(QWidget *);