comparison main/OSCHandler.cpp @ 438:868f73825b37

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:27:30 +0100
parents 9de86c1b980e
children e583f57f1311
comparison
equal deleted inserted replaced
437:9de86c1b980e 438:868f73825b37
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 DEBUG << "MainWindow::handleOSCMessage: thread id = " 38 SVDEBUG << "MainWindow::handleOSCMessage: thread id = "
39 << QThread::currentThreadId() << 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") {
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 DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in save" << endl; 91 SVDEBUG << "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 DEBUG << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << endl; 105 SVDEBUG << "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 WavFileWriter::WriteToTemporary); 110 WavFileWriter::WriteToTemporary);