# HG changeset patch # User Chris Cannam # Date 1309114561 -3600 # Node ID 4bccf2014f80b102f6b79df4dda21a5e21478897 # Parent fa0c3e79ea8e9cd1effff8fd7afa06950c9e0fa9# Parent e3644cd9cf992cce2a48c2fac0598032de59123f Merge from branch "templating" diff -r e3644cd9cf99 -r 4bccf2014f80 .hgignore --- a/.hgignore Sun Jun 26 19:55:25 2011 +0100 +++ b/.hgignore Sun Jun 26 19:56:01 2011 +0100 @@ -14,3 +14,10 @@ *~ *.orig *.rej +re:^autom4te\.cache/ +re:^qrc_sonic-visualiser\.cpp$ +re:^sonic-visualiser$ +re:^aclocal\.m4$ +re:^config\.log$ +re:^config\.pri$ +re:^config\.status$ diff -r e3644cd9cf99 -r 4bccf2014f80 INSTALL.txt --- a/INSTALL.txt Sun Jun 26 19:55:25 2011 +0100 +++ b/INSTALL.txt Sun Jun 26 19:56:01 2011 +0100 @@ -19,7 +19,7 @@ REQUIRED Redland RDF libraries http://librdf.org/ Optional MAD mp3 decoder http://www.underbit.com/products/mad/ -Optional Oggz and fishsound http://www.annodex.net/software/libraries.html +Optional Oggz and fishsound http://xiph.org/oggz/ Optional liblo OSC library http://www.plugin.org.uk/liblo/ The Redland RDF libraries include the Raptor RDF parser library, diff -r e3644cd9cf99 -r 4bccf2014f80 main/MainWindow.cpp --- a/main/MainWindow.cpp Sun Jun 26 19:55:25 2011 +0100 +++ b/main/MainWindow.cpp Sun Jun 26 19:56:01 2011 +0100 @@ -315,12 +315,12 @@ MainWindow::~MainWindow() { -// std::cerr << "MainWindow::~MainWindow" << std::endl; +// SVDEBUG << "MainWindow::~MainWindow" << endl; delete m_keyReference; delete m_preferencesDialog; delete m_layerTreeDialog; Profiles::getInstance()->dump(); -// std::cerr << "MainWindow::~MainWindow finishing" << std::endl; +// SVDEBUG << "MainWindow::~MainWindow finishing" << endl; } void @@ -1492,7 +1492,7 @@ QString name = transforms[i].name; if (name == "") name = transforms[i].identifier; -// std::cerr << "Plugin Name: " << name.toStdString() << std::endl; +// std::cerr << "Plugin Name: " << name << std::endl; TransformDescription::Type type = transforms[i].type; QString typeStr = factory->getTransformTypeName(type); @@ -1528,8 +1528,8 @@ if (categoryMenus[type].find(category) == categoryMenus[type].end()) { std::cerr << "WARNING: MainWindow::setupMenus: Internal error: " << "No category menu for transform \"" - << name.toStdString() << "\" (category = \"" - << category.toStdString() << "\")" << std::endl; + << name << "\" (category = \"" + << category << "\")" << std::endl; } else { categoryMenus[type][category]->addAction(action); } @@ -1537,8 +1537,8 @@ if (makerMenus[type].find(maker) == makerMenus[type].end()) { std::cerr << "WARNING: MainWindow::setupMenus: Internal error: " << "No maker menu for transform \"" - << name.toStdString() << "\" (maker = \"" - << maker.toStdString() << "\")" << std::endl; + << name << "\" (maker = \"" + << maker << "\")" << std::endl; } else { makerMenus[type][maker]->addAction(action); } @@ -1549,7 +1549,7 @@ connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool))); action->setStatusTip(transforms[i].longDescription); -// cerr << "Transform: \"" << name.toStdString() << "\": plugin name \"" << pluginName.toStdString() << "\"" << endl; +// cerr << "Transform: \"" << name << "\": plugin name \"" << pluginName << "\"" << endl; if (pluginNameMenus[type].find(pluginName) == pluginNameMenus[type].end()) { @@ -1732,7 +1732,7 @@ { if (!m_existingLayersMenu) return; // should have been created by setupMenus -// std::cerr << "MainWindow::setupExistingLayersMenu" << std::endl; +// SVDEBUG << "MainWindow::setupExistingLayersMenu" << endl; m_existingLayersMenu->clear(); m_existingLayerActions.clear(); @@ -1763,7 +1763,7 @@ } // std::cerr << "found new layer " << layer << " (name = " -// << layer->getLayerPresentationName().toStdString() << ")" << std::endl; +// << layer->getLayerPresentationName() << ")" << std::endl; orderedLayers.push_back(layer); observedLayers.insert(layer); @@ -2270,12 +2270,12 @@ for (int j = 0; j < pane->getLayerCount(); ++j) { Layer *layer = pane->getLayer(j); if (!layer) continue; - cerr << "layer = " << layer->objectName().toStdString() << endl; + cerr << "layer = " << layer->objectName() << endl; Model *m = layer->getModel(); RangeSummarisableTimeValueModel *wm = dynamic_cast(m); if (wm) { - cerr << "found: " << wm->objectName().toStdString() << endl; + cerr << "found: " << wm->objectName() << endl; otherModels.insert(wm); if (pane == m_paneStack->getCurrentPane()) { current = wm; @@ -2965,7 +2965,7 @@ void MainWindow::closeEvent(QCloseEvent *e) { -// std::cerr << "MainWindow::closeEvent" << std::endl; +// SVDEBUG << "MainWindow::closeEvent" << endl; if (m_openingAudioFile) { // std::cerr << "Busy - ignoring close event" << std::endl; @@ -2974,7 +2974,7 @@ } if (!m_abandoning && !checkSaveModified()) { -// std::cerr << "Ignoring close event" << std::endl; +// SVDEBUG << "Ignoring close event" << endl; e->ignore(); return; } @@ -3182,13 +3182,13 @@ void MainWindow::propertyStacksResized(int width) { -// std::cerr << "MainWindow::propertyStacksResized(" << width << ")" << std::endl; +// SVDEBUG << "MainWindow::propertyStacksResized(" << width << ")" << endl; if (!m_playControlsSpacer) return; int spacerWidth = width - m_playControlsWidth - 4; -// std::cerr << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << std::endl; +// SVDEBUG << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << endl; m_playControlsSpacer->setFixedSize(QSize(spacerWidth, 2)); } @@ -3209,7 +3209,7 @@ if (i == m_paneActions.end()) { std::cerr << "WARNING: MainWindow::addPane: unknown action " - << action->objectName().toStdString() << std::endl; + << action->objectName() << std::endl; return; } @@ -3241,7 +3241,7 @@ (LayerFactory::TimeRuler); } -// std::cerr << "adding time ruler layer " << m_timeRulerLayer << std::endl; +// SVDEBUG << "adding time ruler layer " << m_timeRulerLayer << endl; m_document->addLayerToView(pane, m_timeRulerLayer); } @@ -3281,8 +3281,8 @@ m_paneStack->setCurrentPane(pane); m_paneStack->setCurrentLayer(pane, newLayer); -// std::cerr << "MainWindow::addPane: global centre frame is " -// << m_viewManager->getGlobalCentreFrame() << std::endl; +// SVDEBUG << "MainWindow::addPane: global centre frame is " +// << m_viewManager->getGlobalCentreFrame() << endl; // pane->setCentreFrame(m_viewManager->getGlobalCentreFrame()); CommandHistory::getInstance()->endCompoundOperation(); @@ -3346,7 +3346,7 @@ if (i == m_layerActions.end()) { std::cerr << "WARNING: MainWindow::addLayer: unknown action " - << action->objectName().toStdString() << std::endl; + << action->objectName() << std::endl; return; } @@ -3488,7 +3488,7 @@ if (!input.getModel()) return; -// std::cerr << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName().toStdString() << "\"" << std::endl << "transform:" << std::endl << transform.toXmlString().toStdString() << std::endl; +// SVDEBUG << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << endl << "transform:" << endl << transform.toXmlString() << endl; Layer *newLayer = m_document->createDerivedLayer(transform, input); @@ -4032,7 +4032,7 @@ void MainWindow::rightButtonMenuRequested(Pane *pane, QPoint position) { -// std::cerr << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << std::endl; +// SVDEBUG << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << endl; m_paneStack->setCurrentPane(pane); m_rightButtonMenu->popup(position); } diff -r e3644cd9cf99 -r 4bccf2014f80 main/OSCHandler.cpp --- a/main/OSCHandler.cpp Sun Jun 26 19:55:25 2011 +0100 +++ b/main/OSCHandler.cpp Sun Jun 26 19:56:01 2011 +0100 @@ -35,8 +35,8 @@ void MainWindow::handleOSCMessage(const OSCMessage &message) { - std::cerr << "MainWindow::handleOSCMessage: thread id = " - << QThread::currentThreadId() << std::endl; + SVDEBUG << "MainWindow::handleOSCMessage: thread id = " + << QThread::currentThreadId() << endl; // This large function should really be abstracted out. @@ -47,7 +47,7 @@ QString path = message.getArg(0).toString(); if (open(path, ReplaceMainModel) != FileOpenSucceeded) { std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" - << path.toStdString() << "\"" << std::endl; + << path << "\"" << std::endl; } //!!! we really need to spin here and not return until the // file has been completely decoded... @@ -60,7 +60,7 @@ QString path = message.getArg(0).toString(); if (open(path, CreateAdditionalModel) != FileOpenSucceeded) { std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" - << path.toStdString() << "\"" << std::endl; + << path << "\"" << std::endl; } } @@ -77,7 +77,7 @@ if (n >= 0 && n < int(recent.size())) { if (open(recent[n], ReplaceMainModel) != FileOpenSucceeded) { std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" - << recent[n].toStdString() << "\"" << std::endl; + << recent[n] << "\"" << std::endl; } } @@ -88,7 +88,7 @@ message.getArg(0).canConvert(QVariant::String)) { path = message.getArg(0).toString(); if (QFileInfo(path).exists()) { - std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << std::endl; + SVDEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << endl; } else { saveSessionFile(path); } @@ -102,7 +102,7 @@ message.getArg(0).canConvert(QVariant::String)) { path = message.getArg(0).toString(); if (QFileInfo(path).exists()) { - std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << std::endl; + SVDEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << endl; } else { WavFileWriter writer(path, getMainModel()->getSampleRate(), @@ -307,7 +307,7 @@ if (type == LayerFactory::UnknownLayer) { std::cerr << "WARNING: MainWindow::handleOSCMessage: unknown layer " - << "type " << str.toStdString() << std::endl; + << "type " << str << std::endl; } else { LayerConfiguration configuration(type, @@ -431,7 +431,7 @@ } else { - std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target.toStdString() << std::endl; + std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target << std::endl; } } diff -r e3644cd9cf99 -r 4bccf2014f80 main/PreferencesDialog.cpp --- a/main/PreferencesDialog.cpp Sun Jun 26 19:55:25 2011 +0100 +++ b/main/PreferencesDialog.cpp Sun Jun 26 19:56:01 2011 +0100 @@ -399,7 +399,7 @@ PreferencesDialog::~PreferencesDialog() { - std::cerr << "PreferencesDialog::~PreferencesDialog()" << std::endl; + SVDEBUG << "PreferencesDialog::~PreferencesDialog()" << endl; } void diff -r e3644cd9cf99 -r 4bccf2014f80 main/main.cpp --- a/main/main.cpp Sun Jun 26 19:55:25 2011 +0100 +++ b/main/main.cpp Sun Jun 26 19:56:01 2011 +0100 @@ -245,7 +245,7 @@ if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { std::cerr << QApplication::tr( - "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [ ...]\n\n --no-audio: Do not attempt to open an audio output device\n --no-osc: Do not provide an Open Sound Control port for remote control\n : One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]).toStdString() << std::endl; + "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [ ...]\n\n --no-audio: Do not attempt to open an audio output device\n --no-osc: Do not provide an Open Sound Control port for remote control\n : One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << std::endl; exit(2); } @@ -297,7 +297,7 @@ QTranslator qtTranslator; QString qtTrName = QString("qt_%1").arg(language); - std::cerr << "Loading " << qtTrName.toStdString() << "... "; + SVDEBUG << "Loading " << qtTrName << "... "; bool success = false; if (!(success = qtTranslator.load(qtTrName))) { QString qtDir = getenv("QTDIR"); @@ -307,7 +307,7 @@ } } if (!success) { - std::cerr << "Failed\nFailed to load Qt translation for locale" << std::endl; + SVDEBUG << "Failed\nFailed to load Qt translation for locale" << endl; } else { std::cerr << "Done" << std::endl; } @@ -315,9 +315,9 @@ QTranslator svTranslator; QString svTrName = QString("sonic-visualiser_%1").arg(language); - std::cerr << "Loading " << svTrName.toStdString() << "... "; + SVDEBUG << "Loading " << svTrName << "... "; svTranslator.load(svTrName, ":i18n"); - std::cerr << "Done" << std::endl; + SVDEBUG << "Done" << endl; application.installTranslator(&svTranslator); StoreStartupLocale(); @@ -462,7 +462,7 @@ haveMainModel = true; } } else { - std::cerr << "WARNING: Ignoring additional session file argument \"" << path.toStdString() << "\"" << std::endl; + std::cerr << "WARNING: Ignoring additional session file argument \"" << path << "\"" << std::endl; status = MainWindow::FileOpenSucceeded; } }