changeset 844:f5cd33909744

Drop toStdString, with debug header we can stream QStrings
author Chris Cannam
date Tue, 26 Nov 2013 13:43:31 +0000
parents e802e550a1f2
children a299c4cec0f8
files base/Exceptions.cpp base/ProgressPrinter.cpp base/PropertyContainer.cpp base/StringBits.cpp base/TempDirectory.cpp data/fileio/AudioFileReaderFactory.cpp data/fileio/CSVFileReader.cpp data/fileio/CodedAudioFileReader.cpp data/fileio/CoreAudioFileReader.cpp data/fileio/FileSource.cpp data/fileio/PlaylistFileReader.cpp plugin/DSSIPluginFactory.cpp plugin/FeatureExtractionPluginFactory.cpp plugin/LADSPAPluginFactory.cpp plugin/PluginXml.cpp rdf/PluginRDFIndexer.cpp rdf/RDFImporter.cpp transform/FileFeatureWriter.cpp
diffstat 18 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/base/Exceptions.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/base/Exceptions.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -126,7 +126,7 @@
 AllocationFailed::AllocationFailed(QString purpose) throw() :
     m_purpose(purpose)
 {
-    cerr << "ERROR: Allocation failed: " << purpose.toStdString()
+    cerr << "ERROR: Allocation failed: " << purpose
               << endl;
 }
 
--- a/base/ProgressPrinter.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/base/ProgressPrinter.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -63,7 +63,7 @@
 ProgressPrinter::done()
 {
     cerr << "\r"
-              << m_prefix.toStdString() 
+              << m_prefix 
               << (m_prefix == "" ? "" : " ")
               << "Done" << endl;
 }
@@ -73,7 +73,7 @@
 {
     if (progress == m_lastProgress) return;
     cerr << "\r"
-              << m_prefix.toStdString() 
+              << m_prefix 
               << (m_prefix == "" ? "" : " ");
     if (m_definite) {
         cerr << progress << "%";
--- a/base/PropertyContainer.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/base/PropertyContainer.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -87,7 +87,7 @@
     if (!convertPropertyStrings(nameString, valueString, name, value)) {
         cerr << "WARNING: PropertyContainer::setProperty(\""
                   << nameString << "\", \""
-                  << valueString.toStdString()
+                  << valueString
                   << "\"): Name and value conversion failed" << endl;
         return;
     }
@@ -102,7 +102,7 @@
     if (!convertPropertyStrings(nameString, valueString, name, value)) {
         cerr << "WARNING: PropertyContainer::getSetPropertyCommand(\""
                   << nameString << "\", \""
-                  << valueString.toStdString()
+                  << valueString
                   << "\"): Name and value conversion failed" << endl;
         return 0;
     }
--- a/base/StringBits.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/base/StringBits.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -144,7 +144,7 @@
 	QStringList l = splitQuoted(tests[j], ' ');
 	for (int i = 0; i < l.size(); ++i) {
 	    if (i > 0) cout << ";";
-	    cout << l[i].toStdString();
+	    cout << l[i];
 	}
 	cout << ")" << endl;
     }
--- a/base/TempDirectory.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/base/TempDirectory.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -264,7 +264,7 @@
                 cerr << "INFO: Found abandoned temporary directory from "
                           << "a previous, defunct process\n(pid=" << pid
                           << ", directory=\""
-                          << dirpath.toStdString()
+                          << dirpath
                           << "\").  Removing it..." << endl;
                 cleanupDirectory(dirpath);
                 cerr << "...done." << endl;
--- a/data/fileio/AudioFileReaderFactory.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/AudioFileReaderFactory.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -316,7 +316,7 @@
             return reader;
         }
         cerr << "AudioFileReaderFactory: Preferred reader for "
-                  << "url \"" << source.getLocation().toStdString()
+                  << "url \"" << source.getLocation()
                   << "\" (content type \""
                   << source.getContentType() << "\") failed";
 
--- a/data/fileio/CSVFileReader.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/CSVFileReader.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -114,7 +114,7 @@
     if (!ok) {
         if (m_warnings < warnLimit) {
             cerr << "WARNING: CSVFileReader::load: "
-                      << "Bad time format (\"" << s.toStdString()
+                      << "Bad time format (\"" << s
                       << "\") in data line "
                       << lineno+1 << endl;
         } else if (m_warnings == warnLimit) {
@@ -334,7 +334,7 @@
                         if (warnings < warnLimit) {
                             cerr << "WARNING: CSVFileReader::load: "
                                       << "Non-numeric value \""
-                                      << list[i].toStdString()
+                                      << list[i]
                                       << "\" in data line " << lineno+1
                                       << ":" << endl;
                             cerr << line << endl;
--- a/data/fileio/CodedAudioFileReader.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/CodedAudioFileReader.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -83,7 +83,7 @@
 void
 CodedAudioFileReader::endSerialised()
 {
-    SVDEBUG << "CodedAudioFileReader(" << this << ")::endSerialised: id = " << (m_serialiser ? m_serialiser->getId().toStdString() : "(none)") << endl;
+    SVDEBUG << "CodedAudioFileReader(" << this << ")::endSerialised: id = " << (m_serialiser ? m_serialiser->getId() : "(none)") << endl;
 
     delete m_serialiser;
     m_serialiser = 0;
--- a/data/fileio/CoreAudioFileReader.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/CoreAudioFileReader.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -77,7 +77,7 @@
 
     Profiler profiler("CoreAudioFileReader::CoreAudioFileReader", true);
 
-    SVDEBUG << "CoreAudioFileReader: path is \"" << m_path.toStdString() << "\"" << endl;
+    SVDEBUG << "CoreAudioFileReader: path is \"" << m_path << "\"" << endl;
 
     QByteArray ba = m_path.toLocal8Bit();
 
--- a/data/fileio/FileSource.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/FileSource.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -131,7 +131,7 @@
             // was human-readable.  Let's try again, this time
             // assuming it was already encoded.
             cerr << "FileSource::FileSource: Failed to retrieve URL \""
-                      << fileOrUrl.toStdString() 
+                      << fileOrUrl 
                       << "\" as human-readable URL; "
                       << "trying again treating it as encoded URL"
                       << endl;
--- a/data/fileio/PlaylistFileReader.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/data/fileio/PlaylistFileReader.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -133,7 +133,7 @@
                     QString testpath = QDir(m_basedir).filePath(line);
                     if (QFileInfo(testpath).exists() &&
                         QFileInfo(testpath).isFile()) {
-                        cerr << "Path \"" << line.toStdString()
+                        cerr << "Path \"" << line
                                   << "\" is relative, resolving to \""
                                   << testpath << "\""
                                   << endl;
--- a/plugin/DSSIPluginFactory.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/plugin/DSSIPluginFactory.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -359,8 +359,8 @@
         rtd->category = category.toStdString();
 	
 //	cerr << "Plugin id is " << ladspaDescriptor->UniqueID
-//                  << ", identifier is \"" << identifier.toStdString()
-//		  << "\", category is \"" << category.toStdString()
+//                  << ", identifier is \"" << identifier
+//		  << "\", category is \"" << category
 //		  << "\", name is " << ladspaDescriptor->Name
 //		  << ", label is " << ladspaDescriptor->Label
 //		  << endl;
--- a/plugin/FeatureExtractionPluginFactory.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -168,7 +168,7 @@
 
                 if (known.find(descriptor->identifier) != known.end()) {
                     cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Plugin library "
-                              << soname.toStdString()
+                              << soname
                               << " returns the same plugin identifier \""
                               << descriptor->identifier << "\" at indices "
                               << known[descriptor->identifier] << " and "
--- a/plugin/LADSPAPluginFactory.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/plugin/LADSPAPluginFactory.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -80,7 +80,7 @@
 	const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i);
 
 	if (!descriptor) {
-	    cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << i->toStdString() << endl;
+	    cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << *i << endl;
 	    continue;
 	}
 	
@@ -94,11 +94,11 @@
 	list.push_back("false"); // is grouped
 
 	if (m_taxonomy.find(*i) != m_taxonomy.end() && m_taxonomy[*i] != "") {
-//		cerr << "LADSPAPluginFactory: cat for " << i->toStdString()<< " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << endl;
+//		cerr << "LADSPAPluginFactory: cat for " << *i << " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << endl;
 	    list.push_back(m_taxonomy[*i]);
 	} else {
 	    list.push_back("");
-//		cerr << "LADSPAPluginFactory: cat for " << i->toStdString() << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << endl;
+//		cerr << "LADSPAPluginFactory: cat for " << *i << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << endl;
 	    
 	}
 
--- a/plugin/PluginXml.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/plugin/PluginXml.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -148,7 +148,7 @@
                  i != configList.end(); ++i) {
                 QStringList kv = i->split("=");
                 if (kv.count() < 2) {
-                    cerr << "WARNING: PluginXml::setParameters: Malformed configure pair string: \"" << i->toStdString() << "\"" << endl;
+                    cerr << "WARNING: PluginXml::setParameters: Malformed configure pair string: \"" << *i << "\"" << endl;
                     continue;
                 }
                 QString key(kv[0]), value(kv[1]);
--- a/rdf/PluginRDFIndexer.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/rdf/PluginRDFIndexer.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -166,7 +166,7 @@
         for (PlaylistFileReader::Playlist::const_iterator j = list.begin();
              j != list.end(); ++j) {
             SVDEBUG << "PluginRDFIndexer::indexConfiguredURLs: url is "
-                  << j->toStdString() << endl;
+                  << *j << endl;
             pullURL(*j);
         }
     }
@@ -261,7 +261,7 @@
 {
     Profiler profiler("PluginRDFIndexer::indexURL");
 
-//    cerr << "PluginRDFIndexer::indexURL(" << urlString.toStdString() << ")" << endl;
+//    cerr << "PluginRDFIndexer::indexURL(" << urlString << ")" << endl;
 
     QMutexLocker locker(&m_mutex);
 
--- a/rdf/RDFImporter.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/rdf/RDFImporter.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -251,7 +251,7 @@
                                         fs->getLocation(),
                                         m_uristring);
                 if (path != "") {
-                    cerr << "File finder returns: \"" << path.toStdString()
+                    cerr << "File finder returns: \"" << path
                               << "\"" << endl;
                     delete fs;
                     fs = new FileSource(path, reporter);
--- a/transform/FileFeatureWriter.cpp	Tue Nov 26 13:35:08 2013 +0000
+++ b/transform/FileFeatureWriter.cpp	Tue Nov 26 13:43:31 2013 +0000
@@ -276,7 +276,7 @@
         if (m_append) mode |= QIODevice::Append;
                        
         if (!file->open(mode)) {
-            cerr << "FileFeatureWriter: ERROR: Failed to open output file \"" << filename.toStdString()
+            cerr << "FileFeatureWriter: ERROR: Failed to open output file \"" << filename
                  << "\" for writing" << endl;
             delete file;
             m_files[key] = 0;