Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 229:8c13e8219903 debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:40 +0100 |
parents | 67cea66bd588 |
children | 8aace2d9f1c2 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Thu May 12 17:31:56 2011 +0100 +++ b/framework/MainWindowBase.cpp Mon May 16 17:19:40 2011 +0100 @@ -234,7 +234,7 @@ MainWindowBase::~MainWindowBase() { - std::cerr << "MainWindowBase::~MainWindowBase" << std::endl; + DEBUG << "MainWindowBase::~MainWindowBase" << endl; if (m_playTarget) m_playTarget->shutdown(); // delete m_playTarget; delete m_playSource; @@ -427,7 +427,7 @@ void MainWindowBase::documentModified() { -// std::cerr << "MainWindowBase::documentModified" << std::endl; +// DEBUG << "MainWindowBase::documentModified" << endl; if (!m_documentModified) { //!!! this in subclass implementation? @@ -441,7 +441,7 @@ void MainWindowBase::documentRestored() { -// std::cerr << "MainWindowBase::documentRestored" << std::endl; +// DEBUG << "MainWindowBase::documentRestored" << endl; if (m_documentModified) { //!!! this in subclass implementation? @@ -1073,7 +1073,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, QString templateName) { -// std::cerr << "MainWindowBase::openAudio(" << source.getLocation() << ")" << std::endl; +// DEBUG << "MainWindowBase::openAudio(" << source.getLocation() << ")" << endl; if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); @@ -1280,7 +1280,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openPlaylist(FileSource source, AudioFileOpenMode mode) { - std::cerr << "MainWindowBase::openPlaylist(" << source.getLocation() << ")" << std::endl; + DEBUG << "MainWindowBase::openPlaylist(" << source.getLocation() << ")" << endl; std::set<QString> extensions; PlaylistFileReader::getSupportedExtensions(extensions); @@ -1321,7 +1321,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openLayer(FileSource source) { - std::cerr << "MainWindowBase::openLayer(" << source.getLocation() << ")" << std::endl; + DEBUG << "MainWindowBase::openLayer(" << source.getLocation() << ")" << endl; Pane *pane = m_paneStack->getCurrentPane(); @@ -1418,7 +1418,7 @@ if (model) { - std::cerr << "MainWindowBase::openLayer: Have model" << std::endl; + DEBUG << "MainWindowBase::openLayer: Have model" << endl; emit activity(tr("Import MIDI file \"%1\"").arg(source.getLocation())); @@ -1453,7 +1453,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openImage(FileSource source) { - std::cerr << "MainWindowBase::openImage(" << source.getLocation() << ")" << std::endl; + DEBUG << "MainWindowBase::openImage(" << source.getLocation() << ")" << endl; Pane *pane = m_paneStack->getCurrentPane(); @@ -1513,7 +1513,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openSession(FileSource source) { - std::cerr << "MainWindowBase::openSession(" << source.getLocation() << ")" << std::endl; + DEBUG << "MainWindowBase::openSession(" << source.getLocation() << ")" << endl; if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); @@ -1633,7 +1633,7 @@ MainWindowBase::FileOpenStatus MainWindowBase::openSessionFromRDF(FileSource source) { - std::cerr << "MainWindowBase::openSessionFromRDF(" << source.getLocation() << ")" << std::endl; + DEBUG << "MainWindowBase::openSessionFromRDF(" << source.getLocation() << ")" << endl; if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); @@ -1664,7 +1664,7 @@ { size_t rate = 0; - std::cerr << "MainWindowBase::openLayersFromRDF" << std::endl; + DEBUG << "MainWindowBase::openLayersFromRDF" << endl; ProgressDialog dialog(tr("Importing from RDF..."), true, 2000, this); connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash())); @@ -2587,7 +2587,7 @@ //!!! how to prevent this function from being active if not //appropriate model type? or will we ultimately support //tabular display for all editable models? - std::cerr << "NOTE: Not a tabular model" << std::endl; + DEBUG << "NOTE: Not a tabular model" << endl; return; } @@ -2769,7 +2769,7 @@ void MainWindowBase::viewCentreFrameChanged(View *v, unsigned long frame) { -// std::cerr << "MainWindowBase::viewCentreFrameChanged(" << v << "," << frame << ")" << std::endl; +// DEBUG << "MainWindowBase::viewCentreFrameChanged(" << v << "," << frame << ")" << endl; if (m_viewDataDialogMap.find(v) != m_viewDataDialogMap.end()) { for (DataDialogSet::iterator i = m_viewDataDialogMap[v].begin(); @@ -2795,21 +2795,21 @@ void MainWindowBase::layerAdded(Layer *) { -// std::cerr << "MainWindowBase::layerAdded(" << layer << ")" << std::endl; +// DEBUG << "MainWindowBase::layerAdded(" << layer << ")" << endl; updateMenuStates(); } void MainWindowBase::layerRemoved(Layer *) { -// std::cerr << "MainWindowBase::layerRemoved(" << layer << ")" << std::endl; +// DEBUG << "MainWindowBase::layerRemoved(" << layer << ")" << endl; updateMenuStates(); } void MainWindowBase::layerAboutToBeDeleted(Layer *layer) { -// std::cerr << "MainWindowBase::layerAboutToBeDeleted(" << layer << ")" << std::endl; +// DEBUG << "MainWindowBase::layerAboutToBeDeleted(" << layer << ")" << endl; removeLayerEditDialog(layer); @@ -2822,7 +2822,7 @@ void MainWindowBase::layerInAView(Layer *layer, bool inAView) { -// std::cerr << "MainWindowBase::layerInAView(" << layer << "," << inAView << ")" << std::endl; +// DEBUG << "MainWindowBase::layerInAView(" << layer << "," << inAView << ")" << endl; if (!inAView) removeLayerEditDialog(layer); @@ -2876,14 +2876,14 @@ void MainWindowBase::modelAdded(Model *model) { -// std::cerr << "MainWindowBase::modelAdded(" << model << ")" << std::endl; +// DEBUG << "MainWindowBase::modelAdded(" << model << ")" << endl; m_playSource->addModel(model); } void MainWindowBase::mainModelChanged(WaveFileModel *model) { -// std::cerr << "MainWindowBase::mainModelChanged(" << model << ")" << std::endl; +// DEBUG << "MainWindowBase::mainModelChanged(" << model << ")" << endl; updateDescriptionLabel(); if (model) m_viewManager->setMainModelSampleRate(model->getSampleRate()); if (model && !m_playTarget && m_audioOutput) createPlayTarget(); @@ -2892,7 +2892,7 @@ void MainWindowBase::modelAboutToBeDeleted(Model *model) { -// std::cerr << "MainWindowBase::modelAboutToBeDeleted(" << model << ")" << std::endl; +// DEBUG << "MainWindowBase::modelAboutToBeDeleted(" << model << ")" << endl; if (model == m_viewManager->getPlaybackModel()) { m_viewManager->setPlaybackModel(0); } @@ -2911,8 +2911,8 @@ } } if (!found) { - std::cerr << "MainWindowBase::paneDeleteButtonClicked: Unknown pane " - << pane << std::endl; + DEBUG << "MainWindowBase::paneDeleteButtonClicked: Unknown pane " + << pane << endl; return; } @@ -2940,7 +2940,7 @@ MainWindowBase::pollOSC() { if (!m_oscQueue || m_oscQueue->isEmpty()) return; - std::cerr << "MainWindowBase::pollOSC: have " << m_oscQueue->getMessagesAvailable() << " messages" << std::endl; + DEBUG << "MainWindowBase::pollOSC: have " << m_oscQueue->getMessagesAvailable() << " messages" << endl; if (m_openingAudioFile) return;