changeset 587:4806715f7a19

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:27:05 +0100
parents 1ae54a29e59e
children 707d43018f59 7ebd5a21d74f aaa3be825207 6948c3cc151e
files layer/Colour3DPlotLayer.cpp layer/ImageLayer.cpp layer/Layer.cpp layer/LayerFactory.cpp layer/NoteLayer.cpp layer/PaintAssistant.cpp layer/RegionLayer.cpp layer/SingleColourLayer.cpp layer/SliceLayer.cpp layer/SpectrogramLayer.cpp layer/SpectrumLayer.cpp layer/TextLayer.cpp layer/TimeInstantLayer.cpp layer/TimeRulerLayer.cpp layer/TimeValueLayer.cpp layer/WaveformLayer.cpp view/Overview.cpp view/Pane.cpp view/PaneStack.cpp view/View.cpp view/ViewManager.cpp widgets/ActivityLog.cpp widgets/AudioDial.cpp widgets/CommandHistory.cpp widgets/InteractiveFileFinder.cpp widgets/LEDButton.cpp widgets/LayerTree.cpp widgets/ModelDataTableDialog.cpp widgets/Panner.cpp widgets/PluginParameterBox.cpp widgets/PropertyBox.cpp widgets/PropertyStack.cpp widgets/SubdividingMenu.cpp widgets/TextAbbrev.cpp widgets/Thumbwheel.cpp widgets/TipDialog.cpp
diffstat 36 files changed, 238 insertions(+), 238 deletions(-) [+]
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -493,7 +493,7 @@
     if (dormant) {
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-        DEBUG << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")"
+        SVDEBUG << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")"
                   << endl;
 #endif
 
@@ -588,7 +588,7 @@
 {
     if (!m_model) return;
 
-//    DEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): before: miny = " << m_miny << ", maxy = " << m_maxy << endl;
+//    SVDEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): before: miny = " << m_miny << ", maxy = " << m_maxy << endl;
 
     int dist = m_model->getHeight() - step;
     if (dist < 1) dist = 1;
@@ -598,7 +598,7 @@
     m_maxy = m_miny + dist;
     if (m_maxy > m_model->getHeight()) m_maxy = m_model->getHeight();
 
-//    DEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"):  after: miny = " << m_miny << ", maxy = " << m_maxy << endl;
+//    SVDEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"):  after: miny = " << m_miny << ", maxy = " << m_maxy << endl;
     
     emit layerParametersChanged();
 }
@@ -918,7 +918,7 @@
     size_t modelResolution = m_model->getResolution();
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    DEBUG << "Colour3DPlotLayer::fillCache: " << firstBin << " -> " << lastBin << endl;
+    SVDEBUG << "Colour3DPlotLayer::fillCache: " << firstBin << " -> " << lastBin << endl;
 #endif
 
     size_t modelStartBin = modelStart / modelResolution;
@@ -1152,12 +1152,12 @@
 {
 /*
     if (m_model) {
-        DEBUG << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << endl;
+        SVDEBUG << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << endl;
     }
 */
     Profiler profiler("Colour3DPlotLayer::paint");
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    DEBUG << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << endl;
+    SVDEBUG << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << endl;
 #endif
 
     int completion = 0;
@@ -1213,7 +1213,7 @@
               sx1 < 0 ? 0 : sx1);
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    DEBUG << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", modelStart = " << modelStart << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << " (zoom level = " << v->getZoomLevel() << ", srRatio = " << srRatio << ")" << endl;
+    SVDEBUG << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", modelStart = " << modelStart << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << " (zoom level = " << v->getZoomLevel() << ", srRatio = " << srRatio << ")" << endl;
 #endif
 
     if (m_opaque || 
@@ -1221,14 +1221,14 @@
         int(m_model->getHeight()) >= v->height() ||
         ((modelResolution * srRatio) / v->getZoomLevel()) < 2) {
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-        DEBUG << "calling paintDense" << endl;
+        SVDEBUG << "calling paintDense" << endl;
 #endif
         paintDense(v, paint, rect);
         return;
     }
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    DEBUG << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << endl;
+    SVDEBUG << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << endl;
     std::cerr << "Colour3DPlotLayer: sample rate is " << m_model->getSampleRate() << ", resolution " << m_model->getResolution() << std::endl;
 #endif
 
@@ -1358,7 +1358,7 @@
 
     if (m_peaksCache) {
         if (((modelResolution * srRatio * m_peakResolution) / zoomLevel) < 1) {
-            DEBUG << "using peaks cache" << endl;
+            SVDEBUG << "using peaks cache" << endl;
             source = m_peaksCache;
             modelResolution *= m_peakResolution;
         } else {
--- a/layer/ImageLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/ImageLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -127,7 +127,7 @@
 {
     if (!m_model) return ImageModel::PointList();
 
-//    DEBUG << "ImageLayer::getLocalPoints(" << x << "," << y << "):";
+//    SVDEBUG << "ImageLayer::getLocalPoints(" << x << "," << y << "):";
     const ImageModel::PointList &points(m_model->getPoints());
 
     ImageModel::PointList rv;
@@ -155,7 +155,7 @@
         int width = 32;
         if (m_scaled[v].find(p.image) != m_scaled[v].end()) {
             width = m_scaled[v][p.image].width();
-//            DEBUG << "scaled width = " << width << endl;
+//            SVDEBUG << "scaled width = " << width << endl;
         }
 
         if (x >= px && x < px + width) {
@@ -521,7 +521,7 @@
 {
     bool need = false;
 
-//    DEBUG << "ImageLayer::getImage(" << v << ", " << name << ", ("
+//    SVDEBUG << "ImageLayer::getImage(" << v << ", " << name << ", ("
 //              << maxSize.width() << "x" << maxSize.height() << "))" << endl;
 
     if (!m_scaled[v][name].isNull()  &&
@@ -558,10 +558,10 @@
 void
 ImageLayer::drawStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "ImageLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "ImageLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) {
-	DEBUG << "ImageLayer::drawStart: no model" << endl;
+	SVDEBUG << "ImageLayer::drawStart: no model" << endl;
 	return;
     }
 
@@ -582,7 +582,7 @@
 void
 ImageLayer::drawDrag(View *v, QMouseEvent *e)
 {
-//    DEBUG << "ImageLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "ImageLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model || !m_editing) return;
 
@@ -598,7 +598,7 @@
 void
 ImageLayer::drawEnd(View *v, QMouseEvent *)
 {
-//    DEBUG << "ImageLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "ImageLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
 
     bool ok = false;
@@ -644,7 +644,7 @@
 void
 ImageLayer::editStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "ImageLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "ImageLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) return;
 
@@ -686,7 +686,7 @@
 void
 ImageLayer::editEnd(View *, QMouseEvent *)
 {
-//    DEBUG << "ImageLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "ImageLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
 
     if (m_editingCommand) {
@@ -906,7 +906,7 @@
 void
 ImageLayer::checkAddSource(QString img) const
 {
-    DEBUG << "ImageLayer::checkAddSource(" << img << "): yes, trying..." << endl;
+    SVDEBUG << "ImageLayer::checkAddSource(" << img << "): yes, trying..." << endl;
 
     if (m_fileSources.find(img) != m_fileSources.end()) {
         return;
@@ -938,7 +938,7 @@
 void
 ImageLayer::fileSourceReady()
 {
-//    DEBUG << "ImageLayer::fileSourceReady" << endl;
+//    SVDEBUG << "ImageLayer::fileSourceReady" << endl;
 
     FileSource *rf = dynamic_cast<FileSource *>(sender());
     if (!rf) return;
--- a/layer/Layer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/Layer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -42,7 +42,7 @@
 
 Layer::~Layer()
 {
-//    DEBUG << "Layer::~Layer(" << this << ")" << endl;
+//    SVDEBUG << "Layer::~Layer(" << this << ")" << endl;
 }
 
 void
@@ -169,7 +169,7 @@
 Layer::alignToReference(View *v, size_t frame) const
 {
     const Model *m = getModel();
-    DEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
+    SVDEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
     if (m && m->getAlignmentReference()) {
         return m->alignToReference(frame);
     } else {
@@ -181,7 +181,7 @@
 Layer::alignFromReference(View *v, size_t frame) const
 {
     const Model *m = getModel();
-    DEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
+    SVDEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
     if (m && m->getAlignmentReference()) {
         return m->alignFromReference(frame);
     } else {
--- a/layer/LayerFactory.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/LayerFactory.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -442,10 +442,10 @@
     }
 
     if (!layer) {
-	DEBUG << "LayerFactory::createLayer: Unknown layer type " 
+	SVDEBUG << "LayerFactory::createLayer: Unknown layer type " 
 		  << type << endl;
     } else {
-//	DEBUG << "LayerFactory::createLayer: Setting object name "
+//	SVDEBUG << "LayerFactory::createLayer: Setting object name "
 //		  << getLayerPresentationName(type) << " on " << layer << endl;
 	layer->setObjectName(getLayerPresentationName(type));
         setLayerDefaultProperties(type, layer);
@@ -457,7 +457,7 @@
 void
 LayerFactory::setLayerDefaultProperties(LayerType type, Layer *layer)
 {
-//    DEBUG << "LayerFactory::setLayerDefaultProperties: type " << type << " (name \"" << getLayerTypeName(type) << "\")" << endl;
+//    SVDEBUG << "LayerFactory::setLayerDefaultProperties: type " << type << " (name \"" << getLayerTypeName(type) << "\")" << endl;
 
     QSettings settings;
     settings.beginGroup("LayerDefaults");
--- a/layer/NoteLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/NoteLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -60,7 +60,7 @@
 
     connectSignals(m_model);
 
-//    DEBUG << "NoteLayer::setModel(" << model << ")" << endl;
+//    SVDEBUG << "NoteLayer::setModel(" << model << ")" << endl;
 
     m_scaleMinimum = 0;
     m_scaleMaximum = 0;
@@ -253,7 +253,7 @@
     m_scaleMinimum = min;
     m_scaleMaximum = max;
 
-//    DEBUG << "NoteLayer::setDisplayExtents: min = " << min << ", max = " << max << endl;
+//    SVDEBUG << "NoteLayer::setDisplayExtents: min = " << min << ", max = " << max << endl;
     
     emit layerParametersChanged();
     return true;
@@ -334,7 +334,7 @@
         newmax = max;
     }
     
-    DEBUG << "NoteLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
+    SVDEBUG << "NoteLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
 
     setDisplayExtents(newmin, newmax);
 }
@@ -724,7 +724,7 @@
     QColor brushColour(getBaseQColor());
     brushColour.setAlpha(80);
 
-//    DEBUG << "NoteLayer::paint: resolution is "
+//    SVDEBUG << "NoteLayer::paint: resolution is "
 //	      << m_model->getResolution() << " frames" << endl;
 
     float min = m_model->getValueMinimum();
@@ -794,7 +794,7 @@
 void
 NoteLayer::drawStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "NoteLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) return;
 
@@ -818,7 +818,7 @@
 void
 NoteLayer::drawDrag(View *v, QMouseEvent *e)
 {
-//    DEBUG << "NoteLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model || !m_editing) return;
 
@@ -847,7 +847,7 @@
 void
 NoteLayer::drawEnd(View *, QMouseEvent *)
 {
-//    DEBUG << "NoteLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
     m_editingCommand = 0;
@@ -897,7 +897,7 @@
 void
 NoteLayer::editStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "NoteLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) return;
 
@@ -920,7 +920,7 @@
 void
 NoteLayer::editDrag(View *v, QMouseEvent *e)
 {
-//    DEBUG << "NoteLayer::editDrag(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::editDrag(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model || !m_editing) return;
 
@@ -949,7 +949,7 @@
 void
 NoteLayer::editEnd(View *, QMouseEvent *)
 {
-//    DEBUG << "NoteLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "NoteLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
 
     if (m_editingCommand) {
--- a/layer/PaintAssistant.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/PaintAssistant.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -104,7 +104,7 @@
             ny = getYForValue(scale, nval, minVal, maxVal, rect.y(), h);
         }
 
-//        DEBUG << "PaintAssistant::paintVerticalLevelScale: val = "
+//        SVDEBUG << "PaintAssistant::paintVerticalLevelScale: val = "
 //                  << val << ", y = " << y << ", h = " << h << endl;
 
         bool spaceForLabel = (i == 0 ||
--- a/layer/RegionLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/RegionLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -61,7 +61,7 @@
     connect(m_model, SIGNAL(modelChanged()), this, SLOT(recalcSpacing()));
     recalcSpacing();
 
-//    DEBUG << "RegionLayer::setModel(" << model << ")" << endl;
+//    SVDEBUG << "RegionLayer::setModel(" << model << ")" << endl;
 
     emit modelReplaced();
 }
@@ -239,12 +239,12 @@
     m_distributionMap.clear();
     if (!m_model) return;
 
-//    DEBUG << "RegionLayer::recalcSpacing" << endl;
+//    SVDEBUG << "RegionLayer::recalcSpacing" << endl;
 
     for (RegionModel::PointList::const_iterator i = m_model->getPoints().begin();
          i != m_model->getPoints().end(); ++i) {
         m_distributionMap[i->value]++;
-//        DEBUG << "RegionLayer::recalcSpacing: value found: " << i->value << " (now have " << m_distributionMap[i->value] << " of this value)" <<  endl;
+//        SVDEBUG << "RegionLayer::recalcSpacing: value found: " << i->value << " (now have " << m_distributionMap[i->value] << " of this value)" <<  endl;
     }
 
     int n = 0;
@@ -252,7 +252,7 @@
     for (SpacingMap::const_iterator i = m_distributionMap.begin();
          i != m_distributionMap.end(); ++i) {
         m_spacingMap[i->first] = n++;
-//        DEBUG << "RegionLayer::recalcSpacing: " << i->first << " -> " << m_spacingMap[i->first] << endl;
+//        SVDEBUG << "RegionLayer::recalcSpacing: " << i->first << " -> " << m_spacingMap[i->first] << endl;
     }
 }
 
@@ -680,7 +680,7 @@
 
         int y = spacingIndexToY(v, i->second);
 
-//        DEBUG << "RegionLayer::getYForValue: value " << val << " -> i->second " << i->second << " -> y " << y << endl;
+//        SVDEBUG << "RegionLayer::getYForValue: value " << val << " -> i->second " << i->second << " -> y " << y << endl;
         return y;
 
 
@@ -811,7 +811,7 @@
         val = LogRange::map(val);
     }
 
-//    DEBUG << "RegionLayer::getColourForValue: min " << min << ", max "
+//    SVDEBUG << "RegionLayer::getColourForValue: min " << min << ", max "
 //              << max << ", log " << log << ", value " << val << endl;
 
     QColor solid = ColourMapper(m_colourMap, min, max).map(val);
@@ -848,7 +848,7 @@
     QColor brushColour(getBaseQColor());
     brushColour.setAlpha(80);
 
-//    DEBUG << "RegionLayer::paint: resolution is "
+//    SVDEBUG << "RegionLayer::paint: resolution is "
 //	      << m_model->getResolution() << " frames" << endl;
 
     float min = m_model->getValueMinimum();
--- a/layer/SingleColourLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/SingleColourLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -132,7 +132,7 @@
 SingleColourLayer::setDefaultColourFor(View *v)
 {
 #ifdef DEBUG_COLOUR_SELECTION
-    DEBUG << "SingleColourLayer::setDefaultColourFor: m_colourExplicitlySet = " << m_colourExplicitlySet << ", m_defaultColourSet " << m_defaultColourSet << endl;
+    SVDEBUG << "SingleColourLayer::setDefaultColourFor: m_colourExplicitlySet = " << m_colourExplicitlySet << ", m_defaultColourSet " << m_defaultColourSet << endl;
 #endif
 
     if (m_colourExplicitlySet || m_defaultColourSet) return;
@@ -312,7 +312,7 @@
     if (m_colour != colour) {
 
 #ifdef DEBUG_COLOUR_SELECTION
-        DEBUG << "SingleColourLayer::setProperties: changing colour from " << m_colour << " to " << colour << endl;
+        SVDEBUG << "SingleColourLayer::setProperties: changing colour from " << m_colour << " to " << colour << endl;
 #endif
 
         if (m_colourRefCount.find(m_colour) != m_colourRefCount.end() &&
--- a/layer/SliceLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/SliceLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -73,7 +73,7 @@
 void
 SliceLayer::sliceableModelReplaced(const Model *orig, const Model *replacement)
 {
-    DEBUG << "SliceLayer::sliceableModelReplaced(" << orig << ", " << replacement << ")" << endl;
+    SVDEBUG << "SliceLayer::sliceableModelReplaced(" << orig << ", " << replacement << ")" << endl;
 
     if (orig == m_sliceableModel) {
         setSliceableModel
@@ -84,7 +84,7 @@
 void
 SliceLayer::modelAboutToBeDeleted(Model *m)
 {
-    DEBUG << "SliceLayer::modelAboutToBeDeleted(" << m << ")" << endl;
+    SVDEBUG << "SliceLayer::modelAboutToBeDeleted(" << m << ")" << endl;
 
     if (m == m_sliceableModel) {
         setSliceableModel(0);
--- a/layer/SpectrogramLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/SpectrogramLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -578,7 +578,7 @@
         const View *v = i->first;
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-        DEBUG << "SpectrogramLayer::invalidateImageCaches(" 
+        SVDEBUG << "SpectrogramLayer::invalidateImageCaches(" 
                   << startFrame << ", " << endFrame << "): view range is "
                   << v->getStartFrame() << ", " << v->getEndFrame()
                   << endl;
@@ -598,7 +598,7 @@
             }
             int x = v->getXForFrame(startFrame);
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "clipping from 0 to " << x-1 << endl;
+            SVDEBUG << "clipping from 0 to " << x-1 << endl;
 #endif
             if (x > 1) {
                 i->second.validArea &=
@@ -615,7 +615,7 @@
             }
             int x = v->getXForFrame(endFrame);
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "clipping from " << x+1 << " to " << v->width()
+            SVDEBUG << "clipping from " << x+1 << " to " << v->width()
                       << endl;
 #endif
             if (x < v->width()) {
@@ -638,7 +638,7 @@
 void
 SpectrogramLayer::preferenceChanged(PropertyContainer::PropertyName name)
 {
-    DEBUG << "SpectrogramLayer::preferenceChanged(" << name << ")" << endl;
+    SVDEBUG << "SpectrogramLayer::preferenceChanged(" << name << ")" << endl;
 
     if (name == "Window Type") {
         setWindowType(Preferences::getInstance()->getWindowType());
@@ -764,7 +764,7 @@
 void
 SpectrogramLayer::setGain(float gain)
 {
-//    DEBUG << "SpectrogramLayer::setGain(" << gain << ") (my gain is now "
+//    SVDEBUG << "SpectrogramLayer::setGain(" << gain << ") (my gain is now "
 //	      << m_gain << ")" << endl;
 
     if (m_gain == gain) return;
@@ -805,7 +805,7 @@
 {
     if (m_minFrequency == mf) return;
 
-//    DEBUG << "SpectrogramLayer::setMinFrequency: " << mf << endl;
+//    SVDEBUG << "SpectrogramLayer::setMinFrequency: " << mf << endl;
 
     invalidateImageCaches();
     invalidateMagnitudes();
@@ -826,7 +826,7 @@
 {
     if (m_maxFrequency == mf) return;
 
-//    DEBUG << "SpectrogramLayer::setMaxFrequency: " << mf << endl;
+//    SVDEBUG << "SpectrogramLayer::setMaxFrequency: " << mf << endl;
 
     invalidateImageCaches();
     invalidateMagnitudes();
@@ -951,7 +951,7 @@
 void
 SpectrogramLayer::setNormalizeVisibleArea(bool n)
 {
-    DEBUG << "SpectrogramLayer::setNormalizeVisibleArea(" << n
+    SVDEBUG << "SpectrogramLayer::setNormalizeVisibleArea(" << n
               << ") (from " << m_normalizeVisibleArea << ")" << endl;
 
     if (m_normalizeVisibleArea == n) return;
@@ -975,7 +975,7 @@
     if (dormant) {
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-        DEBUG << "SpectrogramLayer::setLayerDormant(" << dormant << ")"
+        SVDEBUG << "SpectrogramLayer::setLayerDormant(" << dormant << ")"
                   << endl;
 #endif
 
@@ -1020,7 +1020,7 @@
 SpectrogramLayer::cacheInvalid()
 {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::cacheInvalid()" << endl;
+    SVDEBUG << "SpectrogramLayer::cacheInvalid()" << endl;
 #endif
 
     invalidateImageCaches();
@@ -1031,7 +1031,7 @@
 SpectrogramLayer::cacheInvalid(size_t from, size_t to)
 {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::cacheInvalid(" << from << ", " << to << ")" << endl;
+    SVDEBUG << "SpectrogramLayer::cacheInvalid(" << from << ", " << to << ")" << endl;
 #endif
 
     invalidateImageCaches(from, to);
@@ -1046,7 +1046,7 @@
     bool allDone = true;
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::fillTimerTimedOut: have " << m_fftModels.size() << " FFT models associated with views" << endl;
+    SVDEBUG << "SpectrogramLayer::fillTimerTimedOut: have " << m_fftModels.size() << " FFT models associated with views" << endl;
 #endif
 
     for (ViewFFTMap::iterator i = m_fftModels.begin();
@@ -1060,7 +1060,7 @@
             size_t fill = model->getFillExtent();
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "SpectrogramLayer::fillTimerTimedOut: extent for " << model << ": " << fill << ", last " << lastFill << ", total " << m_model->getEndFrame() << endl;
+            SVDEBUG << "SpectrogramLayer::fillTimerTimedOut: extent for " << model << ": " << fill << ", last " << lastFill << ", total " << m_model->getEndFrame() << endl;
 #endif
 
             if (fill >= lastFill) {
@@ -1629,13 +1629,13 @@
     if (m_fftModels.find(v) != m_fftModels.end()) {
         if (m_fftModels[v].first == 0) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found null model" << endl;
+            SVDEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found null model" << endl;
 #endif
             return 0;
         }
         if (m_fftModels[v].first->getHeight() != fftSize / 2 + 1) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found a model with the wrong height (" << m_fftModels[v].first->getHeight() << ", wanted " << (fftSize / 2 + 1) << ")" << endl;
+            SVDEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found a model with the wrong height (" << m_fftModels[v].first->getHeight() << ", wanted " << (fftSize / 2 + 1) << ")" << endl;
 #endif
             delete m_fftModels[v].first;
             m_fftModels.erase(v);
@@ -1643,7 +1643,7 @@
             m_peakCaches.erase(v);
         } else {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found a good model of height " << m_fftModels[v].first->getHeight() << endl;
+            SVDEBUG << "SpectrogramLayer::getFFTModel(" << v << "): Found a good model of height " << m_fftModels[v].first->getHeight() << endl;
 #endif
             return m_fftModels[v].first;
         }
@@ -1764,7 +1764,7 @@
     int s0 = int(std::min(s00, s10) + 0.0001);
     int s1 = int(std::max(s01, s11) + 0.0001);
 
-//    DEBUG << "SpectrogramLayer::updateViewMagnitudes: x0 = " << x0 << ", x1 = " << x1 << ", s00 = " << s00 << ", s11 = " << s11 << " s0 = " << s0 << ", s1 = " << s1 << endl;
+//    SVDEBUG << "SpectrogramLayer::updateViewMagnitudes: x0 = " << x0 << ", x1 = " << x1 << ", s00 = " << s00 << ", s11 = " << s11 << " s0 = " << s0 << ", s1 = " << s1 << endl;
 
     if (int(m_columnMags.size()) <= s1) {
         m_columnMags.resize(s1 + 1);
@@ -1777,7 +1777,7 @@
     }
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::updateViewMagnitudes returning from cols "
+    SVDEBUG << "SpectrogramLayer::updateViewMagnitudes returning from cols "
               << s0 << " -> " << s1 << " inclusive" << endl;
 #endif
 
@@ -1802,7 +1802,7 @@
     Profiler profiler("SpectrogramLayer::paint", false);
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", m_updateTimer " << m_updateTimer << endl;
+    SVDEBUG << "SpectrogramLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", m_updateTimer " << m_updateTimer << endl;
     
     std::cerr << "rect is " << rect.x() << "," << rect.y() << " " << rect.width() << "x" << rect.height() << std::endl;
 #endif
@@ -1816,7 +1816,7 @@
     }
 
     if (isLayerDormant(v)) {
-	DEBUG << "SpectrogramLayer::paint(): Layer is dormant, making it undormant again" << endl;
+	SVDEBUG << "SpectrogramLayer::paint(): Layer is dormant, making it undormant again" << endl;
     }
 
     // Need to do this even if !isLayerDormant, as that could mean v
@@ -1837,14 +1837,14 @@
     ImageCache &cache = m_imageCaches[v];
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::paint(): image cache valid area " << cache.
+    SVDEBUG << "SpectrogramLayer::paint(): image cache valid area " << cache.
 
 validArea.x() << ", " << cache.validArea.y() << ", " << cache.validArea.width() << "x" << cache.validArea.height() << endl;
 #endif
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
     bool stillCacheing = (m_updateTimer != 0);
-    DEBUG << "SpectrogramLayer::paint(): Still cacheing = " << stillCacheing << endl;
+    SVDEBUG << "SpectrogramLayer::paint(): Still cacheing = " << stillCacheing << endl;
 #endif
 
     int zoomLevel = v->getZoomLevel();
@@ -2202,7 +2202,7 @@
     bool runOutOfData = false;
 
     if (w == 0) {
-        DEBUG << "*** NOTE: w == 0" << endl;
+        SVDEBUG << "*** NOTE: w == 0" << endl;
     }
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
@@ -2363,7 +2363,7 @@
 
     if (recreateWholeImageCache) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-        DEBUG << "Recreating image cache: width = " << v->width()
+        SVDEBUG << "Recreating image cache: width = " << v->width()
                   << ", height = " << h << endl;
 #endif
 	cache.image = QImage(v->width(), h, QImage::Format_ARGB32_Premultiplied);
@@ -2371,7 +2371,7 @@
 
     if (w > 0) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-        DEBUG << "Painting " << w << "x" << h
+        SVDEBUG << "Painting " << w << "x" << h
                   << " from draw buffer at " << 0 << "," << 0
                   << " to " << w << "x" << h << " on cache at "
                   << x0 << "," << 0 << endl;
@@ -2383,13 +2383,13 @@
             int scaledLeft = v->getXForFrame(leftBoundaryFrame);
             int scaledRight = v->getXForFrame(rightBoundaryFrame);
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "Rescaling image from " << bufwid
+            SVDEBUG << "Rescaling image from " << bufwid
                  << "x" << h << " to "
                  << scaledRight-scaledLeft << "x" << h << endl;
 #endif
             Preferences::SpectrogramXSmoothing xsmoothing = 
                 Preferences::getInstance()->getSpectrogramXSmoothing();
-//            DEBUG << "xsmoothing == " << xsmoothing << endl;
+//            SVDEBUG << "xsmoothing == " << xsmoothing << endl;
             QImage scaled = m_drawBuffer.scaled
                 (scaledRight - scaledLeft, h,
                  Qt::IgnoreAspectRatio,
@@ -2398,7 +2398,7 @@
             int scaledLeftCrop = v->getXForFrame(leftCropFrame);
             int scaledRightCrop = v->getXForFrame(rightCropFrame);
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-            DEBUG << "Drawing image region of width " << scaledRightCrop - scaledLeftCrop << " to "
+            SVDEBUG << "Drawing image region of width " << scaledRightCrop - scaledLeftCrop << " to "
                  << scaledLeftCrop << " from " << scaledLeftCrop - scaledLeft << endl;
 #endif
             cachePainter.drawImage
@@ -2419,7 +2419,7 @@
     QRect pr = rect & cache.validArea;
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "Painting " << pr.width() << "x" << pr.height()
+    SVDEBUG << "Painting " << pr.width() << "x" << pr.height()
               << " from cache at " << pr.x() << "," << pr.y()
               << " to window" << endl;
 #endif
@@ -2439,7 +2439,7 @@
     
             if (cache.validArea.x() > 0) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-                DEBUG << "SpectrogramLayer::paint() updating left (0, "
+                SVDEBUG << "SpectrogramLayer::paint() updating left (0, "
                           << cache.validArea.x() << ")" << endl;
 #endif
                 v->update(0, 0, cache.validArea.x(), h);
@@ -2448,7 +2448,7 @@
             if (cache.validArea.x() + cache.validArea.width() <
                 cache.image.width()) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-                DEBUG << "SpectrogramLayer::paint() updating right ("
+                SVDEBUG << "SpectrogramLayer::paint() updating right ("
                           << cache.validArea.x() + cache.validArea.width()
                           << ", "
                           << cache.image.width() - (cache.validArea.x() +
@@ -2472,7 +2472,7 @@
     illuminateLocalFeatures(v, paint);
 
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::paint() returning" << endl;
+    SVDEBUG << "SpectrogramLayer::paint() returning" << endl;
 #endif
 
     if (!m_synchronous) {
@@ -2707,7 +2707,7 @@
             if (sx != psx) {
                 if (fft) {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-                    DEBUG << "Retrieving column " << sx << " from fft directly" << endl;
+                    SVDEBUG << "Retrieving column " << sx << " from fft directly" << endl;
 #endif
                     if (m_colourScale == PhaseColourScale) {
                         fft->getPhasesAt(sx, autoarray, minbin, maxbin - minbin + 1);
@@ -2718,7 +2718,7 @@
                     }
                 } else {
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-                    DEBUG << "Retrieving column " << sx << " from peaks cache" << endl;
+                    SVDEBUG << "Retrieving column " << sx << " from peaks cache" << endl;
 #endif
                     c = sourceModel->getColumn(sx);
                     if (m_normalizeColumns) {
@@ -2900,7 +2900,7 @@
 
     size_t completion = m_fftModels[v].first->getCompletion();
 #ifdef DEBUG_SPECTROGRAM_REPAINT
-    DEBUG << "SpectrogramLayer::getCompletion: completion = " << completion << endl;
+    SVDEBUG << "SpectrogramLayer::getCompletion: completion = " << completion << endl;
 #endif
     return completion;
 }
@@ -2933,7 +2933,7 @@
     min = getEffectiveMinFrequency();
     max = getEffectiveMaxFrequency();
 
-//    DEBUG << "SpectrogramLayer::getDisplayExtents: " << min << "->" << max << endl;
+//    SVDEBUG << "SpectrogramLayer::getDisplayExtents: " << min << "->" << max << endl;
     return true;
 }    
 
@@ -2942,7 +2942,7 @@
 {
     if (!m_model) return false;
 
-//    DEBUG << "SpectrogramLayer::setDisplayExtents: " << min << "->" << max << endl;
+//    SVDEBUG << "SpectrogramLayer::setDisplayExtents: " << min << "->" << max << endl;
 
     if (min < 0) min = 0;
     if (max > m_model->getSampleRate()/2) max = m_model->getSampleRate()/2;
@@ -3551,7 +3551,7 @@
 
     defaultStep = mapper.getPositionForValue(initialMax) - minStep;
 
-//    DEBUG << "SpectrogramLayer::getVerticalZoomSteps: " << maxStep - minStep << " (" << maxStep <<"-" << minStep << "), default is " << defaultStep << " (from initial max freq " << initialMax << ")" << endl;
+//    SVDEBUG << "SpectrogramLayer::getVerticalZoomSteps: " << maxStep - minStep << " (" << maxStep <<"-" << minStep << "), default is " << defaultStep << " (from initial max freq " << initialMax << ")" << endl;
 
     return maxStep - minStep;
 }
@@ -3566,7 +3566,7 @@
     
     SpectrogramRangeMapper mapper(m_model->getSampleRate(), m_fftSize);
     int n = mapper.getPositionForValue(dmax - dmin);
-//    DEBUG << "SpectrogramLayer::getCurrentVerticalZoomStep: " << n << endl;
+//    SVDEBUG << "SpectrogramLayer::getCurrentVerticalZoomStep: " << n << endl;
     return n;
 }
 
@@ -3632,7 +3632,7 @@
         newmax = mmax;
     }
     
-//    DEBUG << "SpectrogramLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
+//    SVDEBUG << "SpectrogramLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
 
     setMinFrequency(lrintf(newmin));
     setMaxFrequency(lrintf(newmax));
@@ -3654,7 +3654,7 @@
     int y1 = y0;
     if (r.endY > 0.0) y1 = getYForFrequency(v, r.endY);
 
-//    DEBUG << "SpectrogramLayer::updateMeasureRectYCoords: start " << r.startY << " -> " << y0 << ", end " << r.endY << " -> " << y1 << endl;
+//    SVDEBUG << "SpectrogramLayer::updateMeasureRectYCoords: start " << r.startY << " -> " << y0 << ", end " << r.endY << " -> " << y1 << endl;
 
     r.pixrect = QRect(r.pixrect.x(), y0, r.pixrect.width(), y1 - y0);
 }
@@ -3668,7 +3668,7 @@
     } else {
         r.endY = getFrequencyForY(v, y);
     }
-//    DEBUG << "SpectrogramLayer::setMeasureRectYCoord: start " << r.startY << " <- " << y << ", end " << r.endY << " <- " << y << endl;
+//    SVDEBUG << "SpectrogramLayer::setMeasureRectYCoord: start " << r.startY << " <- " << y << ", end " << r.endY << " <- " << y << endl;
 
 }
 
@@ -3744,13 +3744,13 @@
 
     size_t minFrequency = attributes.value("minFrequency").toUInt(&ok);
     if (ok) {
-        DEBUG << "SpectrogramLayer::setProperties: setting min freq to " << minFrequency << endl;
+        SVDEBUG << "SpectrogramLayer::setProperties: setting min freq to " << minFrequency << endl;
         setMinFrequency(minFrequency);
     }
 
     size_t maxFrequency = attributes.value("maxFrequency").toUInt(&ok);
     if (ok) {
-        DEBUG << "SpectrogramLayer::setProperties: setting max freq to " << maxFrequency << endl;
+        SVDEBUG << "SpectrogramLayer::setProperties: setting max freq to " << maxFrequency << endl;
         setMaxFrequency(maxFrequency);
     }
 
--- a/layer/SpectrumLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/SpectrumLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -57,7 +57,7 @@
 void
 SpectrumLayer::setModel(DenseTimeValueModel *model)
 {
-    DEBUG << "SpectrumLayer::setModel(" << model << ") from " << m_originModel << endl;
+    SVDEBUG << "SpectrumLayer::setModel(" << model << ") from " << m_originModel << endl;
     
     if (m_originModel == model) return;
 
@@ -79,7 +79,7 @@
 void
 SpectrumLayer::setChannel(int channel)
 {
-    DEBUG << "SpectrumLayer::setChannel(" << channel << ") from " << m_channel << endl;
+    SVDEBUG << "SpectrumLayer::setChannel(" << channel << ") from " << m_channel << endl;
     
     m_channelSet = true;
     
@@ -654,12 +654,12 @@
 {
     if (!m_originModel || !m_originModel->isOK() ||
         !m_originModel->isReady()) {
-        DEBUG << "SpectrumLayer::paint: no origin model, or origin model not OK or not ready" << endl;
+        SVDEBUG << "SpectrumLayer::paint: no origin model, or origin model not OK or not ready" << endl;
         return;
     }
 
     if (m_newFFTNeeded) {
-        DEBUG << "SpectrumLayer::paint: new FFT needed, calling setupFFT" << endl;
+        SVDEBUG << "SpectrumLayer::paint: new FFT needed, calling setupFFT" << endl;
         const_cast<SpectrumLayer *>(this)->setupFFT(); //ugh
     }
 
@@ -682,7 +682,7 @@
 
         // draw peak lines
 
-//        DEBUG << "Showing peaks..." << endl;
+//        SVDEBUG << "Showing peaks..." << endl;
 
         size_t col = v->getCentreFrame() / fft->getResolution();
 
--- a/layer/TextLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/TextLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -51,7 +51,7 @@
 
     connectSignals(m_model);
 
-//    DEBUG << "TextLayer::setModel(" << model << ")" << endl;
+//    SVDEBUG << "TextLayer::setModel(" << model << ")" << endl;
 
     emit modelReplaced();
 }
@@ -331,7 +331,7 @@
     QColor penColour;
     penColour = v->getForeground();
 
-//    DEBUG << "TextLayer::paint: resolution is "
+//    SVDEBUG << "TextLayer::paint: resolution is "
 //	      << m_model->getResolution() << " frames" << endl;
 
     QPoint localPos;
@@ -413,10 +413,10 @@
 void
 TextLayer::drawStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "TextLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "TextLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) {
-	DEBUG << "TextLayer::drawStart: no model" << endl;
+	SVDEBUG << "TextLayer::drawStart: no model" << endl;
 	return;
     }
 
@@ -439,7 +439,7 @@
 void
 TextLayer::drawDrag(View *v, QMouseEvent *e)
 {
-//    DEBUG << "TextLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "TextLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model || !m_editing) return;
 
@@ -458,7 +458,7 @@
 void
 TextLayer::drawEnd(View *v, QMouseEvent *)
 {
-//    DEBUG << "TextLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "TextLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
 
     bool ok = false;
@@ -523,7 +523,7 @@
 void
 TextLayer::editStart(View *v, QMouseEvent *e)
 {
-//    DEBUG << "TextLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "TextLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
 
     if (!m_model) return;
 
@@ -572,7 +572,7 @@
 void
 TextLayer::editEnd(View *, QMouseEvent *)
 {
-//    DEBUG << "TextLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
+//    SVDEBUG << "TextLayer::editEnd(" << e->x() << "," << e->y() << ")" << endl;
     if (!m_model || !m_editing) return;
 
     if (m_editingCommand) {
--- a/layer/TimeInstantLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/TimeInstantLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -60,7 +60,7 @@
     connectSignals(m_model);
 
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::setModel(" << model << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::setModel(" << model << ")" << endl;
 #endif
 
     if (m_model && m_model->getRDFTypeURI().endsWith("Segment")) {
@@ -363,7 +363,7 @@
 	oddBrushColour.setAlpha(100);
     }
 
-//    DEBUG << "TimeInstantLayer::paint: resolution is "
+//    SVDEBUG << "TimeInstantLayer::paint: resolution is "
 //	      << m_model->getResolution() << " frames" << endl;
 
     QPoint localPos;
@@ -469,7 +469,7 @@
 TimeInstantLayer::drawStart(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::drawStart(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::drawStart(" << e->x() << ")" << endl;
 #endif
 
     if (!m_model) return;
@@ -492,7 +492,7 @@
 TimeInstantLayer::drawDrag(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::drawDrag(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::drawDrag(" << e->x() << ")" << endl;
 #endif
 
     if (!m_model || !m_editing) return;
@@ -509,7 +509,7 @@
 TimeInstantLayer::drawEnd(View *, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::drawEnd(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::drawEnd(" << e->x() << ")" << endl;
 #endif
     if (!m_model || !m_editing) return;
     QString newName = tr("Add Point at %1 s")
@@ -570,7 +570,7 @@
 TimeInstantLayer::editStart(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::editStart(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::editStart(" << e->x() << ")" << endl;
 #endif
 
     if (!m_model) return;
@@ -592,7 +592,7 @@
 TimeInstantLayer::editDrag(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::editDrag(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::editDrag(" << e->x() << ")" << endl;
 #endif
 
     if (!m_model || !m_editing) return;
@@ -615,7 +615,7 @@
 TimeInstantLayer::editEnd(View *, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_INSTANT_LAYER
-    DEBUG << "TimeInstantLayer::editEnd(" << e->x() << ")" << endl;
+    SVDEBUG << "TimeInstantLayer::editEnd(" << e->x() << ")" << endl;
 #endif
     if (!m_model || !m_editing) return;
     if (m_editingCommand) {
--- a/layer/TimeRulerLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/TimeRulerLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -72,7 +72,7 @@
     resolution = RealTime::realTime2Frame(rtick, rate);
     int right = left + resolution;
 
-//    DEBUG << "TimeRulerLayer::snapToFeatureFrame: type "
+//    SVDEBUG << "TimeRulerLayer::snapToFeatureFrame: type "
 //              << int(snap) << ", frame " << frame << " (time "
 //              << rt << ", tick " << rtick << ", rounded " << rdrt << ") ";
 
@@ -135,7 +135,7 @@
     }
     }
 
-//    DEBUG << " -> " << frame << " (resolution = " << resolution << ")" << endl;
+//    SVDEBUG << " -> " << frame << " (resolution = " << resolution << ")" << endl;
 
     return true;
 }
@@ -195,7 +195,7 @@
 TimeRulerLayer::paint(View *v, QPainter &paint, QRect rect) const
 {
 #ifdef DEBUG_TIME_RULER_LAYER
-    DEBUG << "TimeRulerLayer::paint (" << rect.x() << "," << rect.y()
+    SVDEBUG << "TimeRulerLayer::paint (" << rect.x() << "," << rect.y()
 	      << ") [" << rect.width() << "x" << rect.height() << "]" << endl;
 #endif
     
@@ -252,7 +252,7 @@
         int x = v->getXForFrame(frame);
 
 #ifdef DEBUG_TIME_RULER_LAYER
-        DEBUG << "Considering frame = " << frame << ", x = " << x << endl;
+        SVDEBUG << "Considering frame = " << frame << ", x = " << x << endl;
 #endif
 
         if (x >= rect.x() + rect.width() + 50) {
--- a/layer/TimeValueLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/TimeValueLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -81,7 +81,7 @@
     }
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::setModel(" << model << ")" << endl;
+    SVDEBUG << "TimeValueLayer::setModel(" << model << ")" << endl;
 #endif
 
     emit modelReplaced();
@@ -348,7 +348,7 @@
     }
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::getDisplayExtents: min = " << min << ", max = " << max << endl;
+    SVDEBUG << "TimeValueLayer::getDisplayExtents: min = " << min << ", max = " << max << endl;
 #endif
 
     return true;
@@ -371,7 +371,7 @@
     m_scaleMaximum = max;
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::setDisplayExtents: min = " << min << ", max = " << max << endl;
+    SVDEBUG << "TimeValueLayer::setDisplayExtents: min = " << min << ", max = " << max << endl;
 #endif
     
     emit layerParametersChanged();
@@ -403,7 +403,7 @@
     int nr = mapper->getPositionForValue(dmax - dmin);
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::getCurrentVerticalZoomStep: dmin = " << dmin << ", dmax = " << dmax << ", nr = " << nr << endl;
+    SVDEBUG << "TimeValueLayer::getCurrentVerticalZoomStep: dmin = " << dmin << ", dmax = " << dmax << ", nr = " << nr << endl;
 #endif
 
     delete mapper;
@@ -458,7 +458,7 @@
     }
     
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
+    SVDEBUG << "TimeValueLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
 #endif
 
     setDisplayExtents(newmin, newmax);
@@ -826,7 +826,7 @@
     }
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::getColourForValue: min " << min << ", max "
+    SVDEBUG << "TimeValueLayer::getColourForValue: min " << min << ", max "
               << max << ", log " << log << ", value " << val << endl;
 #endif
 
@@ -870,7 +870,7 @@
     paint.setBrush(brushColour);
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::paint: resolution is "
+    SVDEBUG << "TimeValueLayer::paint: resolution is "
 	      << m_model->getResolution() << " frames" << endl;
 #endif
 
@@ -1067,7 +1067,7 @@
 	if (m_plotStyle == PlotSegmentation) {
 
 #ifdef DEBUG_TIME_VALUE_LAYER
-            DEBUG << "drawing rect" << endl;
+            SVDEBUG << "drawing rect" << endl;
 #endif
 	    
 	    if (nx <= x) continue;
@@ -1251,7 +1251,7 @@
 TimeValueLayer::drawStart(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
+    SVDEBUG << "TimeValueLayer::drawStart(" << e->x() << "," << e->y() << ")" << endl;
 #endif
 
     if (!m_model) return;
@@ -1271,7 +1271,7 @@
              i != points.end(); ++i) {
             if (((i->frame / resolution) * resolution) != frame) {
 #ifdef DEBUG_TIME_VALUE_LAYER
-                DEBUG << "ignoring out-of-range frame at " << i->frame << endl;
+                SVDEBUG << "ignoring out-of-range frame at " << i->frame << endl;
 #endif
                 continue;
             }
@@ -1301,7 +1301,7 @@
 TimeValueLayer::drawDrag(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
+    SVDEBUG << "TimeValueLayer::drawDrag(" << e->x() << "," << e->y() << ")" << endl;
 #endif
 
     if (!m_model || !m_editing) return;
@@ -1327,18 +1327,18 @@
             if (i->frame == m_editingPoint.frame &&
                 i->value == m_editingPoint.value) {
 #ifdef DEBUG_TIME_VALUE_LAYER
-                DEBUG << "ignoring current editing point at " << i->frame << ", " << i->value << endl;
+                SVDEBUG << "ignoring current editing point at " << i->frame << ", " << i->value << endl;
 #endif
                 continue;
             }
             if (((i->frame / resolution) * resolution) != frame) {
 #ifdef DEBUG_TIME_VALUE_LAYER
-                DEBUG << "ignoring out-of-range frame at " << i->frame << endl;
+                SVDEBUG << "ignoring out-of-range frame at " << i->frame << endl;
 #endif
                 continue;
             }
 #ifdef DEBUG_TIME_VALUE_LAYER
-            DEBUG << "adjusting to new point at " << i->frame << ", " << i->value << endl;
+            SVDEBUG << "adjusting to new point at " << i->frame << ", " << i->value << endl;
 #endif
             m_editingPoint = *i;
             m_originalPoint = m_editingPoint;
@@ -1363,7 +1363,7 @@
 TimeValueLayer::drawEnd(View *, QMouseEvent *)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::drawEnd" << endl;
+    SVDEBUG << "TimeValueLayer::drawEnd" << endl;
 #endif
     if (!m_model || !m_editing) return;
     finish(m_editingCommand);
@@ -1420,7 +1420,7 @@
 TimeValueLayer::editStart(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
+    SVDEBUG << "TimeValueLayer::editStart(" << e->x() << "," << e->y() << ")" << endl;
 #endif
 
     if (!m_model) return;
@@ -1443,7 +1443,7 @@
 TimeValueLayer::editDrag(View *v, QMouseEvent *e)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::editDrag(" << e->x() << "," << e->y() << ")" << endl;
+    SVDEBUG << "TimeValueLayer::editDrag(" << e->x() << "," << e->y() << ")" << endl;
 #endif
 
     if (!m_model || !m_editing) return;
@@ -1469,7 +1469,7 @@
 TimeValueLayer::editEnd(View *, QMouseEvent *)
 {
 #ifdef DEBUG_TIME_VALUE_LAYER
-    DEBUG << "TimeValueLayer::editEnd" << endl;
+    SVDEBUG << "TimeValueLayer::editEnd" << endl;
 #endif
     if (!m_model || !m_editing) return;
 
@@ -1809,9 +1809,9 @@
             newPoint.value = i->getValue();
         } else {
 #ifdef DEBUG_TIME_VALUE_LAYER
-            DEBUG << "Setting value on point at " << newPoint.frame << " from labeller";
+            SVDEBUG << "Setting value on point at " << newPoint.frame << " from labeller";
             if (i == points.begin()) {
-                DEBUG << ", no prev point" << endl;
+                SVDEBUG << ", no prev point" << endl;
             } else {
                 std::cerr << ", prev point is at " << prevPoint.frame << std::endl;
             }
--- a/layer/WaveformLayer.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/layer/WaveformLayer.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -288,7 +288,7 @@
 void
 WaveformLayer::setChannel(int channel)
 {
-//    DEBUG << "WaveformLayer::setChannel(" << channel << ")" << endl;
+//    SVDEBUG << "WaveformLayer::setChannel(" << channel << ")" << endl;
 
     if (m_channel == channel) return;
     m_channel = channel;
@@ -382,7 +382,7 @@
     merging = (m_channelMode == MergeChannels && rawChannels > 1);
     mixing = (m_channelMode == MixChannels && rawChannels > 1);
 
-//    DEBUG << "WaveformLayer::getChannelArrangement: min " << min << ", max " << max << ", merging " << merging << ", channels " << channels << endl;
+//    SVDEBUG << "WaveformLayer::getChannelArrangement: min " << min << ", max " << max << ", merging " << merging << ", channels " << channels << endl;
 
     return channels;
 }    
@@ -474,7 +474,7 @@
 
 #ifdef DEBUG_WAVEFORM_PAINT
     Profiler profiler("WaveformLayer::paint", true);
-    DEBUG << "WaveformLayer::paint (" << rect.x() << "," << rect.y()
+    SVDEBUG << "WaveformLayer::paint (" << rect.x() << "," << rect.y()
 	      << ") [" << rect.width() << "x" << rect.height() << "]: zoom " << zoomLevel << ", start " << startFrame << endl;
 #endif
 
@@ -494,7 +494,7 @@
     if (m_aggressive) {
 
 #ifdef DEBUG_WAVEFORM_PAINT
-        DEBUG << "WaveformLayer::paint: aggressive is true" << endl;
+        SVDEBUG << "WaveformLayer::paint: aggressive is true" << endl;
 #endif
 
 	if (m_cacheValid && (zoomLevel != m_cacheZoomLevel)) {
@@ -504,7 +504,7 @@
 	if (!m_cache || m_cache->width() != w || m_cache->height() != h) {
 #ifdef DEBUG_WAVEFORM_PAINT
             if (m_cache) {
-                DEBUG << "WaveformLayer::paint: cache size " << m_cache->width() << "x" << m_cache->height() << " differs from view size " << w << "x" << h << ": regenerating aggressive cache" << endl;
+                SVDEBUG << "WaveformLayer::paint: cache size " << m_cache->width() << "x" << m_cache->height() << " differs from view size " << w << "x" << h << ": regenerating aggressive cache" << endl;
             }
 #endif
 	    delete m_cache;
@@ -562,7 +562,7 @@
     getSourceFramesForX(v, x1, modelZoomLevel, spare, frame1);
     
 #ifdef DEBUG_WAVEFORM_PAINT
-    DEBUG << "Painting waveform from " << frame0 << " to " << frame1 << " (" << (x1-x0+1) << " pixels at zoom " << zoomLevel << " and model zoom " << modelZoomLevel << ")" <<  endl;
+    SVDEBUG << "Painting waveform from " << frame0 << " to " << frame1 << " (" << (x1-x0+1) << " pixels at zoom " << zoomLevel << " and model zoom " << modelZoomLevel << ")" <<  endl;
 #endif
 
     RangeSummarisableTimeValueModel::RangeBlock *ranges = 
@@ -703,11 +703,11 @@
             size_t i1 = (f1 - frame0) / modelZoomLevel;
 
 #ifdef DEBUG_WAVEFORM_PAINT
-            DEBUG << "WaveformLayer::paint: pixel " << x << ": i0 " << i0 << " (f " << f0 << "), i1 " << i1 << " (f " << f1 << ")" << endl;
+            SVDEBUG << "WaveformLayer::paint: pixel " << x << ": i0 " << i0 << " (f " << f0 << "), i1 " << i1 << " (f " << f1 << ")" << endl;
 #endif
 
             if (i1 > i0 + 1) {
-                DEBUG << "WaveformLayer::paint: ERROR: i1 " << i1 << " > i0 " << i0 << " plus one (zoom = " << zoomLevel << ", model zoom = " << modelZoomLevel << ")" << endl;
+                SVDEBUG << "WaveformLayer::paint: ERROR: i1 " << i1 << " > i0 " << i0 << " plus one (zoom = " << zoomLevel << ", model zoom = " << modelZoomLevel << ")" << endl;
             }
 
 	    if (ranges && i0 < ranges->size()) {
--- a/view/Overview.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/Overview.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -130,7 +130,7 @@
 {
     // Recalculate zoom in case the size of the widget has changed.
 
-//    DEBUG << "Overview::paintEvent: width is " << width() << ", centre frame " << m_centreFrame << endl;
+//    SVDEBUG << "Overview::paintEvent: width is " << width() << ", centre frame " << m_centreFrame << endl;
 
     size_t startFrame = getModelsStartFrame();
     size_t frameCount = getModelsEndFrame() - getModelsStartFrame();
@@ -148,10 +148,10 @@
 	centreFrame = (startFrame + getModelsEndFrame())/2;
     }
     if (centreFrame != m_centreFrame) {
-//        DEBUG << "Overview::paintEvent: Centre frame changed from "
+//        SVDEBUG << "Overview::paintEvent: Centre frame changed from "
 //                  << m_centreFrame << " to " << centreFrame << " and thus start frame from " << getStartFrame();
 	m_centreFrame = centreFrame;
-//        DEBUG << " to " << getStartFrame() << endl;
+//        SVDEBUG << " to " << getStartFrame() << endl;
 	emit centreFrameChanged(m_centreFrame, false, PlaybackIgnore);
     }
 
--- a/view/Pane.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/Pane.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -85,7 +85,7 @@
     updateHeadsUpDisplay();
 
 
-//    DEBUG << "Pane::Pane(" << this << ") returning" << endl;
+//    SVDEBUG << "Pane::Pane(" << this << ") returning" << endl;
 }
 
 void
@@ -624,7 +624,7 @@
 
 //	    Profiler profiler("Pane::paintEvent - painting vertical scale", true);
 
-//	    DEBUG << "Pane::paintEvent: calling paint.save() in vertical scale block" << endl;
+//	    SVDEBUG << "Pane::paintEvent: calling paint.save() in vertical scale block" << endl;
         paint.save();
             
         paint.setPen(getForeground());
@@ -827,7 +827,7 @@
 {
     QString title = model->getTitle();
     QString maker = model->getMaker();
-//DEBUG << "Pane::drawWorkTitle: title=\"" << title//<< "\", maker=\"" << maker << "\"" << endl;
+//SVDEBUG << "Pane::drawWorkTitle: title=\"" << title//<< "\", maker=\"" << maker << "\"" << endl;
     if (title == "") return;
 
     QString text = title;
@@ -1783,7 +1783,7 @@
         }
 
 #ifdef DEBUG_PANE	    
-        DEBUG << "Pane::dragTopLayer: newCentreFrame = " << newCentreFrame <<
+        SVDEBUG << "Pane::dragTopLayer: newCentreFrame = " << newCentreFrame <<
             ", models end frame = " << getModelsEndFrame() << endl;
 #endif
 
@@ -1849,7 +1849,7 @@
 
     int smallThreshold = 10, bigThreshold = 80;
 
-//    DEBUG << "Pane::updateDragMode: xdiff = " << xdiff << ", ydiff = "
+//    SVDEBUG << "Pane::updateDragMode: xdiff = " << xdiff << ", ydiff = "
 //              << ydiff << ", canMoveVertical = " << canMoveVertical << ", drag mode = " << m_dragMode << endl;
 
     if (dragMode == UnresolvedDrag) {
@@ -1857,18 +1857,18 @@
         if (abs(ydiff) > smallThreshold &&
             abs(ydiff) > abs(xdiff) * 2 &&
             canMoveVertical) {
-//            DEBUG << "Pane::updateDragMode: passed vertical threshold" << endl;
+//            SVDEBUG << "Pane::updateDragMode: passed vertical threshold" << endl;
             dragMode = VerticalDrag;
         } else if (abs(xdiff) > smallThreshold &&
                    abs(xdiff) > abs(ydiff) * 2 &&
                    canMoveHorizontal) {
-//            DEBUG << "Pane::updateDragMode: passed horizontal threshold" << endl;
+//            SVDEBUG << "Pane::updateDragMode: passed horizontal threshold" << endl;
             dragMode = HorizontalDrag;
         } else if (abs(xdiff) > smallThreshold &&
                    abs(ydiff) > smallThreshold &&
                    canMoveVertical &&
                    canMoveHorizontal) {
-//            DEBUG << "Pane::updateDragMode: passed both thresholds" << endl;
+//            SVDEBUG << "Pane::updateDragMode: passed both thresholds" << endl;
             dragMode = FreeDrag;
         }
     }
@@ -2277,7 +2277,7 @@
 
         if (e->provides("text/uri-list")) {
 
-            DEBUG << "accepting... data is \"" << e->encodedData("text/uri-list").data() << "\"" << endl;
+            SVDEBUG << "accepting... data is \"" << e->encodedData("text/uri-list").data() << "\"" << endl;
             emit dropAccepted(QString::fromLocal8Bit
                               (e->encodedData("text/uri-list").data())
                               .split(QRegExp("[\\r\\n]+"), 
@@ -2372,7 +2372,7 @@
 Pane::toolModeChanged()
 {
     ViewManager::ToolMode mode = m_manager->getToolMode();
-//    DEBUG << "Pane::toolModeChanged(" << mode << ")" << endl;
+//    SVDEBUG << "Pane::toolModeChanged(" << mode << ")" << endl;
 
     if (mode == ViewManager::MeasureMode && !m_measureCursor1) {
         m_measureCursor1 = new QCursor(QBitmap(":/icons/measure1cursor.xbm"),
--- a/view/PaneStack.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/PaneStack.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -495,7 +495,7 @@
     for (size_t i = 0; i < m_panes.size(); ++i) {
 	if (!m_panes[i].propertyStack) continue;
 #ifdef DEBUG_PANE_STACK
-	DEBUG << "PaneStack::sizePropertyStacks: " << i << ": min " 
+	SVDEBUG << "PaneStack::sizePropertyStacks: " << i << ": min " 
 		  << m_panes[i].propertyStack->minimumSizeHint().width() << ", hint "
                   << m_panes[i].propertyStack->sizeHint().width() << ", current "
 		  << m_panes[i].propertyStack->width() << endl;
@@ -507,7 +507,7 @@
     }
 
 #ifdef DEBUG_PANE_STACK
-    DEBUG << "PaneStack::sizePropertyStacks: max min width " << maxMinWidth << endl;
+    SVDEBUG << "PaneStack::sizePropertyStacks: max min width " << maxMinWidth << endl;
 #endif
 
     int setWidth = maxMinWidth;
--- a/view/View.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/View.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -64,12 +64,12 @@
     m_manager(0),
     m_propertyContainer(new ViewPropertyContainer(this))
 {
-    DEBUG << "View::View(" << this << ")" << endl;
+    SVDEBUG << "View::View(" << this << ")" << endl;
 }
 
 View::~View()
 {
-//    DEBUG << "View::~View(" << this << ")" << endl;
+//    SVDEBUG << "View::~View(" << this << ")" << endl;
 
     m_deleting = true;
     delete m_propertyContainer;
@@ -274,7 +274,7 @@
 void
 View::toolModeChanged()
 {
-//    DEBUG << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << endl;
+//    SVDEBUG << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << endl;
 }
 
 void
@@ -359,7 +359,7 @@
     long frame = m_centreFrame - (width()/2) * z;
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-    DEBUG << "View::getFrameForX(" << x << "): z = " << z << ", m_centreFrame = " << m_centreFrame << ", width() = " << width() << ", frame = " << frame << endl;
+    SVDEBUG << "View::getFrameForX(" << x << "): z = " << z << ", m_centreFrame = " << m_centreFrame << ", width() = " << width() << ", frame = " << frame << endl;
 #endif
 
     frame = (frame / z) * z; // this is start frame
@@ -688,13 +688,13 @@
 //    setCentreFrame(m_manager->getViewInitialCentreFrame());
 
     if (m_followPlay == PlaybackScrollPage) {
-//        DEBUG << "View::setViewManager: setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
+//        SVDEBUG << "View::setViewManager: setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
         setCentreFrame(m_manager->getGlobalCentreFrame(), false);
     } else if (m_followPlay == PlaybackScrollContinuous) {
-//        DEBUG << "View::setViewManager: setting centre frame to playback frame: " << m_manager->getPlaybackFrame() << endl;
+//        SVDEBUG << "View::setViewManager: setting centre frame to playback frame: " << m_manager->getPlaybackFrame() << endl;
         setCentreFrame(m_manager->getPlaybackFrame(), false);
     } else if (m_followPan) {
-//        DEBUG << "View::setViewManager: (follow pan) setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
+//        SVDEBUG << "View::setViewManager: (follow pan) setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
         setCentreFrame(m_manager->getGlobalCentreFrame(), false);
     }
 
@@ -897,7 +897,7 @@
     Layer *layer = dynamic_cast<Layer *>(sender());
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-    DEBUG << "View::layerParametersChanged()" << endl;
+    SVDEBUG << "View::layerParametersChanged()" << endl;
 #endif
 
     delete m_cache;
@@ -1271,10 +1271,10 @@
     bool metUnscrollable = false;
 
     for (LayerList::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i) {
-//        DEBUG << "View::getScrollableBackLayers: calling isLayerDormant on layer " << *i << endl;
+//        SVDEBUG << "View::getScrollableBackLayers: calling isLayerDormant on layer " << *i << endl;
 //        std::cerr << "(name is " << (*i)->objectName() << ")"
 //                  << std::endl;
-//        DEBUG << "View::getScrollableBackLayers: I am " << this << endl;
+//        SVDEBUG << "View::getScrollableBackLayers: I am " << this << endl;
 	if ((*i)->isLayerDormant(this)) continue;
 	if ((*i)->isLayerOpaque()) {
 	    // You can't see anything behind an opaque layer!
@@ -1459,7 +1459,7 @@
                     (wfm = dynamic_cast<RangeSummarisableTimeValueModel *>
                      (model->getSourceModel()))) {
                     completion = wfm->getAlignmentCompletion();
-//                    DEBUG << "View::checkProgress: Alignment completion = " << completion << endl;
+//                    SVDEBUG << "View::checkProgress: Alignment completion = " << completion << endl;
                     if (completion < 100) {
                         text = tr("Alignment");
                     }
@@ -1544,7 +1544,7 @@
 View::paintEvent(QPaintEvent *e)
 {
 //    Profiler prof("View::paintEvent", false);
-//    DEBUG << "View::paintEvent: centre frame is " << m_centreFrame << endl;
+//    SVDEBUG << "View::paintEvent: centre frame is " << m_centreFrame << endl;
 
     if (m_layers.empty()) {
 	QFrame::paintEvent(e);
@@ -1876,7 +1876,7 @@
 	if (p1 < 0 || p0 > width()) continue;
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-	DEBUG << "View::drawSelections: " << p0 << ",-1 [" << (p1-p0) << "x" << (height()+1) << "]" << endl;
+	SVDEBUG << "View::drawSelections: " << p0 << ",-1 [" << (p1-p0) << "x" << (height()+1) << "]" << endl;
 #endif
 
 	bool illuminateThis =
@@ -1978,7 +1978,7 @@
 View::drawMeasurementRect(QPainter &paint, const Layer *topLayer, QRect r,
                           bool focus) const
 {
-//    DEBUG << "View::drawMeasurementRect(" << r.x() << "," << r.y() << " "
+//    SVDEBUG << "View::drawMeasurementRect(" << r.x() << "," << r.y() << " "
 //              << r.width() << "x" << r.height() << ")" << endl;
 
     if (r.x() + r.width() < 0 || r.x() >= width()) return;
--- a/view/ViewManager.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/ViewManager.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -499,7 +499,7 @@
     View *v = dynamic_cast<View *>(sender());
 
 #ifdef DEBUG_VIEW_MANAGER
-    DEBUG << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << endl;
+    SVDEBUG << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << endl;
 #endif
 
     if (locked) {
@@ -556,7 +556,7 @@
     View *v = dynamic_cast<View *>(sender());
 
     if (!v) {
-        DEBUG << "ViewManager::viewZoomLevelChanged: WARNING: sender is not a view" << endl;
+        SVDEBUG << "ViewManager::viewZoomLevelChanged: WARNING: sender is not a view" << endl;
         return;
     }
 
--- a/widgets/ActivityLog.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/ActivityLog.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -53,7 +53,7 @@
 ActivityLog::activityHappened(QString name)
 {
     name = name.replace("&", "");
-//    DEBUG << "ActivityLog::activityHappened(" << name << ")" << endl;
+//    SVDEBUG << "ActivityLog::activityHappened(" << name << ")" << endl;
     if (name == m_prevName) {
 //        std::cerr << "(ignoring duplicate)" << std::endl;
         return;
--- a/widgets/AudioDial.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/AudioDial.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -365,7 +365,7 @@
         bool changed = (m_mappedValue != mappedValue);
         m_mappedValue = mappedValue;
         m_noMappedUpdate = true;
-        DEBUG << "AudioDial::setMappedValue(" << mappedValue << "): new position is " << newPosition << endl;
+        SVDEBUG << "AudioDial::setMappedValue(" << mappedValue << "): new position is " << newPosition << endl;
         if (newPosition != value()) {
             setValue(newPosition);
         } else if (changed) {
@@ -390,7 +390,7 @@
 float AudioDial::mappedValue() const
 {
     if (m_rangeMapper) {
-//        DEBUG << "AudioDial::mappedValue(): value = " << value() << ", mappedValue = " << m_mappedValue << endl;
+//        SVDEBUG << "AudioDial::mappedValue(): value = " << value() << ", mappedValue = " << m_mappedValue << endl;
         return m_mappedValue;
     }
     return value();
--- a/widgets/CommandHistory.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/CommandHistory.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -101,7 +101,7 @@
 CommandHistory::clear()
 {
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::clear()" << endl;
+    SVDEBUG << "CommandHistory::clear()" << endl;
 #endif
     closeBundle();
     m_savedAt = -1;
@@ -143,7 +143,7 @@
     if (!command) return;
 
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " of type " << typeid(*command).name() << " at " << command << ": execute = " << execute << ", bundle = " << bundle << " (m_currentCompound = " << m_currentCompound << ", m_currentBundle = " << m_currentBundle << ")" << endl;
+    SVDEBUG << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " of type " << typeid(*command).name() << " at " << command << ": execute = " << execute << ", bundle = " << bundle << " (m_currentCompound = " << m_currentCompound << ", m_currentBundle = " << m_currentBundle << ")" << endl;
 #endif
 
     if (m_currentCompound) {
@@ -160,7 +160,7 @@
 
 #ifdef DEBUG_COMMAND_HISTORY
     if (!m_redoStack.empty()) {
-        DEBUG << "CommandHistory::clearing redo stack" << endl;
+        SVDEBUG << "CommandHistory::clearing redo stack" << endl;
     }
 #endif
 
@@ -192,7 +192,7 @@
     if (m_currentBundle) {
 	if (!command || (command->getName() != m_currentBundleName)) {
 #ifdef DEBUG_COMMAND_HISTORY
-            DEBUG << "CommandHistory::addToBundle: "
+            SVDEBUG << "CommandHistory::addToBundle: "
                       << command->getName()                      << ": closing current bundle" << endl;
 #endif
 	    closeBundle();
@@ -204,7 +204,7 @@
     if (!m_currentBundle) {
 
 #ifdef DEBUG_COMMAND_HISTORY
-        DEBUG << "CommandHistory::addToBundle: "
+        SVDEBUG << "CommandHistory::addToBundle: "
                   << command->getName()                  << ": creating new bundle" << endl;
 #endif
 
@@ -219,7 +219,7 @@
     }
 
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::addToBundle: "
+    SVDEBUG << "CommandHistory::addToBundle: "
               << command->getName()              << ": adding to bundle" << endl;
 #endif
 
@@ -243,7 +243,7 @@
 CommandHistory::closeBundle()
 {
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::closeBundle" << endl;
+    SVDEBUG << "CommandHistory::closeBundle" << endl;
 #endif
 
     if (m_currentBundle) emit activity(m_currentBundle->getName());
@@ -255,7 +255,7 @@
 CommandHistory::bundleTimerTimeout()
 {
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::bundleTimerTimeout: bundle is " << m_currentBundle << endl;
+    SVDEBUG << "CommandHistory::bundleTimerTimeout: bundle is " << m_currentBundle << endl;
 #endif
 
     closeBundle();
@@ -265,10 +265,10 @@
 CommandHistory::addToCompound(Command *command, bool execute)
 {
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::addToCompound: " << command->getName().toLocal8Bit().data() << endl;
+    SVDEBUG << "CommandHistory::addToCompound: " << command->getName().toLocal8Bit().data() << endl;
 #endif
     if (!m_currentCompound) {
-	DEBUG << "CommandHistory::addToCompound: ERROR: no compound operation in progress!" << endl;
+	SVDEBUG << "CommandHistory::addToCompound: ERROR: no compound operation in progress!" << endl;
         return;
     }
 
@@ -280,7 +280,7 @@
 CommandHistory::startCompoundOperation(QString name, bool execute)
 {
     if (m_currentCompound) {
-	DEBUG << "CommandHistory::startCompoundOperation: ERROR: compound operation already in progress!" << endl;
+	SVDEBUG << "CommandHistory::startCompoundOperation: ERROR: compound operation already in progress!" << endl;
 	std::cerr << "(name is " << m_currentCompound->getName().toLocal8Bit().data() << ")" << std::endl;
         return;
     }
@@ -295,7 +295,7 @@
 CommandHistory::endCompoundOperation()
 {
     if (!m_currentCompound) {
-	DEBUG << "CommandHistory::endCompoundOperation: ERROR: no compound operation in progress!" << endl;
+	SVDEBUG << "CommandHistory::endCompoundOperation: ERROR: no compound operation in progress!" << endl;
         return;
     }
 
@@ -329,7 +329,7 @@
     if (m_undoStack.empty()) return;
 
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::undo()" << endl;
+    SVDEBUG << "CommandHistory::undo()" << endl;
 #endif
 
     closeBundle();
@@ -355,7 +355,7 @@
     if (m_redoStack.empty()) return;
 
 #ifdef DEBUG_COMMAND_HISTORY
-    DEBUG << "CommandHistory::redo()" << endl;
+    SVDEBUG << "CommandHistory::redo()" << endl;
 #endif
 
     closeBundle();
@@ -436,7 +436,7 @@
 	for (i = 0; i < limit; ++i) {
 #ifdef DEBUG_COMMAND_HISTORY
 	    Command *command = stack.top();
-	    DEBUG << "CommandHistory::clipStack: Saving recent command: " << command->getName().toLocal8Bit().data() << " at " << command << endl;
+	    SVDEBUG << "CommandHistory::clipStack: Saving recent command: " << command->getName().toLocal8Bit().data() << " at " << command << endl;
 #endif
 	    tempStack.push(stack.top());
 	    stack.pop();
@@ -458,7 +458,7 @@
 	Command *command = stack.top();
 	// Not safe to call getName() on a command about to be deleted
 #ifdef DEBUG_COMMAND_HISTORY
-	DEBUG << "CommandHistory::clearStack: About to delete command " << command << endl;
+	SVDEBUG << "CommandHistory::clearStack: About to delete command " << command << endl;
 #endif
 	delete command;
 	stack.pop();
--- a/widgets/InteractiveFileFinder.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/InteractiveFileFinder.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -35,7 +35,7 @@
 InteractiveFileFinder::InteractiveFileFinder() :
     m_lastLocatedLocation("")
 {
-    DEBUG << "Registering interactive file finder" << endl;
+    SVDEBUG << "Registering interactive file finder" << endl;
     FileFinder::registerFileFinder(this);
 }
 
@@ -383,7 +383,7 @@
 {
     if (FileSource::canHandleScheme(location)) {
         if (FileSource(location).isAvailable()) {
-            DEBUG << "InteractiveFileFinder::find: ok, it's available... returning" << endl;
+            SVDEBUG << "InteractiveFileFinder::find: ok, it's available... returning" << endl;
             return location;
         }
     }
@@ -408,7 +408,7 @@
 {
     if (relativeTo == "") return "";
 
-    DEBUG << "Looking for \"" << location << "\" next to \""
+    SVDEBUG << "Looking for \"" << location << "\" next to \""
               << relativeTo << "\"..." << endl;
 
     QString fileName;
--- a/widgets/LEDButton.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/LEDButton.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -99,7 +99,7 @@
     if (e->buttons() & Qt::LeftButton) {
 	toggle();
 	bool newState = state();
-	DEBUG << "emitting new state " << newState << endl;
+	SVDEBUG << "emitting new state " << newState << endl;
 	emit stateChanged(newState);
     }
 }
--- a/widgets/LayerTree.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/LayerTree.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -111,7 +111,7 @@
         m_models.erase(*i);
     }
 
-    DEBUG << "ModelMetadataModel::rebuildModelSet: " << m_models.size() << " models" << endl;
+    SVDEBUG << "ModelMetadataModel::rebuildModelSet: " << m_models.size() << " models" << endl;
 }
 
 void
@@ -371,7 +371,7 @@
     PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
     if (!params) return;
 
-    DEBUG << "LayerTreeModel::playParametersAudibilityChanged("
+    SVDEBUG << "LayerTreeModel::playParametersAudibilityChanged("
               << params << "," << a << ")" << endl;
 
     for (int i = 0; i < m_stack->getPaneCount(); ++i) {
@@ -381,7 +381,7 @@
             Layer *layer = pane->getLayer(j);
             if (!layer) continue;
             if (layer->getPlayParameters() == params) {
-                DEBUG << "LayerTreeModel::playParametersAudibilityChanged("
+                SVDEBUG << "LayerTreeModel::playParametersAudibilityChanged("
                           << params << "," << a << "): row " << pane->getLayerCount() - j - 1 << ", col " << 2 << endl;
 
                 emit dataChanged(createIndex(pane->getLayerCount() - j - 1,
--- a/widgets/ModelDataTableDialog.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/ModelDataTableDialog.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -243,21 +243,21 @@
 void
 ModelDataTableDialog::viewClicked(const QModelIndex &index)
 {
-//    DEBUG << "ModelDataTableDialog::viewClicked: " << index.row() << ", " << index.column() << endl;
+//    SVDEBUG << "ModelDataTableDialog::viewClicked: " << index.row() << ", " << index.column() << endl;
     emit scrollToFrame(m_table->getFrameForModelIndex(index));
 }
 
 void
 ModelDataTableDialog::viewPressed(const QModelIndex &index)
 {
-//    DEBUG << "ModelDataTableDialog::viewPressed: " << index.row() << ", " << index.column() << endl;
+//    SVDEBUG << "ModelDataTableDialog::viewPressed: " << index.row() << ", " << index.column() << endl;
 }
 
 void
 ModelDataTableDialog::currentChanged(const QModelIndex &current,
                                      const QModelIndex &previous)
 {
-//    DEBUG << "ModelDataTableDialog::currentChanged: from "
+//    SVDEBUG << "ModelDataTableDialog::currentChanged: from "
 //              << previous.row() << ", " << previous.column()
 //              << " to " << current.row() << ", " << current.column() 
 //              << endl;
@@ -301,7 +301,7 @@
 void
 ModelDataTableDialog::currentChangedThroughResort(const QModelIndex &index)
 {
-//    DEBUG << "ModelDataTableDialog::currentChangedThroughResort: row = " << index.row() << endl;
+//    SVDEBUG << "ModelDataTableDialog::currentChangedThroughResort: row = " << index.row() << endl;
 //  m_tableView->scrollTo(index);
     makeCurrent(index.row());
 }
--- a/widgets/Panner.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/Panner.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -210,7 +210,7 @@
 void
 Panner::setRectExtents(float x0, float y0, float width, float height)
 {
-//    DEBUG << "Panner::setRectExtents(" << x0 << ", " << y0 << ", "
+//    SVDEBUG << "Panner::setRectExtents(" << x0 << ", " << y0 << ", "
 //              << width << ", " << height << ")" << endl;
 
     if (m_rectX == x0 &&
--- a/widgets/PluginParameterBox.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/PluginParameterBox.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -258,7 +258,7 @@
         newValue = min + ival * qtz;
     }
 
-//    DEBUG << "PluginParameterBox::dialChanged: newValue = " << newValue << endl;
+//    SVDEBUG << "PluginParameterBox::dialChanged: newValue = " << newValue << endl;
 
     QDoubleSpinBox *spin = m_params[identifier].spin;
     if (spin) {
@@ -267,7 +267,7 @@
         spin->blockSignals(false);
     }
 
-//    DEBUG << "setting plugin parameter \"" << identifier << "\" to value " << newValue << endl;
+//    SVDEBUG << "setting plugin parameter \"" << identifier << "\" to value " << newValue << endl;
 
     m_plugin->setParameter(identifier.toStdString(), newValue);
 
@@ -352,7 +352,7 @@
         dial->blockSignals(false);
     }
 
-    DEBUG << "setting plugin parameter \"" << identifier << "\" to value " << value << endl;
+    SVDEBUG << "setting plugin parameter \"" << identifier << "\" to value " << value << endl;
 
     m_plugin->setParameter(identifier.toStdString(), value);
 
--- a/widgets/PropertyBox.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/PropertyBox.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -148,7 +148,7 @@
     layout->setMargin(layout->margin() / 2);
 
 #ifdef DEBUG_PROPERTY_BOX
-    DEBUG << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName() << ") params " << params << endl;
+    SVDEBUG << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName() << ") params " << params << endl;
 #endif
 
     if (layer) {
@@ -530,7 +530,7 @@
     if (pc != m_container) return;
     
 #ifdef DEBUG_PROPERTY_BOX
-    DEBUG << "PropertyBox::propertyContainerPropertyChanged" << endl;
+    SVDEBUG << "PropertyBox::propertyContainerPropertyChanged" << endl;
 #endif
 
     PropertyContainer::PropertyList properties = m_container->getProperties();
@@ -608,7 +608,7 @@
     QString name = obj->objectName();
 
 #ifdef DEBUG_PROPERTY_BOX
-    DEBUG << "PropertyBox::propertyControllerChanged(" << name	      << ", " << value << ")" << endl;
+    SVDEBUG << "PropertyBox::propertyControllerChanged(" << name	      << ", " << value << ")" << endl;
 #endif
     
     PropertyContainer::PropertyType type = m_container->getPropertyType(name);
--- a/widgets/PropertyStack.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/PropertyStack.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -80,7 +80,7 @@
     blockSignals(true);
 
 #ifdef DEBUG_PROPERTY_STACK
-    DEBUG << "PropertyStack::repopulate" << endl;
+    SVDEBUG << "PropertyStack::repopulate" << endl;
 #endif
     
     while (count() > 0) {
--- a/widgets/SubdividingMenu.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/SubdividingMenu.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -67,7 +67,7 @@
          j != entries.end();
          ++j) {
 
-//        DEBUG << "SubdividingMenu::setEntries: j -> " << j->toStdString() << endl;
+//        SVDEBUG << "SubdividingMenu::setEntries: j -> " << j->toStdString() << endl;
 
         m_nameToChunkMenuMap[*j] = chunkMenu;
 
@@ -176,12 +176,12 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         QMenu::addAction(action);
         return;
     }
 
-//    DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     m_nameToChunkMenuMap[name]->addAction(action);
 }
 
@@ -195,11 +195,11 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         return QMenu::addAction(name);
     }
 
-//    DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     return m_nameToChunkMenuMap[name]->addAction(name);
 }
 
@@ -212,12 +212,12 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         QMenu::addAction(action);
         return;
     }
 
-//    DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     m_nameToChunkMenuMap[name]->addAction(action);
 }
 
@@ -232,12 +232,12 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         QMenu::addMenu(menu);
         return;
     }
 
-//    DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     m_nameToChunkMenuMap[name]->addMenu(menu);
 }
 
@@ -252,11 +252,11 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         return QMenu::addMenu(name);
     }
 
-//    DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     return m_nameToChunkMenuMap[name]->addMenu(name);
 }
 
@@ -269,12 +269,12 @@
     }
 
     if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
-//        DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
+//        SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
         QMenu::addMenu(menu);
         return;
     }
 
-//    DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
+//    SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
     m_nameToChunkMenuMap[name]->addMenu(menu);
 }
 
--- a/widgets/TextAbbrev.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/TextAbbrev.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -261,7 +261,7 @@
         }
     }
 
-//    DEBUG << "TextAbbrev::getPrefixLength: prefix length is " << candidate << endl;
+//    SVDEBUG << "TextAbbrev::getPrefixLength: prefix length is " << candidate << endl;
 //    for (int i = 0; i < texts.size(); ++i) {
 //        std::cerr << texts[i].left(candidate) << "|" << texts[i].right(texts[i].length() - candidate) << std::endl;
 //    }
--- a/widgets/Thumbwheel.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/Thumbwheel.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -142,7 +142,7 @@
         bool changed = (m_mappedValue != mappedValue);
         m_mappedValue = mappedValue;
         m_noMappedUpdate = true;
-//        DEBUG << "Thumbwheel::setMappedValue(" << mappedValue << "): new value is " << newValue << " (visible " << isVisible() << ")" << endl;
+//        SVDEBUG << "Thumbwheel::setMappedValue(" << mappedValue << "): new value is " << newValue << " (visible " << isVisible() << ")" << endl;
         if (newValue != getValue()) {
             setValue(newValue);
             changed = true;
@@ -169,7 +169,7 @@
 void
 Thumbwheel::setValue(int value)
 {
-//    DEBUG << "Thumbwheel::setValue(" << value << ") (from " << m_value
+//    SVDEBUG << "Thumbwheel::setValue(" << value << ") (from " << m_value
 //              << ", rotation " << m_rotation << ")" << " (visible " << isVisible() << ")" << endl;
 
     if (m_value != value) {
@@ -206,7 +206,7 @@
 Thumbwheel::getMappedValue() const
 {
     if (m_rangeMapper) {
-//        DEBUG << "Thumbwheel::getMappedValue(): value = " << getValue() << ", mappedValue = " << m_mappedValue << endl;
+//        SVDEBUG << "Thumbwheel::getMappedValue(): value = " << getValue() << ", mappedValue = " << m_mappedValue << endl;
         return m_mappedValue;
     }
     return getValue();
--- a/widgets/TipDialog.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/widgets/TipDialog.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -114,7 +114,7 @@
 void
 TipDialog::readTips()
 {
-    DEBUG << "TipDialog::readTips" << endl;
+    SVDEBUG << "TipDialog::readTips" << endl;
 
     QString language = QLocale::system().name();
     QString filename = QString(":i18n/tips_%1.xml").arg(language);
@@ -134,7 +134,7 @@
 
     QFile file(filename);
 
-    DEBUG << "TipDialog::readTips from " << filename << endl;
+    SVDEBUG << "TipDialog::readTips from " << filename << endl;
 
     QXmlInputSource source(&file);
     
@@ -188,11 +188,11 @@
 {
     QString name = qName.toLower();
 
-    DEBUG << "TipFileParser::startElement(" << name << ")" << endl;
+    SVDEBUG << "TipFileParser::startElement(" << name << ")" << endl;
 
     if (name == "tips") {
         QString caption = attributes.value("caption");
-        DEBUG << "TipFileParser::caption = " << caption << endl;
+        SVDEBUG << "TipFileParser::caption = " << caption << endl;
         if (caption != "") m_dialog->m_caption = caption;
     } else if (name == "tip") {
         if (m_inTip) {
@@ -224,7 +224,7 @@
         m_dialog->m_tips[m_dialog->m_tips.size()-1] += ">";
     }
     
-    DEBUG << "TipFileParser::startElement done" << endl;
+    SVDEBUG << "TipFileParser::startElement done" << endl;
     return true;
 }
 
@@ -263,7 +263,7 @@
 bool
 TipDialog::TipFileParser::characters(const QString &text)
 {
-    DEBUG << "TipFileParser::characters(" << text << ")" << endl;
+    SVDEBUG << "TipFileParser::characters(" << text << ")" << endl;
 
     if (m_inText || m_inHtml) {
         m_dialog->m_tips[m_dialog->m_tips.size()-1] += text;