changeset 1410:d057dcc827e7 fix-static-analysis

Merge from default branch
author Chris Cannam
date Tue, 04 Dec 2018 13:49:09 +0000
parents c8a6fd3f9dff (diff) 24234307c9b2 (current diff)
children fa986b91d77f
files layer/RegionLayer.cpp
diffstat 98 files changed, 1052 insertions(+), 1052 deletions(-) [+]
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -43,7 +43,7 @@
 
 
 Colour3DPlotLayer::Colour3DPlotLayer() :
-    m_model(0),
+    m_model(nullptr),
     m_colourScale(ColourScaleType::Linear),
     m_colourScaleSet(false),
     m_colourMap(0),
@@ -59,7 +59,7 @@
     m_miny(0),
     m_maxy(0),
     m_synchronous(false),
-    m_peakCache(0),
+    m_peakCache(nullptr),
     m_peakCacheDivisor(8)
 {
     QSettings settings;
@@ -162,7 +162,7 @@
 
     if (m_peakCache) m_peakCache->aboutToDelete();
     delete m_peakCache;
-    m_peakCache = 0;
+    m_peakCache = nullptr;
 
     invalidateRenderers();
     invalidateMagnitudes();
@@ -185,7 +185,7 @@
     //!!! should do this only if the range is visible
     if (m_peakCache) m_peakCache->aboutToDelete();
     delete m_peakCache;
-    m_peakCache = 0;
+    m_peakCache = nullptr;
     
     invalidateRenderers();
     invalidateMagnitudes();
@@ -460,7 +460,7 @@
     if (name == "Gain") {
         return new LinearRangeMapper(-50, 50, -25, 25, tr("dB"));
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -750,7 +750,7 @@
 RangeMapper *
 Colour3DPlotLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_model) return 0;
+    if (!m_model) return nullptr;
 
     return new LinearRangeMapper(0, m_model->getHeight(),
                                  0, m_model->getHeight(), "");
@@ -1020,7 +1020,7 @@
 
         Colour3DPlotRenderer::Sources sources;
         sources.verticalBinLayer = this;
-        sources.fft = 0;
+        sources.fft = nullptr;
         sources.source = m_model;
         sources.peakCaches.push_back(getPeakCache());
 
--- a/layer/Colour3DPlotLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/Colour3DPlotLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -46,48 +46,48 @@
     Colour3DPlotLayer();
     ~Colour3DPlotLayer();
 
-    virtual const ZoomConstraint *getZoomConstraint() const {
+    const ZoomConstraint *getZoomConstraint() const override {
         return m_model ? m_model->getZoomConstraint() : 0;
     }
-    virtual const Model *getModel() const { return m_model; }
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
-    virtual void setSynchronousPainting(bool synchronous);
+    const Model *getModel() const override { return m_model; }
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
+    void setSynchronousPainting(bool synchronous) override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, 
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, 
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void setLayerDormant(const LayerGeometryProvider *v, bool dormant);
+    void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override;
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourHasMeaningfulValue;
     }
 
     void setModel(const DenseThreeDimensionalModel *model);
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual PropertyList getProperties() const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual QString getPropertyIconName(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual QString getPropertyValueIconName(const PropertyName &,
-                                             int value) const;
-    virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
-    virtual void setProperty(const PropertyName &, int value);
-    virtual void setProperties(const QXmlAttributes &);
+    PropertyList getProperties() const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    QString getPropertyIconName(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    QString getPropertyValueIconName(const PropertyName &,
+                                             int value) const override;
+    RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
+    void setProperty(const PropertyName &, int value) override;
+    void setProperties(const QXmlAttributes &) override;
     
     void setColourScale(ColourScaleType);
     ColourScaleType getColourScale() const { return m_colourScale; }
@@ -129,24 +129,24 @@
     void setSmooth(bool i);
     bool getSmooth() const;
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
-    virtual bool setDisplayExtents(double min, double max);
+    bool getDisplayExtents(double &min, double &max) const override;
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual bool getYScaleValue(const LayerGeometryProvider *, int /* y */,
-                                double &/* value */, QString &/* unit */) const;
+    bool getYScaleValue(const LayerGeometryProvider *, int /* y */,
+                                double &/* value */, QString &/* unit */) const override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
-    virtual const Model *getSliceableModel() const { return m_model; }
+    const Model *getSliceableModel() const override { return m_model; }
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
 protected slots:
     void cacheInvalid();
@@ -203,7 +203,7 @@
      * and the vertical scale is the usual way up). Bin number may be
      * fractional, to obtain a position part-way through a bin.
      */
-    double getYForBin(const LayerGeometryProvider *, double bin) const;
+    double getYForBin(const LayerGeometryProvider *, double bin) const override;
     
     /**
      * Return the bin number, possibly fractional, at the given y
@@ -211,7 +211,7 @@
      * at which the bins "start" (i.e. the bottom of the visible bin,
      * if the vertical scale is the usual way up).
      */
-    double getBinForY(const LayerGeometryProvider *, double y) const;
+    double getBinForY(const LayerGeometryProvider *, double y) const override;
 
     int getColourScaleWidth(QPainter &) const;
 
--- a/layer/ColourDatabase.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ColourDatabase.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _COLOUR_DATABASE_H_
-#define _COLOUR_DATABASE_H_
+#ifndef SV_COLOUR_DATABASE_H
+#define SV_COLOUR_DATABASE_H
 
 #include <QObject>
 #include <QString>
--- a/layer/ColourMapper.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ColourMapper.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -111,8 +111,8 @@
 {
     int n = int(colours.size());
     double m = norm * (n-1);
-    if (m >= n-1) { colours[n-1].getRgbF(&r, &g, &b, 0); return; }
-    if (m <= 0) { colours[0].getRgbF(&r, &g, &b, 0); return; }
+    if (m >= n-1) { colours[n-1].getRgbF(&r, &g, &b, nullptr); return; }
+    if (m <= 0) { colours[0].getRgbF(&r, &g, &b, nullptr); return; }
     int base(int(floor(m)));
     double prop0 = (base + 1.0) - m, prop1 = m - base;
     QColor c0(colours[base]), c1(colours[base+1]);
--- a/layer/FlexiNoteLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/FlexiNoteLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -62,7 +62,7 @@
     // m_scaleMinimum(0),
     // m_scaleMaximum(0)
 
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_intelligentActions(true),
     m_dragPointX(0),
@@ -73,7 +73,7 @@
     m_editingPoint(0, 0.0, 0, 1.f, tr("New Point")),
     m_greatestLeftNeighbourFrame(0),
     m_smallestRightNeighbourFrame(0),
-    m_editingCommand(0),
+    m_editingCommand(nullptr),
     m_verticalScale(AutoAlignScale),
     m_editMode(DragNote),
     m_scaleMinimum(34), 
@@ -387,7 +387,7 @@
 RangeMapper *
 FlexiNoteLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_model) return 0;
+    if (!m_model) return nullptr;
     
     RangeMapper *mapper;
 
@@ -396,7 +396,7 @@
     QString unit;
     getValueExtents(min, max, logarithmic, unit);
 
-    if (min == max) return 0;
+    if (min == max) return nullptr;
     
     if (logarithmic) {
         mapper = new LogRangeMapper(0, 100, min, max, unit);
@@ -1017,7 +1017,7 @@
 //    SVDEBUG << "FlexiNoteLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1030,7 +1030,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1057,7 +1057,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1081,7 +1081,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1227,7 +1227,7 @@
         finish(m_editingCommand);
     }
 
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1246,7 +1246,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1276,7 +1276,7 @@
 void
 FlexiNoteLayer::splitNotesAt(LayerGeometryProvider *v, sv_frame_t frame)
 {
-    splitNotesAt(v, frame, 0);
+    splitNotesAt(v, frame, nullptr);
 }
 
 void
@@ -1380,7 +1380,7 @@
         }
     }
     cerr << "FlexiNoteLayer::getAssociatedPitchModel: failed to find a model" << endl;
-    return 0;
+    return nullptr;
 }
 
 void
--- a/layer/FlexiNoteLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/FlexiNoteLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FLEXINOTE_LAYER_H_
-#define _FLEXINOTE_LAYER_H_
+#ifndef SV_FLEXINOTE_LAYER_H
+#define SV_FLEXINOTE_LAYER_H
 
 #define NOTE_HEIGHT 16
 
@@ -38,63 +38,63 @@
 public:
     FlexiNoteLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                     int &resolution,
-                    SnapType snap) const;
+                    SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void splitStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void splitEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void splitStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void splitEnd(LayerGeometryProvider *v, QMouseEvent *) override;
     
-    virtual void addNote(LayerGeometryProvider *v, QMouseEvent *e);
+    void addNote(LayerGeometryProvider *v, QMouseEvent *e) override;
 
     virtual void mouseMoveEvent(LayerGeometryProvider *v, QMouseEvent *);
 
-    virtual bool editOpen(LayerGeometryProvider *v, QMouseEvent *);
+    bool editOpen(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
     virtual void deleteSelectionInclusive(Selection s);
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
     void splitNotesAt(LayerGeometryProvider *v, sv_frame_t frame);
     void snapSelectedNotesToPitchTrack(LayerGeometryProvider *v, Selection s);
     void mergeNotes(LayerGeometryProvider *v, Selection s, bool inclusive);
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(FlexiNoteModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                      int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                      int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     enum VerticalScale {
         AutoAlignScale,
@@ -116,22 +116,22 @@
     void setVerticalScale(VerticalScale scale);
     VerticalScale getVerticalScale() const { return m_verticalScale; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &log, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &log, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
-    virtual bool setDisplayExtents(double min, double max);
+    bool getDisplayExtents(double &min, double &max) const override;
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
     /**
      * Add a note-on.  Used when recording MIDI "live".  The note will
@@ -151,17 +151,17 @@
      */
     void abandonNoteOns();
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
     
     void setVerticalRangeToNoteRange(LayerGeometryProvider *v);
 
     /// VerticalScaleLayer methods
-    virtual int getYForValue(LayerGeometryProvider *v, double value) const;
-    virtual double getValueForY(LayerGeometryProvider *v, int y) const;
-    virtual QString getScaleUnits() const;
+    int getYForValue(LayerGeometryProvider *v, double value) const override;
+    double getValueForY(LayerGeometryProvider *v, int y) const override;
+    QString getScaleUnits() const override;
 
 signals:
     void reAnalyseRegion(sv_frame_t, sv_frame_t, float, float);
@@ -171,7 +171,7 @@
     void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
     bool shouldConvertMIDIToHz() const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     FlexiNoteModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const;
 
--- a/layer/ImageLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ImageLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -44,11 +44,11 @@
 
 ImageLayer::ImageLayer() :
     Layer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_originalPoint(0, "", ""),
     m_editingPoint(0, "", ""),
-    m_editingCommand(0)
+    m_editingCommand(nullptr)
 {
 }
 
@@ -614,7 +614,7 @@
     }
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -653,7 +653,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -689,7 +689,7 @@
         finish(m_editingCommand);
     }
     
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
--- a/layer/ImageLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ImageLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _IMAGE_LAYER_H_
-#define _IMAGE_LAYER_H_
+#ifndef SV_IMAGE_LAYER_H
+#define SV_IMAGE_LAYER_H
 
 #include "Layer.h"
 #include "data/model/ImageModel.h"
@@ -38,65 +38,65 @@
     ImageLayer();
     virtual ~ImageLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *); // on double-click
+    bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(ImageModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourAbsent;
     }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; }
+    int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
 
-    virtual void setLayerDormant(const LayerGeometryProvider *v, bool dormant);
+    void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
     virtual bool addImage(sv_frame_t frame, QString url); // using a command
 
--- a/layer/ImageRegionFinder.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ImageRegionFinder.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _IMAGE_REGION_FINDER_H_
-#define _IMAGE_REGION_FINDER_H_
+#ifndef SV_IMAGE_REGION_FINDER_H
+#define SV_IMAGE_REGION_FINDER_H
 
 #include <QColor>
 #include <QRect>
--- a/layer/Layer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/Layer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -111,7 +111,7 @@
     if (model) {
         return PlayParameterRepository::getInstance()->getPlayParameters(model);
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -169,7 +169,7 @@
 Layer::alignToReference(LayerGeometryProvider *v, sv_frame_t frame) const
 {
     const Model *m = getModel();
-    SVDEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
+    SVDEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : nullptr) << endl;
     if (m && m->getAlignmentReference()) {
         return m->alignToReference(frame);
     } else {
@@ -181,7 +181,7 @@
 Layer::alignFromReference(LayerGeometryProvider *v, sv_frame_t frame) const
 {
     const Model *m = getModel();
-    SVDEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
+    SVDEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : nullptr) << endl;
     if (m && m->getAlignmentReference()) {
         return m->alignFromReference(frame);
     } else {
--- a/layer/Layer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/Layer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LAYER_H_
-#define _LAYER_H_
+#ifndef SV_LAYER_H
+#define SV_LAYER_H
 
 #include "base/PropertyContainer.h"
 #include "base/XmlExportable.h"
@@ -118,9 +118,9 @@
         return true;
     }
 
-    virtual QString getPropertyContainerIconName() const;
+    QString getPropertyContainerIconName() const override;
 
-    virtual QString getPropertyContainerName() const {
+    QString getPropertyContainerName() const override {
         if (m_presentationName != "") return m_presentationName;
         else return objectName();
     }
@@ -366,8 +366,8 @@
      * this superclass implementation with extra attributes describing
      * their particular properties.
      */
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
     /**
      * Set the particular properties of a layer (those specific to the
@@ -412,7 +412,7 @@
      */
     virtual bool isLayerDormant(const LayerGeometryProvider *v) const;
 
-    virtual PlayParameters *getPlayParameters();
+    PlayParameters *getPlayParameters() override;
 
     /**
      * True if this layer will need to place text labels when it is
@@ -593,9 +593,9 @@
         AddMeasurementRectCommand(Layer *layer, MeasureRect rect) :
             m_layer(layer), m_rect(rect) { }
 
-        virtual QString getName() const;
-        virtual void execute();
-        virtual void unexecute();
+        QString getName() const override;
+        void execute() override;
+        void unexecute() override;
 
     private:
         Layer *m_layer;
@@ -608,9 +608,9 @@
         DeleteMeasurementRectCommand(Layer *layer, MeasureRect rect) :
             m_layer(layer), m_rect(rect) { }
 
-        virtual QString getName() const;
-        virtual void execute();
-        virtual void unexecute();
+        QString getName() const override;
+        void execute() override;
+        void unexecute() override;
 
     private:
         Layer *m_layer;
--- a/layer/LayerFactory.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/LayerFactory.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -371,7 +371,7 @@
     } else if (layerType == Image) {
         return new ImageModel(baseModel->getSampleRate(), 1, true);
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -407,7 +407,7 @@
 Layer *
 LayerFactory::createLayer(LayerType type)
 {
-    Layer *layer = 0;
+    Layer *layer = nullptr;
 
     switch (type) {
 
--- a/layer/NoteLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/NoteLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -48,7 +48,7 @@
 
 NoteLayer::NoteLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_dragPointX(0),
     m_dragPointY(0),
@@ -56,7 +56,7 @@
     m_dragStartY(0),
     m_originalPoint(0, 0.0, 0, 1.f, tr("New Point")),
     m_editingPoint(0, 0.0, 0, 1.f, tr("New Point")),
-    m_editingCommand(0),
+    m_editingCommand(nullptr),
     m_verticalScale(AutoAlignScale),
     m_scaleMinimum(0),
     m_scaleMaximum(0)
@@ -369,7 +369,7 @@
 RangeMapper *
 NoteLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_model) return 0;
+    if (!m_model) return nullptr;
     
     RangeMapper *mapper;
 
@@ -378,7 +378,7 @@
     QString unit;
     getValueExtents(min, max, logarithmic, unit);
 
-    if (min == max) return 0;
+    if (min == max) return nullptr;
     
     if (logarithmic) {
         mapper = new LogRangeMapper(0, 100, min, max, unit);
@@ -945,7 +945,7 @@
 //    SVDEBUG << "NoteLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -958,7 +958,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -985,7 +985,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1004,7 +1004,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1065,7 +1065,7 @@
         finish(m_editingCommand);
     }
 
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
--- a/layer/NoteLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/NoteLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -35,51 +35,51 @@
 public:
     NoteLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual bool editOpen(LayerGeometryProvider *v, QMouseEvent *);
+    bool editOpen(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(NoteModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     enum VerticalScale {
         AutoAlignScale,
@@ -91,22 +91,22 @@
     void setVerticalScale(VerticalScale scale);
     VerticalScale getVerticalScale() const { return m_verticalScale; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &log, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &log, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
-    virtual bool setDisplayExtents(double min, double max);
+    bool getDisplayExtents(double &min, double &max) const override;
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
     /**
      * Add a note-on.  Used when recording MIDI "live".  The note will
@@ -126,21 +126,21 @@
      */
     void abandonNoteOns();
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
     /// VerticalScaleLayer methods
-    virtual int getYForValue(LayerGeometryProvider *v, double value) const;
-    virtual double getValueForY(LayerGeometryProvider *v, int y) const;
-    virtual QString getScaleUnits() const;
+    int getYForValue(LayerGeometryProvider *v, double value) const override;
+    double getValueForY(LayerGeometryProvider *v, int y) const override;
+    QString getScaleUnits() const override;
 
 protected:
     void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
     bool shouldConvertMIDIToHz() const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     NoteModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const;
 
--- a/layer/RegionLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/RegionLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -46,7 +46,7 @@
 
 RegionLayer::RegionLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_dragPointX(0),
     m_dragPointY(0),
@@ -54,7 +54,7 @@
     m_dragStartY(0),
     m_originalPoint(0, 0.0, 0, tr("New Region")),
     m_editingPoint(0, 0.0, 0, tr("New Region")),
-    m_editingCommand(0),
+    m_editingCommand(nullptr),
     m_verticalScale(EqualSpaced),
     m_colourMap(0),
     m_colourInverted(false),
@@ -1202,7 +1202,7 @@
 {
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 
     recalcSpacing();
@@ -1217,7 +1217,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1246,7 +1246,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
     recalcSpacing();
 }
@@ -1267,7 +1267,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1334,7 +1334,7 @@
         finish(m_editingCommand);
     }
 
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
     recalcSpacing();
 }
--- a/layer/RegionLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/RegionLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -39,55 +39,55 @@
 public:
     RegionLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
-    virtual QString getLabelPreceding(sv_frame_t) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
+    QString getLabelPreceding(sv_frame_t) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
-    virtual bool snapToSimilarFeature(LayerGeometryProvider *v, sv_frame_t &frame,
+                                    SnapType snap) const override;
+    bool snapToSimilarFeature(LayerGeometryProvider *v, sv_frame_t &frame,
                                       int &resolution,
-                                      SnapType snap) const;
+                                      SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual bool editOpen(LayerGeometryProvider *v, QMouseEvent *);
+    bool editOpen(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(RegionModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     void setFillColourMap(int);
     int getFillColourMap() const { return m_colourMap; }
@@ -110,27 +110,27 @@
     void setPlotStyle(PlotStyle style);
     PlotStyle getPlotStyle() const { return m_plotStyle; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &log, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &log, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
+    bool getDisplayExtents(double &min, double &max) const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
     /// VerticalScaleLayer and ColourScaleLayer methods
-    int getYForValue(LayerGeometryProvider *v, double value) const;
-    double getValueForY(LayerGeometryProvider *v, int y) const;
-    virtual QString getScaleUnits() const;
-    QColor getColourForValue(LayerGeometryProvider *v, double value) const;
+    int getYForValue(LayerGeometryProvider *v, double value) const override;
+    double getValueForY(LayerGeometryProvider *v, int y) const override;
+    QString getScaleUnits() const override;
+    QColor getColourForValue(LayerGeometryProvider *v, double value) const override;
 
 protected slots:
     void recalcSpacing();
@@ -139,7 +139,7 @@
     double getValueForY(LayerGeometryProvider *v, int y, int avoid) const;
     void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     RegionModel::PointList getLocalPoints(LayerGeometryProvider *v, int x) const;
 
--- a/layer/ShowLayerCommand.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/ShowLayerCommand.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SHOW_LAYER_COMMAND_H_
-#define _SHOW_LAYER_COMMAND_H_
+#ifndef SV_SHOW_LAYER_COMMAND_H
+#define SV_SHOW_LAYER_COMMAND_H
 
 #include "base/Command.h"
 
@@ -23,13 +23,13 @@
 public:
     ShowLayerCommand(View *view, Layer *layer, bool show, QString commandName) :
         m_view(view), m_layer(layer), m_show(show), m_name(commandName) { }
-    void execute() {
+    void execute() override {
         m_layer->showLayer(m_view, m_show);
     }
-    void unexecute() {
+    void unexecute() override {
         m_layer->showLayer(m_view, !m_show);
     }
-    QString getName() const {
+    QString getName() const override {
         return m_name;
     }
 protected:
--- a/layer/SingleColourLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SingleColourLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -35,7 +35,7 @@
     // Reference current colour because setDefaulColourFor
     // will unreference it before (possibly) changing it.
     refColor();
-    setDefaultColourFor(0);
+    setDefaultColourFor(nullptr);
 }
 
 SingleColourLayer::~SingleColourLayer()
@@ -125,7 +125,7 @@
 RangeMapper *
 SingleColourLayer::getNewPropertyRangeMapper(const PropertyName &) const
 {
-    return 0;
+    return nullptr;
 }
 
 void
--- a/layer/SingleColourLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SingleColourLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -44,32 +44,32 @@
      * background, false if it has a light colour on a dark
      * background.
      */
-    virtual bool hasLightBackground() const;
+    bool hasLightBackground() const override;
 
     /**
      * Implements Layer::getLayerColourSignificance()
      */
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourDistinguishes;
     }
 
-    virtual QPixmap getLayerPresentationPixmap(QSize size) const;
+    QPixmap getLayerPresentationPixmap(QSize size) const override;
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
+    void setProperty(const PropertyName &, int value) override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    virtual void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
     virtual void setDefaultColourFor(LayerGeometryProvider *v);
 
--- a/layer/SliceLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SliceLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -32,7 +32,7 @@
 
 
 SliceLayer::SliceLayer() :
-    m_sliceableModel(0),
+    m_sliceableModel(nullptr),
     m_binAlignment(BinsSpanScalePoints),
     m_colourMap(int(ColourMapper::Ice)),
     m_colourInverted(false),
@@ -101,7 +101,7 @@
     SVDEBUG << "SliceLayer::modelAboutToBeDeleted(" << m << ")" << endl;
 
     if (m == m_sliceableModel) {
-        setSliceableModel(0);
+        setSliceableModel(nullptr);
     }
 }
 
@@ -1262,7 +1262,7 @@
 RangeMapper *
 SliceLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_sliceableModel) return 0;
+    if (!m_sliceableModel) return nullptr;
 
     return new LinearRangeMapper(0, m_sliceableModel->getHeight(),
                                  0, m_sliceableModel->getHeight(), "");
--- a/layer/SliceLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SliceLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -32,52 +32,52 @@
     SliceLayer();
     ~SliceLayer();
     
-    virtual const Model *getModel() const { return 0; }
+    const Model *getModel() const override { return 0; }
 
     void setSliceableModel(const Model *model);    
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourAndBackgroundSignificant;
     }
 
-    virtual bool hasLightBackground() const;
+    bool hasLightBackground() const override;
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual QString getPropertyIconName(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
-    virtual void setProperty(const PropertyName &, int value);
-    virtual void setProperties(const QXmlAttributes &);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    QString getPropertyIconName(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
+    void setProperty(const PropertyName &, int value) override;
+    void setProperties(const QXmlAttributes &) override;
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
-    virtual bool setDisplayExtents(double min, double max);
+    bool getDisplayExtents(double &min, double &max) const override;
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
     virtual bool hasTimeXAxis() const override { return false; }
 
     virtual void zoomToRegion(const LayerGeometryProvider *, QRect) override;
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *) const { return false; }
+    bool isLayerScrollable(const LayerGeometryProvider *) const override { return false; }
 
     enum EnergyScale { LinearScale, MeterScale, dBScale, AbsoluteScale };
 
@@ -113,8 +113,8 @@
     void setNormalize(bool n);
     bool getNormalize() const;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
 public slots:
     void sliceableModelReplaced(const Model *, const Model *);
@@ -153,7 +153,7 @@
 
     virtual float getThresholdDb() const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     // Determine how the bins are lined up
     // horizontally. BinsCentredOnScalePoint means we operate like a
--- a/layer/SliceableLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SliceableLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SLICEABLE_LAYER_H_
-#define _SLICEABLE_LAYER_H_
+#ifndef SV_SLICEABLE_LAYER_H
+#define SV_SLICEABLE_LAYER_H
 
 #include "Layer.h"
 
--- a/layer/SpectrogramLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SpectrogramLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -56,7 +56,7 @@
 using namespace std;
 
 SpectrogramLayer::SpectrogramLayer(Configuration config) :
-    m_model(0),
+    m_model(nullptr),
     m_channel(0),
     m_windowSize(1024),
     m_windowType(HanningWindow),
@@ -83,9 +83,9 @@
     m_synchronous(false),
     m_haveDetailedScale(false),
     m_exiting(false),
-    m_fftModel(0),
-    m_wholeCache(0),
-    m_peakCache(0),
+    m_fftModel(nullptr),
+    m_wholeCache(nullptr),
+    m_peakCache(nullptr),
     m_peakCacheDivisor(8)
 {
     QString colourConfigName = "spectrogram-colour";
@@ -148,9 +148,9 @@
     delete m_peakCache;
     delete m_wholeCache;
 
-    m_fftModel = 0;
-    m_peakCache = 0;
-    m_wholeCache = 0;
+    m_fftModel = nullptr;
+    m_peakCache = nullptr;
+    m_wholeCache = nullptr;
 }
 
 pair<ColourScaleType, double>
@@ -582,7 +582,7 @@
         return new LinearRangeMapper(-81, -1, -81, -1, tr("dB"), false,
                                      { { -81, Strings::minus_infinity } });
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -1372,7 +1372,7 @@
     SVDEBUG << "SpectrogramLayer::recreateFFTModel called" << endl;
 
     if (!m_model || !m_model->isOK()) {
-        emit sliceableModelReplaced(m_fftModel, 0);
+        emit sliceableModelReplaced(m_fftModel, nullptr);
         deleteDerivedModels();
         return;
     }
@@ -1381,11 +1381,11 @@
     
     if (m_peakCache) m_peakCache->aboutToDelete();
     delete m_peakCache;
-    m_peakCache = 0;
+    m_peakCache = nullptr;
 
     if (m_wholeCache) m_wholeCache->aboutToDelete();
     delete m_wholeCache;
-    m_wholeCache = 0;
+    m_wholeCache = nullptr;
     
     FFTModel *newModel = new FFTModel(m_model,
                                       m_channel,
@@ -1396,12 +1396,12 @@
 
     if (!newModel->isOK()) {
         QMessageBox::critical
-            (0, tr("FFT cache failed"),
+            (nullptr, tr("FFT cache failed"),
              tr("Failed to create the FFT model for this spectrogram.\n"
                 "There may be insufficient memory or disc space to continue."));
         delete newModel;
         delete m_fftModel;
-        m_fftModel = 0;
+        m_fftModel = nullptr;
         return;
     }
 
@@ -2314,9 +2314,9 @@
     SpectrogramRangeMapper(sv_samplerate_t sr, int /* fftsize */) :
         m_dist(sr / 2),
         m_s2(sqrt(sqrt(2))) { }
-    ~SpectrogramRangeMapper() { }
+    ~SpectrogramRangeMapper() override { }
     
-    virtual int getPositionForValue(double value) const {
+    int getPositionForValue(double value) const override {
 
         double dist = m_dist;
     
@@ -2330,12 +2330,12 @@
         return n;
     }
     
-    virtual int getPositionForValueUnclamped(double value) const {
+    int getPositionForValueUnclamped(double value) const override {
         // We don't really support this
         return getPositionForValue(value);
     }
 
-    virtual double getValueForPosition(int position) const {
+    double getValueForPosition(int position) const override {
 
         // Vertical zoom step 0 shows the entire range from DC ->
         // Nyquist frequency.  Step 1 shows 2^(1/4) of the range of
@@ -2353,12 +2353,12 @@
         return dist;
     }
     
-    virtual double getValueForPositionUnclamped(int position) const {
+    double getValueForPositionUnclamped(int position) const override {
         // We don't really support this
         return getValueForPosition(position);
     }
 
-    virtual QString getUnit() const { return "Hz"; }
+    QString getUnit() const override { return "Hz"; }
 
 protected:
     double m_dist;
@@ -2473,7 +2473,7 @@
 RangeMapper *
 SpectrogramLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_model) return 0;
+    if (!m_model) return nullptr;
     return new SpectrogramRangeMapper(m_model->getSampleRate(), getFFTSize());
 }
 
--- a/layer/SpectrogramLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SpectrogramLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -59,43 +59,43 @@
     SpectrogramLayer(Configuration = FullRangeDb);
     ~SpectrogramLayer();
 
-    virtual const ZoomConstraint *getZoomConstraint() const { return this; }
-    virtual const Model *getModel() const { return m_model; }
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
-    virtual void setSynchronousPainting(bool synchronous);
+    const ZoomConstraint *getZoomConstraint() const override { return this; }
+    const Model *getModel() const override { return m_model; }
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
+    void setSynchronousPainting(bool synchronous) override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override;
 
-    virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos,
-                                     std::vector<QRect> &extents) const;
-    virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const;
+    bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos,
+                                     std::vector<QRect> &extents) const override;
+    void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *);
+    void measureDoubleClick(LayerGeometryProvider *, QMouseEvent *) override;
 
-    virtual bool hasLightBackground() const;
+    bool hasLightBackground() const override;
 
     void setModel(const DenseTimeValueModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual QString getPropertyIconName(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual QString getPropertyValueIconName(const PropertyName &,
-                                             int value) const;
-    virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    QString getPropertyIconName(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    QString getPropertyValueIconName(const PropertyName &,
+                                             int value) const override;
+    RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     /**
      * Specify the channel to use from the source model.
@@ -191,13 +191,13 @@
     void setColourRotation(int);
     int getColourRotation() const;
 
-    virtual VerticalPosition getPreferredFrameCountPosition() const {
+    VerticalPosition getPreferredFrameCountPosition() const override {
         return PositionTop;
     }
 
-    virtual bool isLayerOpaque() const { return true; }
+    bool isLayerOpaque() const override { return true; }
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourHasMeaningfulValue;
     }
 
@@ -205,36 +205,36 @@
     double getFrequencyForY(const LayerGeometryProvider *v, int y) const;
 
     //!!! VerticalBinLayer methods. Note overlap with get*BinRange()
-    double getYForBin(const LayerGeometryProvider *, double bin) const;
-    double getBinForY(const LayerGeometryProvider *, double y) const;
+    double getYForBin(const LayerGeometryProvider *, double bin) const override;
+    double getBinForY(const LayerGeometryProvider *, double y) const override;
     
-    virtual int getCompletion(LayerGeometryProvider *v) const;
-    virtual QString getError(LayerGeometryProvider *v) const;
+    int getCompletion(LayerGeometryProvider *v) const override;
+    QString getError(LayerGeometryProvider *v) const override;
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
+    bool getDisplayExtents(double &min, double &max) const override;
 
-    virtual bool setDisplayExtents(double min, double max);
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual bool getYScaleValue(const LayerGeometryProvider *, int, double &, QString &) const;
+    bool getYScaleValue(const LayerGeometryProvider *, int, double &, QString &) const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
-    virtual void setLayerDormant(const LayerGeometryProvider *v, bool dormant);
+    void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override;
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *) const;
+    bool isLayerScrollable(const LayerGeometryProvider *) const override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
-    virtual const Model *getSliceableModel() const;
+    const Model *getSliceableModel() const override;
 
 protected slots:
     void cacheInvalid();
@@ -334,10 +334,10 @@
     void paintDetailedScalePhase(LayerGeometryProvider *v,
                                  QPainter &paint, QRect rect) const;
     
-    virtual void updateMeasureRectYCoords(LayerGeometryProvider *v,
-                                          const MeasureRect &r) const;
-    virtual void setMeasureRectYCoord(LayerGeometryProvider *v,
-                                      MeasureRect &r, bool start, int y) const;
+    void updateMeasureRectYCoords(LayerGeometryProvider *v,
+                                          const MeasureRect &r) const override;
+    void setMeasureRectYCoord(LayerGeometryProvider *v,
+                                      MeasureRect &r, bool start, int y) const override;
 };
 
 #endif
--- a/layer/SpectrumLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SpectrumLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -33,7 +33,7 @@
 
 
 SpectrumLayer::SpectrumLayer() :
-    m_originModel(0),
+    m_originModel(nullptr),
     m_channel(-1),
     m_channelSet(false),
     m_windowSize(4096),
@@ -59,7 +59,7 @@
     Model *m = const_cast<Model *>
         (static_cast<const Model *>(m_sliceableModel));
     if (m) m->aboutToDelete();
-    m_sliceableModel = 0;
+    m_sliceableModel = nullptr;
     delete m;
 }
 
@@ -76,7 +76,7 @@
         Model *m = const_cast<Model *>
             (static_cast<const Model *>(m_sliceableModel));
         m->aboutToDelete();
-        setSliceableModel(0);
+        setSliceableModel(nullptr);
         delete m;
     }
 
@@ -108,7 +108,7 @@
         Model *m = const_cast<Model *>
             (static_cast<const Model *>(m_sliceableModel));
         m->aboutToDelete();
-        setSliceableModel(0);
+        setSliceableModel(nullptr);
         delete m;
     }
 
--- a/layer/SpectrumLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/SpectrumLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -101,7 +101,7 @@
     void setShowPeaks(bool);
     bool getShowPeaks() const { return m_showPeaks; }
 
-    virtual bool needsTextLabelHeight() const { return true; }
+    bool needsTextLabelHeight() const override { return true; }
 
     virtual void toXml(QTextStream &stream, QString indent = "",
                        QString extraAttributes = "") const override;
--- a/layer/TextLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TextLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -34,11 +34,11 @@
 
 TextLayer::TextLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_originalPoint(0, 0.0, tr("Empty Label")),
     m_editingPoint(0, 0.0, tr("Empty Label")),
-    m_editingCommand(0)
+    m_editingCommand(nullptr)
 {
     
 }
@@ -475,7 +475,7 @@
     }
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -488,7 +488,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -516,7 +516,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -536,7 +536,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -593,7 +593,7 @@
         finish(m_editingCommand);
     }
     
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
--- a/layer/TextLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TextLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TEXT_LAYER_H_
-#define _TEXT_LAYER_H_
+#ifndef SV_TEXT_LAYER_H
+#define SV_TEXT_LAYER_H
 
 #include "SingleColourLayer.h"
 #include "data/model/TextModel.h"
@@ -32,69 +32,69 @@
 public:
     TextLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *); // on double-click
+    bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(TextModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; }
+    int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
 protected:
     int getYForHeight(LayerGeometryProvider *v, double height) const;
     double getHeightForY(LayerGeometryProvider *v, int y) const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     TextModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const;
 
--- a/layer/TimeInstantLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeInstantLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -41,10 +41,10 @@
 
 TimeInstantLayer::TimeInstantLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_editingPoint(0, tr("New Point")),
-    m_editingCommand(0),
+    m_editingCommand(nullptr),
     m_plotStyle(PlotInstants)
 {
 }
@@ -522,7 +522,7 @@
              .toText(false).c_str());
     m_editingCommand->setName(newName);
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -538,7 +538,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -566,7 +566,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -586,7 +586,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -630,7 +630,7 @@
         m_editingCommand->setName(newName);
         finish(m_editingCommand);
     }
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
--- a/layer/TimeInstantLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeInstantLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TIME_INSTANT_LAYER_H_
-#define _TIME_INSTANT_LAYER_H_
+#ifndef SV_TIME_INSTANT_LAYER_H
+#define SV_TIME_INSTANT_LAYER_H
 
 #include "SingleColourLayer.h"
 #include "data/model/SparseOneDimensionalModel.h"
@@ -33,48 +33,48 @@
     TimeInstantLayer();
     virtual ~TimeInstantLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual QString getLabelPreceding(sv_frame_t) const;
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getLabelPreceding(sv_frame_t) const override;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
+                                    SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *);
+    bool editOpen(LayerGeometryProvider *, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(SparseOneDimensionalModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     enum PlotStyle {
         PlotInstants,
@@ -84,24 +84,24 @@
     void setPlotStyle(PlotStyle style);
     PlotStyle getPlotStyle() const { return m_plotStyle; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool needsTextLabelHeight() const { return m_model->hasTextLabels(); }
+    bool needsTextLabelHeight() const override { return m_model->hasTextLabels(); }
 
-    virtual bool getValueExtents(double &, double &, bool &, QString &) const {
+    bool getValueExtents(double &, double &, bool &, QString &) const override {
         return false;
     }
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         if (m_plotStyle == PlotSegmentation) {
             return ColourHasMeaningfulValue;
         } else {
@@ -109,12 +109,12 @@
         }
     }
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; }
+    int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
 
 protected:
     SparseOneDimensionalModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     bool clipboardAlignmentDiffers(LayerGeometryProvider *v, const Clipboard &) const;
 
--- a/layer/TimeRulerLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeRulerLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -36,7 +36,7 @@
 
 TimeRulerLayer::TimeRulerLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_labelHeight(LabelTop)
 {
     
--- a/layer/TimeRulerLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeRulerLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TIME_RULER_H_
-#define _TIME_RULER_H_
+#ifndef SV_TIME_RULER_H
+#define SV_TIME_RULER_H
 
 #include "SingleColourLayer.h"
 
@@ -32,41 +32,41 @@
 public:
     TimeRulerLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
     void setModel(Model *);
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
 
     enum LabelHeight { LabelTop, LabelMiddle, LabelBottom };
     void setLabelHeight(LabelHeight h) { m_labelHeight = h; }
     LabelHeight getLabelHeight() const { return m_labelHeight; }
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *, sv_frame_t &, int &, SnapType) const;
+    bool snapToFeatureFrame(LayerGeometryProvider *, sv_frame_t &, int &, SnapType) const override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourIrrelevant;
     }
 
-    virtual bool getValueExtents(double &, double &, bool &, QString &) const {
+    bool getValueExtents(double &, double &, bool &, QString &) const override {
         return false;
     }
 
-    virtual QString getLayerPresentationName() const;
+    QString getLayerPresentationName() const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; }
+    int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
-    virtual bool canExistWithoutModel() const { return true; }
+    bool canExistWithoutModel() const override { return true; }
 
 protected:
     Model *m_model;
     LabelHeight m_labelHeight;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     int64_t getMajorTickUSec(LayerGeometryProvider *, bool &quarterTicks) const;
     int getXForUSec(LayerGeometryProvider *, double usec) const;
--- a/layer/TimeValueLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeValueLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -54,11 +54,11 @@
 
 TimeValueLayer::TimeValueLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_editing(false),
     m_originalPoint(0, 0.0, tr("New Point")),
     m_editingPoint(0, 0.0, tr("New Point")),
-    m_editingCommand(0),
+    m_editingCommand(nullptr),
     m_colourMap(0),
     m_colourInverted(false),
     m_plotStyle(PlotConnectedPoints),
@@ -511,7 +511,7 @@
 RangeMapper *
 TimeValueLayer::getNewVerticalZoomRangeMapper() const
 {
-    if (!m_model) return 0;
+    if (!m_model) return nullptr;
     
     RangeMapper *mapper;
 
@@ -520,7 +520,7 @@
     QString unit;
     getValueExtents(min, max, logarithmic, unit);
 
-    if (min == max) return 0;
+    if (min == max) return nullptr;
     
     if (logarithmic) {
         mapper = new LogRangeMapper(0, 100, min, max, unit);
@@ -1430,7 +1430,7 @@
 #endif
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1446,7 +1446,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1475,7 +1475,7 @@
     m_editingCommand->deletePoint(m_editingPoint);
 
     finish(m_editingCommand);
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1496,7 +1496,7 @@
 
     if (m_editingCommand) {
         finish(m_editingCommand);
-        m_editingCommand = 0;
+        m_editingCommand = nullptr;
     }
 
     m_editing = true;
@@ -1554,7 +1554,7 @@
         finish(m_editingCommand);
     }
 
-    m_editingCommand = 0;
+    m_editingCommand = nullptr;
     m_editing = false;
 }
 
@@ -1803,7 +1803,7 @@
 
             bool ok = false;
             QString selected = ListInputDialog::getItem
-                (0, tr("Choose value calculation"),
+                (nullptr, tr("Choose value calculation"),
                  text, options, prevSelection, &ok);
 
             if (!ok) {
@@ -1827,7 +1827,7 @@
             if (generation == Labeller::ValueFromCyclicalCounter ||
                 generation == Labeller::ValueFromTwoLevelCounter) {
                 int cycleSize = QInputDialog::getInt
-                    (0, tr("Select cycle size"),
+                    (nullptr, tr("Select cycle size"),
                      tr("Cycle size:"), 4, 2, 16, 1);
                 labeller.setCounterCycleSize(cycleSize);
             }
@@ -1882,7 +1882,7 @@
             }
 #endif
             labeller.setValue<SparseTimeValueModel::Point>
-                (newPoint, (i == points.begin()) ? 0 : &prevPoint);
+                (newPoint, (i == points.begin()) ? nullptr : &prevPoint);
 #ifdef DEBUG_TIME_VALUE_LAYER
             cerr << "New point value = " << newPoint.value << endl;
 #endif
--- a/layer/TimeValueLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/TimeValueLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -37,56 +37,56 @@
 public:
     TimeValueLayer();
 
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
-    virtual QString getLabelPreceding(sv_frame_t) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
+    QString getLabelPreceding(sv_frame_t) const override;
 
-    virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+    bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
                                     int &resolution,
-                                    SnapType snap) const;
-    virtual bool snapToSimilarFeature(LayerGeometryProvider *v, sv_frame_t &frame,
+                                    SnapType snap) const override;
+    bool snapToSimilarFeature(LayerGeometryProvider *v, sv_frame_t &frame,
                                       int &resolution,
-                                      SnapType snap) const;
+                                      SnapType snap) const override;
 
-    virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
-    virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
+    void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
+    void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual bool editOpen(LayerGeometryProvider *v, QMouseEvent *);
+    bool editOpen(LayerGeometryProvider *v, QMouseEvent *) override;
 
-    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
-    virtual void resizeSelection(Selection s, Selection newSize);
-    virtual void deleteSelection(Selection s);
+    void moveSelection(Selection s, sv_frame_t newStartFrame) override;
+    void resizeSelection(Selection s, Selection newSize) override;
+    void deleteSelection(Selection s) override;
 
-    virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
-    virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
-                       bool interactive);
+    void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
+    bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
+                       bool interactive) override;
 
-    virtual const Model *getModel() const { return m_model; }
+    const Model *getModel() const override { return m_model; }
     void setModel(SparseTimeValueModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual QString getPropertyIconName(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    QString getPropertyIconName(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     void setFillColourMap(int);
     int getFillColourMap() const { return m_colourMap; }
@@ -120,34 +120,34 @@
     void setShowDerivative(bool);
     bool getShowDerivative() const { return m_derivative; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
+    bool isLayerScrollable(const LayerGeometryProvider *v) const override;
 
-    virtual bool isLayerEditable() const { return true; }
+    bool isLayerEditable() const override { return true; }
 
-    virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
 
-    virtual bool needsTextLabelHeight() const {
+    bool needsTextLabelHeight() const override {
         return m_plotStyle == PlotSegmentation && m_model->hasTextLabels();
     }
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &logarithmic, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &logarithmic, QString &unit) const override;
 
-    virtual bool getDisplayExtents(double &min, double &max) const;
-    virtual bool setDisplayExtents(double min, double max);
+    bool getDisplayExtents(double &min, double &max) const override;
+    bool setDisplayExtents(double min, double max) override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
-    virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
+    RangeMapper *getNewVerticalZoomRangeMapper() const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
     /// Override from SingleColourLayer
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         if (m_plotStyle == PlotSegmentation) {
             return ColourHasMeaningfulValue;
         } else {
@@ -156,7 +156,7 @@
     }
 
     /// Override from SingleColourLayer
-    virtual bool hasLightBackground() const {
+    bool hasLightBackground() const override {
         if (m_plotStyle == PlotSegmentation) {
             return true;
         } else {
@@ -165,10 +165,10 @@
     }
 
     /// VerticalScaleLayer and ColourScaleLayer methods
-    virtual int getYForValue(LayerGeometryProvider *, double value) const;
-    virtual double getValueForY(LayerGeometryProvider *, int y) const;
-    virtual QString getScaleUnits() const;
-    virtual QColor getColourForValue(LayerGeometryProvider *v, double value) const;
+    int getYForValue(LayerGeometryProvider *, double value) const override;
+    double getValueForY(LayerGeometryProvider *, int y) const override;
+    QString getScaleUnits() const override;
+    QColor getColourForValue(LayerGeometryProvider *v, double value) const override;
 
 protected:
     void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
@@ -176,7 +176,7 @@
 
     SparseTimeValueModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const;
 
-    virtual int getDefaultColourHint(bool dark, bool &impose);
+    int getDefaultColourHint(bool dark, bool &impose) override;
 
     SparseTimeValueModel *m_model;
     bool m_editing;
--- a/layer/WaveformLayer.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/WaveformLayer.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -41,7 +41,7 @@
 
 WaveformLayer::WaveformLayer() :
     SingleColourLayer(),
-    m_model(0),
+    m_model(nullptr),
     m_gain(1.0f),
     m_autoNormalize(false),
     m_showMeans(true),
@@ -50,7 +50,7 @@
     m_scale(LinearScale),
     m_middleLineHeight(0.5),
     m_aggressive(false),
-    m_cache(0),
+    m_cache(nullptr),
     m_cacheValid(false)
 {
 }
@@ -218,7 +218,7 @@
     if (name == "Gain") {
         return new LinearRangeMapper(-50, 50, -25, 25, tr("dB"));
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -919,9 +919,9 @@
 
         case MeterScale:
             if (!mergingChannels) {
-                double r0 = fabs(AudioLevel::multiplier_to_preview
+                double r0 = std::abs(AudioLevel::multiplier_to_preview
                                  (range.min() * gain, m));
-                double r1 = fabs(AudioLevel::multiplier_to_preview
+                double r1 = std::abs(AudioLevel::multiplier_to_preview
                                  (range.max() * gain, m));
                 rangeTop = std::max(r0, r1);
                 meanTop = std::min(r0, r1);
--- a/layer/WaveformLayer.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/layer/WaveformLayer.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _WAVEFORM_LAYER_H_
-#define _WAVEFORM_LAYER_H_
+#ifndef SV_WAVEFORM_LAYER_H
+#define SV_WAVEFORM_LAYER_H
 
 #include <QRect>
 
@@ -36,34 +36,34 @@
     WaveformLayer();
     ~WaveformLayer();
 
-    virtual const ZoomConstraint *getZoomConstraint() const {
+    const ZoomConstraint *getZoomConstraint() const override {
         return m_model ? m_model->getZoomConstraint() : 0;
     }
-    virtual const Model *getModel() const { return m_model; }
-    virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
+    const Model *getModel() const override { return m_model; }
+    void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
 
-    virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
+    QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
-    virtual ColourSignificance getLayerColourSignificance() const {
+    ColourSignificance getLayerColourSignificance() const override {
         return ColourAndBackgroundSignificant;
     }
 
-    virtual int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const;
-    virtual void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const;
+    int getVerticalScaleWidth(LayerGeometryProvider *v, bool detailed, QPainter &) const override;
+    void paintVerticalScale(LayerGeometryProvider *v, bool detailed, QPainter &paint, QRect rect) const override;
 
     void setModel(const RangeSummarisableTimeValueModel *model);
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual QString getPropertyIconName(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual QString getPropertyGroupName(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &,
-                                         int *min, int *max, int *deflt) const;
-    virtual QString getPropertyValueLabel(const PropertyName &,
-                                          int value) const;
-    virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const;
-    virtual void setProperty(const PropertyName &, int value);
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    QString getPropertyIconName(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    QString getPropertyGroupName(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &,
+                                         int *min, int *max, int *deflt) const override;
+    QString getPropertyValueLabel(const PropertyName &,
+                                          int value) const override;
+    RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const override;
+    void setProperty(const PropertyName &, int value) override;
 
     /**
      * Set the gain multiplier for sample values in this view.
@@ -169,29 +169,29 @@
     void setAggressiveCacheing(bool);
     bool getAggressiveCacheing() const { return m_aggressive; }
 
-    virtual bool isLayerScrollable(const LayerGeometryProvider *) const;
+    bool isLayerScrollable(const LayerGeometryProvider *) const override;
 
-    virtual int getCompletion(LayerGeometryProvider *) const;
+    int getCompletion(LayerGeometryProvider *) const override;
 
-    virtual bool getValueExtents(double &min, double &max,
-                                 bool &log, QString &unit) const;
+    bool getValueExtents(double &min, double &max,
+                                 bool &log, QString &unit) const override;
 
-    virtual bool getYScaleValue(const LayerGeometryProvider *v, int y,
-                                double &value, QString &unit) const;
+    bool getYScaleValue(const LayerGeometryProvider *v, int y,
+                                double &value, QString &unit) const override;
     
-    virtual bool getYScaleDifference(const LayerGeometryProvider *v, int y0, int y1,
-                                     double &diff, QString &unit) const;
+    bool getYScaleDifference(const LayerGeometryProvider *v, int y0, int y1,
+                                     double &diff, QString &unit) const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
-    virtual void setProperties(const QXmlAttributes &attributes);
+    void setProperties(const QXmlAttributes &attributes) override;
 
-    virtual int getVerticalZoomSteps(int &defaultStep) const;
-    virtual int getCurrentVerticalZoomStep() const;
-    virtual void setVerticalZoomStep(int);
+    int getVerticalZoomSteps(int &defaultStep) const override;
+    int getCurrentVerticalZoomStep() const override;
+    void setVerticalZoomStep(int) override;
 
-    virtual bool canExistWithoutModel() const { return true; }
+    bool canExistWithoutModel() const override { return true; }
 
 protected:
     double dBscale(double sample, int m) const;
@@ -231,7 +231,7 @@
 
     float getNormalizeGain(LayerGeometryProvider *v, int channel) const;
 
-    virtual void flagBaseColourChanged() { m_cacheValid = false; }
+    void flagBaseColourChanged() override { m_cacheValid = false; }
 
     float        m_gain;
     bool         m_autoNormalize;
--- a/view/AlignmentView.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/AlignmentView.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -25,8 +25,8 @@
 
 AlignmentView::AlignmentView(QWidget *w) :
     View(w, false),
-    m_above(0),
-    m_below(0)
+    m_above(nullptr),
+    m_below(nullptr)
 {
     setObjectName(tr("AlignmentView"));
 }
@@ -73,7 +73,7 @@
 AlignmentView::setViewAbove(View *v)
 {
     if (m_above) {
-        disconnect(m_above, 0, this, 0);
+        disconnect(m_above, nullptr, this, nullptr);
     }
 
     m_above = v;
@@ -90,7 +90,7 @@
 AlignmentView::setViewBelow(View *v)
 {
     if (m_below) {
-        disconnect(m_below, 0, this, 0);
+        disconnect(m_below, nullptr, this, nullptr);
     }
 
     m_below = v;
@@ -106,7 +106,7 @@
 void
 AlignmentView::paintEvent(QPaintEvent *)
 {
-    if (m_above == 0 || m_below == 0 || !m_manager) return;
+    if (m_above == nullptr || m_below == nullptr || !m_manager) return;
 
     bool darkPalette = false;
     if (m_manager) darkPalette = m_manager->getGlobalDarkBackground();
@@ -147,7 +147,7 @@
         return getDefaultKeyFrames();
     }
 
-    SparseOneDimensionalModel *m = 0;
+    SparseOneDimensionalModel *m = nullptr;
 
     // get the topmost such
     for (int i = 0; i < m_above->getLayerCount(); ++i) {
--- a/view/AlignmentView.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/AlignmentView.h	Tue Dec 04 13:49:09 2018 +0000
@@ -24,21 +24,21 @@
 
 public:
     AlignmentView(QWidget *parent = 0);
-    virtual QString getPropertyContainerIconName() const { return "alignment"; }
+    QString getPropertyContainerIconName() const override { return "alignment"; }
     
     void setViewAbove(View *view);
     void setViewBelow(View *view);
 
 public slots:
-    virtual void globalCentreFrameChanged(sv_frame_t);
-    virtual void viewCentreFrameChanged(View *, sv_frame_t);
+    void globalCentreFrameChanged(sv_frame_t) override;
+    void viewCentreFrameChanged(View *, sv_frame_t) override;
     virtual void viewAboveZoomLevelChanged(ZoomLevel, bool);
     virtual void viewBelowZoomLevelChanged(ZoomLevel, bool);
-    virtual void viewManagerPlaybackFrameChanged(sv_frame_t);
+    void viewManagerPlaybackFrameChanged(sv_frame_t) override;
 
 protected:
-    virtual void paintEvent(QPaintEvent *e);
-    virtual bool shouldLabelSelections() const { return false; }
+    void paintEvent(QPaintEvent *e) override;
+    bool shouldLabelSelections() const override { return false; }
 
     std::vector<sv_frame_t> getKeyFrames();
     std::vector<sv_frame_t> getDefaultKeyFrames();
--- a/view/Overview.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/Overview.h	Tue Dec 04 13:49:09 2018 +0000
@@ -38,28 +38,28 @@
     void registerView(View *view);
     void unregisterView(View *view);
 
-    virtual QString getPropertyContainerIconName() const { return "panner"; }
+    QString getPropertyContainerIconName() const override { return "panner"; }
 
 public slots:
-    virtual void modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame);
-    virtual void modelReplaced();
+    void modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame) override;
+    void modelReplaced() override;
 
-    virtual void globalCentreFrameChanged(sv_frame_t);
-    virtual void viewCentreFrameChanged(View *, sv_frame_t);
-    virtual void viewZoomLevelChanged(View *, ZoomLevel, bool);
-    virtual void viewManagerPlaybackFrameChanged(sv_frame_t);
+    void globalCentreFrameChanged(sv_frame_t) override;
+    void viewCentreFrameChanged(View *, sv_frame_t) override;
+    void viewZoomLevelChanged(View *, ZoomLevel, bool) override;
+    void viewManagerPlaybackFrameChanged(sv_frame_t) override;
 
     virtual void setBoxColour(QColor);
     
 protected:
-    virtual void paintEvent(QPaintEvent *e);
-    virtual void mousePressEvent(QMouseEvent *e);
-    virtual void mouseReleaseEvent(QMouseEvent *e);
-    virtual void mouseMoveEvent(QMouseEvent *e);
-    virtual void mouseDoubleClickEvent(QMouseEvent *e);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
-    virtual bool shouldLabelSelections() const { return false; }
+    void paintEvent(QPaintEvent *e) override;
+    void mousePressEvent(QMouseEvent *e) override;
+    void mouseReleaseEvent(QMouseEvent *e) override;
+    void mouseMoveEvent(QMouseEvent *e) override;
+    void mouseDoubleClickEvent(QMouseEvent *e) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
+    bool shouldLabelSelections() const override { return false; }
 
     QColor getFillWithin() const;
     QColor getFillWithout() const;
--- a/view/Pane.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/Pane.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -62,8 +62,8 @@
 
 //#define DEBUG_PANE
 
-QCursor *Pane::m_measureCursor1 = 0;
-QCursor *Pane::m_measureCursor2 = 0;
+QCursor *Pane::m_measureCursor1 = nullptr;
+QCursor *Pane::m_measureCursor2 = nullptr;
 
 Pane::Pane(QWidget *w) :
     View(w, true),
@@ -79,11 +79,11 @@
     m_centreLineVisible(true),
     m_scaleWidth(0),
     m_pendingWheelAngle(0),
-    m_headsUpDisplay(0),
-    m_vpan(0),
-    m_hthumb(0),
-    m_vthumb(0),
-    m_reset(0),
+    m_headsUpDisplay(nullptr),
+    m_vpan(nullptr),
+    m_hthumb(nullptr),
+    m_vthumb(nullptr),
+    m_reset(nullptr),
     m_mouseInWidget(false),
     m_playbackFrameMoveScheduled(false),
     m_playbackFrameMoveTo(0)
@@ -107,7 +107,7 @@
 
     if (!isVisible()) return;
 
-    Layer *layer = 0;
+    Layer *layer = nullptr;
     if (getLayerCount() > 0) {
         layer = getLayer(getLayerCount() - 1);
     }
@@ -252,7 +252,7 @@
     // implement vertical zoom steps as well, but they don't all at
     // the moment.
 
-    Layer *layer = 0;
+    Layer *layer = nullptr;
     if (getLayerCount() > 0) layer = getLayer(getLayerCount() - 1);
     int discard;
     if (layer && layer->getVerticalZoomSteps(discard) == 0) {
@@ -367,8 +367,8 @@
     Layer *topLayer = getTopLayer();
     bool haveSomeTimeXAxis = false;
 
-    const Model *waveformModel = 0; // just for reporting purposes
-    const Model *workModel = 0;
+    const Model *waveformModel = nullptr; // just for reporting purposes
+    const Model *workModel = nullptr;
 
     for (LayerList::iterator vi = m_layerStack.end(); vi != m_layerStack.begin(); ) {
         --vi;
@@ -511,7 +511,7 @@
 void
 Pane::drawVerticalScale(QRect r, Layer *topLayer, QPainter &paint)
 {
-    Layer *scaleLayer = 0;
+    Layer *scaleLayer = nullptr;
 
 //    cerr << "Pane::drawVerticalScale[" << this << "]" << endl;
     
@@ -1131,7 +1131,7 @@
     if (!render(*paint, 0, f0, f1)) {
         delete paint;
         delete image;
-        return 0;
+        return nullptr;
     } else {
         delete paint;
         return image;
@@ -1267,7 +1267,7 @@
             return m_layerStack[i];
         }
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -1869,7 +1869,7 @@
     QString unit;
     double min, max;
     bool log;
-    Layer *layer = 0;
+    Layer *layer = nullptr;
     for (LayerList::const_iterator i = m_layerStack.begin();
          i != m_layerStack.end(); ++i) { 
         if ((*i)->getValueExtents(min, max, log, unit) &&
@@ -2405,7 +2405,7 @@
 void
 Pane::verticalThumbwheelMoved(int value)
 {
-    Layer *layer = 0;
+    Layer *layer = nullptr;
     if (getLayerCount() > 0) layer = getLayer(getLayerCount() - 1);
     if (layer) {
         int defaultStep = 0;
@@ -2681,7 +2681,7 @@
 void
 Pane::propertyContainerSelected(View *v, PropertyContainer *pc)
 {
-    Layer *layer = 0;
+    Layer *layer = nullptr;
 
     if (getLayerCount() > 0) {
         layer = getLayer(getLayerCount() - 1);
@@ -2693,7 +2693,7 @@
     updateHeadsUpDisplay();
 
     if (m_vthumb) {
-        RangeMapper *rm = 0;
+        RangeMapper *rm = nullptr;
         if (layer) rm = layer->getNewVerticalZoomRangeMapper();
         if (rm) m_vthumb->setRangeMapper(rm);
     }
@@ -2708,7 +2708,7 @@
 void
 Pane::verticalZoomChanged()
 {
-    Layer *layer = 0;
+    Layer *layer = nullptr;
 
     if (getLayerCount() > 0) {
 
--- a/view/PaneStack.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/PaneStack.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -39,7 +39,7 @@
 
 PaneStack::PaneStack(QWidget *parent, ViewManager *viewManager) :
     QFrame(parent),
-    m_currentPane(0),
+    m_currentPane(nullptr),
     m_showAccessories(true),
     m_showAlignmentViews(false),
     m_splitter(new QSplitter),
@@ -129,7 +129,7 @@
     av->setViewManager(m_viewManager);
     layout->addWidget(av, 2, 1);
 
-    QWidget *properties = 0;
+    QWidget *properties = nullptr;
     if (suppressPropertyBox) {
         properties = new QFrame();
     } else {
@@ -198,7 +198,7 @@
         if (i + 1 < (int)m_panes.size()) {
             m_panes[i].alignmentView->setViewBelow(m_panes[i+1].pane);
         } else {
-            m_panes[i].alignmentView->setViewBelow(0);
+            m_panes[i].alignmentView->setViewBelow(nullptr);
         }
     }
 }
@@ -207,8 +207,8 @@
 PaneStack::unlinkAlignmentViews()
 {
     for (int i = 0; i < (int)m_panes.size(); ++i) {
-        m_panes[i].alignmentView->setViewAbove(0);
-        m_panes[i].alignmentView->setViewBelow(0);
+        m_panes[i].alignmentView->setViewAbove(nullptr);
+        m_panes[i].alignmentView->setViewBelow(nullptr);
     }
 }
 
@@ -262,7 +262,7 @@
     if (n < (int)m_panes.size()) {
         return m_panes[n].pane;
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -293,7 +293,7 @@
     std::vector<PaneRec>::iterator i;
     bool found = false;
 
-    QWidget *stack = 0;
+    QWidget *stack = nullptr;
 
     for (i = m_panes.begin(); i != m_panes.end(); ++i) {
         if (i->pane == pane) {
@@ -344,7 +344,7 @@
         if (m_panes.size() > 0) {
             setCurrentPane(m_panes[0].pane);
         } else {
-            setCurrentPane(0);
+            setCurrentPane(nullptr);
         }
     }
 
@@ -399,7 +399,7 @@
                 if (m_panes.size() > 0) {
                     setCurrentPane(m_panes[0].pane);
                 } else {
-                    setCurrentPane(0);
+                    setCurrentPane(nullptr);
                 }
             }
             
@@ -474,7 +474,7 @@
         ++i;
     }
 
-    if (found || pane == 0) {
+    if (found || pane == nullptr) {
         m_currentPane = pane;
         emit currentPaneChanged(m_currentPane);
     } else {
@@ -504,7 +504,7 @@
                         stack->setCurrentIndex
                             (stack->getContainerIndex
                              (pane->getPropertyContainer(0)));
-                        emit currentLayerChanged(pane, 0);
+                        emit currentLayerChanged(pane, nullptr);
                     }
                 }
                 break;
@@ -550,7 +550,7 @@
 
     Layer *layer = dynamic_cast<Layer *>(pc);
     if (layer) emit currentLayerChanged(m_currentPane, layer);
-    else emit currentLayerChanged(m_currentPane, 0);
+    else emit currentLayerChanged(m_currentPane, nullptr);
 }
 
 void
--- a/view/View.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/View.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -62,15 +62,15 @@
     m_followPlayIsDetached(false),
     m_playPointerFrame(0),
     m_showProgress(showProgress),
-    m_cache(0),
-    m_buffer(0),
+    m_cache(nullptr),
+    m_buffer(nullptr),
     m_cacheValid(false),
     m_cacheCentreFrame(0),
     m_cacheZoomLevel(ZoomLevel::FramesPerPixel, 1024),
     m_selectionCached(false),
     m_deleting(false),
     m_haveSelectedLayer(false),
-    m_manager(0),
+    m_manager(nullptr),
     m_propertyContainer(new ViewPropertyContainer(this))
 {
 //    cerr << "View::View(" << this << ")" << endl;
@@ -264,7 +264,7 @@
 
     m_cacheValid = false;
 
-    Layer *selectedLayer = 0;
+    Layer *selectedLayer = nullptr;
 
     for (LayerList::iterator i = m_layerStack.begin(); i != m_layerStack.end(); ++i) {
         if (*i == pc) {
@@ -793,7 +793,7 @@
             }
         }
     }
-    return 0;
+    return nullptr;
 }
 
 const Layer *
@@ -808,7 +808,7 @@
     if (m_haveSelectedLayer && !m_layerStack.empty()) {
         return getLayer(getLayerCount() - 1);
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -1349,12 +1349,12 @@
     if (!m_manager ||
         !m_manager->getAlignMode() ||
         !m_manager->getPlaybackModel()) {
-        return 0;
+        return nullptr;
     }
 
-    Model *anyModel = 0;
-    Model *alignedModel = 0;
-    Model *goodModel = 0;
+    Model *anyModel = nullptr;
+    Model *alignedModel = nullptr;
+    Model *goodModel = nullptr;
 
     for (LayerList::const_iterator i = m_layerStack.begin();
          i != m_layerStack.end(); ++i) {
@@ -2022,7 +2022,7 @@
 
             if (dx > -m_cache->width() && dx < m_cache->width()) {
 
-                m_cache->scroll(dx, 0, m_cache->rect(), 0);
+                m_cache->scroll(dx, 0, m_cache->rect(), nullptr);
 
                 if (dx < 0) {
                     cacheAreaToRepaint = 
@@ -2723,7 +2723,7 @@
     if (!render(*paint, 0, f0, f1)) {
         delete paint;
         delete image;
-        return 0;
+        return nullptr;
     } else {
         delete paint;
         return image;
--- a/view/View.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/View.h	Tue Dec 04 13:49:09 2018 +0000
@@ -67,14 +67,14 @@
      * Retrieve the id of this object. Views have their own unique
      * ids, but ViewProxy objects share the id of their View.
      */
-    int getId() const { return m_id; }
+    int getId() const override { return m_id; }
     
     /**
      * Retrieve the first visible sample frame on the widget.
      * This is a calculated value based on the centre-frame, widget
      * width and zoom level.  The result may be negative.
      */
-    sv_frame_t getStartFrame() const;
+    sv_frame_t getStartFrame() const override;
 
     /**
      * Set the widget pan based on the given first visible frame.  The
@@ -88,7 +88,7 @@
      * frame values (start, end) are calculated from this based on the
      * zoom and other factors.
      */
-    sv_frame_t getCentreFrame() const { return m_centreFrame; }
+    sv_frame_t getCentreFrame() const override { return m_centreFrame; }
 
     /**
      * Set the centre frame of the visible widget.
@@ -100,7 +100,7 @@
      * This is a calculated value based on the centre-frame, widget
      * width and zoom level.
      */
-    sv_frame_t getEndFrame() const;
+    sv_frame_t getEndFrame() const override;
 
     /**
      * Return the pixel x-coordinate corresponding to a given sample
@@ -110,26 +110,26 @@
      * visible area, as that could lead to overflow. In that situation
      * an error will be logged and 0 returned.
      */
-    int getXForFrame(sv_frame_t frame) const;
+    int getXForFrame(sv_frame_t frame) const override;
 
     /**
      * Return the closest frame to the given pixel x-coordinate.
      */
-    sv_frame_t getFrameForX(int x) const;
+    sv_frame_t getFrameForX(int x) const override;
 
     /**
      * Return the closest pixel x-coordinate corresponding to a given
      * view x-coordinate. Default is no scaling, ViewProxy handles
      * scaling case.
      */
-    int getXForViewX(int viewx) const { return viewx; }
+    int getXForViewX(int viewx) const override { return viewx; }
 
     /**
      * Return the closest view x-coordinate corresponding to a given
      * pixel x-coordinate. Default is no scaling, ViewProxy handles
      * scaling case.
      */
-    int getViewXForX(int x) const { return x; }
+    int getViewXForX(int x) const override { return x; }
 
     /**
      * Return the pixel y-coordinate corresponding to a given
@@ -140,7 +140,7 @@
      * Not thread-safe in logarithmic mode.  Call only from GUI thread.
      */
     double getYForFrequency(double frequency, double minFreq, double maxFreq, 
-                           bool logarithmic) const;
+                           bool logarithmic) const override;
 
     /**
      * Return the closest frequency to the given pixel y-coordinate,
@@ -149,13 +149,13 @@
      * Not thread-safe in logarithmic mode.  Call only from GUI thread.
      */
     double getFrequencyForY(double y, double minFreq, double maxFreq,
-                            bool logarithmic) const;
+                            bool logarithmic) const override;
 
     /**
      * Return the zoom level, i.e. the number of frames per pixel or
      * pixels per frame
      */
-    ZoomLevel getZoomLevel() const;
+    ZoomLevel getZoomLevel() const override;
 
     /**
      * Set the zoom level, i.e. the number of frames per pixel or
@@ -259,7 +259,7 @@
 
     virtual void setViewManager(ViewManager *m);
     virtual void setViewManager(ViewManager *m, sv_frame_t initialFrame);
-    virtual ViewManager *getViewManager() const { return m_manager; }
+    ViewManager *getViewManager() const override { return m_manager; }
 
     virtual void setFollowGlobalPan(bool f);
     virtual bool getFollowGlobalPan() const { return m_followPan; }
@@ -267,17 +267,17 @@
     virtual void setFollowGlobalZoom(bool f);
     virtual bool getFollowGlobalZoom() const { return m_followZoom; }
 
-    virtual bool hasLightBackground() const;
-    virtual QColor getForeground() const;
-    virtual QColor getBackground() const;
+    bool hasLightBackground() const override;
+    QColor getForeground() const override;
+    QColor getBackground() const override;
 
-    virtual void drawMeasurementRect(QPainter &p, const Layer *,
-                                     QRect rect, bool focus) const;
+    void drawMeasurementRect(QPainter &p, const Layer *,
+                                     QRect rect, bool focus) const override;
 
-    virtual bool shouldShowFeatureLabels() const {
+    bool shouldShowFeatureLabels() const override {
         return m_manager && m_manager->shouldShowFeatureLabels();
     }
-    virtual bool shouldIlluminateLocalFeatures(const Layer *, QPoint &) const {
+    bool shouldIlluminateLocalFeatures(const Layer *, QPoint &) const override {
         return false;
     }
     virtual bool shouldIlluminateLocalSelection(QPoint &, bool &, bool &) const {
@@ -349,20 +349,20 @@
     virtual bool renderPartToSvgFile(QString filename,
                                      sv_frame_t f0, sv_frame_t f1);
     
-    virtual int getTextLabelHeight(const Layer *layer, QPainter &) const;
+    int getTextLabelHeight(const Layer *layer, QPainter &) const override;
 
-    virtual bool getValueExtents(QString unit, double &min, double &max,
-                                 bool &log) const;
+    bool getValueExtents(QString unit, double &min, double &max,
+                                 bool &log) const override;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
     // First frame actually in model, to right of scale, if present
     virtual sv_frame_t getFirstVisibleFrame() const;
     virtual sv_frame_t getLastVisibleFrame() const;
 
-    sv_frame_t getModelsStartFrame() const;
-    sv_frame_t getModelsEndFrame() const;
+    sv_frame_t getModelsStartFrame() const override;
+    sv_frame_t getModelsEndFrame() const override;
 
     /**
      * To be called from a layer, to obtain the extent of the surface
@@ -370,16 +370,16 @@
      * of the view (if 1x display scaling is in effect) or of a larger
      * cached pixmap (if greater display scaling is in effect).
      */
-    QRect getPaintRect() const;
+    QRect getPaintRect() const override;
 
-    QSize getPaintSize() const { return getPaintRect().size(); }
-    int getPaintWidth() const { return getPaintRect().width(); }
-    int getPaintHeight() const { return getPaintRect().height(); }
+    QSize getPaintSize() const override { return getPaintRect().size(); }
+    int getPaintWidth() const override { return getPaintRect().width(); }
+    int getPaintHeight() const override { return getPaintRect().height(); }
 
-    double scaleSize(double size) const;
-    int scalePixelSize(int size) const;
-    double scalePenWidth(double width) const;
-    QPen scalePen(QPen pen) const;
+    double scaleSize(double size) const override;
+    int scalePixelSize(int size) const override;
+    double scalePenWidth(double width) const override;
+    QPen scalePen(QPen pen) const override;
 
     typedef std::set<Model *> ModelSet;
     ModelSet getModels();
@@ -390,10 +390,10 @@
     sv_frame_t alignToReference(sv_frame_t) const;
     sv_frame_t getAlignedPlaybackFrame() const;
 
-    void updatePaintRect(QRect r) { update(r); }
+    void updatePaintRect(QRect r) override { update(r); }
     
-    View *getView() { return this; } 
-    const View *getView() const { return this; } 
+    View *getView() override { return this; } 
+    const View *getView() const override { return this; } 
     
 signals:
     void propertyContainerAdded(PropertyContainer *pc);
@@ -446,7 +446,7 @@
 
     int m_id;
     
-    virtual void paintEvent(QPaintEvent *e);
+    void paintEvent(QPaintEvent *e) override;
     virtual void drawSelections(QPainter &);
     virtual bool shouldLabelSelections() const { return true; }
     virtual void drawPlayPointer(QPainter &);
@@ -552,29 +552,29 @@
     ViewPropertyContainer(View *v);
     virtual ~ViewPropertyContainer();
 
-    PropertyList getProperties() const { return m_v->getProperties(); }
-    QString getPropertyLabel(const PropertyName &n) const {
+    PropertyList getProperties() const override { return m_v->getProperties(); }
+    QString getPropertyLabel(const PropertyName &n) const override {
         return m_v->getPropertyLabel(n);
     }
-    PropertyType getPropertyType(const PropertyName &n) const {
+    PropertyType getPropertyType(const PropertyName &n) const override {
         return m_v->getPropertyType(n);
     }
     int getPropertyRangeAndValue(const PropertyName &n, int *min, int *max,
-                                 int *deflt) const {
+                                 int *deflt) const override {
         return m_v->getPropertyRangeAndValue(n, min, max, deflt);
     }
-    QString getPropertyValueLabel(const PropertyName &n, int value) const {
+    QString getPropertyValueLabel(const PropertyName &n, int value) const override {
         return m_v->getPropertyValueLabel(n, value);
     }
-    QString getPropertyContainerName() const {
+    QString getPropertyContainerName() const override {
         return m_v->getPropertyContainerName();
     }
-    QString getPropertyContainerIconName() const {
+    QString getPropertyContainerIconName() const override {
         return m_v->getPropertyContainerIconName();
     }
 
 public slots:
-    virtual void setProperty(const PropertyName &n, int value) {
+    void setProperty(const PropertyName &n, int value) override {
         m_v->setProperty(n, value);
     }
 
--- a/view/ViewManager.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/ViewManager.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -30,12 +30,12 @@
 //#define DEBUG_VIEW_MANAGER 1
 
 ViewManager::ViewManager() :
-    m_playSource(0),
-    m_recordTarget(0),
+    m_playSource(nullptr),
+    m_recordTarget(nullptr),
     m_globalCentreFrame(0),
     m_globalZoom(ZoomLevel::FramesPerPixel, 1024),
     m_playbackFrame(0),
-    m_playbackModel(0),
+    m_playbackModel(nullptr),
     m_mainModelSampleRate(0),
     m_lastLeft(0), 
     m_lastRight(0),
--- a/view/ViewManager.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/ViewManager.h	Tue Dec 04 13:49:09 2018 +0000
@@ -81,8 +81,8 @@
     ViewManager();
     virtual ~ViewManager();
 
-    void setAudioPlaySource(AudioPlaySource *source);
-    void setAudioRecordTarget(AudioRecordTarget *target);
+    void setAudioPlaySource(AudioPlaySource *source) override;
+    void setAudioRecordTarget(AudioRecordTarget *target) override;
 
     bool isPlaying() const;
     bool isRecording() const;
@@ -96,22 +96,22 @@
     Model *getPlaybackModel() const;
     void setPlaybackModel(Model *);
 
-    sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const;
-    sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const;
+    sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const override;
+    sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const override;
 
     bool haveInProgressSelection() const;
     const Selection &getInProgressSelection(bool &exclusive) const;
     void setInProgressSelection(const Selection &selection, bool exclusive);
     void clearInProgressSelection();
 
-    const MultiSelection &getSelection() const;
+    const MultiSelection &getSelection() const override;
 
-    const MultiSelection::SelectionList &getSelections() const;
+    const MultiSelection::SelectionList &getSelections() const override;
     void setSelection(const Selection &selection);
     void addSelection(const Selection &selection);
     void removeSelection(const Selection &selection);
     void clearSelections();
-    sv_frame_t constrainFrameToSelection(sv_frame_t frame) const;
+    sv_frame_t constrainFrameToSelection(sv_frame_t frame) const override;
 
     /**
      * Adding a selection normally emits the selectionChangedByUser
@@ -126,7 +126,7 @@
      * selected area, return the next selection after the given frame.
      * Return the empty selection if no appropriate selection is found.
      */
-    Selection getContainingSelection(sv_frame_t frame, bool defaultToFollowing) const;
+    Selection getContainingSelection(sv_frame_t frame, bool defaultToFollowing) const override;
 
     Clipboard &getClipboard() { return m_clipboard; }
 
@@ -149,16 +149,16 @@
     /// Clear all current view-specific overrides
     void clearToolModeOverrides();
 
-    bool getPlayLoopMode() const { return m_playLoopMode; }
+    bool getPlayLoopMode() const override { return m_playLoopMode; }
     void setPlayLoopMode(bool on);
 
-    bool getPlaySelectionMode() const { return m_playSelectionMode; }
+    bool getPlaySelectionMode() const override { return m_playSelectionMode; }
     void setPlaySelectionMode(bool on);
 
-    bool getPlaySoloMode() const { return m_playSoloMode; }
+    bool getPlaySoloMode() const override { return m_playSoloMode; }
     void setPlaySoloMode(bool on);
 
-    bool getAlignMode() const { return m_alignMode; }
+    bool getAlignMode() const override { return m_alignMode; }
     void setAlignMode(bool on);
 
     void setIlluminateLocalFeatures(bool i) { m_illuminateLocalFeatures = i; }
@@ -354,9 +354,9 @@
     public:
         SetSelectionCommand(ViewManager *vm, const MultiSelection &ms);
         virtual ~SetSelectionCommand();
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         ViewManager *m_vm;
--- a/view/ViewProxy.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/view/ViewProxy.h	Tue Dec 04 13:49:09 2018 +0000
@@ -23,59 +23,59 @@
     ViewProxy(View *view, int scaleFactor) :
         m_view(view), m_scaleFactor(scaleFactor) { }
 
-    virtual int getId() const {
+    int getId() const override {
         return m_view->getId();
     }
-    virtual sv_frame_t getStartFrame() const {
+    sv_frame_t getStartFrame() const override {
         return m_view->getStartFrame();
     }
-    virtual sv_frame_t getCentreFrame() const {
+    sv_frame_t getCentreFrame() const override {
         return m_view->getCentreFrame();
     }
-    virtual sv_frame_t getEndFrame() const {
+    sv_frame_t getEndFrame() const override {
         return m_view->getEndFrame();
     }
-    virtual int getXForFrame(sv_frame_t frame) const {
+    int getXForFrame(sv_frame_t frame) const override {
         //!!! not actually correct, if frame lies between view's pixels
         return m_scaleFactor * m_view->getXForFrame(frame);
     }
-    virtual sv_frame_t getFrameForX(int x) const {
+    sv_frame_t getFrameForX(int x) const override {
         sv_frame_t f0 = m_view->getFrameForX(x / m_scaleFactor);
         if (m_scaleFactor == 1) return f0;
         sv_frame_t f1 = m_view->getFrameForX((x / m_scaleFactor) + 1);
         return f0 + ((f1 - f0) * (x % m_scaleFactor)) / m_scaleFactor;
     }
-    virtual int getXForViewX(int viewx) const {
+    int getXForViewX(int viewx) const override {
         return viewx * m_scaleFactor;
     }
-    virtual int getViewXForX(int x) const {
+    int getViewXForX(int x) const override {
         return x / m_scaleFactor;
     }
-    virtual sv_frame_t getModelsStartFrame() const {
+    sv_frame_t getModelsStartFrame() const override {
         return m_view->getModelsStartFrame();
     }
-    virtual sv_frame_t getModelsEndFrame() const {
+    sv_frame_t getModelsEndFrame() const override {
         return m_view->getModelsEndFrame();
     }
-    virtual double getYForFrequency(double frequency,
+    double getYForFrequency(double frequency,
                                     double minFreq, double maxFreq, 
-                                    bool logarithmic) const {
+                                    bool logarithmic) const override {
         return m_scaleFactor *
             m_view->getYForFrequency(frequency, minFreq, maxFreq, logarithmic);
     }
-    virtual double getFrequencyForY(double y, double minFreq, double maxFreq,
-                                    bool logarithmic) const {
+    double getFrequencyForY(double y, double minFreq, double maxFreq,
+                                    bool logarithmic) const override {
         return m_view->getFrequencyForY
             (y / m_scaleFactor, minFreq, maxFreq, logarithmic);
     }
-    virtual int getTextLabelHeight(const Layer *layer, QPainter &paint) const {
+    int getTextLabelHeight(const Layer *layer, QPainter &paint) const override {
         return m_scaleFactor * m_view->getTextLabelHeight(layer, paint);
     }
-    virtual bool getValueExtents(QString unit, double &min, double &max,
-                                 bool &log) const {
+    bool getValueExtents(QString unit, double &min, double &max,
+                                 bool &log) const override {
         return m_view->getValueExtents(unit, min, max, log);
     }
-    virtual ZoomLevel getZoomLevel() const {
+    ZoomLevel getZoomLevel() const override {
         ZoomLevel z = m_view->getZoomLevel();
         //!!!
 //        cerr << "getZoomLevel: from " << z << " to ";
@@ -91,53 +91,53 @@
 //        cerr << z << endl;
         return z;
     }
-    virtual QRect getPaintRect() const {
+    QRect getPaintRect() const override {
         QRect r = m_view->getPaintRect();
         return QRect(r.x() * m_scaleFactor,
                      r.y() * m_scaleFactor,
                      r.width() * m_scaleFactor,
                      r.height() * m_scaleFactor);
     }
-    virtual QSize getPaintSize() const {
+    QSize getPaintSize() const override {
         return getPaintRect().size();
     }
-    virtual int getPaintWidth() const { 
+    int getPaintWidth() const override { 
         return getPaintRect().width();
     }
-    virtual int getPaintHeight() const { 
+    int getPaintHeight() const override { 
         return getPaintRect().height();
     }
-    virtual bool hasLightBackground() const {
+    bool hasLightBackground() const override {
         return m_view->hasLightBackground();
     }
-    virtual QColor getForeground() const {
+    QColor getForeground() const override {
         return m_view->getForeground();
     }
-    virtual QColor getBackground() const {
+    QColor getBackground() const override {
         return m_view->getBackground();
     }
-    virtual ViewManager *getViewManager() const {
+    ViewManager *getViewManager() const override {
         return m_view->getViewManager();
     }
         
-    virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
-                                               QPoint &point) const {
+    bool shouldIlluminateLocalFeatures(const Layer *layer,
+                                               QPoint &point) const override {
         QPoint p;
         bool should = m_view->shouldIlluminateLocalFeatures(layer, p);
         point = QPoint(p.x() * m_scaleFactor, p.y() * m_scaleFactor);
         return should;
     }
 
-    virtual bool shouldShowFeatureLabels() const {
+    bool shouldShowFeatureLabels() const override {
         return m_view->shouldShowFeatureLabels();
     }
 
-    virtual void drawMeasurementRect(QPainter &p, const Layer *layer,
-                                     QRect rect, bool focus) const {
+    void drawMeasurementRect(QPainter &p, const Layer *layer,
+                                     QRect rect, bool focus) const override {
         m_view->drawMeasurementRect(p, layer, rect, focus);
     }
 
-    virtual void updatePaintRect(QRect r) {
+    void updatePaintRect(QRect r) override {
         m_view->update(r.x() / m_scaleFactor,
                        r.y() / m_scaleFactor,
                        r.width() / m_scaleFactor,
@@ -151,14 +151,14 @@
      * pixels. It is also a little more conservative - it never
      * shrinks the size, it can only increase or leave it unchanged.
      */
-    virtual double scaleSize(double size) const {
+    double scaleSize(double size) const override {
         return m_view->scaleSize(size * m_scaleFactor);
     }
 
     /**
      * Integer version of scaleSize.
      */
-    virtual int scalePixelSize(int size) const {
+    int scalePixelSize(int size) const override {
         return m_view->scalePixelSize(size * m_scaleFactor);
     }
     
@@ -167,7 +167,7 @@
      * This is like scaleSize except that it also scales the
      * zero-width case.
      */
-    virtual double scalePenWidth(double width) const {
+    double scalePenWidth(double width) const override {
         if (width <= 0) { // zero-width pen, produce a scaled one-pixel pen
             width = 1;
         }
@@ -178,12 +178,12 @@
     /**
      * Apply scalePenWidth to a pen.
      */
-    virtual QPen scalePen(QPen pen) const {
+    QPen scalePen(QPen pen) const override {
         return QPen(pen.color(), scalePenWidth(pen.width()));
     }
     
-    virtual View *getView() { return m_view; }
-    virtual const View *getView() const { return m_view; }
+    View *getView() override { return m_view; }
+    const View *getView() const override { return m_view; }
 
 private:
     View *m_view;
--- a/widgets/ActivityLog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ActivityLog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _ACTIVITY_LOG_H_
-#define _ACTIVITY_LOG_H_
+#ifndef SV_ACTIVITY_LOG_H
+#define SV_ACTIVITY_LOG_H
 
 #include <QDialog>
 #include <QString>
--- a/widgets/AudioDial.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/AudioDial.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -81,7 +81,7 @@
     m_mappedValue(0),
     m_noMappedUpdate(false),
     m_showTooltip(true),
-    m_rangeMapper(0)
+    m_rangeMapper(nullptr)
 {
     m_mouseDial = false;
     m_mousePressed = false;
--- a/widgets/AudioDial.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/AudioDial.h	Tue Dec 04 13:49:09 2018 +0000
@@ -12,8 +12,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _AUDIO_DIAL_H_
-#define _AUDIO_DIAL_H_
+#ifndef SV_AUDIO_DIAL_H
+#define SV_AUDIO_DIAL_H
 
 /**
  * A rotary dial widget.
@@ -115,15 +115,15 @@
 
 protected:
     void drawTick(QPainter &paint, double angle, int size, bool internal);
-    virtual void paintEvent(QPaintEvent *);
+    void paintEvent(QPaintEvent *) override;
 
     // Alternate mouse behavior event handlers.
-    virtual void mousePressEvent(QMouseEvent *pMouseEvent);
-    virtual void mouseMoveEvent(QMouseEvent *pMouseEvent);
-    virtual void mouseReleaseEvent(QMouseEvent *pMouseEvent);
-    virtual void mouseDoubleClickEvent(QMouseEvent *pMouseEvent);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *pMouseEvent) override;
+    void mouseMoveEvent(QMouseEvent *pMouseEvent) override;
+    void mouseReleaseEvent(QMouseEvent *pMouseEvent) override;
+    void mouseDoubleClickEvent(QMouseEvent *pMouseEvent) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
 protected slots:
     void updateMappedValue(int value);
--- a/widgets/ClickableLabel.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ClickableLabel.h	Tue Dec 04 13:49:09 2018 +0000
@@ -12,8 +12,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _CLICKABLE_LABEL_H_
-#define _CLICKABLE_LABEL_H_
+#ifndef SV_CLICKABLE_LABEL_H
+#define SV_CLICKABLE_LABEL_H
 
 #include <QLabel>
 
@@ -31,7 +31,7 @@
     void clicked();
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *) {
+    void mousePressEvent(QMouseEvent *) override {
         emit clicked();
     }
 };
--- a/widgets/ColourNameDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ColourNameDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _COLOUR_NAME_DIALOG_H_
-#define _COLOUR_NAME_DIALOG_H_
+#ifndef SV_COLOUR_NAME_DIALOG_H
+#define SV_COLOUR_NAME_DIALOG_H
 
 #include <QDialog>
 #include <QColor>
--- a/widgets/CommandHistory.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/CommandHistory.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -41,18 +41,18 @@
 
 //#define DEBUG_COMMAND_HISTORY 1
 
-CommandHistory *CommandHistory::m_instance = 0;
+CommandHistory *CommandHistory::m_instance = nullptr;
 
 CommandHistory::CommandHistory() :
     m_undoLimit(50),
     m_redoLimit(50),
     m_menuLimit(15),
     m_savedAt(0),
-    m_currentCompound(0),
+    m_currentCompound(nullptr),
     m_executeCompound(false),
-    m_currentBundle(0),
+    m_currentBundle(nullptr),
     m_bundling(false),
-    m_bundleTimer(0),
+    m_bundleTimer(nullptr),
     m_bundleTimeout(3000)
 {
     IconLoader loader;
@@ -254,7 +254,7 @@
 #endif
         emit activity(m_currentBundle->getName());
     }
-    m_currentBundle = 0;
+    m_currentBundle = nullptr;
     m_currentBundleName = "";
 }
 
@@ -316,7 +316,7 @@
 #endif
 
     MacroCommand *toAdd = m_currentCompound;
-    m_currentCompound = 0;
+    m_currentCompound = nullptr;
 
     if (toAdd->haveCommands()) {
 
--- a/widgets/CommandHistory.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/CommandHistory.h	Tue Dec 04 13:49:09 2018 +0000
@@ -22,8 +22,8 @@
    distributed under the GNU Lesser General Public License.
 */
 
-#ifndef _MULTI_VIEW_COMMAND_HISTORY_H_
-#define _MULTI_VIEW_COMMAND_HISTORY_H_
+#ifndef SV_MULTI_VIEW_COMMAND_HISTORY_H
+#define SV_MULTI_VIEW_COMMAND_HISTORY_H
 
 #include <QObject>
 #include <QString>
--- a/widgets/Fader.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/Fader.h	Tue Dec 04 13:49:09 2018 +0000
@@ -60,14 +60,14 @@
     void mouseLeft();
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *ev);
-    virtual void mouseDoubleClickEvent(QMouseEvent *ev);
-    virtual void mouseMoveEvent(QMouseEvent *ev);
-    virtual void mouseReleaseEvent(QMouseEvent *ev);
-    virtual void wheelEvent( QWheelEvent *ev );
-    virtual void paintEvent(QPaintEvent *ev);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *ev) override;
+    void mouseDoubleClickEvent(QMouseEvent *ev) override;
+    void mouseMoveEvent(QMouseEvent *ev) override;
+    void mouseReleaseEvent(QMouseEvent *ev) override;
+    void wheelEvent( QWheelEvent *ev ) override;
+    void paintEvent(QPaintEvent *ev) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
     int getMaxX() const;
 
--- a/widgets/IconLoader.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/IconLoader.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _ICON_LOADER_H_
-#define _ICON_LOADER_H_
+#ifndef SV_ICON_LOADER_H
+#define SV_ICON_LOADER_H
 
 #include <QIcon>
 
--- a/widgets/ImageDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ImageDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -38,8 +38,8 @@
                          QString label,
                          QWidget *parent) :
     QDialog(parent),
-    m_imagePreview(0),
-    m_remoteFile(0)
+    m_imagePreview(nullptr),
+    m_remoteFile(nullptr)
 {
     setWindowTitle(title);
     
@@ -179,7 +179,7 @@
 
         QString fileName = img;
         delete m_remoteFile;
-        m_remoteFile = 0;
+        m_remoteFile = nullptr;
 
         if (FileSource::isRemote(fileName)) {
             QUrl url(fileName);
@@ -197,7 +197,7 @@
                                           tr("Failed to download URL \"%1\": %2")
                                           .arg(url.toString()).arg(m_remoteFile->getErrorString()));
                     delete m_remoteFile;
-                    m_remoteFile = 0;
+                    m_remoteFile = nullptr;
                 } else {
                     fileName = m_remoteFile->getLocalFilename();
                 }
--- a/widgets/ImageDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ImageDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _IMAGE_DIALOG_H_
-#define _IMAGE_DIALOG_H_
+#ifndef SV_IMAGE_DIALOG_H
+#define SV_IMAGE_DIALOG_H
 
 #include <QDialog>
 #include <QString>
@@ -54,7 +54,7 @@
     void imageEditEdited();
 
 protected:
-    void resizeEvent(QResizeEvent *);
+    void resizeEvent(QResizeEvent *) override;
 
     QLineEdit *m_imageEdit;
     QLineEdit *m_labelEdit;
--- a/widgets/InteractiveFileFinder.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/InteractiveFileFinder.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -36,7 +36,7 @@
 InteractiveFileFinder::InteractiveFileFinder() :
     m_sessionExtension("sv"),
     m_lastLocatedLocation(""),
-    m_parent(0)
+    m_parent(nullptr)
 {
     FileFinder::registerFileFinder(this);
 }
@@ -193,31 +193,31 @@
         
         if (!fi.exists()) {
             
-            QMessageBox::critical(0, tr("File does not exist"),
+            QMessageBox::critical(nullptr, tr("File does not exist"),
                                   tr("<b>File not found</b><p>File \"%1\" does not exist").arg(path));
             path = "";
             
         } else if (!fi.isReadable()) {
             
-            QMessageBox::critical(0, tr("File is not readable"),
+            QMessageBox::critical(nullptr, tr("File is not readable"),
                                   tr("<b>File is not readable</b><p>File \"%1\" can not be read").arg(path));
             path = "";
             
         } else if (fi.isDir()) {
             
-            QMessageBox::critical(0, tr("Directory selected"),
+            QMessageBox::critical(nullptr, tr("Directory selected"),
                                   tr("<b>Directory selected</b><p>File \"%1\" is a directory").arg(path));
             path = "";
 
         } else if (!fi.isFile()) {
             
-            QMessageBox::critical(0, tr("Non-file selected"),
+            QMessageBox::critical(nullptr, tr("Non-file selected"),
                                   tr("<b>Not a file</b><p>Path \"%1\" is not a file").arg(path));
             path = "";
             
         } else if (fi.size() == 0) {
             
-            QMessageBox::critical(0, tr("File is empty"),
+            QMessageBox::critical(nullptr, tr("File is empty"),
                                   tr("<b>File is empty</b><p>File \"%1\" is empty").arg(path));
             path = "";
         }                
@@ -405,13 +405,13 @@
         }
         
         if (fi.isDir()) {
-            QMessageBox::critical(0, tr("Directory selected"),
+            QMessageBox::critical(nullptr, tr("Directory selected"),
                                   tr("<b>Directory selected</b><p>File \"%1\" is a directory").arg(path));
             continue;
         }
         
         if (fi.exists()) {
-            if (QMessageBox::question(0, tr("File exists"),
+            if (QMessageBox::question(nullptr, tr("File exists"),
                                       tr("<b>File exists</b><p>The file \"%1\" already exists.\nDo you want to overwrite it?").arg(path),
                                       QMessageBox::Ok,
                                       QMessageBox::Cancel) != QMessageBox::Ok) {
@@ -575,7 +575,7 @@
     while (!done) {
 
         int rv = QMessageBox::question
-            (0, 
+            (nullptr, 
              tr("Failed to open file"),
              question.arg(thing),
              tr("Locate file..."),
@@ -599,7 +599,7 @@
         {
             bool ok = false;
             path = QInputDialog::getText
-                (0, tr("Use URL"),
+                (nullptr, tr("Use URL"),
                  tr("Please enter the URL to use for this file:"),
                  QLineEdit::Normal, "", &ok);
 
@@ -608,7 +608,7 @@
                     done = true;
                 } else {
                     QMessageBox::critical
-                        (0, tr("Failed to open location"),
+                        (nullptr, tr("Failed to open location"),
                          tr("<b>Failed to open location</b><p>URL \"%1\" could not be opened").arg(path));
                     path = "";
                 }
--- a/widgets/InteractiveFileFinder.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/InteractiveFileFinder.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _INTERACTIVE_FILE_FINDER_H_
-#define _INTERACTIVE_FILE_FINDER_H_
+#ifndef SV_INTERACTIVE_FILE_FINDER_H
+#define SV_INTERACTIVE_FILE_FINDER_H
 
 #include "data/fileio/FileFinder.h"
 
@@ -38,11 +38,11 @@
         return m_sessionExtension;
     }
 
-    QString getOpenFileName(FileType type, QString fallbackLocation = "");
-    QString getSaveFileName(FileType type, QString fallbackLocation = "");
-    void registerLastOpenedFilePath(FileType type, QString path);
+    QString getOpenFileName(FileType type, QString fallbackLocation = "") override;
+    QString getSaveFileName(FileType type, QString fallbackLocation = "") override;
+    void registerLastOpenedFilePath(FileType type, QString path) override;
 
-    QString find(FileType type, QString location, QString lastKnownLocation = "");
+    QString find(FileType type, QString location, QString lastKnownLocation = "") override;
 
     static void setParentWidget(QWidget *);
 
--- a/widgets/ItemEditDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ItemEditDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -35,21 +35,21 @@
     m_defaultFrame(0),
     m_defaultDuration(0),
     m_defaultValue(0),
-    m_frameTimeSpinBox(0),
-    m_realTimeSecsSpinBox(0),
-    m_realTimeUSecsSpinBox(0),
-    m_frameDurationSpinBox(0),
-    m_realDurationSecsSpinBox(0),
-    m_realDurationUSecsSpinBox(0),
-    m_valueSpinBox(0),
-    m_textField(0)
+    m_frameTimeSpinBox(nullptr),
+    m_realTimeSecsSpinBox(nullptr),
+    m_realTimeUSecsSpinBox(nullptr),
+    m_frameDurationSpinBox(nullptr),
+    m_realDurationSecsSpinBox(nullptr),
+    m_realDurationUSecsSpinBox(nullptr),
+    m_valueSpinBox(nullptr),
+    m_textField(nullptr)
 {
     QGridLayout *grid = new QGridLayout;
     setLayout(grid);
 
-    QGroupBox *timeBox = 0;
-    QGroupBox *valueBox = 0;
-    QGridLayout *subgrid = 0;
+    QGroupBox *timeBox = nullptr;
+    QGroupBox *valueBox = nullptr;
+    QGridLayout *subgrid = nullptr;
 
     int row = 0, subrow = 0;
 
--- a/widgets/ItemEditDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ItemEditDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _ITEM_EDIT_DIALOG_H_
-#define _ITEM_EDIT_DIALOG_H_
+#ifndef SV_ITEM_EDIT_DIALOG_H
+#define SV_ITEM_EDIT_DIALOG_H
 
 #include <QDialog>
 #include <QString>
--- a/widgets/KeyReference.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/KeyReference.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -24,8 +24,8 @@
 #include <QDesktopWidget>
 
 KeyReference::KeyReference() :
-    m_text(0),
-    m_dialog(0)
+    m_text(nullptr),
+    m_dialog(nullptr)
 {
 }
 
--- a/widgets/KeyReference.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/KeyReference.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _KEY_REFERENCE_H_
-#define _KEY_REFERENCE_H_
+#ifndef SV_KEY_REFERENCE_H
+#define SV_KEY_REFERENCE_H
 
 #include <QObject>
 #include <QString>
--- a/widgets/LEDButton.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LEDButton.h	Tue Dec 04 13:49:09 2018 +0000
@@ -49,8 +49,8 @@
     QColor color() const;
     int darkFactor() const;
 
-    virtual QSize sizeHint() const;
-    virtual QSize minimumSizeHint() const;
+    QSize sizeHint() const override;
+    QSize minimumSizeHint() const override;
 
 signals:
     void stateChanged(bool);
@@ -69,10 +69,10 @@
     void setDarkFactor(int darkfactor);
 
 protected:
-    void paintEvent(QPaintEvent *);
-    void mousePressEvent(QMouseEvent *);
-    void enterEvent(QEvent *);
-    void leaveEvent(QEvent *);
+    void paintEvent(QPaintEvent *) override;
+    void mousePressEvent(QMouseEvent *) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
     bool led_state;
     QColor led_color;
--- a/widgets/LabelCounterInputDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LabelCounterInputDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LABEL_COUNTER_INPUT_DIALOG_H_
-#define _LABEL_COUNTER_INPUT_DIALOG_H_
+#ifndef SV_LABEL_COUNTER_INPUT_DIALOG_H
+#define SV_LABEL_COUNTER_INPUT_DIALOG_H
 
 #include <QDialog>
 #include "data/model/Labeller.h"
--- a/widgets/LayerTree.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LayerTree.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -238,7 +238,7 @@
 {
     if (!parent.isValid()) {
         if (row >= (int)m_models.size()) return QModelIndex();
-        return createIndex(row, column, (void *)0);
+        return createIndex(row, column, (void *)nullptr);
     }
 
     return QModelIndex();
--- a/widgets/LayerTree.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LayerTree.h	Tue Dec 04 13:49:09 2018 +0000
@@ -14,8 +14,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LAYER_TREE_H_
-#define _LAYER_TREE_H_
+#ifndef SV_LAYER_TREE_H
+#define SV_LAYER_TREE_H
 
 #include <QAbstractItemModel>
 
@@ -36,22 +36,22 @@
     ModelMetadataModel(PaneStack *stack, bool waveModelsOnly, QObject *parent = 0);
     virtual ~ModelMetadataModel();
 
-    QVariant data(const QModelIndex &index, int role) const;
+    QVariant data(const QModelIndex &index, int role) const override;
 
-    bool setData(const QModelIndex &index, const QVariant &value, int role);
+    bool setData(const QModelIndex &index, const QVariant &value, int role) override;
 
-    Qt::ItemFlags flags(const QModelIndex &index) const;
+    Qt::ItemFlags flags(const QModelIndex &index) const override;
 
     QVariant headerData(int section, Qt::Orientation orientation,
-                        int role = Qt::DisplayRole) const;
+                        int role = Qt::DisplayRole) const override;
 
     QModelIndex index(int row, int column,
-                      const QModelIndex &parent = QModelIndex()) const;
+                      const QModelIndex &parent = QModelIndex()) const override;
 
-    QModelIndex parent(const QModelIndex &index) const;
+    QModelIndex parent(const QModelIndex &index) const override;
 
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    int columnCount(const QModelIndex &parent = QModelIndex()) const;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
 
 protected slots:
     void paneAdded();
@@ -84,22 +84,22 @@
     LayerTreeModel(PaneStack *stack, QObject *parent = 0);
     virtual ~LayerTreeModel();
 
-    QVariant data(const QModelIndex &index, int role) const;
+    QVariant data(const QModelIndex &index, int role) const override;
 
-    bool setData(const QModelIndex &index, const QVariant &value, int role);
+    bool setData(const QModelIndex &index, const QVariant &value, int role) override;
 
-    Qt::ItemFlags flags(const QModelIndex &index) const;
+    Qt::ItemFlags flags(const QModelIndex &index) const override;
 
     QVariant headerData(int section, Qt::Orientation orientation,
-                        int role = Qt::DisplayRole) const;
+                        int role = Qt::DisplayRole) const override;
 
     QModelIndex index(int row, int column,
-                      const QModelIndex &parent = QModelIndex()) const;
+                      const QModelIndex &parent = QModelIndex()) const override;
 
-    QModelIndex parent(const QModelIndex &index) const;
+    QModelIndex parent(const QModelIndex &index) const override;
 
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    int columnCount(const QModelIndex &parent = QModelIndex()) const;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
 
 protected slots:
     void paneAdded();
--- a/widgets/LayerTreeDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LayerTreeDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LAYER_TREE_DIALOG_H_
-#define _LAYER_TREE_DIALOG_H_
+#ifndef SV_LAYER_TREE_DIALOG_H
+#define SV_LAYER_TREE_DIALOG_H
 
 #include <QDialog>
 
--- a/widgets/LevelPanToolButton.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LevelPanToolButton.h	Tue Dec 04 13:49:09 2018 +0000
@@ -67,11 +67,11 @@
     void selfClicked();
     
 protected:
-    virtual void paintEvent(QPaintEvent *);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
-    virtual void mousePressEvent(QMouseEvent *);
-    virtual void wheelEvent(QWheelEvent *e);
+    void paintEvent(QPaintEvent *) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
+    void mousePressEvent(QMouseEvent *) override;
+    void wheelEvent(QWheelEvent *e) override;
     
     LevelPanWidget *m_lpw;
     int m_pixels;
--- a/widgets/LevelPanWidget.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/LevelPanWidget.h	Tue Dec 04 13:49:09 2018 +0000
@@ -47,7 +47,7 @@
     /// Draw a suitably sized copy of the widget's contents to the given device
     void renderTo(QPaintDevice *, QRectF, bool asIfEditable) const;
 
-    QSize sizeHint() const;
+    QSize sizeHint() const override;
                                                
 public slots:
     /// Set level. The basic level range is [0,1] but the scale may go
@@ -70,7 +70,7 @@
     void setToDefault();
     
     // public so it can be called from LevelPanToolButton (ew)
-    virtual void wheelEvent(QWheelEvent *ev);
+    void wheelEvent(QWheelEvent *ev) override;
     
 signals:
     void levelChanged(float); // range [0,1]
@@ -80,12 +80,12 @@
     void mouseLeft();
     
 protected:
-    virtual void mousePressEvent(QMouseEvent *ev);
-    virtual void mouseMoveEvent(QMouseEvent *ev);
-    virtual void mouseReleaseEvent(QMouseEvent *ev);
-    virtual void paintEvent(QPaintEvent *ev);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *ev) override;
+    void mouseMoveEvent(QMouseEvent *ev) override;
+    void mouseReleaseEvent(QMouseEvent *ev) override;
+    void paintEvent(QPaintEvent *ev) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
     void emitLevelChanged();
     void emitPanChanged();
--- a/widgets/ListInputDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ListInputDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LIST_INPUT_DIALOG_H_
-#define _LIST_INPUT_DIALOG_H_
+#ifndef SV_LIST_INPUT_DIALOG_H
+#define SV_LIST_INPUT_DIALOG_H
 
 #include <QDialog>
 #include <QString>
--- a/widgets/MIDIFileImportDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/MIDIFileImportDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -47,7 +47,7 @@
 
     bool ok = false;
     QString selected = QInputDialog::getItem
-        (0, tr("Select track or tracks to import"),
+        (nullptr, tr("Select track or tracks to import"),
          tr("<b>Select track to import</b><p>You can only import this file as a single annotation layer, but the file contains more than one track, or notes on more than one channel.<p>Please select the track or merged tracks you wish to import:"),
          available, 0, false, &ok);
     
@@ -67,6 +67,6 @@
 void
 MIDIFileImportDialog::showError(QString error)
 {
-    QMessageBox::critical(0, tr("Error in MIDI file import"), error);
+    QMessageBox::critical(nullptr, tr("Error in MIDI file import"), error);
 }
 
--- a/widgets/MIDIFileImportDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/MIDIFileImportDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -12,8 +12,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _MIDI_FILE_IMPORT_DIALOG_H_
-#define _MIDI_FILE_IMPORT_DIALOG_H_
+#ifndef SV_MIDI_FILE_IMPORT_DIALOG_H
+#define SV_MIDI_FILE_IMPORT_DIALOG_H
 
 #include <QObject>
 
@@ -27,11 +27,11 @@
 public:
     MIDIFileImportDialog(QWidget *parent = 0);
 
-    virtual TrackPreference getTrackImportPreference
+    TrackPreference getTrackImportPreference
     (QStringList trackNames, bool haveSomePercussion,
-     QString &singleTrack) const;
+     QString &singleTrack) const override;
 
-    virtual void showError(QString error);
+    void showError(QString error) override;
 
 protected:
     QWidget *m_parent;
--- a/widgets/NotifyingCheckBox.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/NotifyingCheckBox.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _NOTIFYING_CHECK_BOX_H_
-#define _NOTIFYING_CHECK_BOX_H_
+#ifndef SV_NOTIFYING_CHECK_BOX_H
+#define SV_NOTIFYING_CHECK_BOX_H
 
 #include <QCheckBox>
 
@@ -38,8 +38,8 @@
     void mouseLeft();
 
 protected:
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 };
 
 #endif
--- a/widgets/NotifyingComboBox.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/NotifyingComboBox.h	Tue Dec 04 13:49:09 2018 +0000
@@ -38,8 +38,8 @@
     void mouseLeft();
 
 protected:
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 };
 
 #endif
--- a/widgets/NotifyingPushButton.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/NotifyingPushButton.h	Tue Dec 04 13:49:09 2018 +0000
@@ -39,8 +39,8 @@
     void mouseLeft();
 
 protected:
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 };
 
 #endif
--- a/widgets/NotifyingTabBar.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/NotifyingTabBar.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _NOTIFYING_TAB_BAR_H_
-#define _NOTIFYING_TAB_BAR_H_
+#ifndef SV_NOTIFYING_TAB_BAR_H
+#define SV_NOTIFYING_TAB_BAR_H
 
 #include <QTabBar>
 
@@ -32,9 +32,9 @@
     void activeTabClicked();
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 };
 
 #endif
--- a/widgets/NotifyingToolButton.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/NotifyingToolButton.h	Tue Dec 04 13:49:09 2018 +0000
@@ -39,8 +39,8 @@
     void mouseLeft();
 
 protected:
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 };
 
 #endif
--- a/widgets/Panner.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/Panner.h	Tue Dec 04 13:49:09 2018 +0000
@@ -43,7 +43,7 @@
 
     void getRectExtents(float &x0, float &y0, float &width, float &height);
 
-    virtual QSize sizeHint() const;
+    QSize sizeHint() const override;
 
 signals:
     /**
@@ -120,14 +120,14 @@
     void resetToDefault();
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *e);
-    virtual void mouseDoubleClickEvent(QMouseEvent *e);
-    virtual void mouseMoveEvent(QMouseEvent *e);
-    virtual void mouseReleaseEvent(QMouseEvent *e);
-    virtual void wheelEvent(QWheelEvent *e);
-    virtual void paintEvent(QPaintEvent *e);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *e) override;
+    void mouseDoubleClickEvent(QMouseEvent *e) override;
+    void mouseMoveEvent(QMouseEvent *e) override;
+    void mouseReleaseEvent(QMouseEvent *e) override;
+    void wheelEvent(QWheelEvent *e) override;
+    void paintEvent(QPaintEvent *e) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
     void normalise();
     void emitAndUpdate();
--- a/widgets/PluginParameterBox.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PluginParameterBox.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -37,7 +37,7 @@
 PluginParameterBox::PluginParameterBox(Vamp::PluginBase *plugin, QWidget *parent) :
     QFrame(parent),
     m_plugin(plugin),
-    m_programCombo(0)
+    m_programCombo(nullptr)
 {
     m_layout = new QGridLayout;
     setLayout(m_layout);
@@ -143,10 +143,10 @@
 
         ParamRec rec;
         rec.param = params[i];
-        rec.dial = 0;
-        rec.spin = 0;
-        rec.check = 0;
-        rec.combo = 0;
+        rec.dial = nullptr;
+        rec.spin = nullptr;
+        rec.check = nullptr;
+        rec.combo = nullptr;
         
         if (params[i].isQuantized && !valueNames.empty()) {
             
@@ -191,7 +191,7 @@
                        << "\": invalid range " << min << " -> " << max
                        << " with quantize step " << qtz << endl;
             } else {
-                RangeMapper *rm = 0;
+                RangeMapper *rm = nullptr;
                 if (hint & PortHint::Logarithmic) {
                     rm = new LogRangeMapper(imin, imax, min, max, unit);
                 } else {
--- a/widgets/PluginParameterBox.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PluginParameterBox.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLUGIN_PARAMETER_BOX_H_
-#define _PLUGIN_PARAMETER_BOX_H_
+#ifndef SV_PLUGIN_PARAMETER_BOX_H
+#define SV_PLUGIN_PARAMETER_BOX_H
 
 #include <vamp-hostsdk/PluginBase.h>
 
--- a/widgets/PluginParameterDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PluginParameterDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -51,7 +51,7 @@
     m_stepSize(0),
     m_blockSize(0),
     m_windowType(HanningWindow),
-    m_parameterBox(0),
+    m_parameterBox(nullptr),
     m_currentSelectionOnly(false)
 {
     setWindowTitle(tr("Plugin Parameters"));
@@ -89,7 +89,7 @@
     QLabel *copyrightLabel = new QLabel(plugin->getCopyright().c_str());
     copyrightLabel->setWordWrap(true);
 
-    QLabel *descriptionLabel = 0;
+    QLabel *descriptionLabel = nullptr;
     if (plugin->getDescription() != "") {
         descriptionLabel = new QLabel(plugin->getDescription().c_str());
         descriptionLabel->setWordWrap(true);
--- a/widgets/PluginParameterDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PluginParameterDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLUGIN_PARAMETER_DIALOG_H_
-#define _PLUGIN_PARAMETER_DIALOG_H_
+#ifndef SV_PLUGIN_PARAMETER_DIALOG_H
+#define SV_PLUGIN_PARAMETER_DIALOG_H
 
 #include <QDialog>
 
@@ -74,7 +74,7 @@
     void getProcessingParameters(int &stepSize, int &blockSize,
                                  WindowType &windowType) const;
 
-    int exec();
+    int exec() override;
 
 signals:
     void pluginConfigurationChanged(QString);
--- a/widgets/ProgressDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ProgressDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -24,11 +24,11 @@
                                int timeBeforeShow,
                                QWidget *parent,
                                Qt::WindowModality modality) : 
-    m_showTimer(0),
+    m_showTimer(nullptr),
     m_timerElapsed(false),
     m_cancelled(false)
 {
-    m_dialog = new QProgressDialog(message, cancellable ? tr("Cancel") : 0,
+    m_dialog = new QProgressDialog(message, cancellable ? tr("Cancel") : nullptr,
                                    0, 100, parent);
     m_dialog->setWindowModality(modality);
 
--- a/widgets/ProgressDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/ProgressDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,7 +13,7 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PROGRESS_DIALOG_H_
+#ifndef SV_PROGRESS_DIALOG_H
 
 #include "base/ProgressReporter.h"
 
@@ -32,18 +32,18 @@
                    Qt::WindowModality modality = Qt::NonModal);
     virtual ~ProgressDialog();
 
-    virtual bool isDefinite() const;
-    virtual void setDefinite(bool definite);
+    bool isDefinite() const override;
+    void setDefinite(bool definite) override;
 
-    virtual bool wasCancelled() const;
+    bool wasCancelled() const override;
 
 signals:
     void showing();
     void cancelled();
 
 public slots:
-    virtual void setMessage(QString text);
-    virtual void setProgress(int percentage);
+    void setMessage(QString text) override;
+    void setProgress(int percentage) override;
 
 protected slots:
     virtual void showTimerElapsed();
--- a/widgets/PropertyBox.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PropertyBox.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -57,8 +57,8 @@
 
 PropertyBox::PropertyBox(PropertyContainer *container) :
     m_container(container),
-    m_showButton(0),
-    m_playButton(0)
+    m_showButton(nullptr),
+    m_playButton(nullptr)
 {
 #ifdef DEBUG_PROPERTY_BOX
     cerr << "PropertyBox[" << this << "(\"" <<
@@ -82,7 +82,7 @@
     m_mainBox->addWidget(m_mainWidget);
     m_mainBox->insertStretch(2, 10);
 
-    m_viewPlayFrame = 0;
+    m_viewPlayFrame = nullptr;
     populateViewPlayFrame();
 
     m_layout = new QGridLayout;
@@ -129,7 +129,7 @@
 
     if (m_viewPlayFrame) {
         delete m_viewPlayFrame;
-        m_viewPlayFrame = 0;
+        m_viewPlayFrame = nullptr;
     }
 
     if (!m_container) return;
@@ -644,7 +644,7 @@
     
     PropertyContainer::PropertyType type = m_container->getPropertyType(name);
 
-    Command *c = 0;
+    Command *c = nullptr;
 
     if (type == PropertyContainer::UnitsProperty) {
 
--- a/widgets/PropertyStack.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/PropertyStack.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PROPERTY_STACK_H_
-#define _PROPERTY_STACK_H_
+#ifndef SV_PROPERTY_STACK_H
+#define SV_PROPERTY_STACK_H
 
 #include <QFrame>
 #include <QTabWidget>
--- a/widgets/RangeInputDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/RangeInputDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RANGE_INPUT_DIALOG_H_
-#define _RANGE_INPUT_DIALOG_H_
+#ifndef SV_RANGE_INPUT_DIALOG_H
+#define SV_RANGE_INPUT_DIALOG_H
 
 #include <QDialog>
 #include <QString>
--- a/widgets/SelectableLabel.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/SelectableLabel.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SELECTABLE_LABEL_H_
-#define _SELECTABLE_LABEL_H_
+#ifndef SV_SELECTABLE_LABEL_H
+#define SV_SELECTABLE_LABEL_H
 
 #include <QLabel>
 
@@ -40,11 +40,11 @@
     void toggle();
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *e);
-    virtual void mouseReleaseEvent(QMouseEvent *e);
-    virtual void mouseDoubleClickEvent(QMouseEvent *e);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *e) override;
+    void mouseReleaseEvent(QMouseEvent *e) override;
+    void mouseDoubleClickEvent(QMouseEvent *e) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
     void setupStyle();
     QString m_selectedText;
     QString m_unselectedText;
--- a/widgets/TextAbbrev.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/TextAbbrev.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TEXT_ABBREV_H_
-#define _TEXT_ABBREV_H_
+#ifndef SV_TEXT_ABBREV_H
+#define SV_TEXT_ABBREV_H
 
 #include <QString>
 #include <QStringList>
--- a/widgets/Thumbwheel.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/Thumbwheel.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -46,7 +46,7 @@
     m_atDefault(true),
     m_clickRotation(m_rotation),
     m_showTooltip(true),
-    m_rangeMapper(0)
+    m_rangeMapper(nullptr)
 {
 }
 
--- a/widgets/Thumbwheel.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/Thumbwheel.h	Tue Dec 04 13:49:09 2018 +0000
@@ -47,7 +47,7 @@
 
     void setShowToolTip(bool show);
 
-    QSize sizeHint() const;
+    QSize sizeHint() const override;
 
 signals:
     void valueChanged(int);
@@ -71,14 +71,14 @@
     void updateMappedValue(int value);
 
 protected:
-    virtual void mousePressEvent(QMouseEvent *e);
-    virtual void mouseDoubleClickEvent(QMouseEvent *e);
-    virtual void mouseMoveEvent(QMouseEvent *e);
-    virtual void mouseReleaseEvent(QMouseEvent *e);
-    virtual void wheelEvent(QWheelEvent *e);
-    virtual void paintEvent(QPaintEvent *e);
-    virtual void enterEvent(QEvent *);
-    virtual void leaveEvent(QEvent *);
+    void mousePressEvent(QMouseEvent *e) override;
+    void mouseDoubleClickEvent(QMouseEvent *e) override;
+    void mouseMoveEvent(QMouseEvent *e) override;
+    void mouseReleaseEvent(QMouseEvent *e) override;
+    void wheelEvent(QWheelEvent *e) override;
+    void paintEvent(QPaintEvent *e) override;
+    void enterEvent(QEvent *) override;
+    void leaveEvent(QEvent *) override;
 
     int m_min;
     int m_max;
--- a/widgets/TipDialog.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/TipDialog.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -31,7 +31,7 @@
 TipDialog::TipDialog(QWidget *parent) :
     QDialog(parent),
     m_tipNumber(0),
-    m_label(0),
+    m_label(nullptr),
     m_caption(tr("Tip of the Day"))
 {
     readTips();
--- a/widgets/TipDialog.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/TipDialog.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TIP_DIALOG_H_
-#define _TIP_DIALOG_H_
+#ifndef SV_TIP_DIALOG_H
+#define SV_TIP_DIALOG_H
 
 #include <QDialog>
 #include <QString>
@@ -59,19 +59,19 @@
         
         void parse(QXmlInputSource &source);
 
-        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;
 
     protected:
         TipDialog *m_dialog;
--- a/widgets/TransformFinder.cpp	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/TransformFinder.cpp	Tue Dec 04 13:49:09 2018 +0000
@@ -32,8 +32,8 @@
 
 TransformFinder::TransformFinder(QWidget *parent) :
     QDialog(parent),
-    m_resultsFrame(0),
-    m_resultsLayout(0)
+    m_resultsFrame(nullptr),
+    m_resultsLayout(nullptr)
 {
     setWindowTitle(tr("Find a Transform"));
     
@@ -225,11 +225,11 @@
         if (m_sortedResults.size() < sorted.size()) {
             m_infoLabel->setText
                 (tr("Found %n description(s) containing <b>%1</b>, showing the first %2 only",
-                    0, int(sorted.size())).arg(text).arg(m_sortedResults.size()));
+                    nullptr, int(sorted.size())).arg(text).arg(m_sortedResults.size()));
         } else {
             m_infoLabel->setText
                 (tr("Found %n description(s) containing <b>%1</b>",
-                    0, int(sorted.size())).arg(text));
+                    nullptr, int(sorted.size())).arg(text));
         }
 
         return;
--- a/widgets/TransformFinder.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/TransformFinder.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TRANSFORM_FINDER_H_
-#define _TRANSFORM_FINDER_H_
+#ifndef SV_TRANSFORM_FINDER_H
+#define SV_TRANSFORM_FINDER_H
 
 #include <QDialog>
 
--- a/widgets/WindowShapePreview.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/WindowShapePreview.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _WINDOW_SHAPE_PREVIEW_H_
-#define _WINDOW_SHAPE_PREVIEW_H_
+#ifndef SV_WINDOW_SHAPE_PREVIEW_H
+#define SV_WINDOW_SHAPE_PREVIEW_H
 
 #include <QFrame>
 
--- a/widgets/WindowTypeSelector.h	Thu Nov 29 11:57:30 2018 +0000
+++ b/widgets/WindowTypeSelector.h	Tue Dec 04 13:49:09 2018 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _WINDOW_TYPE_SELECTOR_H_
-#define _WINDOW_TYPE_SELECTOR_H_
+#ifndef SV_WINDOW_TYPE_SELECTOR_H
+#define SV_WINDOW_TYPE_SELECTOR_H
 
 #include <QFrame>