# HG changeset patch # User Chris Cannam # Date 1543242834 0 # Node ID c8a6fd3f9dff8648c7fd79d539b46f0e47d5a431 # Parent 05d614f6e46dd580afb00f9cf964736acd131b40 Use nullptr throughout diff -r 05d614f6e46d -r c8a6fd3f9dff layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/Colour3DPlotLayer.cpp Mon Nov 26 14:33:54 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()); diff -r 05d614f6e46d -r c8a6fd3f9dff layer/ColourMapper.cpp --- a/layer/ColourMapper.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/ColourMapper.cpp Mon Nov 26 14:33:54 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]); diff -r 05d614f6e46d -r c8a6fd3f9dff layer/FlexiNoteLayer.cpp --- a/layer/FlexiNoteLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/FlexiNoteLayer.cpp Mon Nov 26 14:33:54 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 diff -r 05d614f6e46d -r c8a6fd3f9dff layer/ImageLayer.cpp --- a/layer/ImageLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/ImageLayer.cpp Mon Nov 26 14:33:54 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; } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/Layer.cpp --- a/layer/Layer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/Layer.cpp Mon Nov 26 14:33:54 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 { diff -r 05d614f6e46d -r c8a6fd3f9dff layer/LayerFactory.cpp --- a/layer/LayerFactory.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/LayerFactory.cpp Mon Nov 26 14:33:54 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) { diff -r 05d614f6e46d -r c8a6fd3f9dff layer/NoteLayer.cpp --- a/layer/NoteLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/NoteLayer.cpp Mon Nov 26 14:33:54 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; } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/RegionLayer.cpp --- a/layer/RegionLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/RegionLayer.cpp Mon Nov 26 14:33:54 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), @@ -1181,7 +1181,7 @@ { if (!m_model || !m_editing) return; finish(m_editingCommand); - m_editingCommand = 0; + m_editingCommand = nullptr; m_editing = false; recalcSpacing(); @@ -1196,7 +1196,7 @@ if (m_editingCommand) { finish(m_editingCommand); - m_editingCommand = 0; + m_editingCommand = nullptr; } m_editing = true; @@ -1225,7 +1225,7 @@ m_editingCommand->deletePoint(m_editingPoint); finish(m_editingCommand); - m_editingCommand = 0; + m_editingCommand = nullptr; m_editing = false; recalcSpacing(); } @@ -1246,7 +1246,7 @@ if (m_editingCommand) { finish(m_editingCommand); - m_editingCommand = 0; + m_editingCommand = nullptr; } m_editing = true; @@ -1313,7 +1313,7 @@ finish(m_editingCommand); } - m_editingCommand = 0; + m_editingCommand = nullptr; m_editing = false; recalcSpacing(); } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/SingleColourLayer.cpp --- a/layer/SingleColourLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/SingleColourLayer.cpp Mon Nov 26 14:33:54 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 diff -r 05d614f6e46d -r c8a6fd3f9dff layer/SliceLayer.cpp --- a/layer/SliceLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/SliceLayer.cpp Mon Nov 26 14:33:54 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(), ""); diff -r 05d614f6e46d -r c8a6fd3f9dff layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/SpectrogramLayer.cpp Mon Nov 26 14:33:54 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 @@ -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; } @@ -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()); } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/SpectrumLayer.cpp --- a/layer/SpectrumLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/SpectrumLayer.cpp Mon Nov 26 14:33:54 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 (static_cast(m_sliceableModel)); if (m) m->aboutToDelete(); - m_sliceableModel = 0; + m_sliceableModel = nullptr; delete m; } @@ -76,7 +76,7 @@ Model *m = const_cast (static_cast(m_sliceableModel)); m->aboutToDelete(); - setSliceableModel(0); + setSliceableModel(nullptr); delete m; } @@ -108,7 +108,7 @@ Model *m = const_cast (static_cast(m_sliceableModel)); m->aboutToDelete(); - setSliceableModel(0); + setSliceableModel(nullptr); delete m; } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/TextLayer.cpp --- a/layer/TextLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/TextLayer.cpp Mon Nov 26 14:33:54 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; } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/TimeInstantLayer.cpp --- a/layer/TimeInstantLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/TimeInstantLayer.cpp Mon Nov 26 14:33:54 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; } diff -r 05d614f6e46d -r c8a6fd3f9dff layer/TimeRulerLayer.cpp --- a/layer/TimeRulerLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/TimeRulerLayer.cpp Mon Nov 26 14:33:54 2018 +0000 @@ -36,7 +36,7 @@ TimeRulerLayer::TimeRulerLayer() : SingleColourLayer(), - m_model(0), + m_model(nullptr), m_labelHeight(LabelTop) { diff -r 05d614f6e46d -r c8a6fd3f9dff layer/TimeValueLayer.cpp --- a/layer/TimeValueLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/TimeValueLayer.cpp Mon Nov 26 14:33:54 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 - (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 diff -r 05d614f6e46d -r c8a6fd3f9dff layer/WaveformLayer.cpp --- a/layer/WaveformLayer.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/layer/WaveformLayer.cpp Mon Nov 26 14:33:54 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 diff -r 05d614f6e46d -r c8a6fd3f9dff view/AlignmentView.cpp --- a/view/AlignmentView.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/AlignmentView.cpp Mon Nov 26 14:33:54 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) { diff -r 05d614f6e46d -r c8a6fd3f9dff view/Pane.cpp --- a/view/Pane.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/Pane.cpp Mon Nov 26 14:33:54 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) { diff -r 05d614f6e46d -r c8a6fd3f9dff view/PaneStack.cpp --- a/view/PaneStack.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/PaneStack.cpp Mon Nov 26 14:33:54 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::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(pc); if (layer) emit currentLayerChanged(m_currentPane, layer); - else emit currentLayerChanged(m_currentPane, 0); + else emit currentLayerChanged(m_currentPane, nullptr); } void diff -r 05d614f6e46d -r c8a6fd3f9dff view/View.cpp --- a/view/View.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/View.cpp Mon Nov 26 14:33:54 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; diff -r 05d614f6e46d -r c8a6fd3f9dff view/ViewManager.cpp --- a/view/ViewManager.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/ViewManager.cpp Mon Nov 26 14:33:54 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), diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/AudioDial.cpp --- a/widgets/AudioDial.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/AudioDial.cpp Mon Nov 26 14:33:54 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; diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/CommandHistory.cpp --- a/widgets/CommandHistory.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/CommandHistory.cpp Mon Nov 26 14:33:54 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()) { diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/ImageDialog.cpp --- a/widgets/ImageDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/ImageDialog.cpp Mon Nov 26 14:33:54 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(); } diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/InteractiveFileFinder.cpp --- a/widgets/InteractiveFileFinder.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/InteractiveFileFinder.cpp Mon Nov 26 14:33:54 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("File not found

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("File is not readable

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("Directory selected

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("Not a file

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("File is empty

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("Directory selected

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("File exists

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("Failed to open location

URL \"%1\" could not be opened").arg(path)); path = ""; } diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/ItemEditDialog.cpp --- a/widgets/ItemEditDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/ItemEditDialog.cpp Mon Nov 26 14:33:54 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; diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/KeyReference.cpp --- a/widgets/KeyReference.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/KeyReference.cpp Mon Nov 26 14:33:54 2018 +0000 @@ -24,8 +24,8 @@ #include KeyReference::KeyReference() : - m_text(0), - m_dialog(0) + m_text(nullptr), + m_dialog(nullptr) { } diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/LayerTree.cpp --- a/widgets/LayerTree.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/LayerTree.cpp Mon Nov 26 14:33:54 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(); diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/MIDIFileImportDialog.cpp --- a/widgets/MIDIFileImportDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/MIDIFileImportDialog.cpp Mon Nov 26 14:33:54 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("Select track to import

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.

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); } diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/PluginParameterBox.cpp --- a/widgets/PluginParameterBox.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/PluginParameterBox.cpp Mon Nov 26 14:33:54 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 { diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/PluginParameterDialog.cpp --- a/widgets/PluginParameterDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/PluginParameterDialog.cpp Mon Nov 26 14:33:54 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); diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/ProgressDialog.cpp --- a/widgets/ProgressDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/ProgressDialog.cpp Mon Nov 26 14:33:54 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); diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/PropertyBox.cpp Mon Nov 26 14:33:54 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) { diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/Thumbwheel.cpp --- a/widgets/Thumbwheel.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/Thumbwheel.cpp Mon Nov 26 14:33:54 2018 +0000 @@ -46,7 +46,7 @@ m_atDefault(true), m_clickRotation(m_rotation), m_showTooltip(true), - m_rangeMapper(0) + m_rangeMapper(nullptr) { } diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/TipDialog.cpp --- a/widgets/TipDialog.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/TipDialog.cpp Mon Nov 26 14:33:54 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(); diff -r 05d614f6e46d -r c8a6fd3f9dff widgets/TransformFinder.cpp --- a/widgets/TransformFinder.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/widgets/TransformFinder.cpp Mon Nov 26 14:33:54 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 %1, 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 %1", - 0, int(sorted.size())).arg(text)); + nullptr, int(sorted.size())).arg(text)); } return;