changeset 294:933b5aed341a

Drop toStdString() and toLocal8Bit().data(), with debug header we can stream QStrings
author Chris Cannam
date Tue, 26 Nov 2013 14:14:25 +0000
parents 068235cf5bf7
children 14b1768e5406 47964f188bd9
files audioio/AudioGenerator.cpp framework/Document.cpp framework/MainWindowBase.cpp framework/SVFileReader.cpp
diffstat 4 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp	Tue Nov 26 14:12:50 2013 +0000
+++ b/audioio/AudioGenerator.cpp	Tue Nov 26 14:14:25 2013 +0000
@@ -95,7 +95,7 @@
 
         if (!file.copy(target)) {
             cerr << "WARNING: AudioGenerator::getSampleDir: "
-                      << "Unable to copy " << fileName.toStdString()
+                      << "Unable to copy " << fileName
                       << " into temporary directory \""
                       << m_sampleDir << "\"" << endl;
         } else {
--- a/framework/Document.cpp	Tue Nov 26 14:12:50 2013 +0000
+++ b/framework/Document.cpp	Tue Nov 26 14:14:25 2013 +0000
@@ -662,7 +662,7 @@
 	model != m_mainModel &&
 	m_models.find(model) == m_models.end()) {
 	cerr << "ERROR: Document::setModel: Layer " << layer
-		  << " (\"" << layer->objectName().toStdString()
+		  << " (\"" << layer->objectName()
                   << "\") wants to use unregistered model " << model
 		  << ": register the layer's model before setting it!"
 		  << endl;
--- a/framework/MainWindowBase.cpp	Tue Nov 26 14:12:50 2013 +0000
+++ b/framework/MainWindowBase.cpp	Tue Nov 26 14:14:25 2013 +0000
@@ -1132,7 +1132,7 @@
         templateName = getDefaultSessionTemplate();
     }
 
-    cerr << "template is: \"" << templateName.toStdString() << "\"" << endl;
+    cerr << "template is: \"" << templateName << "\"" << endl;
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
@@ -1448,7 +1448,7 @@
         
         if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
             cerr << "ERROR: MainWindowBase::openLayer("
-                      << source.getLocation().toStdString()
+                      << source.getLocation()
                       << "): Failed to open file for reading" << endl;
             return FileOpenFailed;
         }
@@ -1467,7 +1467,7 @@
         
         if (!reader.isOK()) {
             cerr << "ERROR: MainWindowBase::openLayer("
-                      << source.getLocation().toStdString()
+                      << source.getLocation()
                       << "): Failed to read XML file: "
                       << reader.getErrorString() << endl;
             return FileOpenFailed;
@@ -1726,7 +1726,7 @@
     ResourceFinder rf;
     QString tfile = rf.getResourcePath("templates", templateName + ".svt");
     if (tfile != "") {
-        cerr << "SV loading template file " << tfile.toStdString() << endl;
+        cerr << "SV loading template file " << tfile << endl;
         return openSessionTemplate(FileSource("file:" + tfile));
     } else {
         return FileOpenFailed;
@@ -1736,7 +1736,7 @@
 MainWindowBase::FileOpenStatus
 MainWindowBase::openSessionTemplate(FileSource source)
 {
-    cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation().toStdString() << ")" << endl;
+    cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation() << ")" << endl;
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
@@ -2066,7 +2066,7 @@
         BZipFileDevice bzFile(temp.getTemporaryFilename());
         if (!bzFile.open(QIODevice::WriteOnly)) {
             cerr << "Failed to open session file \""
-                      << temp.getTemporaryFilename().toStdString()
+                      << temp.getTemporaryFilename()
                       << "\" for writing: "
                       << bzFile.errorString() << endl;
             return false;
@@ -2111,9 +2111,9 @@
         QFile file(temp.getTemporaryFilename());
         if (!file.open(QIODevice::WriteOnly)) {
             cerr << "Failed to open session template file \""
-                      << temp.getTemporaryFilename().toStdString()
+                      << temp.getTemporaryFilename()
                       << "\" for writing: "
-                      << file.errorString().toStdString() << endl;
+                      << file.errorString() << endl;
             return false;
         }
         
--- a/framework/SVFileReader.cpp	Tue Nov 26 14:12:50 2013 +0000
+++ b/framework/SVFileReader.cpp	Tue Nov 26 14:14:25 2013 +0000
@@ -236,12 +236,12 @@
 
     } else {
         cerr << "WARNING: SV-XML: Unexpected element \""
-                  << name.toLocal8Bit().data() << "\"" << endl;
+                  << name << "\"" << endl;
     }
 
     if (!ok) {
 	cerr << "WARNING: SV-XML: Failed to completely process element \""
-		  << name.toLocal8Bit().data() << "\"" << endl;
+		  << name << "\"" << endl;
     }
 
     return true;
@@ -362,7 +362,7 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    cerr << m_errorString.toLocal8Bit().data() << endl;
+    cerr << m_errorString << endl;
     return QXmlDefaultHandler::error(exception);
 }
 
@@ -374,7 +374,7 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    cerr << m_errorString.toLocal8Bit().data() << endl;
+    cerr << m_errorString << endl;
     return QXmlDefaultHandler::fatalError(exception);
 }
 
@@ -706,7 +706,7 @@
     } else {
 
 	cerr << "WARNING: SV-XML: Unexpected model type \""
-		  << type.toLocal8Bit().data() << "\" for model id " << id << endl;
+		  << type << "\" for model id " << id << endl;
     }
 
     return false;
@@ -720,7 +720,7 @@
     
     if (type != "pane") {
 	cerr << "WARNING: SV-XML: Unexpected view type \""
-		  << type.toLocal8Bit().data() << "\"" << endl;
+		  << type << "\"" << endl;
 	return false;
     }
 
@@ -778,7 +778,7 @@
 
     if (!ok) {
 	cerr << "WARNING: SV-XML: No layer id for layer of type \""
-		  << type.toLocal8Bit().data()
+		  << type
 		  << "\"" << endl;
 	return false;
     }
@@ -837,7 +837,7 @@
 	    
     if (!layer) {
 	cerr << "WARNING: SV-XML: Failed to add layer of type \""
-		  << type.toLocal8Bit().data()
+		  << type
 		  << "\"" << endl;
 	return false;
     }