diff widgets/InteractiveFileFinder.cpp @ 586:1ae54a29e59e

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:48:29 +0100
parents f4960f8ce798
children 4806715f7a19
line wrap: on
line diff
--- a/widgets/InteractiveFileFinder.cpp	Thu Apr 14 15:21:21 2011 +0100
+++ b/widgets/InteractiveFileFinder.cpp	Tue Jun 14 14:48:29 2011 +0100
@@ -35,7 +35,7 @@
 InteractiveFileFinder::InteractiveFileFinder() :
     m_lastLocatedLocation("")
 {
-    std::cerr << "Registering interactive file finder" << std::endl;
+    DEBUG << "Registering interactive file finder" << endl;
     FileFinder::registerFileFinder(this);
 }
 
@@ -284,7 +284,7 @@
         
         QFileInfo fi(path);
 
-        std::cerr << "type = " << type << ", suffix = " << fi.suffix().toStdString() << std::endl;
+        std::cerr << "type = " << type << ", suffix = " << fi.suffix() << std::endl;
         
         if ((type == LayerFile || type == LayerFileNoMidi)
             && fi.suffix() == "") {
@@ -301,7 +301,7 @@
             } else if (selectedFilter.contains(".ttl")) {
                 expectedExtension = "ttl";
             }
-            std::cerr << "expected extension = " << expectedExtension.toStdString() << std::endl;
+            std::cerr << "expected extension = " << expectedExtension << std::endl;
             if (expectedExtension != "") {
                 path = QString("%1.%2").arg(path).arg(expectedExtension);
                 fi = QFileInfo(path);
@@ -383,7 +383,7 @@
 {
     if (FileSource::canHandleScheme(location)) {
         if (FileSource(location).isAvailable()) {
-            std::cerr << "InteractiveFileFinder::find: ok, it's available... returning" << std::endl;
+            DEBUG << "InteractiveFileFinder::find: ok, it's available... returning" << endl;
             return location;
         }
     }
@@ -408,8 +408,8 @@
 {
     if (relativeTo == "") return "";
 
-    std::cerr << "Looking for \"" << location.toStdString() << "\" next to \""
-              << relativeTo.toStdString() << "\"..." << std::endl;
+    DEBUG << "Looking for \"" << location << "\" next to \""
+              << relativeTo << "\"..." << endl;
 
     QString fileName;
     QString resolved;
@@ -427,7 +427,7 @@
     if (FileSource::isRemote(relativeTo)) {
         resolved = QUrl(relativeTo).resolved(fileName).toString();
         if (!FileSource(resolved).isAvailable()) resolved = "";
-        std::cerr << "resolved: " << resolved.toStdString() << std::endl;
+        std::cerr << "resolved: " << resolved << std::endl;
     } else {
         if (QUrl(relativeTo).scheme() == "file") {
             relativeTo = QUrl(relativeTo).toLocalFile();