# HG changeset patch # User Chris Cannam # Date 1385473411 0 # Node ID f5cd339097442e04b39992ed21cc1e8028417ba8 # Parent e802e550a1f22b3892b811af85335657dfb28f00 Drop toStdString, with debug header we can stream QStrings diff -r e802e550a1f2 -r f5cd33909744 base/Exceptions.cpp --- 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; } diff -r e802e550a1f2 -r f5cd33909744 base/ProgressPrinter.cpp --- 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 << "%"; diff -r e802e550a1f2 -r f5cd33909744 base/PropertyContainer.cpp --- 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; } diff -r e802e550a1f2 -r f5cd33909744 base/StringBits.cpp --- 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; } diff -r e802e550a1f2 -r f5cd33909744 base/TempDirectory.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 data/fileio/AudioFileReaderFactory.cpp --- 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"; diff -r e802e550a1f2 -r f5cd33909744 data/fileio/CSVFileReader.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 data/fileio/CodedAudioFileReader.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 data/fileio/CoreAudioFileReader.cpp --- 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(); diff -r e802e550a1f2 -r f5cd33909744 data/fileio/FileSource.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 data/fileio/PlaylistFileReader.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 plugin/DSSIPluginFactory.cpp --- 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; diff -r e802e550a1f2 -r f5cd33909744 plugin/FeatureExtractionPluginFactory.cpp --- 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 " diff -r e802e550a1f2 -r f5cd33909744 plugin/LADSPAPluginFactory.cpp --- 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; } diff -r e802e550a1f2 -r f5cd33909744 plugin/PluginXml.cpp --- 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]); diff -r e802e550a1f2 -r f5cd33909744 rdf/PluginRDFIndexer.cpp --- 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); diff -r e802e550a1f2 -r f5cd33909744 rdf/RDFImporter.cpp --- 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); diff -r e802e550a1f2 -r f5cd33909744 transform/FileFeatureWriter.cpp --- 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;