diff plugin/LADSPAPluginFactory.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents 115f60df1e4d
children 06f13a3b9e9e
line wrap: on
line diff
--- a/plugin/LADSPAPluginFactory.cpp	Thu May 12 16:56:08 2011 +0100
+++ b/plugin/LADSPAPluginFactory.cpp	Thu May 12 17:31:24 2011 +0100
@@ -350,7 +350,7 @@
 
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
         std::cerr << "LADSPAPluginFactory::instantiatePlugin("
-                  << identifier.toStdString() << ": now have " << m_instances.size() << " instances" << std::endl;
+                  << identifier << ": now have " << m_instances.size() << " instances" << std::endl;
 #endif
 
 	return instance;
@@ -384,7 +384,7 @@
 	PluginIdentifier::parseIdentifier((*ii)->getPluginIdentifier(), itype, isoname, ilabel);
 	if (isoname == soname) {
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
-	    std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname.toStdString() << " is still in use for plugin " << ilabel.toStdString() << std::endl;
+	    std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname << " is still in use for plugin " << ilabel << std::endl;
 #endif
 	    stillInUse = true;
 	    break;
@@ -394,7 +394,7 @@
     if (!stillInUse) {
         if (soname != PluginIdentifier::BUILTIN_PLUGIN_SONAME) {
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
-            std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname.toStdString() << " no longer in use, unloading" << std::endl;
+            std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname << " no longer in use, unloading" << std::endl;
 #endif
             unloadLibrary(soname);
         }
@@ -402,7 +402,7 @@
 
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
     std::cerr << "LADSPAPluginFactory::releasePlugin("
-                  << identifier.toStdString() << ": now have " << m_instances.size() << " instances" << std::endl;
+                  << identifier << ": now have " << m_instances.size() << " instances" << std::endl;
 #endif
 }
 
@@ -415,7 +415,7 @@
     if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
 	loadLibrary(soname);
 	if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
-	    std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname.toStdString() << std::endl;
+	    std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << std::endl;
 	    return 0;
 	}
     }
@@ -426,7 +426,7 @@
 	DLSYM(libraryHandle, "ladspa_descriptor");
 
     if (!fn) {
-	std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname.toStdString() << std::endl;
+	std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << std::endl;
 	return 0;
     }
 
@@ -438,7 +438,7 @@
 	++index;
     }
 
-    std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label.toStdString() << " in library " << soname.toStdString() << std::endl;
+    std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << std::endl;
 
     return 0;
 }
@@ -449,13 +449,13 @@
     void *libraryHandle = DLOPEN(soName, RTLD_NOW);
     if (libraryHandle) {
         m_libraryHandles[soName] = libraryHandle;
-        std::cerr << "LADSPAPluginFactory::loadLibrary: Loaded library \"" << soName.toStdString() << "\"" << std::endl;
+        std::cerr << "LADSPAPluginFactory::loadLibrary: Loaded library \"" << soName << "\"" << std::endl;
         return;
     }
 
     if (QFileInfo(soName).exists()) {
         DLERROR();
-        std::cerr << "LADSPAPluginFactory::loadLibrary: Library \"" << soName.toStdString() << "\" exists, but failed to load it" << std::endl;
+        std::cerr << "LADSPAPluginFactory::loadLibrary: Library \"" << soName << "\" exists, but failed to load it" << std::endl;
         return;
     }
 
@@ -468,7 +468,7 @@
 	 i != pathList.end(); ++i) {
         
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
-        std::cerr << "Looking at: " << (*i).toStdString() << std::endl;
+        std::cerr << "Looking at: " << (*i) << std::endl;
 #endif
 
         QDir dir(*i, PLUGIN_GLOB,
@@ -477,7 +477,7 @@
 
         if (QFileInfo(dir.filePath(fileName)).exists()) {
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
-            std::cerr << "Loading: " << fileName.toStdString() << std::endl;
+            std::cerr << "Loading: " << fileName << std::endl;
 #endif
             libraryHandle = DLOPEN(dir.filePath(fileName), RTLD_NOW);
             if (libraryHandle) {
@@ -490,7 +490,7 @@
             QString file = dir.filePath(dir[j]);
             if (QFileInfo(file).baseName() == base) {
 #ifdef DEBUG_LADSPA_PLUGIN_FACTORY
-                std::cerr << "Loading: " << file.toStdString() << std::endl;
+                std::cerr << "Loading: " << file << std::endl;
 #endif
                 libraryHandle = DLOPEN(file, RTLD_NOW);
                 if (libraryHandle) {
@@ -501,7 +501,7 @@
         }
     }
 
-    std::cerr << "LADSPAPluginFactory::loadLibrary: Failed to locate plugin library \"" << soName.toStdString() << "\"" << std::endl;
+    std::cerr << "LADSPAPluginFactory::loadLibrary: Failed to locate plugin library \"" << soName << "\"" << std::endl;
 }
 
 void
@@ -509,7 +509,7 @@
 {
     LibraryHandleMap::iterator li = m_libraryHandles.find(soName);
     if (li != m_libraryHandles.end()) {
-//	std::cerr << "unloading " << soname.toStdString() << std::endl;
+//	std::cerr << "unloading " << soname << std::endl;
 	DLCLOSE(m_libraryHandles[soName]);
 	m_libraryHandles.erase(li);
     }
@@ -684,7 +684,7 @@
 
     if (!libraryHandle) {
         std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't load plugin library "
-                  << soname.toStdString() << " - " << DLERROR() << std::endl;
+                  << soname << " - " << DLERROR() << std::endl;
         return;
     }
 
@@ -692,7 +692,7 @@
 	DLSYM(libraryHandle, "ladspa_descriptor");
 
     if (!fn) {
-	std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname.toStdString() << std::endl;
+	std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname << std::endl;
 	return;
     }
 
@@ -722,8 +722,8 @@
 		
         if (m_lrdfTaxonomy[descriptor->UniqueID] != "") {
             m_taxonomy[identifier] = m_lrdfTaxonomy[descriptor->UniqueID];
-//            std::cerr << "set id \"" << identifier.toStdString() << "\" to cat \"" << m_taxonomy[identifier].toStdString() << "\" from LRDF" << std::endl;
-//            std::cout << identifier.toStdString() << "::" << m_taxonomy[identifier].toStdString() << std::endl;
+//            std::cerr << "set id \"" << identifier << "\" to cat \"" << m_taxonomy[identifier] << "\" from LRDF" << std::endl;
+//            std::cout << identifier << "::" << m_taxonomy[identifier] << std::endl;
         }
 
 	QString category = m_taxonomy[identifier];
@@ -818,17 +818,17 @@
             path.push_back(p);
 	    p.replace("/lib/", "/share/");
 	    path.push_back(p);
-//	    std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p.toStdString() << std::endl;
+//	    std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl;
 	}
 	path.push_back(pluginPath[i]);
-//	std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << pluginPath[i].toStdString() << std::endl;
+//	std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << pluginPath[i] << std::endl;
     }
 
     for (size_t i = 0; i < path.size(); ++i) {
 
 	QDir dir(path[i], "*.cat");
 
-//	std::cerr << "LADSPAPluginFactory::generateFallbackCategories: directory " << path[i].toStdString() << " has " << dir.count() << " .cat files" << std::endl;
+//	std::cerr << "LADSPAPluginFactory::generateFallbackCategories: directory " << path[i] << " has " << dir.count() << " .cat files" << std::endl;
 	for (unsigned int j = 0; j < dir.count(); ++j) {
 
 	    QFile file(path[i] + "/" + dir[j]);
@@ -842,12 +842,12 @@
 
 		while (!stream.atEnd()) {
 		    line = stream.readLine();
-//		    std::cerr << "line is: \"" << line.toStdString() << "\"" << std::endl;
+//		    std::cerr << "line is: \"" << line << "\"" << std::endl;
 		    QString id = PluginIdentifier::canonicalise
                         (line.section("::", 0, 0));
 		    QString cat = line.section("::", 1, 1);
 		    m_taxonomy[id] = cat;
-//		    std::cerr << "set id \"" << id.toStdString() << "\" to cat \"" << cat.toStdString() << "\"" << std::endl;
+//		    std::cerr << "set id \"" << id << "\" to cat \"" << cat << "\"" << std::endl;
 		}
 	    }
 	}