Mercurial > hg > sonic-visualiser
comparison main/OSCHandler.cpp @ 433:ae68fc09bf16 debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:56 +0100 |
parents | e1bde903c65c |
children | 9de86c1b980e |
comparison
equal
deleted
inserted
replaced
432:e1bde903c65c | 433:ae68fc09bf16 |
---|---|
33 #include <QFileInfo> | 33 #include <QFileInfo> |
34 | 34 |
35 void | 35 void |
36 MainWindow::handleOSCMessage(const OSCMessage &message) | 36 MainWindow::handleOSCMessage(const OSCMessage &message) |
37 { | 37 { |
38 std::cerr << "MainWindow::handleOSCMessage: thread id = " | 38 DEBUG << "MainWindow::handleOSCMessage: thread id = " |
39 << QThread::currentThreadId() << std::endl; | 39 << QThread::currentThreadId() << endl; |
40 | 40 |
41 // This large function should really be abstracted out. | 41 // This large function should really be abstracted out. |
42 | 42 |
43 if (message.getMethod() == "open") { | 43 if (message.getMethod() == "open") { |
44 | 44 |
86 QString path; | 86 QString path; |
87 if (message.getArgCount() == 1 && | 87 if (message.getArgCount() == 1 && |
88 message.getArg(0).canConvert(QVariant::String)) { | 88 message.getArg(0).canConvert(QVariant::String)) { |
89 path = message.getArg(0).toString(); | 89 path = message.getArg(0).toString(); |
90 if (QFileInfo(path).exists()) { | 90 if (QFileInfo(path).exists()) { |
91 std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << std::endl; | 91 DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << endl; |
92 } else { | 92 } else { |
93 saveSessionFile(path); | 93 saveSessionFile(path); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
100 if (getMainModel()) { | 100 if (getMainModel()) { |
101 if (message.getArgCount() == 1 && | 101 if (message.getArgCount() == 1 && |
102 message.getArg(0).canConvert(QVariant::String)) { | 102 message.getArg(0).canConvert(QVariant::String)) { |
103 path = message.getArg(0).toString(); | 103 path = message.getArg(0).toString(); |
104 if (QFileInfo(path).exists()) { | 104 if (QFileInfo(path).exists()) { |
105 std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << std::endl; | 105 DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << endl; |
106 } else { | 106 } else { |
107 WavFileWriter writer(path, | 107 WavFileWriter writer(path, |
108 getMainModel()->getSampleRate(), | 108 getMainModel()->getSampleRate(), |
109 getMainModel()->getChannelCount()); | 109 getMainModel()->getChannelCount()); |
110 MultiSelection ms = m_viewManager->getSelection(); | 110 MultiSelection ms = m_viewManager->getSelection(); |