Mercurial > hg > svapp
changeset 248:ecbf3b75c562
Debug output only
author | Chris Cannam |
---|---|
date | Fri, 07 Oct 2011 17:06:08 +0100 |
parents | 1e9df8eac5ce |
children | 0136555495ae c469f8d8208e |
files | framework/Document.cpp framework/MainWindowBase.cpp framework/SVFileReader.cpp |
diffstat | 3 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/Document.cpp Wed Sep 28 16:44:39 2011 +0100 +++ b/framework/Document.cpp Fri Oct 07 17:06:08 2011 +0100 @@ -282,13 +282,14 @@ // delete any of the models. #ifdef DEBUG_DOCUMENT - SVDEBUG << "Document::setMainModel: Have " - << m_layers.size() << " layers" << endl; + std::cerr << "Document::setMainModel: Have " + << m_layers.size() << " layers" << std::endl; std::cerr << "Models now: "; for (ModelMap::const_iterator i = m_models.begin(); i != m_models.end(); ++i) { std::cerr << i->first << " "; } std::cerr << std::endl; + std::cerr << "Old main model: " << oldMainModel << std::endl; #endif for (LayerSet::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { @@ -297,9 +298,9 @@ Model *model = layer->getModel(); #ifdef DEBUG_DOCUMENT - SVDEBUG << "Document::setMainModel: inspecting model " + std::cerr << "Document::setMainModel: inspecting model " << (model ? model->objectName(): "(null)") << " in layer " - << layer->objectName() << endl; + << layer->objectName() << std::endl; #endif if (model == oldMainModel) { @@ -367,12 +368,12 @@ message); } #ifdef DEBUG_DOCUMENT - SVDEBUG << "Replacing model " << model << " (type " + std::cerr << "Replacing model " << model << " (type " << typeid(*model).name() << ") with model " << replacementModel << " (type " << typeid(*replacementModel).name() << ") in layer " << layer << " (name " << layer->objectName() << ")" - << endl; + << std::endl; #endif RangeSummarisableTimeValueModel *rm = dynamic_cast<RangeSummarisableTimeValueModel *>(replacementModel); @@ -438,7 +439,11 @@ } #ifdef DEBUG_DOCUMENT - SVDEBUG << "Document::addDerivedModel: source is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << endl; + if (input.getModel()) { + std::cerr << "Document::addDerivedModel: source is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << std::endl; + } else { + std::cerr << "Document::addDerivedModel: source is " << input.getModel() << std::endl; + } #endif ModelRecord rec;
--- a/framework/MainWindowBase.cpp Wed Sep 28 16:44:39 2011 +0100 +++ b/framework/MainWindowBase.cpp Fri Oct 07 17:06:08 2011 +0100 @@ -1216,6 +1216,8 @@ } PlayParameterRepository::getInstance()->addPlayable(newModel); + SVDEBUG << "SV about to call setMainModel(" << newModel << "): prevMain is " << prevMain << endl; + m_document->setMainModel(newModel); setupMenus();
--- a/framework/SVFileReader.cpp Wed Sep 28 16:44:39 2011 +0100 +++ b/framework/SVFileReader.cpp Fri Oct 07 17:06:08 2011 +0100 @@ -457,6 +457,9 @@ QString path = ff->find(FileFinder::AudioFile, originalPath, m_location); + SVDEBUG << "Wave file originalPath = " << originalPath << ", path = " + << path << endl; + ProgressDialog dialog(tr("Opening file or URL..."), true, 2000); FileSource file(path, &dialog); file.waitForStatus();