changeset 432:e1bde903c65c debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:32:07 +0100
parents aa8117d79702
children ae68fc09bf16
files main/MainWindow.cpp main/OSCHandler.cpp main/main.cpp
diffstat 3 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Thu Apr 14 12:13:06 2011 +0100
+++ b/main/MainWindow.cpp	Thu May 12 17:32:07 2011 +0100
@@ -1459,7 +1459,7 @@
 	QString name = transforms[i].name;
 	if (name == "") name = transforms[i].identifier;
 
-//        std::cerr << "Plugin Name: " << name.toStdString() << std::endl;
+//        std::cerr << "Plugin Name: " << name << std::endl;
 
         TransformDescription::Type type = transforms[i].type;
         QString typeStr = factory->getTransformTypeName(type);
@@ -1495,8 +1495,8 @@
         if (categoryMenus[type].find(category) == categoryMenus[type].end()) {
             std::cerr << "WARNING: MainWindow::setupMenus: Internal error: "
                       << "No category menu for transform \""
-                      << name.toStdString() << "\" (category = \""
-                      << category.toStdString() << "\")" << std::endl;
+                      << name << "\" (category = \""
+                      << category << "\")" << std::endl;
         } else {
             categoryMenus[type][category]->addAction(action);
         }
@@ -1504,8 +1504,8 @@
         if (makerMenus[type].find(maker) == makerMenus[type].end()) {
             std::cerr << "WARNING: MainWindow::setupMenus: Internal error: "
                       << "No maker menu for transform \""
-                      << name.toStdString() << "\" (maker = \""
-                      << maker.toStdString() << "\")" << std::endl;
+                      << name << "\" (maker = \""
+                      << maker << "\")" << std::endl;
         } else {
             makerMenus[type][maker]->addAction(action);
         }
@@ -1516,7 +1516,7 @@
         connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool)));
         action->setStatusTip(transforms[i].longDescription);
 
-//        cerr << "Transform: \"" << name.toStdString() << "\": plugin name \"" << pluginName.toStdString() << "\"" << endl;
+//        cerr << "Transform: \"" << name << "\": plugin name \"" << pluginName << "\"" << endl;
 
         if (pluginNameMenus[type].find(pluginName) ==
             pluginNameMenus[type].end()) {
@@ -1679,7 +1679,7 @@
 	    }
 
 //	    std::cerr << "found new layer " << layer << " (name = " 
-//		      << layer->getLayerPresentationName().toStdString() << ")" << std::endl;
+//		      << layer->getLayerPresentationName() << ")" << std::endl;
 
 	    orderedLayers.push_back(layer);
 	    observedLayers.insert(layer);
@@ -2186,12 +2186,12 @@
             for (int j = 0; j < pane->getLayerCount(); ++j) {
                 Layer *layer = pane->getLayer(j);
                 if (!layer) continue;
-                cerr << "layer = " << layer->objectName().toStdString() << endl;
+                cerr << "layer = " << layer->objectName() << endl;
                 Model *m = layer->getModel();
                 RangeSummarisableTimeValueModel *wm = 
                     dynamic_cast<RangeSummarisableTimeValueModel *>(m);
                 if (wm) {
-                    cerr << "found: " << wm->objectName().toStdString() << endl;
+                    cerr << "found: " << wm->objectName() << endl;
                     otherModels.insert(wm);
                     if (pane == m_paneStack->getCurrentPane()) {
                         current = wm;
@@ -3059,7 +3059,7 @@
 
     if (i == m_paneActions.end()) {
 	std::cerr << "WARNING: MainWindow::addPane: unknown action "
-		  << action->objectName().toStdString() << std::endl;
+		  << action->objectName() << std::endl;
 	return;
     }
 
@@ -3196,7 +3196,7 @@
 	
 	if (i == m_layerActions.end()) {
 	    std::cerr << "WARNING: MainWindow::addLayer: unknown action "
-		      << action->objectName().toStdString() << std::endl;
+		      << action->objectName() << std::endl;
 	    return;
 	}
 
@@ -3338,7 +3338,7 @@
 
     if (!input.getModel()) return;
 
-//    std::cerr << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName().toStdString() << "\"" << std::endl << "transform:" << std::endl << transform.toXmlString().toStdString() << std::endl;
+//    std::cerr << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << std::endl << "transform:" << std::endl << transform.toXmlString() << std::endl;
 
     Layer *newLayer = m_document->createDerivedLayer(transform, input);
 
--- a/main/OSCHandler.cpp	Thu Apr 14 12:13:06 2011 +0100
+++ b/main/OSCHandler.cpp	Thu May 12 17:32:07 2011 +0100
@@ -47,7 +47,7 @@
             QString path = message.getArg(0).toString();
             if (open(path, ReplaceMainModel) != FileOpenSucceeded) {
                 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \""
-                          << path.toStdString() << "\"" << std::endl;
+                          << path << "\"" << std::endl;
             }
             //!!! we really need to spin here and not return until the
             // file has been completely decoded...
@@ -60,7 +60,7 @@
             QString path = message.getArg(0).toString();
             if (open(path, CreateAdditionalModel) != FileOpenSucceeded) {
                 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \""
-                          << path.toStdString() << "\"" << std::endl;
+                          << path << "\"" << std::endl;
             }
         }
 
@@ -77,7 +77,7 @@
         if (n >= 0 && n < int(recent.size())) {
             if (open(recent[n], ReplaceMainModel) != FileOpenSucceeded) {
                 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \""
-                          << recent[n].toStdString() << "\"" << std::endl;
+                          << recent[n] << "\"" << std::endl;
             }
         }
 
@@ -306,7 +306,7 @@
 
                 if (type == LayerFactory::UnknownLayer) {
                     std::cerr << "WARNING: MainWindow::handleOSCMessage: unknown layer "
-                              << "type " << str.toStdString() << std::endl;
+                              << "type " << str << std::endl;
                 } else {
 
                     LayerConfiguration configuration(type,
@@ -430,7 +430,7 @@
 
             } else {
                 
-                std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target.toStdString() << std::endl;
+                std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target << std::endl;
             }
         }
 
--- a/main/main.cpp	Thu Apr 14 12:13:06 2011 +0100
+++ b/main/main.cpp	Thu May 12 17:32:07 2011 +0100
@@ -245,7 +245,7 @@
 
     if (args.contains("--help") || args.contains("-h") || args.contains("-?")) {
         std::cerr << QApplication::tr(
-            "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n  %1 [--no-audio] [--no-osc] [<file> ...]\n\n  --no-audio: Do not attempt to open an audio output device\n  --no-osc: Do not provide an Open Sound Control port for remote control\n  <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]).toStdString() << std::endl;
+            "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n  %1 [--no-audio] [--no-osc] [<file> ...]\n\n  --no-audio: Do not attempt to open an audio output device\n  --no-osc: Do not provide an Open Sound Control port for remote control\n  <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << std::endl;
         exit(2);
     }
 
@@ -297,7 +297,7 @@
 
     QTranslator qtTranslator;
     QString qtTrName = QString("qt_%1").arg(language);
-    std::cerr << "Loading " << qtTrName.toStdString() << "... ";
+    std::cerr << "Loading " << qtTrName << "... ";
     bool success = false;
     if (!(success = qtTranslator.load(qtTrName))) {
         QString qtDir = getenv("QTDIR");
@@ -315,7 +315,7 @@
 
     QTranslator svTranslator;
     QString svTrName = QString("sonic-visualiser_%1").arg(language);
-    std::cerr << "Loading " << svTrName.toStdString() << "... ";
+    std::cerr << "Loading " << svTrName << "... ";
     svTranslator.load(svTrName, ":i18n");
     std::cerr << "Done" << std::endl;
     application.installTranslator(&svTranslator);
@@ -462,7 +462,7 @@
                 haveMainModel = true;
             }
         } else {
-            std::cerr << "WARNING: Ignoring additional session file argument \"" << path.toStdString() << "\"" << std::endl;
+            std::cerr << "WARNING: Ignoring additional session file argument \"" << path << "\"" << std::endl;
             status = MainWindow::FileOpenSucceeded;
         }
     }