# HG changeset patch # User Chris Cannam # Date 1305217884 -3600 # Node ID b4a8d8221eaf226f0e3bf7e9d727daebb06aadb3 # Parent 99222d4bfc78e1fd1ea991b5bcfdad3f92ea4a1e Remove most toStdString calls (no longer needed, with debug header) diff -r 99222d4bfc78 -r b4a8d8221eaf base/Command.h --- a/base/Command.h Thu May 12 16:56:08 2011 +0100 +++ b/base/Command.h Thu May 12 17:31:24 2011 +0100 @@ -20,6 +20,8 @@ #include #include +#include "Debug.h" + class Command { public: diff -r 99222d4bfc78 -r b4a8d8221eaf base/Exceptions.cpp --- a/base/Exceptions.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/Exceptions.cpp Thu May 12 17:31:24 2011 +0100 @@ -21,7 +21,7 @@ m_file(file) { std::cerr << "ERROR: File not found: " - << file.toStdString() << std::endl; + << file << std::endl; } const char * @@ -35,7 +35,7 @@ m_file(file) { std::cerr << "ERROR: Failed to open file: " - << file.toStdString() << std::endl; + << file << std::endl; } const char * @@ -49,7 +49,7 @@ m_directory(directory) { std::cerr << "ERROR: Directory creation failed for directory: " - << directory.toStdString() << std::endl; + << directory << std::endl; } const char * @@ -63,7 +63,7 @@ m_file(file) { std::cerr << "ERROR: File read failed for file: " - << file.toStdString() << std::endl; + << file << std::endl; } const char * @@ -77,8 +77,8 @@ m_file(file), m_operation(op) { - std::cerr << "ERROR: File " << op.toStdString() << " failed for file: " - << file.toStdString() << std::endl; + std::cerr << "ERROR: File " << op << " failed for file: " + << file << std::endl; } const char * @@ -96,7 +96,7 @@ m_available(available) { std::cerr << "ERROR: Not enough disc space available in " - << directory.toStdString() << ": need " << required + << directory << ": need " << required << ", only have " << available << std::endl; } @@ -106,7 +106,7 @@ m_available(0) { std::cerr << "ERROR: Not enough disc space available in " - << directory.toStdString() << std::endl; + << directory << std::endl; } const char * diff -r 99222d4bfc78 -r b4a8d8221eaf base/Exceptions.h --- a/base/Exceptions.h Thu May 12 16:56:08 2011 +0100 +++ b/base/Exceptions.h Thu May 12 17:31:24 2011 +0100 @@ -20,6 +20,8 @@ #include +#include "Debug.h" + class FileNotFound : virtual public std::exception { public: diff -r 99222d4bfc78 -r b4a8d8221eaf base/PlayParameters.cpp --- a/base/PlayParameters.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/PlayParameters.cpp Thu May 12 17:31:24 2011 +0100 @@ -132,7 +132,7 @@ { if (m_playPluginConfiguration != configuration) { m_playPluginConfiguration = configuration; -// std::cerr << "PlayParameters(" << this << "): setPlayPluginConfiguration to \"" << configuration.toStdString() << "\"" << std::endl; +// std::cerr << "PlayParameters(" << this << "): setPlayPluginConfiguration to \"" << configuration << "\"" << std::endl; emit playPluginConfigurationChanged(configuration); emit playParametersChanged(); } diff -r 99222d4bfc78 -r b4a8d8221eaf base/PropertyContainer.cpp --- a/base/PropertyContainer.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/PropertyContainer.cpp Thu May 12 17:31:24 2011 +0100 @@ -68,7 +68,7 @@ void PropertyContainer::setProperty(const PropertyName &name, int) { - std::cerr << "WARNING: PropertyContainer[" << getPropertyContainerName().toStdString() << "]::setProperty(" << name.toStdString() << "): no implementation in subclass!" << std::endl; + std::cerr << "WARNING: PropertyContainer[" << getPropertyContainerName() << "]::setProperty(" << name << "): no implementation in subclass!" << std::endl; } Command * @@ -86,7 +86,7 @@ int value; if (!convertPropertyStrings(nameString, valueString, name, value)) { std::cerr << "WARNING: PropertyContainer::setProperty(\"" - << nameString.toStdString() << "\", \"" + << nameString << "\", \"" << valueString.toStdString() << "\"): Name and value conversion failed" << std::endl; return; @@ -101,7 +101,7 @@ int value; if (!convertPropertyStrings(nameString, valueString, name, value)) { std::cerr << "WARNING: PropertyContainer::getSetPropertyCommand(\"" - << nameString.toStdString() << "\", \"" + << nameString << "\", \"" << valueString.toStdString() << "\"): Name and value conversion failed" << std::endl; return 0; @@ -135,7 +135,7 @@ } if (name == "") { - std::cerr << "PropertyContainer::convertPropertyStrings: Unable to match name string \"" << nameString.toStdString() << "\"" << std::endl; + std::cerr << "PropertyContainer::convertPropertyStrings: Unable to match name string \"" << nameString << "\"" << std::endl; return false; } @@ -192,7 +192,7 @@ break; case InvalidProperty: - std::cerr << "PropertyContainer::convertPropertyStrings: Invalid property name \"" << name.toStdString() << "\"" << std::endl; + std::cerr << "PropertyContainer::convertPropertyStrings: Invalid property name \"" << name << "\"" << std::endl; return false; } @@ -204,7 +204,7 @@ bool ok = false; int i = valueString.toInt(&ok); if (!ok) { - std::cerr << "PropertyContainer::convertPropertyStrings: Unable to parse value string \"" << valueString.toStdString() << "\"" << std::endl; + std::cerr << "PropertyContainer::convertPropertyStrings: Unable to parse value string \"" << valueString << "\"" << std::endl; return false; } else if (i < min || i > max) { std::cerr << "PropertyContainer::convertPropertyStrings: Property value \"" << i << "\" outside valid range " << min << " to " << max << std::endl; diff -r 99222d4bfc78 -r b4a8d8221eaf base/RangeMapper.cpp --- a/base/RangeMapper.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/RangeMapper.cpp Thu May 12 17:31:24 2011 +0100 @@ -76,7 +76,7 @@ std::cerr << "LogRangeMapper: minpos " << minpos << ", maxpos " << maxpos << ", minval " << minval << ", maxval " << maxval << ", minlog " << m_minlog << ", ratio " << m_ratio - << ", unit " << unit.toStdString() << std::endl; + << ", unit " << unit << std::endl; assert(m_maxpos != m_minpos); diff -r 99222d4bfc78 -r b4a8d8221eaf base/RangeMapper.h --- a/base/RangeMapper.h Thu May 12 16:56:08 2011 +0100 +++ b/base/RangeMapper.h Thu May 12 17:31:24 2011 +0100 @@ -18,6 +18,8 @@ #include +#include "Debug.h" + class RangeMapper { diff -r 99222d4bfc78 -r b4a8d8221eaf base/ResourceFinder.cpp --- a/base/ResourceFinder.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/ResourceFinder.cpp Thu May 12 17:31:24 2011 +0100 @@ -152,7 +152,7 @@ QString prefix = *i; - std::cerr << "ResourceFinder::getResourcePath: Looking up file \"" << fileName.toStdString() << "\" for category \"" << resourceCat.toStdString() << "\" in prefix \"" << prefix.toStdString() << "\"" << std::endl; + std::cerr << "ResourceFinder::getResourcePath: Looking up file \"" << fileName << "\" for category \"" << resourceCat << "\" in prefix \"" << prefix << "\"" << std::endl; QString path = QString("%1%2/%3").arg(prefix).arg(resourceCat).arg(fileName); @@ -211,7 +211,7 @@ QDir userDir(user); if (!userDir.exists()) { if (!userDir.mkpath(user)) { - std::cerr << "ResourceFinder::getResourceSaveDir: ERROR: Failed to create user resource path \"" << user.toStdString() << "\"" << std::endl; + std::cerr << "ResourceFinder::getResourceSaveDir: ERROR: Failed to create user resource path \"" << user << "\"" << std::endl; return ""; } } @@ -221,7 +221,7 @@ QDir saveDir(save); if (!saveDir.exists()) { if (!userDir.mkpath(save)) { - std::cerr << "ResourceFinder::getResourceSaveDir: ERROR: Failed to create user resource path \"" << save.toStdString() << "\"" << std::endl; + std::cerr << "ResourceFinder::getResourceSaveDir: ERROR: Failed to create user resource path \"" << save << "\"" << std::endl; return ""; } } @@ -278,11 +278,11 @@ // This is the lowest-priority alternative path for this // resource, so we know that there must be no installed copy. // Install one to the user location. - std::cerr << "ResourceFinder::unbundleResource: File " << fileName.toStdString() << " is bundled, un-bundling it" << std::endl; + std::cerr << "ResourceFinder::unbundleResource: File " << fileName << " is bundled, un-bundling it" << std::endl; QString target = getResourceSavePath(resourceCat, fileName); QFile file(path); if (!file.copy(target)) { - std::cerr << "ResourceFinder::unbundleResource: ERROR: Failed to un-bundle resource file \"" << fileName.toStdString() << "\" to user location \"" << target.toStdString() << "\"" << std::endl; + std::cerr << "ResourceFinder::unbundleResource: ERROR: Failed to un-bundle resource file \"" << fileName << "\" to user location \"" << target << "\"" << std::endl; return false; } diff -r 99222d4bfc78 -r b4a8d8221eaf base/ResourceFinder.h --- a/base/ResourceFinder.h Thu May 12 16:56:08 2011 +0100 +++ b/base/ResourceFinder.h Thu May 12 17:31:24 2011 +0100 @@ -23,6 +23,8 @@ #define _RESOURCE_FINDER_H_ #include + +#include "Debug.h" class ResourceFinder { diff -r 99222d4bfc78 -r b4a8d8221eaf base/StringBits.cpp --- a/base/StringBits.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/StringBits.cpp Thu May 12 17:31:24 2011 +0100 @@ -139,7 +139,7 @@ for (int j = 0; j < tests.size(); ++j) { cout << endl; - cout << tests[j].toStdString() << endl; + cout << tests[j] << endl; cout << "->" << endl << "("; QStringList l = splitQuoted(tests[j], ' '); for (int i = 0; i < l.size(); ++i) { diff -r 99222d4bfc78 -r b4a8d8221eaf base/TempDirectory.cpp --- a/base/TempDirectory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/TempDirectory.cpp Thu May 12 17:31:24 2011 +0100 @@ -208,7 +208,7 @@ if (!QFile(fi.absoluteFilePath()).remove()) { std::cerr << "WARNING: TempDirectory::cleanup: " << "Failed to unlink file \"" - << fi.absoluteFilePath().toStdString() << "\"" + << fi.absoluteFilePath() << "\"" << std::endl; } } @@ -219,13 +219,13 @@ if (!dir.cdUp()) { std::cerr << "WARNING: TempDirectory::cleanup: " << "Failed to cd to parent directory of " - << tmpdir.toStdString() << std::endl; + << tmpdir << std::endl; return; } if (!dir.rmdir(dirname)) { std::cerr << "WARNING: TempDirectory::cleanup: " << "Failed to remove directory " - << dirname.toStdString() << std::endl; + << dirname << std::endl; } } @@ -248,7 +248,7 @@ if (subdir.count() == 0) { std::cerr << "INFO: Found temporary directory with no .pid file in it!\n(directory=\"" - << dirpath.toStdString() << "\"). Removing it..." << std::endl; + << dirpath << "\"). Removing it..." << std::endl; cleanupDirectory(dirpath); std::cerr << "...done." << std::endl; continue; diff -r 99222d4bfc78 -r b4a8d8221eaf base/TempWriteFile.cpp --- a/base/TempWriteFile.cpp Thu May 12 16:56:08 2011 +0100 +++ b/base/TempWriteFile.cpp Thu May 12 17:31:24 2011 +0100 @@ -27,7 +27,7 @@ temp.setAutoRemove(false); temp.open(); // creates the file and opens it atomically if (temp.error()) { - std::cerr << "TempWriteFile: Failed to create temporary file in directory of " << m_target.toStdString() << ": " << temp.errorString().toStdString() << std::endl; + std::cerr << "TempWriteFile: Failed to create temporary file in directory of " << m_target << ": " << temp.errorString() << std::endl; throw FileOperationFailed(temp.fileName(), "creation"); } @@ -60,7 +60,7 @@ // Therefore, delete first the existing file. if (dir.exists(m_target)) dir.remove(m_target); if (!dir.rename(m_temp, m_target)) { - std::cerr << "TempWriteFile: Failed to rename temporary file " << m_temp.toStdString() << " to target " << m_target.toStdString() << std::endl; + std::cerr << "TempWriteFile: Failed to rename temporary file " << m_temp << " to target " << m_target << std::endl; throw FileOperationFailed(m_temp, "rename"); } diff -r 99222d4bfc78 -r b4a8d8221eaf base/XmlExportable.h --- a/base/XmlExportable.h Thu May 12 16:56:08 2011 +0100 +++ b/base/XmlExportable.h Thu May 12 17:31:24 2011 +0100 @@ -18,6 +18,8 @@ #include +#include "Debug.h" + class QTextStream; class XmlExportable diff -r 99222d4bfc78 -r b4a8d8221eaf data/fft/FFTDataServer.cpp --- a/data/fft/FFTDataServer.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fft/FFTDataServer.cpp Thu May 12 17:31:24 2011 +0100 @@ -228,7 +228,7 @@ FFTDataServer::findServer(QString n) { #ifdef DEBUG_FFT_SERVER - std::cerr << "FFTDataServer::findServer(\"" << n.toStdString() << "\")" << std::endl; + std::cerr << "FFTDataServer::findServer(\"" << n << "\")" << std::endl; #endif if (m_servers.find(n) != m_servers.end()) { @@ -236,7 +236,7 @@ FFTDataServer *server = m_servers[n].first; #ifdef DEBUG_FFT_SERVER - std::cerr << "FFTDataServer::findServer(\"" << n.toStdString() << "\"): found " << server << std::endl; + std::cerr << "FFTDataServer::findServer(\"" << n << "\"): found " << server << std::endl; #endif claimInstance(server, false); @@ -245,7 +245,7 @@ } #ifdef DEBUG_FFT_SERVER - std::cerr << "FFTDataServer::findServer(\"" << n.toStdString() << "\"): not found" << std::endl; + std::cerr << "FFTDataServer::findServer(\"" << n << "\"): not found" << std::endl; #endif return 0; @@ -455,7 +455,7 @@ #endif if (i->second.second > 0) { - std::cerr << "WARNING: FFTDataServer::modelAboutToBeDeleted: Model " << model << " (\"" << model->objectName().toStdString() << "\") is about to be deleted, but is still being referred to by FFT server " << server << " with non-zero refcount " << i->second.second << std::endl; + std::cerr << "WARNING: FFTDataServer::modelAboutToBeDeleted: Model " << model << " (\"" << model->objectName() << "\") is about to be deleted, but is still being referred to by FFT server " << server << " with non-zero refcount " << i->second.second << std::endl; server->suspendWrites(); return; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/AudioFileReaderFactory.cpp --- a/data/fileio/AudioFileReaderFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/AudioFileReaderFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -73,15 +73,15 @@ { QString err; -// std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\"): Requested rate: " << targetRate << std::endl; +// std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << std::endl; if (!source.isOK()) { - std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString().toStdString() << std::endl; + std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << std::endl; return 0; } if (!source.isAvailable()) { - std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Source not found" << std::endl; + std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << std::endl; return 0; } @@ -272,10 +272,10 @@ std::cerr << "AudioFileReaderFactory: Preferred reader for " << "url \"" << source.getLocation().toStdString() << "\" (content type \"" - << source.getContentType().toStdString() << "\") failed"; + << source.getContentType() << "\") failed"; if (reader->getError() != "") { - std::cerr << ": \"" << reader->getError().toStdString() << "\""; + std::cerr << ": \"" << reader->getError() << "\""; } std::cerr << std::endl; delete reader; diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/BZipFileDevice.cpp --- a/data/fileio/BZipFileDevice.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/BZipFileDevice.cpp Thu May 12 17:31:24 2011 +0100 @@ -30,7 +30,7 @@ BZipFileDevice::~BZipFileDevice() { -// std::cerr << "BZipFileDevice::~BZipFileDevice(" << m_fileName.toStdString() << ")" << std::endl; +// std::cerr << "BZipFileDevice::~BZipFileDevice(" << m_fileName << ")" << std::endl; if (m_bzFile) close(); } @@ -88,7 +88,7 @@ return false; } -// std::cerr << "BZipFileDevice: opened \"" << m_fileName.toStdString() << "\" for writing" << std::endl; +// std::cerr << "BZipFileDevice: opened \"" << m_fileName << "\" for writing" << std::endl; setErrorString(QString()); setOpenMode(mode); @@ -115,7 +115,7 @@ return false; } -// std::cerr << "BZipFileDevice: opened \"" << m_fileName.toStdString() << "\" for reading" << std::endl; +// std::cerr << "BZipFileDevice: opened \"" << m_fileName << "\" for reading" << std::endl; m_atEnd = false; diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/CSVFileReader.cpp --- a/data/fileio/CSVFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/CSVFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -337,7 +337,7 @@ << list[i].toStdString() << "\" in data line " << lineno+1 << ":" << std::endl; - std::cerr << line.toStdString() << std::endl; + std::cerr << line << std::endl; ++warnings; } else if (warnings == warnLimit) { // std::cerr << "WARNING: Too many warnings" << std::endl; diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/CachedFile.cpp --- a/data/fileio/CachedFile.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/CachedFile.cpp Thu May 12 17:31:24 2011 +0100 @@ -79,7 +79,7 @@ Profiler p("CachedFile::CachedFile[1]"); std::cerr << "CachedFile::CachedFile: origin is \"" - << origin.toStdString() << "\"" << std::endl; + << origin << "\"" << std::endl; check(); } @@ -94,7 +94,7 @@ Profiler p("CachedFile::CachedFile[2]"); std::cerr << "CachedFile::CachedFile: url is \"" - << url.toString().toStdString() << "\"" << std::endl; + << url.toString() << "\"" << std::endl; check(); } @@ -140,7 +140,7 @@ if (lastRetrieval.isValid()) { std::cerr << "CachedFile::check: Valid last retrieval at " - << lastRetrieval.toString().toStdString() << std::endl; + << lastRetrieval.toString() << std::endl; // this will not be the case if the file is missing, after // updateLastRetrieval(false) was called above m_ok = true; @@ -205,14 +205,14 @@ QString tempName = fs.getLocalFilename(); QFile tempFile(tempName); if (!tempFile.exists()) { - std::cerr << "CachedFile::retrieve: ERROR: FileSource reported success, but local temporary file \"" << tempName.toStdString() << "\" does not exist" << std::endl; + std::cerr << "CachedFile::retrieve: ERROR: FileSource reported success, but local temporary file \"" << tempName << "\" does not exist" << std::endl; return false; } QFile previous(m_localFilename); if (previous.exists()) { if (!previous.remove()) { - std::cerr << "CachedFile::retrieve: ERROR: Failed to remove previous copy of cached file at \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "CachedFile::retrieve: ERROR: Failed to remove previous copy of cached file at \"" << m_localFilename << "\"" << std::endl; return false; } } @@ -222,11 +222,11 @@ //!!! disk space left) if (!tempFile.copy(m_localFilename)) { - std::cerr << "CachedFile::retrieve: ERROR: Failed to copy newly retrieved file from \"" << tempName.toStdString() << "\" to \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "CachedFile::retrieve: ERROR: Failed to copy newly retrieved file from \"" << tempName << "\" to \"" << m_localFilename << "\"" << std::endl; return false; } - std::cerr << "CachedFile::retrieve: Successfully copied newly retrieved file \"" << tempName.toStdString() << "\" to its home at \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "CachedFile::retrieve: Successfully copied newly retrieved file \"" << tempName << "\" to its home at \"" << m_localFilename << "\"" << std::endl; return true; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/CodedAudioFileReader.cpp --- a/data/fileio/CodedAudioFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/CodedAudioFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -61,7 +61,7 @@ if (m_cacheFileName != "") { if (!QFile(m_cacheFileName).remove()) { - std::cerr << "WARNING: CodedAudioFileReader::~CodedAudioFileReader: Failed to delete cache file \"" << m_cacheFileName.toStdString() << "\"" << std::endl; + std::cerr << "WARNING: CodedAudioFileReader::~CodedAudioFileReader: Failed to delete cache file \"" << m_cacheFileName << "\"" << std::endl; } } @@ -72,7 +72,7 @@ void CodedAudioFileReader::startSerialised(QString id) { -// std::cerr << "CodedAudioFileReader::startSerialised(" << id.toStdString() << ")" << std::endl; +// std::cerr << "CodedAudioFileReader::startSerialised(" << id << ")" << std::endl; delete m_serialiser; m_serialiser = new Serialiser(id); @@ -144,7 +144,7 @@ m_cacheFileReader = new WavFileReader(m_cacheFileName); if (!m_cacheFileReader->isOK()) { - std::cerr << "ERROR: CodedAudioFileReader::initialiseDecodeCache: Failed to construct WAV file reader for temporary file: " << m_cacheFileReader->getError().toStdString() << std::endl; + std::cerr << "ERROR: CodedAudioFileReader::initialiseDecodeCache: Failed to construct WAV file reader for temporary file: " << m_cacheFileReader->getError() << std::endl; delete m_cacheFileReader; m_cacheFileReader = 0; m_cacheMode = CacheInMemory; @@ -152,7 +152,7 @@ } } else { - std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to open cache file \"" << m_cacheFileName.toStdString() << "\" (" << m_channelCount << " channels, sample rate " << m_sampleRate << " for writing, falling back to in-memory cache" << std::endl; + std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to open cache file \"" << m_cacheFileName << "\" (" << m_channelCount << " channels, sample rate " << m_sampleRate << " for writing, falling back to in-memory cache" << std::endl; m_cacheMode = CacheInMemory; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/FileSource.cpp --- a/data/fileio/FileSource.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/FileSource.cpp Thu May 12 17:31:24 2011 +0100 @@ -88,12 +88,12 @@ } #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << "): url <" << m_url.toString().toStdString() << ">" << std::endl; + std::cerr << "FileSource::FileSource(" << fileOrUrl << "): url <" << m_url.toString() << ">" << std::endl; incCount(m_url.toString()); #endif if (!canHandleScheme(m_url)) { - std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString().toStdString() << "\"" << std::endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -103,7 +103,7 @@ if (!isRemote() && !isAvailable()) { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::FileSource: Failed to open local file with URL \"" << m_url.toString().toStdString() << "; trying again assuming filename was encoded" << std::endl; + std::cerr << "FileSource::FileSource: Failed to open local file with URL \"" << m_url.toString() << "; trying again assuming filename was encoded" << std::endl; #endif m_url = QUrl::fromEncoded(fileOrUrl.toAscii()); init(); @@ -166,12 +166,12 @@ m_refCounted(false) { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::FileSource(" << url.toString().toStdString() << ") [as url]" << std::endl; + std::cerr << "FileSource::FileSource(" << url.toString() << ") [as url]" << std::endl; incCount(m_url.toString()); #endif if (!canHandleScheme(m_url)) { - std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString().toStdString() << "\"" << std::endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -198,12 +198,12 @@ m_refCounted(false) { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::FileSource(" << m_url.toString().toStdString() << ") [copy ctor]" << std::endl; + std::cerr << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]" << std::endl; incCount(m_url.toString()); #endif if (!canHandleScheme(m_url)) { - std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString().toStdString() << "\"" << std::endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -232,7 +232,7 @@ m_done = true; #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::FileSource(" << m_url.toString().toStdString() << ") [copy ctor]: note: local filename is \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]: note: local filename is \"" << m_localFilename << "\"" << std::endl; #endif #ifdef DEBUG_FILE_SOURCE @@ -243,7 +243,7 @@ FileSource::~FileSource() { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource(" << m_url.toString().toStdString() << ")::~FileSource" << std::endl; + std::cerr << "FileSource(" << m_url.toString() << ")::~FileSource" << std::endl; decCount(m_url.toString()); #endif @@ -270,7 +270,7 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::init: URL translates to local filename \"" - << m_localFilename.toStdString() << "\" (with literal=" << literal << ")" << std::endl; + << m_localFilename << "\" (with literal=" << literal << ")" << std::endl; #endif m_ok = true; m_lastStatus = 200; @@ -318,7 +318,7 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::init: Don't have local copy of \"" - << m_url.toString().toStdString() << "\", retrieving" << std::endl; + << m_url.toString() << "\", retrieving" << std::endl; #endif if (scheme == "http") { @@ -427,7 +427,7 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource: path is \"" - << path.toStdString() << "\"" << std::endl; + << path << "\"" << std::endl; #endif if (m_preferredContentType == "") { @@ -435,7 +435,7 @@ } else { #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource: indicating preferred content type of \"" - << m_preferredContentType.toStdString() << "\"" << std::endl; + << m_preferredContentType << "\"" << std::endl; #endif QHttpRequestHeader header("GET", path); header.setValue("Host", m_url.host()); @@ -634,7 +634,7 @@ QString location = resp.value("Location"); #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::responseHeaderReceived: redirect to \"" - << location.toStdString() << "\" received" << std::endl; + << location << "\" received" << std::endl; #endif if (location != "") { QUrl newUrl(location); @@ -662,7 +662,7 @@ .arg(resp.statusCode()).arg(resp.reasonPhrase()); #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::responseHeaderReceived: " - << m_errorString.toStdString() << std::endl; + << m_errorString << std::endl; #endif } else { #ifdef DEBUG_FILE_SOURCE @@ -776,7 +776,7 @@ FileSource::deleteCacheFile() { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::deleteCacheFile(\"" << m_localFilename.toStdString() << "\")" << std::endl; + std::cerr << "FileSource::deleteCacheFile(\"" << m_localFilename << "\")" << std::endl; #endif cleanup(); @@ -813,11 +813,11 @@ if (!QFile(m_localFilename).remove()) { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::deleteCacheFile: ERROR: Failed to delete file \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "FileSource::deleteCacheFile: ERROR: Failed to delete file \"" << m_localFilename << "\"" << std::endl; #endif } else { #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::deleteCacheFile: Deleted cache file \"" << m_localFilename.toStdString() << "\"" << std::endl; + std::cerr << "FileSource::deleteCacheFile: Deleted cache file \"" << m_localFilename << "\"" << std::endl; #endif m_localFilename = ""; } @@ -881,7 +881,7 @@ QString filepath(dir.filePath(filename)); #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::createCacheFile: URL is \"" << m_url.toString().toStdString() << "\", dir is \"" << dir.path().toStdString() << "\", base \"" << base.toStdString() << "\", extension \"" << extension.toStdString() << "\", filebase \"" << filename.toStdString() << "\", filename \"" << filepath.toStdString() << "\"" << std::endl; + std::cerr << "FileSource::createCacheFile: URL is \"" << m_url.toString() << "\", dir is \"" << dir.path() << "\", base \"" << base << "\", extension \"" << extension << "\", filebase \"" << filename << "\", filename \"" << filepath << "\"" << std::endl; #endif QMutexLocker fcLocker(&m_fileCreationMutex); @@ -893,8 +893,8 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::createCacheFile: Failed to create local file \"" - << filepath.toStdString() << "\" for URL \"" - << m_url.toString().toStdString() << "\" (or file already exists): appending suffix instead" << std::endl; + << filepath << "\" for URL \"" + << m_url.toString() << "\" (or file already exists): appending suffix instead" << std::endl; #endif if (extension == "") { @@ -909,8 +909,8 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::createCacheFile: ERROR: Failed to create local file \"" - << filepath.toStdString() << "\" for URL \"" - << m_url.toString().toStdString() << "\" (or file already exists)" << std::endl; + << filepath << "\" for URL \"" + << m_url.toString() << "\" (or file already exists)" << std::endl; #endif return ""; @@ -919,8 +919,8 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::createCacheFile: url " - << m_url.toString().toStdString() << " -> local filename " - << filepath.toStdString() << std::endl; + << m_url.toString() << " -> local filename " + << filepath << std::endl; #endif m_localFilename = filepath; diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/FileSource.h --- a/data/fileio/FileSource.h Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/FileSource.h Thu May 12 17:31:24 2011 +0100 @@ -23,6 +23,8 @@ #include +#include "base/Debug.h" + class QFtp; class QHttp; class QFile; diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/MP3FileReader.cpp --- a/data/fileio/MP3FileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/MP3FileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -96,7 +96,7 @@ return; } else if (sz == 0) { std::cerr << QString("MP3FileReader::MP3FileReader: Warning: reached EOF after only %1 of %2 bytes") - .arg(offset).arg(m_fileSize).toStdString() << std::endl; + .arg(offset).arg(m_fileSize) << std::endl; m_fileSize = offset; break; } @@ -141,7 +141,7 @@ } if (m_error != "") { - std::cerr << "MP3FileReader::MP3FileReader(\"" << m_path.toStdString() << "\"): ERROR: " << m_error.toStdString() << std::endl; + std::cerr << "MP3FileReader::MP3FileReader(\"" << m_path << "\"): ERROR: " << m_error << std::endl; } } @@ -252,7 +252,7 @@ #ifdef DEBUG_ID3TAG std::cerr << "MP3FileReader::loadTags: tag \"" << name << "\" -> \"" - << rv.toStdString() << "\"" << std::endl; + << rv << "\"" << std::endl; #endif diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/MatrixFile.cpp --- a/data/fileio/MatrixFile.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/MatrixFile.cpp Thu May 12 17:31:24 2011 +0100 @@ -68,7 +68,7 @@ Profiler profiler("MatrixFile::MatrixFile", true); #ifdef DEBUG_MATRIX_FILE - std::cerr << "MatrixFile::MatrixFile(" << fileBase.toStdString() << ", " << int(mode) << ", " << cellSize << ", " << width << ", " << height << ")" << std::endl; + std::cerr << "MatrixFile::MatrixFile(" << fileBase << ", " << int(mode) << ", " << cellSize << ", " << width << ", " << height << ")" << std::endl; #endif m_createMutex.lock(); @@ -103,14 +103,14 @@ #endif #ifdef DEBUG_MATRIX_FILE - std::cerr << "MatrixFile(" << this << ")::MatrixFile: opening " << fileName.toStdString() << "..." << std::endl; + std::cerr << "MatrixFile(" << this << ")::MatrixFile: opening " << fileName << "..." << std::endl; #endif if ((m_fd = ::open(fileName.toLocal8Bit(), m_flags, m_fmode)) < 0) { ::perror("Open failed"); std::cerr << "ERROR: MatrixFile::MatrixFile: " << "Failed to open cache file \"" - << fileName.toStdString() << "\""; + << fileName << "\""; if (m_mode == WriteOnly) std::cerr << " for writing"; std::cerr << std::endl; throw FailedToOpenFile(fileName); @@ -130,7 +130,7 @@ ::perror("MatrixFile::MatrixFile: read failed"); std::cerr << "ERROR: MatrixFile::MatrixFile: " << "Failed to read header (fd " << m_fd << ", file \"" - << fileName.toStdString() << "\")" << std::endl; + << fileName << "\")" << std::endl; throw FileReadFailed(fileName); } if (header[0] != m_width || header[1] != m_height) { @@ -146,7 +146,7 @@ ++m_refcount[fileName]; #ifdef DEBUG_MATRIX_FILE - std::cerr << "MatrixFile[" << m_fd << "]::MatrixFile: File " << fileName.toStdString() << ", ref " << m_refcount[fileName] << std::endl; + std::cerr << "MatrixFile[" << m_fd << "]::MatrixFile: File " << fileName << ", ref " << m_refcount[fileName] << std::endl; std::cerr << "MatrixFile[" << m_fd << "]::MatrixFile: Done, size is " << "(" << m_width << ", " << m_height << ")" << std::endl; #endif @@ -173,9 +173,9 @@ if (--m_refcount[m_fileName] == 0) { if (::unlink(m_fileName.toLocal8Bit())) { - std::cerr << "WARNING: MatrixFile::~MatrixFile: reference count reached 0, but failed to unlink file \"" << m_fileName.toStdString() << "\"" << std::endl; + std::cerr << "WARNING: MatrixFile::~MatrixFile: reference count reached 0, but failed to unlink file \"" << m_fileName << "\"" << std::endl; } else { - std::cerr << "deleted " << m_fileName.toStdString() << std::endl; + std::cerr << "deleted " << m_fileName << std::endl; } } } diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/PlaylistFileReader.cpp --- a/data/fileio/PlaylistFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/PlaylistFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -135,7 +135,7 @@ QFileInfo(testpath).isFile()) { std::cerr << "Path \"" << line.toStdString() << "\" is relative, resolving to \"" - << testpath.toStdString() << "\"" + << testpath << "\"" << std::endl; line = testpath; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/QuickTimeFileReader.cpp --- a/data/fileio/QuickTimeFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/QuickTimeFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -66,7 +66,7 @@ Profiler profiler("QuickTimeFileReader::QuickTimeFileReader", true); -std::cerr << "QuickTimeFileReader: path is \"" << m_path.toStdString() << "\"" << std::endl; +std::cerr << "QuickTimeFileReader: path is \"" << m_path << "\"" << std::endl; long QTversion; @@ -265,7 +265,7 @@ } } - std::cerr << "QuickTimeFileReader::QuickTimeFileReader: frame count is now " << getFrameCount() << ", error is \"\"" << m_error.toStdString() << "\"" << std::endl; + std::cerr << "QuickTimeFileReader::QuickTimeFileReader: frame count is now " << getFrameCount() << ", error is \"\"" << m_error << "\"" << std::endl; } QuickTimeFileReader::~QuickTimeFileReader() diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/ResamplingWavFileReader.cpp --- a/data/fileio/ResamplingWavFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/ResamplingWavFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -40,7 +40,7 @@ m_fileRate = 0; std::cerr << "ResamplingWavFileReader::ResamplingWavFileReader(\"" - << m_path.toStdString() << "\"): rate " << targetRate << std::endl; + << m_path << "\"): rate " << targetRate << std::endl; Profiler profiler("ResamplingWavFileReader::ResamplingWavFileReader", true); diff -r 99222d4bfc78 -r b4a8d8221eaf data/fileio/WavFileReader.cpp --- a/data/fileio/WavFileReader.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/fileio/WavFileReader.cpp Thu May 12 17:31:24 2011 +0100 @@ -40,7 +40,7 @@ if (!m_file || (!fileUpdating && m_fileInfo.channels <= 0)) { std::cerr << "WavFileReader::initialize: Failed to open file at \"" - << m_path.toStdString() << "\" (" + << m_path << "\" (" << sf_strerror(m_file) << ")" << std::endl; if (m_file) { @@ -80,7 +80,7 @@ sf_close(m_file); m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo); if (!m_file || m_fileInfo.channels <= 0) { - std::cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path.toStdString() << "\" (" + std::cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path << "\" (" << sf_strerror(m_file) << ")" << std::endl; } } diff -r 99222d4bfc78 -r b4a8d8221eaf data/model/Model.cpp --- a/data/model/Model.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/model/Model.cpp Thu May 12 17:31:24 2011 +0100 @@ -28,7 +28,7 @@ if (!m_aboutToDelete) { std::cerr << "NOTE: Model::~Model(" << this << ", \"" - << objectName().toStdString() << "\"): Model deleted " + << objectName() << "\"): Model deleted " << "with no aboutToDelete notification" << std::endl; } @@ -63,7 +63,7 @@ if (m_aboutToDelete) { std::cerr << "WARNING: Model(" << this << ", \"" - << objectName().toStdString() << "\")::aboutToDelete: " + << objectName() << "\")::aboutToDelete: " << "aboutToDelete called more than once for the same model" << std::endl; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/model/ModelDataTableModel.cpp --- a/data/model/ModelDataTableModel.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/model/ModelDataTableModel.cpp Thu May 12 17:31:24 2011 +0100 @@ -362,7 +362,7 @@ } for (MapType::iterator i = rowMap.begin(); i != rowMap.end(); ++i) { -// std::cerr << "resortAlphabetical: " << i->second << ": " << i->first.toStdString() << std::endl; +// std::cerr << "resortAlphabetical: " << i->second << ": " << i->first << std::endl; m_rsort.push_back(i->second); } diff -r 99222d4bfc78 -r b4a8d8221eaf data/model/WritableWaveFileModel.cpp --- a/data/model/WritableWaveFileModel.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/model/WritableWaveFileModel.cpp Thu May 12 17:31:24 2011 +0100 @@ -54,7 +54,7 @@ m_writer = new WavFileWriter(path, sampleRate, channels); if (!m_writer->isOK()) { - std::cerr << "WritableWaveFileModel: Error in creating WAV file writer: " << m_writer->getError().toStdString() << std::endl; + std::cerr << "WritableWaveFileModel: Error in creating WAV file writer: " << m_writer->getError() << std::endl; delete m_writer; m_writer = 0; return; @@ -110,7 +110,7 @@ #endif if (!m_writer->writeSamples(samples, count)) { - std::cerr << "ERROR: WritableWaveFileModel::addSamples: writer failed: " << m_writer->getError().toStdString() << std::endl; + std::cerr << "ERROR: WritableWaveFileModel::addSamples: writer failed: " << m_writer->getError() << std::endl; return false; } diff -r 99222d4bfc78 -r b4a8d8221eaf data/osc/OSCMessage.h --- a/data/osc/OSCMessage.h Thu May 12 16:56:08 2011 +0100 +++ b/data/osc/OSCMessage.h Thu May 12 17:31:24 2011 +0100 @@ -27,6 +27,8 @@ #include #include +#include "base/Debug.h" + class OSCMessage { public: diff -r 99222d4bfc78 -r b4a8d8221eaf data/osc/OSCQueue.cpp --- a/data/osc/OSCQueue.cpp Thu May 12 16:56:08 2011 +0100 +++ b/data/osc/OSCQueue.cpp Thu May 12 17:31:24 2011 +0100 @@ -180,7 +180,7 @@ m_buffer.write(&mp, 1); std::cerr << "OSCQueue::postMessage: Posted OSC message: target " << message.getTarget() << ", target data " << message.getTargetData() - << ", method " << message.getMethod().toStdString() << std::endl; + << ", method " << message.getMethod() << std::endl; emit messagesAvailable(); } @@ -213,7 +213,7 @@ if (method.contains('/')) { std::cerr << "ERROR: OSCQueue::parseOSCPath: malformed path \"" - << path.toStdString() << "\" (should be target/data/method or " + << path << "\" (should be target/data/method or " << "target/method or method, where target and data " << "are numeric)" << std::endl; return false; diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/DSSIPluginFactory.cpp --- a/plugin/DSSIPluginFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/plugin/DSSIPluginFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -159,7 +159,7 @@ if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { loadLibrary(soname); if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { - std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname.toStdString() << std::endl; + std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << std::endl; return 0; } firstInLibrary = true; @@ -171,7 +171,7 @@ DLSYM(libraryHandle, "dssi_descriptor"); if (!fn) { - std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname.toStdString() << std::endl; + std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << std::endl; return 0; } @@ -188,7 +188,7 @@ ++index; } - std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label.toStdString() << " in library " << soname.toStdString() << std::endl; + std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << std::endl; return 0; } @@ -292,7 +292,7 @@ if (!libraryHandle) { std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't load plugin library " - << soname.toStdString() << " - " << DLERROR() << std::endl; + << soname << " - " << DLERROR() << std::endl; return; } @@ -300,7 +300,7 @@ DLSYM(libraryHandle, "dssi_descriptor"); if (!fn) { - std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname.toStdString() << std::endl; + std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname << std::endl; return; } @@ -311,7 +311,7 @@ const LADSPA_Descriptor *ladspaDescriptor = descriptor->LADSPA_Plugin; if (!ladspaDescriptor) { - std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname.toStdString() << std::endl; + std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname << std::endl; ++index; continue; } diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/FeatureExtractionPluginFactory.cpp --- a/plugin/FeatureExtractionPluginFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/plugin/FeatureExtractionPluginFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -96,7 +96,7 @@ if (factory) { std::vector tmp = factory->getPluginIdentifiers(); for (size_t i = 0; i < tmp.size(); ++i) { -// std::cerr << "identifier: " << tmp[i].toStdString() << std::endl; +// std::cerr << "identifier: " << tmp[i] << std::endl; rv.push_back(tmp[i]); } } @@ -130,13 +130,13 @@ QString soname = pluginDir.filePath(pluginDir[j]); #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE - std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname << std::endl; #endif void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_LOCAL); if (!libraryHandle) { - std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; + std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname << ": " << DLERROR() << std::endl; continue; } @@ -148,9 +148,9 @@ DLSYM(libraryHandle, "vampGetPluginDescriptor"); if (!fn) { - std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: No descriptor function in " << soname.toStdString() << std::endl; + std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: No descriptor function in " << soname << std::endl; if (DLCLOSE(libraryHandle) != 0) { - std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to unload library " << soname.toStdString() << std::endl; + std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to unload library " << soname << std::endl; } continue; } @@ -194,14 +194,14 @@ ("vamp", soname, descriptor->identifier); rv.push_back(id); #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE - std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id.toStdString() << " at index " << index << std::endl; + std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id << " at index " << index << std::endl; #endif ++index; } } if (DLCLOSE(libraryHandle) != 0) { - std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to unload library " << soname.toStdString() << std::endl; + std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to unload library " << soname << std::endl; } } } @@ -218,7 +218,7 @@ #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE std::cerr << "FeatureExtractionPluginFactory::findPluginFile(\"" - << soname.toStdString() << "\", \"" << inDir.toStdString() << "\")" + << soname << "\", \"" << inDir << "\")" << std::endl; #endif @@ -235,7 +235,7 @@ #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE std::cerr << "FeatureExtractionPluginFactory::findPluginFile: " - << "found trivially at " << file.toStdString() << std::endl; + << "found trivially at " << file << std::endl; #endif return file; @@ -247,7 +247,7 @@ #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE std::cerr << "FeatureExtractionPluginFactory::findPluginFile: " - << "found \"" << soname.toStdString() << "\" at " << file.toStdString() << std::endl; + << "found \"" << soname << "\" at " << file << std::endl; #endif return file; @@ -268,7 +268,7 @@ if (fi.isAbsolute() && fi.exists() && fi.isFile()) { #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE std::cerr << "FeatureExtractionPluginFactory::findPluginFile: " - << "found trivially at " << soname.toStdString() << std::endl; + << "found trivially at " << soname << std::endl; #endif return soname; } @@ -311,20 +311,20 @@ QString type, soname, label; PluginIdentifier::parseIdentifier(identifier, type, soname, label); if (type != "vamp") { - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << std::endl; return 0; } QString found = findPluginFile(soname); if (found == "") { - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find library file " << soname.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find library file " << soname << std::endl; return 0; } else if (found != soname) { #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname.toStdString() << ", found at " << found.toStdString() << std::endl; - std::cerr << soname.toStdString() << " -> " << found.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname << ", found at " << found << std::endl; + std::cerr << soname << " -> " << found << std::endl; #endif } @@ -334,7 +334,7 @@ void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_LOCAL); if (!libraryHandle) { - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to load library " << soname << ": " << DLERROR() << std::endl; return 0; } @@ -342,7 +342,7 @@ DLSYM(libraryHandle, "vampGetPluginDescriptor"); if (!fn) { - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname << std::endl; goto done; } @@ -352,7 +352,7 @@ } if (!descriptor) { - std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find plugin \"" << label.toStdString() << "\" in library " << soname.toStdString() << std::endl; + std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find plugin \"" << label << "\" in library " << soname << std::endl; goto done; } @@ -370,11 +370,11 @@ done: if (!rv) { if (DLCLOSE(libraryHandle) != 0) { - std::cerr << "WARNING: FeatureExtractionPluginFactory::instantiatePlugin: Failed to unload library " << soname.toStdString() << std::endl; + std::cerr << "WARNING: FeatureExtractionPluginFactory::instantiatePlugin: Failed to unload library " << soname << std::endl; } } -// std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Instantiated plugin " << label.toStdString() << " from library " << soname.toStdString() << ": descriptor " << descriptor << ", rv "<< rv << ", label " << rv->getName() << ", outputs " << rv->getOutputDescriptors().size() << std::endl; +// std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Instantiated plugin " << label << " from library " << soname << ": descriptor " << descriptor << ", rv "<< rv << ", label " << rv->getName() << ", outputs " << rv->getOutputDescriptors().size() << std::endl; return rv; } @@ -416,7 +416,7 @@ 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]); @@ -430,12 +430,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 << "FeatureExtractionPluginFactory: set id \"" << id.toStdString() << "\" to cat \"" << cat.toStdString() << "\"" << std::endl; +// std::cerr << "FeatureExtractionPluginFactory: set id \"" << id << "\" to cat \"" << cat << "\"" << std::endl; } } } diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/FeatureExtractionPluginFactory.h --- a/plugin/FeatureExtractionPluginFactory.h Thu May 12 16:56:08 2011 +0100 +++ b/plugin/FeatureExtractionPluginFactory.h Thu May 12 17:31:24 2011 +0100 @@ -22,6 +22,8 @@ #include +#include "base/Debug.h" + class FeatureExtractionPluginFactory { public: diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/LADSPAPluginFactory.cpp --- 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; } } } diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/PluginXml.cpp --- a/plugin/PluginXml.cpp Thu May 12 16:56:08 2011 +0100 +++ b/plugin/PluginXml.cpp Thu May 12 17:31:24 2011 +0100 @@ -119,7 +119,7 @@ if (ATTRIBUTE != "" && ATTRIBUTE != ACCESSOR().c_str()) { \ std::cerr << "WARNING: PluginXml::setParameters: Plugin " \ << #ATTRIBUTE << " does not match (attributes have \"" \ - << ATTRIBUTE.toStdString() << "\", my " \ + << ATTRIBUTE << "\", my " \ << #ATTRIBUTE << " is \"" << ACCESSOR() << "\")" << std::endl; \ } @@ -174,7 +174,7 @@ (QString(i->identifier.c_str()))); if (attrs.value(pname) == "") { -// std::cerr << "PluginXml::setParameters: no parameter \"" << i->name << "\" (attribute \"" << name.toStdString() << "\")" << std::endl; +// std::cerr << "PluginXml::setParameters: no parameter \"" << i->name << "\" (attribute \"" << name << "\")" << std::endl; continue; } @@ -185,7 +185,7 @@ // << i->identifier << "\" to value " << value << std::endl; m_plugin->setParameter(i->identifier, value); } else { - std::cerr << "WARNING: PluginXml::setParameters: Invalid value \"" << attrs.value(pname).toStdString() << "\" for parameter \"" << i->identifier << "\" (attribute \"" << pname.toStdString() << "\")" << std::endl; + std::cerr << "WARNING: PluginXml::setParameters: Invalid value \"" << attrs.value(pname) << "\" for parameter \"" << i->identifier << "\" (attribute \"" << pname << "\")" << std::endl; } } } @@ -203,9 +203,9 @@ // << xml.toLocal8Bit().data() << "\"" << std::endl; if (!doc.setContent(xml, false, &error, &errorLine, &errorColumn)) { - std::cerr << "PluginXml::setParametersFromXml: Error in parsing XML: " << error.toStdString() << " at line " << errorLine << ", column " << errorColumn << std::endl; + std::cerr << "PluginXml::setParametersFromXml: Error in parsing XML: " << error << " at line " << errorLine << ", column " << errorColumn << std::endl; std::cerr << "Input follows:" << std::endl; - std::cerr << xml.toStdString() << std::endl; + std::cerr << xml << std::endl; std::cerr << "Input ends." << std::endl; return; } @@ -218,7 +218,7 @@ QDomAttr attr = attrNodes.item(i).toAttr(); if (attr.isNull()) continue; // std::cerr << "PluginXml::setParametersFromXml: Adding attribute \"" << attr.name().toStdString() -// << "\" with value \"" << attr.value().toStdString() << "\"" << std::endl; +// << "\" with value \"" << attr.value() << "\"" << std::endl; attrs.append(attr.name(), "", "", attr.value()); } diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/RealTimePluginFactory.h --- a/plugin/RealTimePluginFactory.h Thu May 12 16:56:08 2011 +0100 +++ b/plugin/RealTimePluginFactory.h Thu May 12 17:31:24 2011 +0100 @@ -25,6 +25,8 @@ #include #include +#include "base/Debug.h" + class RealTimePluginInstance; class RealTimePluginDescriptor diff -r 99222d4bfc78 -r b4a8d8221eaf plugin/RealTimePluginInstance.cpp --- a/plugin/RealTimePluginInstance.cpp Thu May 12 16:56:08 2011 +0100 +++ b/plugin/RealTimePluginInstance.cpp Thu May 12 17:31:24 2011 +0100 @@ -31,7 +31,7 @@ // std::cerr << "RealTimePluginInstance::~RealTimePluginInstance" << std::endl; if (m_factory) { -// std::cerr << "Asking factory to release " << m_identifier.toStdString() << std::endl; +// std::cerr << "Asking factory to release " << m_identifier << std::endl; m_factory->releasePlugin(this, m_identifier); } diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/PluginRDFDescription.cpp --- a/rdf/PluginRDFDescription.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/PluginRDFDescription.cpp Thu May 12 17:31:24 2011 +0100 @@ -34,7 +34,7 @@ m_pluginUri = indexer->getURIForPluginId(pluginId); if (m_pluginUri == "") { cerr << "PluginRDFDescription: WARNING: No RDF description available for plugin ID \"" - << pluginId.toStdString() << "\"" << endl; + << pluginId << "\"" << endl; } else { // All the data we need should be in our RDF model already: // if it's not there, we don't know where to find it anyway @@ -299,14 +299,14 @@ if (!query.isOK()) { cerr << "ERROR: PluginRDFDescription::index: ERROR: Failed to query outputs for <" - << m_pluginUri.toStdString() << ">: " - << query.getErrorString().toStdString() << endl; + << m_pluginUri << ">: " + << query.getErrorString() << endl; return false; } if (results.empty()) { cerr << "ERROR: PluginRDFDescription::indexURL: NOTE: No outputs defined for <" - << m_pluginUri.toStdString() << ">" << endl; + << m_pluginUri << ">" << endl; return false; } diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/PluginRDFDescription.h --- a/rdf/PluginRDFDescription.h Thu May 12 16:56:08 2011 +0100 +++ b/rdf/PluginRDFDescription.h Thu May 12 17:31:24 2011 +0100 @@ -20,6 +20,8 @@ #include #include +#include "base/Debug.h" + class PluginRDFDescription { public: diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/PluginRDFIndexer.cpp --- a/rdf/PluginRDFIndexer.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/PluginRDFIndexer.cpp Thu May 12 17:31:24 2011 +0100 @@ -130,7 +130,7 @@ QString index = indices[i]; std::cerr << "PluginRDFIndexer::indexConfiguredURLs: index url is " - << index.toStdString() << std::endl; + << index << std::endl; CachedFile cf(index); if (!cf.isOK()) continue; @@ -186,7 +186,7 @@ // Because we may want to refer to this document again, we // cache it locally if it turns out to exist. - cerr << "PluginRDFIndexer::getIdForPluginURI: NOTE: Failed to find a local RDF document describing plugin <" << uri.toStdString() << ">: attempting to retrieve one remotely by guesswork" << endl; + cerr << "PluginRDFIndexer::getIdForPluginURI: NOTE: Failed to find a local RDF document describing plugin <" << uri << ">: attempting to retrieve one remotely by guesswork" << endl; QString baseUrl = QUrl(uri).toString(QUrl::RemoveFragment); @@ -241,7 +241,7 @@ loadPrefixes(); -// std::cerr << "PluginRDFIndexer::indexURL(" << urlString.toStdString() << ")" << std::endl; +// std::cerr << "PluginRDFIndexer::indexURL(" << urlString << ")" << std::endl; QMutexLocker locker(&m_mutex); @@ -288,7 +288,7 @@ if (!query.isOK()) { cerr << "ERROR: PluginRDFIndexer::reindex: ERROR: Failed to query plugins from model: " - << query.getErrorString().toStdString() << endl; + << query.getErrorString() << endl; return false; } @@ -309,13 +309,13 @@ if (identifier == "") { cerr << "PluginRDFIndexer::reindex: NOTE: No vamp:identifier for plugin <" - << pluginUri.toStdString() << ">" + << pluginUri << ">" << endl; continue; } if (soUri == "") { cerr << "PluginRDFIndexer::reindex: NOTE: No implementation library for plugin <" - << pluginUri.toStdString() << ">" + << pluginUri << ">" << endl; continue; } @@ -335,7 +335,7 @@ QString soname = sonameValue.value; if (soname == "") { cerr << "PluginRDFIndexer::reindex: NOTE: No identifier for library <" - << soUri.toStdString() << ">" + << soUri << ">" << endl; continue; } @@ -356,9 +356,9 @@ if (pluginUri != "") { if (m_uriToIdMap.find(pluginUri) != m_uriToIdMap.end()) { cerr << "PluginRDFIndexer::reindex: WARNING: Found multiple plugins with the same URI:" << endl; - cerr << " 1. Plugin id \"" << m_uriToIdMap[pluginUri].toStdString() << "\"" << endl; - cerr << " 2. Plugin id \"" << pluginId.toStdString() << "\"" << endl; - cerr << "both claim URI <" << pluginUri.toStdString() << ">" << endl; + cerr << " 1. Plugin id \"" << m_uriToIdMap[pluginUri] << "\"" << endl; + cerr << " 2. Plugin id \"" << pluginId << "\"" << endl; + cerr << "both claim URI <" << pluginUri << ">" << endl; } else { m_uriToIdMap[pluginUri] = pluginId; } diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/RDFFeatureWriter.cpp --- a/rdf/RDFFeatureWriter.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/RDFFeatureWriter.cpp Thu May 12 17:31:24 2011 +0100 @@ -112,7 +112,7 @@ RDFFeatureWriter::setTrackMetadata(QString trackId, TrackMetadata metadata) { -// cerr << "setTrackMetadata: title = " << metadata.title.toStdString() << ", maker = " << metadata.maker.toStdString() << endl; +// cerr << "setTrackMetadata: title = " << metadata.title << ", maker = " << metadata.maker << endl; m_metadata[trackId] = metadata; } @@ -142,10 +142,10 @@ if (m_rdfDescriptions[pluginId].haveDescription()) { cerr << "NOTE: Have RDF description for plugin ID \"" - << pluginId.toStdString() << "\"" << endl; + << pluginId << "\"" << endl; } else { cerr << "NOTE: No RDF description for plugin ID \"" - << pluginId.toStdString() << "\"" << endl; + << pluginId << "\"" << endl; if (!m_network) { cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; cerr << " from the network where possible." << endl; @@ -262,7 +262,7 @@ // dirty grubby low-rent way of doing that. This function is // called by FileFeatureWriter::getOutputFile when in append mode. -// std::cerr << "reviewFileForAppending(" << filename.toStdString() << ")" << std::endl; +// std::cerr << "reviewFileForAppending(" << filename << ")" << std::endl; QFile file(filename); @@ -348,7 +348,7 @@ (m_metadata.find(trackId) != m_metadata.end())); // cerr << "wantTrack = " << wantTrack << " (userSpecifiedTrack = " -// << userSpecifiedTrack << ", m_userMakerUri = " << m_userMakerUri.toStdString() << ", have metadata = " << (m_metadata.find(trackId) != m_metadata.end()) << ")" << endl; +// << userSpecifiedTrack << ", m_userMakerUri = " << m_userMakerUri << ", have metadata = " << (m_metadata.find(trackId) != m_metadata.end()) << ")" << endl; if (wantTrack) { // We only write a Track at all if we have some title/artist diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/RDFImporter.cpp --- a/rdf/RDFImporter.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/RDFImporter.cpp Thu May 12 17:31:24 2011 +0100 @@ -154,7 +154,7 @@ if (m_sampleRate == 0) { m_errorString = QString("Invalid audio data model (is audio file format supported?)"); - std::cerr << m_errorString.toStdString() << std::endl; + std::cerr << m_errorString << std::endl; return models; } @@ -265,7 +265,7 @@ fs->waitForData(); WaveFileModel *newModel = new WaveFileModel(*fs, m_sampleRate); if (newModel->isOK()) { - std::cerr << "Successfully created wave file model from source at \"" << source.toStdString() << "\"" << std::endl; + std::cerr << "Successfully created wave file model from source at \"" << source << "\"" << std::endl; models.push_back(newModel); m_audioModelMap[signal] = newModel; if (m_sampleRate == 0) { @@ -428,7 +428,7 @@ "title"); if (v.value != "") { - std::cerr << "RDFImporterImpl::getDenseModelTitle: Title (from signal) \"" << v.value.toStdString() << "\"" << std::endl; + std::cerr << "RDFImporterImpl::getDenseModelTitle: Title (from signal) \"" << v.value << "\"" << std::endl; m->setObjectName(v.value); return; } @@ -439,12 +439,12 @@ "title"); if (v.value != "") { - std::cerr << "RDFImporterImpl::getDenseModelTitle: Title (from signal type) \"" << v.value.toStdString() << "\"" << std::endl; + std::cerr << "RDFImporterImpl::getDenseModelTitle: Title (from signal type) \"" << v.value << "\"" << std::endl; m->setObjectName(v.value); return; } - std::cerr << "RDFImporterImpl::getDenseModelTitle: No title available for feature <" << featureUri.toStdString() << ">" << std::endl; + std::cerr << "RDFImporterImpl::getDenseModelTitle: No title available for feature <" << featureUri << ">" << std::endl; } void @@ -473,7 +473,7 @@ SimpleSPARQLQuery::singleResultQuery (s, dimensionsQuery.arg(m_uristring).arg(featureUri), "dimensions"); - cerr << "Dimensions = \"" << dimensionsValue.value.toStdString() << "\"" + cerr << "Dimensions = \"" << dimensionsValue.value << "\"" << endl; if (dimensionsValue.value != "") { @@ -658,7 +658,7 @@ SimpleSPARQLQuery query(s, queryString); query.setProgressReporter(reporter); -// cerr << "Query will be: " << queryString.toStdString() << endl; +// cerr << "Query will be: " << queryString << endl; SimpleSPARQLQuery::ResultList results = query.execute(); @@ -738,13 +738,13 @@ (rangeResults[0]["time"].value.toStdString()); duration = RealTime::fromXsdDuration (rangeResults[0]["duration"].value.toStdString()); -// std::cerr << "duration string " << rangeResults[0]["duration"].value.toStdString() << std::endl; +// std::cerr << "duration string " << rangeResults[0]["duration"].value << std::endl; haveTime = true; haveDuration = true; } else { QString timestring = SimpleSPARQLQuery::singleResultQuery (s, timeQueryString.arg(thinguri), "time").value; -// std::cerr << "timestring = " << timestring.toStdString() << std::endl; +// std::cerr << "timestring = " << timestring << std::endl; if (timestring != "") { time = RealTime::fromXsdDuration(timestring.toStdString()); haveTime = true; @@ -774,7 +774,7 @@ /* std::cerr << "Creating new model: source = " << source.toStdString() - << ", type = " << type.toStdString() << ", dimensions = " + << ", type = " << type << ", dimensions = " << dimensions << ", haveDuration = " << haveDuration << ", time = " << time << ", duration = " << duration << std::endl; diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/RDFTransformFactory.cpp --- a/rdf/RDFTransformFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/RDFTransformFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -168,7 +168,7 @@ m_isRDF = true; if (transformResults.empty()) { - cerr << "RDFTransformFactory: NOTE: No RDF/TTL transform descriptions found in document at <" << m_urlString.toStdString() << ">" << endl; + cerr << "RDFTransformFactory: NOTE: No RDF/TTL transform descriptions found in document at <" << m_urlString << ">" << endl; return transforms; } @@ -195,8 +195,8 @@ QString pluginId = indexer->getIdForPluginURI(pluginUri); if (pluginId == "") { cerr << "RDFTransformFactory: WARNING: Unknown plugin <" - << pluginUri.toStdString() << "> for transform <" - << transformUri.toStdString() << ">, skipping this transform" + << pluginUri << "> for transform <" + << transformUri << ">, skipping this transform" << endl; continue; } @@ -273,7 +273,7 @@ transform.setBlockSize(v.value.toUInt()); } else if (optional == "window_type") { cerr << "NOTE: can't handle window type yet (value is \"" - << v.value.toStdString() << "\")" << endl; + << v.value << "\")" << endl; } else if (optional == "sample_rate") { transform.setSampleRate(v.value.toFloat()); } else if (optional == "start") { @@ -283,14 +283,14 @@ transform.setDuration (RealTime::fromXsdDuration(v.value.toStdString())); } else { - cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional.toStdString() << "\"" << endl; + cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional << "\"" << endl; } } } } cerr << "RDFTransformFactory: NOTE: Transform is: " << endl; - cerr << transform.toXmlString().toStdString() << endl; + cerr << transform.toXmlString() << endl; transforms.push_back(transform); } @@ -398,7 +398,7 @@ s << uri << " a vamp:Transform ;" << endl; s << " vamp:plugin <" << QUrl(pluginUri).toEncoded().data() << "> ;" << endl; } else { - std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No plugin URI available for plugin id \"" << pluginId.toStdString() << "\", writing synthetic plugin and library resources" << std::endl; + std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No plugin URI available for plugin id \"" << pluginId << "\", writing synthetic plugin and library resources" << std::endl; QString type, soname, label; PluginIdentifier::parseIdentifier(pluginId, type, soname, label); s << uri << "_plugin a vamp:Plugin ;" << endl; @@ -415,7 +415,7 @@ QString outputUri = description.getOutputUri(outputId); if (transform.getOutput() != "" && outputUri == "") { - std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No output URI available for transform output id \"" << transform.getOutput().toStdString() << "\", writing a synthetic output resource" << std::endl; + std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No output URI available for transform output id \"" << transform.getOutput() << "\", writing a synthetic output resource" << std::endl; } if (transform.getStepSize() != 0) { diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/SimpleSPARQLQuery.cpp --- a/rdf/SimpleSPARQLQuery.cpp Thu May 12 16:56:08 2011 +0100 +++ b/rdf/SimpleSPARQLQuery.cpp Thu May 12 17:31:24 2011 +0100 @@ -163,7 +163,7 @@ } QString err; if (!loadUri(model, fromUri, err)) { - std::cerr << "SimpleSPARQLQuery: ERROR: Failed to parse into new model: " << err.toStdString() << std::endl; + std::cerr << "SimpleSPARQLQuery: ERROR: Failed to parse into new model: " << err << std::endl; librdf_free_model(model); librdf_free_storage(storage); m_ownModelUris[fromUri] = 0; @@ -178,7 +178,7 @@ WredlandWorldWrapper::freeModel(QString forUri) { #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << "SimpleSPARQLQuery::freeModel: Model uri = \"" << forUri.toStdString() << "\"" << std::endl; + std::cerr << "SimpleSPARQLQuery::freeModel: Model uri = \"" << forUri << "\"" << std::endl; #endif QMutexLocker locker(&m_mutex); @@ -188,7 +188,7 @@ } if (m_ownModelUris.find(forUri) == m_ownModelUris.end()) { #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << "SimpleSPARQLQuery::freeModel: NOTE: Unknown or already-freed model (uri = \"" << forUri.toStdString() << "\")" << std::endl; + std::cerr << "SimpleSPARQLQuery::freeModel: NOTE: Unknown or already-freed model (uri = \"" << forUri << "\")" << std::endl; #endif return; } @@ -221,7 +221,7 @@ } #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << "About to parse \"" << uri.toStdString() << "\"" << std::endl; + std::cerr << "About to parse \"" << uri << "\"" << std::endl; #endif Profiler p("SimpleSPARQLQuery: Parse URI into LIBRDF model"); @@ -379,7 +379,7 @@ #ifdef DEBUG_SIMPLE_SPARQL_QUERY if (m_errorString != "") { std::cerr << "SimpleSPARQLQuery::execute: error returned: \"" - << m_errorString.toStdString() << "\"" << std::endl; + << m_errorString << "\"" << std::endl; } #endif } @@ -388,7 +388,7 @@ SimpleSPARQLQuery::Impl::executeDirectParser() { #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << "SimpleSPARQLQuery::executeDirectParser: Query is: \"" << m_query.toStdString() << "\"" << std::endl; + std::cerr << "SimpleSPARQLQuery::executeDirectParser: Query is: \"" << m_query << "\"" << std::endl; #endif ResultList list; @@ -405,7 +405,7 @@ fromUri = fromRE.cap(1); #ifdef DEBUG_SIMPLE_SPARQL_QUERY std::cerr << "SimpleSPARQLQuery::executeDirectParser: FROM URI is <" - << fromUri.toStdString() << ">" << std::endl; + << fromUri << ">" << std::endl; #endif } @@ -416,7 +416,7 @@ SimpleSPARQLQuery::Impl::executeDatastore() { #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << "SimpleSPARQLQuery::executeDatastore: Query is: \"" << m_query.toStdString() << "\"" << std::endl; + std::cerr << "SimpleSPARQLQuery::executeDatastore: Query is: \"" << m_query << "\"" << std::endl; #endif ResultList list; @@ -437,7 +437,7 @@ if (counter.find(m_query) == counter.end()) counter[m_query] = 1; else ++counter[m_query]; std::cerr << "Counter for this query: " << counter[m_query] << std::endl; - std::cerr << "Base URI is: \"" << modelUri.toStdString() << "\"" << std::endl; + std::cerr << "Base URI is: \"" << modelUri << "\"" << std::endl; #endif { @@ -498,7 +498,7 @@ if (!node) { #ifdef DEBUG_SIMPLE_SPARQL_QUERY - std::cerr << i << ". " << key.toStdString() << " -> (nil)" << std::endl; + std::cerr << i << ". " << key << " -> (nil)" << std::endl; #endif resultmap[key] = Value(); continue; @@ -543,7 +543,7 @@ } #ifdef DEBUG_SIMPLE_SPARQL_QUERY - cerr << i << ". " << key.toStdString() << " -> " << text.toStdString() << " (type " << type << ")" << endl; + cerr << i << ". " << key << " -> " << text << " (type " << type << ")" << endl; #endif resultmap[key] = Value(type, text); @@ -599,7 +599,7 @@ } if (!m_redland->loadUriIntoDefaultModel(sourceUri, err)) { - std::cerr << "SimpleSPARQLQuery::addSourceToModel: Failed to add source URI \"" << sourceUri.toStdString() << ": " << err.toStdString() << std::endl; + std::cerr << "SimpleSPARQLQuery::addSourceToModel: Failed to add source URI \"" << sourceUri << ": " << err << std::endl; return false; } return true; @@ -621,7 +621,7 @@ ResultList results = q.execute(); if (!q.isOK()) { cerr << "SimpleSPARQLQuery::singleResultQuery: ERROR: " - << q.getErrorString().toStdString() << endl; + << q.getErrorString() << endl; return Value(); } if (results.empty()) { diff -r 99222d4bfc78 -r b4a8d8221eaf rdf/SimpleSPARQLQuery.h --- a/rdf/SimpleSPARQLQuery.h Thu May 12 16:56:08 2011 +0100 +++ b/rdf/SimpleSPARQLQuery.h Thu May 12 17:31:24 2011 +0100 @@ -20,6 +20,8 @@ #include #include +#include "base/Debug.h" + class ProgressReporter; class SimpleSPARQLQuery diff -r 99222d4bfc78 -r b4a8d8221eaf system/System.cpp --- a/system/System.cpp Thu May 12 16:56:08 2011 +0100 +++ b/system/System.cpp Thu May 12 17:31:24 2011 +0100 @@ -219,7 +219,7 @@ if (elements.size() > 2) unit = elements[2]; int size = elements[1].toInt(); // std::cerr << "have size \"" << size << "\", unit \"" -// << unit.toStdString() << "\"" << std::endl; +// << unit << "\"" << std::endl; if (unit.toLower() == "gb") size = size * 1024; else if (unit.toLower() == "mb") size = size; else if (unit.toLower() == "kb") size = size / 1024; diff -r 99222d4bfc78 -r b4a8d8221eaf transform/FeatureExtractionModelTransformer.cpp --- a/transform/FeatureExtractionModelTransformer.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/FeatureExtractionModelTransformer.cpp Thu May 12 17:31:24 2011 +0100 @@ -43,7 +43,7 @@ m_descriptor(0), m_outputFeatureNo(0) { -// std::cerr << "FeatureExtractionModelTransformer::FeatureExtractionModelTransformer: plugin " << pluginId.toStdString() << ", outputName " << m_transform.getOutput().toStdString() << std::endl; +// std::cerr << "FeatureExtractionModelTransformer::FeatureExtractionModelTransformer: plugin " << pluginId << ", outputName " << m_transform.getOutput() << std::endl; QString pluginId = transform.getPluginIdentifier(); @@ -152,7 +152,7 @@ } for (size_t i = 0; i < outputs.size(); ++i) { -// std::cerr << "comparing output " << i << " name \"" << outputs[i].identifier << "\" with expected \"" << m_transform.getOutput().toStdString() << "\"" << std::endl; +// std::cerr << "comparing output " << i << " name \"" << outputs[i].identifier << "\" with expected \"" << m_transform.getOutput() << "\"" << std::endl; if (m_transform.getOutput() == "" || outputs[i].identifier == m_transform.getOutput().toStdString()) { m_outputFeatureNo = i; @@ -519,7 +519,7 @@ } error = fftModels[ch]->getError(); if (error != "") { - std::cerr << "FeatureExtractionModelTransformer::run: Abandoning, error is " << error.toStdString() << std::endl; + std::cerr << "FeatureExtractionModelTransformer::run: Abandoning, error is " << error << std::endl; m_abandoned = true; m_message = error; } diff -r 99222d4bfc78 -r b4a8d8221eaf transform/FileFeatureWriter.cpp --- a/transform/FileFeatureWriter.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/FileFeatureWriter.cpp Thu May 12 17:31:24 2011 +0100 @@ -61,7 +61,7 @@ while (!m_files.empty()) { if (m_files.begin()->second) { cerr << "FileFeatureWriter::~FileFeatureWriter: NOTE: Closing feature file \"" - << m_files.begin()->second->fileName().toStdString() << "\"" << endl; + << m_files.begin()->second->fileName() << "\"" << endl; delete m_files.begin()->second; } m_files.erase(m_files.begin()); @@ -170,8 +170,8 @@ { if (m_singleFileName != "") { if (QFileInfo(m_singleFileName).exists() && !(m_force || m_append)) { - cerr << endl << "FileFeatureWriter: ERROR: Specified output file \"" << m_singleFileName.toStdString() << "\" exists and neither --" << getWriterTag().toStdString() << "-force nor --" << getWriterTag().toStdString() << "-append flag is specified -- not overwriting" << endl; - cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag().toStdString() << "-force" << endl << "and --" << getWriterTag().toStdString() << "-append options" << endl; + cerr << endl << "FileFeatureWriter: ERROR: Specified output file \"" << m_singleFileName << "\" exists and neither --" << getWriterTag() << "-force nor --" << getWriterTag() << "-append flag is specified -- not overwriting" << endl; + cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl; return ""; } return m_singleFileName; @@ -193,14 +193,14 @@ infilename = scheme + ":" + infilename; // DOS drive! } -// cerr << "trackId = " << trackId.toStdString() << ", url = " << url.toString().toStdString() << ", infilename = " -// << infilename.toStdString() << ", basename = " << basename.toStdString() << ", m_baseDir = " << m_baseDir.toStdString() << endl; +// cerr << "trackId = " << trackId << ", url = " << url.toString() << ", infilename = " +// << infilename << ", basename = " << basename << ", m_baseDir = " << m_baseDir << endl; if (m_baseDir != "") dirname = QFileInfo(m_baseDir).absoluteFilePath(); else if (local) dirname = QFileInfo(infilename).absolutePath(); else dirname = QDir::currentPath(); -// cerr << "dirname = " << dirname.toStdString() << endl; +// cerr << "dirname = " << dirname << endl; QString filename; @@ -215,8 +215,8 @@ filename = QDir(dirname).filePath(filename); if (QFileInfo(filename).exists() && !(m_force || m_append)) { - cerr << endl << "FileFeatureWriter: ERROR: Output file \"" << filename.toStdString() << "\" exists (for input file or URL \"" << trackId.toStdString() << "\" and transform \"" << transformId.toStdString() << "\") and neither --" << getWriterTag().toStdString() << "-force nor --" << getWriterTag().toStdString() << "-append is specified -- not overwriting" << endl; - cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag().toStdString() << "-force" << endl << "and --" << getWriterTag().toStdString() << "-append options" << endl; + cerr << endl << "FileFeatureWriter: ERROR: Output file \"" << filename << "\" exists (for input file or URL \"" << trackId << "\" and transform \"" << transformId << "\") and neither --" << getWriterTag() << "-force nor --" << getWriterTag() << "-append is specified -- not overwriting" << endl; + cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl; return ""; } @@ -264,7 +264,7 @@ } cerr << "FileFeatureWriter: NOTE: Using output filename \"" - << filename.toStdString() << "\"" << endl; + << filename << "\"" << endl; if (m_append) { cerr << "FileFeatureWriter: NOTE: Calling reviewFileForAppending" << endl; @@ -341,7 +341,7 @@ while (!m_files.empty()) { if (m_files.begin()->second) { cerr << "FileFeatureWriter::finish: NOTE: Closing feature file \"" - << m_files.begin()->second->fileName().toStdString() << "\"" << endl; + << m_files.begin()->second->fileName() << "\"" << endl; delete m_files.begin()->second; } m_files.erase(m_files.begin()); diff -r 99222d4bfc78 -r b4a8d8221eaf transform/ModelTransformerFactory.cpp --- a/transform/ModelTransformerFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/ModelTransformerFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -87,7 +87,7 @@ bool ok = true; QString configurationXml = m_lastConfigurations[transform.getIdentifier()]; - std::cerr << "last configuration: " << configurationXml.toStdString() << std::endl; + std::cerr << "last configuration: " << configurationXml << std::endl; Vamp::PluginBase *plugin = 0; @@ -182,7 +182,7 @@ } else { std::cerr << "ModelTransformerFactory::createTransformer: Unknown transform \"" - << transform.getIdentifier().toStdString() << "\"" << std::endl; + << transform.getIdentifier() << "\"" << std::endl; return transformer; } diff -r 99222d4bfc78 -r b4a8d8221eaf transform/RealTimeEffectModelTransformer.cpp --- a/transform/RealTimeEffectModelTransformer.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/RealTimeEffectModelTransformer.cpp Thu May 12 17:31:24 2011 +0100 @@ -43,14 +43,14 @@ if (!m_transform.getBlockSize()) m_transform.setBlockSize(1024); -// std::cerr << "RealTimeEffectModelTransformer::RealTimeEffectModelTransformer: plugin " << pluginId.toStdString() << ", output " << output << std::endl; +// std::cerr << "RealTimeEffectModelTransformer::RealTimeEffectModelTransformer: plugin " << pluginId << ", output " << output << std::endl; RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(pluginId); if (!factory) { std::cerr << "RealTimeEffectModelTransformer: No factory available for plugin id \"" - << pluginId.toStdString() << "\"" << std::endl; + << pluginId << "\"" << std::endl; return; } @@ -64,7 +64,7 @@ if (!m_plugin) { std::cerr << "RealTimeEffectModelTransformer: Failed to instantiate plugin \"" - << pluginId.toStdString() << "\"" << std::endl; + << pluginId << "\"" << std::endl; return; } diff -r 99222d4bfc78 -r b4a8d8221eaf transform/Transform.cpp --- a/transform/Transform.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/Transform.cpp Thu May 12 17:31:24 2011 +0100 @@ -54,10 +54,10 @@ if (!doc.setContent(xml, false, &error, &errorLine, &errorColumn)) { std::cerr << "Transform::Transform: Error in parsing XML: " - << error.toStdString() << " at line " << errorLine + << error << " at line " << errorLine << ", column " << errorColumn << std::endl; std::cerr << "Input follows:" << std::endl; - std::cerr << xml.toStdString() << std::endl; + std::cerr << xml << std::endl; std::cerr << "Input ends." << std::endl; return; } @@ -126,9 +126,9 @@ /* std::cerr << "Transform::operator==: identical = " << identical << std::endl; std::cerr << "A = " << std::endl; - std::cerr << toXmlString().toStdString() << std::endl; + std::cerr << toXmlString() << std::endl; std::cerr << "B = " << std::endl; - std::cerr << t.toXmlString().toStdString() << std::endl; + std::cerr << t.toXmlString() << std::endl; */ return identical; } @@ -281,7 +281,7 @@ Transform::setConfigurationValue(QString name, QString value) { std::cerr << "Transform::setConfigurationValue(" << name.toStdString() - << ") -> " << value.toStdString() << std::endl; + << ") -> " << value << std::endl; m_configuration[name] = value; } @@ -464,7 +464,7 @@ if (str == "count") return Count; if (str == "") return NoSummary; std::cerr << "Transform::stringToSummaryType: unknown summary type \"" - << str.toStdString() << "\"" << std::endl; + << str << "\"" << std::endl; return NoSummary; } diff -r 99222d4bfc78 -r b4a8d8221eaf transform/TransformFactory.cpp --- a/transform/TransformFactory.cpp Thu May 12 16:56:08 2011 +0100 +++ b/transform/TransformFactory.cpp Thu May 12 17:31:24 2011 +0100 @@ -113,7 +113,7 @@ for (TransformDescriptionMap::const_iterator i = m_transforms.begin(); i != m_transforms.end(); ++i) { #ifdef DEBUG_TRANSFORM_FACTORY - cerr << "inserting transform into set: id = " << i->second.identifier.toStdString() << endl; + cerr << "inserting transform into set: id = " << i->second.identifier << endl; #endif dset.insert(i->second); } @@ -122,7 +122,7 @@ for (std::set::const_iterator i = dset.begin(); i != dset.end(); ++i) { #ifdef DEBUG_TRANSFORM_FACTORY - cerr << "inserting transform into list: id = " << i->identifier.toStdString() << endl; + cerr << "inserting transform into list: id = " << i->identifier << endl; #endif list.push_back(*i); } @@ -159,7 +159,7 @@ for (TransformDescriptionMap::const_iterator i = m_uninstalledTransforms.begin(); i != m_uninstalledTransforms.end(); ++i) { #ifdef DEBUG_TRANSFORM_FACTORY - cerr << "inserting transform into set: id = " << i->second.identifier.toStdString() << endl; + cerr << "inserting transform into set: id = " << i->second.identifier << endl; #endif dset.insert(i->second); } @@ -168,7 +168,7 @@ for (std::set::const_iterator i = dset.begin(); i != dset.end(); ++i) { #ifdef DEBUG_TRANSFORM_FACTORY - cerr << "inserting transform into uninstalled list: id = " << i->identifier.toStdString() << endl; + cerr << "inserting transform into uninstalled list: id = " << i->identifier << endl; #endif list.push_back(*i); } @@ -478,7 +478,7 @@ !plugin->getParameterDescriptors().empty()); #ifdef DEBUG_TRANSFORM_FACTORY - cerr << "Feature extraction plugin transform: " << transformId.toStdString() << " friendly name: " << friendlyName.toStdString() << endl; + cerr << "Feature extraction plugin transform: " << transformId << " friendly name: " << friendlyName << endl; #endif transforms[transformId] = @@ -530,7 +530,7 @@ //!!! if (descriptor->controlOutputPortCount == 0 || // descriptor->audioInputPortCount == 0) continue; -// std::cout << "TransformFactory::populateRealTimePlugins: plugin " << pluginId.toStdString() << " has " << descriptor->controlOutputPortCount << " control output ports, " << descriptor->audioOutputPortCount << " audio outputs, " << descriptor->audioInputPortCount << " audio inputs" << endl; +// std::cout << "TransformFactory::populateRealTimePlugins: plugin " << pluginId << " has " << descriptor->controlOutputPortCount << " control output ports, " << descriptor->audioOutputPortCount << " audio outputs, " << descriptor->audioInputPortCount << " audio inputs" << endl; QString pluginName = descriptor->name.c_str(); QString category = factory->getPluginCategory(pluginId); @@ -679,7 +679,7 @@ if (m_transforms.find(tid) != m_transforms.end()) { #ifdef DEBUG_TRANSFORM_FACTORY std::cerr << "TransformFactory::populateUninstalledTransforms: " - << tid.toStdString() << " is installed; adding info url if appropriate, skipping rest" << std::endl; + << tid << " is installed; adding info url if appropriate, skipping rest" << std::endl; #endif if (infoUrl != "") { if (m_transforms[tid].infoUrl == "") { @@ -691,7 +691,7 @@ #ifdef DEBUG_TRANSFORM_FACTORY std::cerr << "TransformFactory::populateUninstalledTransforms: " - << "adding " << tid.toStdString() << std::endl; + << "adding " << tid << std::endl; #endif QString oname = desc.getOutputName(*j); @@ -1070,7 +1070,7 @@ if (!plugin) { cerr << "TransformFactory::getPluginConfigurationXml: " << "Unable to instantiate plugin for transform \"" - << t.getIdentifier().toStdString() << "\"" << endl; + << t.getIdentifier() << "\"" << endl; return xml; } @@ -1092,7 +1092,7 @@ if (!plugin) { cerr << "TransformFactory::setParametersFromPluginConfigurationXml: " << "Unable to instantiate plugin for transform \"" - << t.getIdentifier().toStdString() << "\"" << endl; + << t.getIdentifier() << "\"" << endl; return; }