Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 295:14b1768e5406 tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:39:57 +0000 |
parents | bc78f88a66f5 933b5aed341a |
children | febd49356ef3 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Fri Nov 22 10:41:36 2013 +0000 +++ b/framework/MainWindowBase.cpp Tue Nov 26 14:39:57 2013 +0000 @@ -103,8 +103,8 @@ #include <cstdio> #include <errno.h> -using std::cerr; -using std::endl; + + using std::vector; using std::map; @@ -122,10 +122,10 @@ char errstr[256]; XGetErrorText(dpy, err->error_code, errstr, 256); if (err->error_code != BadWindow) { - std::cerr << "Sonic Visualiser: X Error: " + cerr << "Sonic Visualiser: X Error: " << errstr << " " << int(err->error_code) << "\nin major opcode: " - << int(err->request_code) << std::endl; + << int(err->request_code) << endl; } return 0; } @@ -292,7 +292,7 @@ QTimer *oscTimer = new QTimer(this); connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC())); oscTimer->start(1000); - std::cerr << "Finished setting up OSC interface" << std::endl; + cerr << "Finished setting up OSC interface" << endl; } } @@ -581,7 +581,7 @@ int frame = m_playSource->getCurrentBufferedFrame(); -// std::cerr << "currentPaneChanged: current frame (in ref model) = " << frame << std::endl; +// cerr << "currentPaneChanged: current frame (in ref model) = " << frame << endl; View::ModelSet soloModels = p->getModels(); @@ -1095,7 +1095,7 @@ RDFImporter::RDFDocumentType rdfType = RDFImporter::identifyDocumentType (QUrl::fromLocalFile(source.getLocalFilename()).toString()); -// std::cerr << "RDF type: " << (int)rdfType << std::endl; +// cerr << "RDF type: " << (int)rdfType << endl; if (rdfType == RDFImporter::AudioRefAndAnnotations || rdfType == RDFImporter::AudioRef) { rdfSession = true; @@ -1154,7 +1154,7 @@ templateName = getDefaultSessionTemplate(); } - std::cerr << "template is: \"" << templateName.toStdString() << "\"" << std::endl; + cerr << "template is: \"" << templateName << "\"" << endl; if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); @@ -1175,7 +1175,7 @@ return FileOpenFailed; } -// std::cerr << "mode = " << mode << std::endl; +// cerr << "mode = " << mode << endl; if (mode == AskUser) { if (getMainModel()) { @@ -1252,15 +1252,15 @@ if (!checkSaveModified()) return FileOpenCancelled; - std::cerr << "SV looking for template " << templateName << std::endl; + cerr << "SV looking for template " << templateName << endl; if (templateName != "") { FileOpenStatus tplStatus = openSessionTemplate(templateName); if (tplStatus == FileOpenCancelled) { - std::cerr << "Template load cancelled" << std::endl; + cerr << "Template load cancelled" << endl; return FileOpenCancelled; } if (tplStatus != FileOpenFailed) { - std::cerr << "Template load succeeded" << std::endl; + cerr << "Template load succeeded" << endl; loadedTemplate = true; } } @@ -1436,13 +1436,13 @@ if (!pane) { // shouldn't happen, as the menu action should have been disabled - std::cerr << "WARNING: MainWindowBase::openLayer: no current pane" << std::endl; + cerr << "WARNING: MainWindowBase::openLayer: no current pane" << endl; return FileOpenWrongMode; } if (!getMainModel()) { // shouldn't happen, as the menu action should have been disabled - std::cerr << "WARNING: MainWindowBase::openLayer: No main model -- hence no default sample rate available" << std::endl; + cerr << "WARNING: MainWindowBase::openLayer: No main model -- hence no default sample rate available" << endl; return FileOpenWrongMode; } @@ -1454,7 +1454,7 @@ RDFImporter::RDFDocumentType rdfType = RDFImporter::identifyDocumentType(QUrl::fromLocalFile(path).toString()); -// std::cerr << "RDF type: (in layer) " << (int) rdfType << std::endl; +// cerr << "RDF type: (in layer) " << (int) rdfType << endl; if (rdfType != RDFImporter::NotRDF) { @@ -1469,9 +1469,9 @@ QFile file(path); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - std::cerr << "ERROR: MainWindowBase::openLayer(" - << source.getLocation().toStdString() - << "): Failed to open file for reading" << std::endl; + cerr << "ERROR: MainWindowBase::openLayer(" + << source.getLocation() + << "): Failed to open file for reading" << endl; return FileOpenFailed; } @@ -1488,10 +1488,10 @@ reader.parse(inputSource); if (!reader.isOK()) { - std::cerr << "ERROR: MainWindowBase::openLayer(" - << source.getLocation().toStdString() + cerr << "ERROR: MainWindowBase::openLayer(" + << source.getLocation() << "): Failed to read XML file: " - << reader.getErrorString() << std::endl; + << reader.getErrorString() << endl; return FileOpenFailed; } @@ -1568,7 +1568,7 @@ if (!pane) { // shouldn't happen, as the menu action should have been disabled - std::cerr << "WARNING: MainWindowBase::openImage: no current pane" << std::endl; + cerr << "WARNING: MainWindowBase::openImage: no current pane" << endl; return FileOpenWrongMode; } @@ -1594,7 +1594,7 @@ // We don't put the image file in Recent Files - std::cerr << "openImage: trying location \"" << source.getLocation() << "\" in image layer" << std::endl; + cerr << "openImage: trying location \"" << source.getLocation() << "\" in image layer" << endl; if (!il->addImage(m_viewManager->getGlobalCentreFrame(), source.getLocation())) { if (newLayer) { @@ -1633,7 +1633,7 @@ RDFImporter::identifyDocumentType (QUrl::fromLocalFile(source.getLocalFilename()).toString()); -// std::cerr << "RDF type: " << (int)rdfType << std::endl; +// cerr << "RDF type: " << (int)rdfType << endl; if (rdfType == RDFImporter::AudioRefAndAnnotations || rdfType == RDFImporter::AudioRef) { @@ -1645,7 +1645,7 @@ if (source.getExtension().toLower() == "xml") { if (SVFileReader::identifyXmlFile(source.getLocalFilename()) == SVFileReader::SVSessionFile) { - std::cerr << "This XML file looks like a session file, attempting to open it as a session" << std::endl; + cerr << "This XML file looks like a session file, attempting to open it as a session" << endl; } else { return FileOpenFailed; } @@ -1748,7 +1748,7 @@ ResourceFinder rf; QString tfile = rf.getResourcePath("templates", templateName + ".svt"); if (tfile != "") { - std::cerr << "SV loading template file " << tfile.toStdString() << std::endl; + cerr << "SV loading template file " << tfile << endl; return openSessionTemplate(FileSource("file:" + tfile)); } else { return FileOpenFailed; @@ -1758,7 +1758,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openSessionTemplate(FileSource source) { - std::cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation().toStdString() << ")" << std::endl; + cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation() << ")" << endl; if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); @@ -2087,10 +2087,10 @@ BZipFileDevice bzFile(temp.getTemporaryFilename()); if (!bzFile.open(QIODevice::WriteOnly)) { - std::cerr << "Failed to open session file \"" - << temp.getTemporaryFilename().toStdString() + cerr << "Failed to open session file \"" + << temp.getTemporaryFilename() << "\" for writing: " - << bzFile.errorString() << std::endl; + << bzFile.errorString() << endl; return false; } @@ -2132,10 +2132,10 @@ QFile file(temp.getTemporaryFilename()); if (!file.open(QIODevice::WriteOnly)) { - std::cerr << "Failed to open session template file \"" - << temp.getTemporaryFilename().toStdString() + cerr << "Failed to open session template file \"" + << temp.getTemporaryFilename() << "\" for writing: " - << file.errorString().toStdString() << std::endl; + << file.errorString() << endl; return false; } @@ -3048,7 +3048,7 @@ removeLayerEditDialog(layer); if (m_timeRulerLayer && (layer == m_timeRulerLayer)) { -// std::cerr << "(this is the time ruler layer)" << std::endl; +// cerr << "(this is the time ruler layer)" << endl; m_timeRulerLayer = 0; } }