diff widgets/TipDialog.cpp @ 586:1ae54a29e59e

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:48:29 +0100
parents f4960f8ce798
children 4806715f7a19
line wrap: on
line diff
--- a/widgets/TipDialog.cpp	Thu Apr 14 15:21:21 2011 +0100
+++ b/widgets/TipDialog.cpp	Tue Jun 14 14:48:29 2011 +0100
@@ -114,7 +114,7 @@
 void
 TipDialog::readTips()
 {
-    std::cerr << "TipDialog::readTips" << std::endl;
+    DEBUG << "TipDialog::readTips" << endl;
 
     QString language = QLocale::system().name();
     QString filename = QString(":i18n/tips_%1.xml").arg(language);
@@ -134,7 +134,7 @@
 
     QFile file(filename);
 
-    std::cerr << "TipDialog::readTips from " << filename.toStdString() << std::endl;
+    DEBUG << "TipDialog::readTips from " << filename << endl;
 
     QXmlInputSource source(&file);
     
@@ -146,7 +146,7 @@
 TipDialog::showTip()
 {
     if (m_tipNumber < int(m_tips.size())) {
-        std::cerr << "Tip " << m_tipNumber << " is: " << m_tips[m_tipNumber].toStdString() << std::endl;
+        std::cerr << "Tip " << m_tipNumber << " is: " << m_tips[m_tipNumber] << std::endl;
         m_label->setText(m_tips[m_tipNumber]);
     } else {
         accept();
@@ -188,11 +188,11 @@
 {
     QString name = qName.toLower();
 
-    std::cerr << "TipFileParser::startElement(" << name.toStdString() << ")" << std::endl;
+    DEBUG << "TipFileParser::startElement(" << name << ")" << endl;
 
     if (name == "tips") {
         QString caption = attributes.value("caption");
-        std::cerr << "TipFileParser::caption = " << caption.toStdString() << std::endl;
+        DEBUG << "TipFileParser::caption = " << caption << endl;
         if (caption != "") m_dialog->m_caption = caption;
     } else if (name == "tip") {
         if (m_inTip) {
@@ -224,7 +224,7 @@
         m_dialog->m_tips[m_dialog->m_tips.size()-1] += ">";
     }
     
-    std::cerr << "TipFileParser::startElement done" << std::endl;
+    DEBUG << "TipFileParser::startElement done" << endl;
     return true;
 }
 
@@ -263,7 +263,7 @@
 bool
 TipDialog::TipFileParser::characters(const QString &text)
 {
-    std::cerr << "TipFileParser::characters(" << text.toStdString() << ")" << std::endl;
+    DEBUG << "TipFileParser::characters(" << text << ")" << endl;
 
     if (m_inText || m_inHtml) {
         m_dialog->m_tips[m_dialog->m_tips.size()-1] += text;
@@ -280,7 +280,7 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    std::cerr << errorString.toStdString() << std::endl;
+    std::cerr << errorString << std::endl;
     return QXmlDefaultHandler::error(exception);
 }
 
@@ -292,6 +292,6 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    std::cerr << errorString.toStdString() << std::endl;
+    std::cerr << errorString << std::endl;
     return QXmlDefaultHandler::fatalError(exception);
 }