diff data/model/RegionModel.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/RegionModel.h	Thu Nov 22 14:55:18 2018 +0000
+++ b/data/model/RegionModel.h	Mon Nov 26 13:48:45 2018 +0000
@@ -122,11 +122,11 @@
 
     bool haveDistinctValues() const { return m_haveDistinctValues; }
 
-    QString getTypeName() const { return tr("Region"); }
+    QString getTypeName() const override { return tr("Region"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         std::cerr << "RegionModel::toXml: extraAttributes = \"" 
                   << extraAttributes.toStdString() << std::endl;
@@ -142,12 +142,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 5;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -159,7 +159,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 4) {
             return IntervalModel<RegionRec>::getData(row, column, role);
@@ -174,7 +174,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 < 4) {
             return IntervalModel<RegionRec>::getSetDataCommand
@@ -197,13 +197,13 @@
         return command->finish();
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 4) return SortAlphabetical;
         return SortNumeric;
     }
 
-    virtual void addPoint(const Point &point)
+    void addPoint(const Point &point) override
     {
         if (point.value != 0.f) m_haveDistinctValues = true;
         IntervalModel<RegionRec>::addPoint(point);