changeset 433:ae68fc09bf16 debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:56 +0100
parents e1bde903c65c
children 9de86c1b980e 2710db2cc2da
files main/MainWindow.cpp main/OSCHandler.cpp main/PreferencesDialog.cpp main/main.cpp
diffstat 4 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Thu May 12 17:32:07 2011 +0100
+++ b/main/MainWindow.cpp	Mon May 16 17:19:56 2011 +0100
@@ -310,12 +310,12 @@
 
 MainWindow::~MainWindow()
 {
-//    std::cerr << "MainWindow::~MainWindow" << std::endl;
+//    DEBUG << "MainWindow::~MainWindow" << endl;
     delete m_keyReference;
     delete m_preferencesDialog;
     delete m_layerTreeDialog;
     Profiles::getInstance()->dump();
-//    std::cerr << "MainWindow::~MainWindow finishing" << std::endl;
+//    DEBUG << "MainWindow::~MainWindow finishing" << endl;
 }
 
 void
@@ -1648,7 +1648,7 @@
 {
     if (!m_existingLayersMenu) return; // should have been created by setupMenus
 
-//    std::cerr << "MainWindow::setupExistingLayersMenu" << std::endl;
+//    DEBUG << "MainWindow::setupExistingLayersMenu" << endl;
 
     m_existingLayersMenu->clear();
     m_existingLayerActions.clear();
@@ -2815,7 +2815,7 @@
 void
 MainWindow::closeEvent(QCloseEvent *e)
 {
-//    std::cerr << "MainWindow::closeEvent" << std::endl;
+//    DEBUG << "MainWindow::closeEvent" << endl;
 
     if (m_openingAudioFile) {
 //        std::cerr << "Busy - ignoring close event" << std::endl;
@@ -2824,7 +2824,7 @@
     }
 
     if (!m_abandoning && !checkSaveModified()) {
-//        std::cerr << "Ignoring close event" << std::endl;
+//        DEBUG << "Ignoring close event" << endl;
 	e->ignore();
 	return;
     }
@@ -3032,13 +3032,13 @@
 void
 MainWindow::propertyStacksResized(int width)
 {
-//    std::cerr << "MainWindow::propertyStacksResized(" << width << ")" << std::endl;
+//    DEBUG << "MainWindow::propertyStacksResized(" << width << ")" << endl;
 
     if (!m_playControlsSpacer) return;
 
     int spacerWidth = width - m_playControlsWidth - 4;
     
-//    std::cerr << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << std::endl;
+//    DEBUG << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << endl;
 
     m_playControlsSpacer->setFixedSize(QSize(spacerWidth, 2));
 }
@@ -3091,7 +3091,7 @@
 		(LayerFactory::TimeRuler);
 	}
 
-//	std::cerr << "adding time ruler layer " << m_timeRulerLayer << std::endl;
+//	DEBUG << "adding time ruler layer " << m_timeRulerLayer << endl;
 
 	m_document->addLayerToView(pane, m_timeRulerLayer);
     }
@@ -3131,8 +3131,8 @@
     m_paneStack->setCurrentPane(pane);
     m_paneStack->setCurrentLayer(pane, newLayer);
 
-//    std::cerr << "MainWindow::addPane: global centre frame is "
-//              << m_viewManager->getGlobalCentreFrame() << std::endl;
+//    DEBUG << "MainWindow::addPane: global centre frame is "
+//              << m_viewManager->getGlobalCentreFrame() << endl;
 //    pane->setCentreFrame(m_viewManager->getGlobalCentreFrame());
 
     CommandHistory::getInstance()->endCompoundOperation();
@@ -3338,7 +3338,7 @@
 
     if (!input.getModel()) return;
 
-//    std::cerr << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << std::endl << "transform:" << std::endl << transform.toXmlString() << std::endl;
+//    DEBUG << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << endl << "transform:" << endl << transform.toXmlString() << endl;
 
     Layer *newLayer = m_document->createDerivedLayer(transform, input);
 
@@ -3882,7 +3882,7 @@
 void
 MainWindow::rightButtonMenuRequested(Pane *pane, QPoint position)
 {
-//    std::cerr << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << std::endl;
+//    DEBUG << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << endl;
     m_paneStack->setCurrentPane(pane);
     m_rightButtonMenu->popup(position);
 }
--- a/main/OSCHandler.cpp	Thu May 12 17:32:07 2011 +0100
+++ b/main/OSCHandler.cpp	Mon May 16 17:19:56 2011 +0100
@@ -35,8 +35,8 @@
 void
 MainWindow::handleOSCMessage(const OSCMessage &message)
 {
-    std::cerr << "MainWindow::handleOSCMessage: thread id = " 
-              << QThread::currentThreadId() << std::endl;
+    DEBUG << "MainWindow::handleOSCMessage: thread id = " 
+              << QThread::currentThreadId() << endl;
 
     // This large function should really be abstracted out.
 
@@ -88,7 +88,7 @@
             message.getArg(0).canConvert(QVariant::String)) {
             path = message.getArg(0).toString();
             if (QFileInfo(path).exists()) {
-                std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << std::endl;
+                DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << endl;
             } else {
                 saveSessionFile(path);
             }
@@ -102,7 +102,7 @@
                 message.getArg(0).canConvert(QVariant::String)) {
                 path = message.getArg(0).toString();
                 if (QFileInfo(path).exists()) {
-                    std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << std::endl;
+                    DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << endl;
                 } else {
                     WavFileWriter writer(path,
                                          getMainModel()->getSampleRate(),
--- a/main/PreferencesDialog.cpp	Thu May 12 17:32:07 2011 +0100
+++ b/main/PreferencesDialog.cpp	Mon May 16 17:19:56 2011 +0100
@@ -347,7 +347,7 @@
 
 PreferencesDialog::~PreferencesDialog()
 {
-    std::cerr << "PreferencesDialog::~PreferencesDialog()" << std::endl;
+    DEBUG << "PreferencesDialog::~PreferencesDialog()" << endl;
 }
 
 void
--- a/main/main.cpp	Thu May 12 17:32:07 2011 +0100
+++ b/main/main.cpp	Mon May 16 17:19:56 2011 +0100
@@ -297,7 +297,7 @@
 
     QTranslator qtTranslator;
     QString qtTrName = QString("qt_%1").arg(language);
-    std::cerr << "Loading " << qtTrName << "... ";
+    DEBUG << "Loading " << qtTrName << "... ";
     bool success = false;
     if (!(success = qtTranslator.load(qtTrName))) {
         QString qtDir = getenv("QTDIR");
@@ -307,7 +307,7 @@
         }
     }
     if (!success) {
-        std::cerr << "Failed\nFailed to load Qt translation for locale" << std::endl;
+        DEBUG << "Failed\nFailed to load Qt translation for locale" << endl;
     } else {
         std::cerr << "Done" << std::endl;
     }
@@ -315,9 +315,9 @@
 
     QTranslator svTranslator;
     QString svTrName = QString("sonic-visualiser_%1").arg(language);
-    std::cerr << "Loading " << svTrName << "... ";
+    DEBUG << "Loading " << svTrName << "... ";
     svTranslator.load(svTrName, ":i18n");
-    std::cerr << "Done" << std::endl;
+    DEBUG << "Done" << endl;
     application.installTranslator(&svTranslator);
 
     StoreStartupLocale();