diff data/model/TextModel.h @ 1580:c01cbe41aeb5 fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:48:45 +0000
parents 48e9f538e6e9
children ad5f892c0c4d
line wrap: on
line diff
--- a/data/model/TextModel.h	Thu Nov 22 14:55:18 2018 +0000
+++ b/data/model/TextModel.h	Mon Nov 26 13:48:45 2018 +0000
@@ -44,7 +44,7 @@
     QString getLabel() const { return label; }
     
     void toXml(QTextStream &stream, QString indent = "",
-               QString extraAttributes = "") const
+               QString extraAttributes = "") const override
     {
         stream << QString("%1<point frame=\"%2\" height=\"%3\" label=\"%4\" %5/>\n")
             .arg(indent).arg(frame).arg(height)
@@ -89,9 +89,9 @@
         SparseModel<TextPoint>(sampleRate, resolution, notifyOnAdd)
     { }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         SparseModel<TextPoint>::toXml
             (out, 
@@ -100,18 +100,18 @@
              .arg(extraAttributes));
     }
 
-    QString getTypeName() const { return tr("Text"); }
+    QString getTypeName() const override { return tr("Text"); }
 
     /**
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 4;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -122,7 +122,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseModel<TextPoint>::getData
@@ -139,7 +139,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseModel<TextPoint>::getSetDataCommand
@@ -163,12 +163,12 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 3) return SortAlphabetical;
         return SortNumeric;