Mercurial > hg > sonic-visualiser
comparison main/OSCHandler.cpp @ 432:e1bde903c65c debug-output
Remove most toStdString calls (no longer needed, with debug header)
author | Chris Cannam |
---|---|
date | Thu, 12 May 2011 17:32:07 +0100 |
parents | 635b79462d3e |
children | ae68fc09bf16 |
comparison
equal
deleted
inserted
replaced
415:aa8117d79702 | 432:e1bde903c65c |
---|---|
45 if (message.getArgCount() == 1 && | 45 if (message.getArgCount() == 1 && |
46 message.getArg(0).canConvert(QVariant::String)) { | 46 message.getArg(0).canConvert(QVariant::String)) { |
47 QString path = message.getArg(0).toString(); | 47 QString path = message.getArg(0).toString(); |
48 if (open(path, ReplaceMainModel) != FileOpenSucceeded) { | 48 if (open(path, ReplaceMainModel) != FileOpenSucceeded) { |
49 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" | 49 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" |
50 << path.toStdString() << "\"" << std::endl; | 50 << path << "\"" << std::endl; |
51 } | 51 } |
52 //!!! we really need to spin here and not return until the | 52 //!!! we really need to spin here and not return until the |
53 // file has been completely decoded... | 53 // file has been completely decoded... |
54 } | 54 } |
55 | 55 |
58 if (message.getArgCount() == 1 && | 58 if (message.getArgCount() == 1 && |
59 message.getArg(0).canConvert(QVariant::String)) { | 59 message.getArg(0).canConvert(QVariant::String)) { |
60 QString path = message.getArg(0).toString(); | 60 QString path = message.getArg(0).toString(); |
61 if (open(path, CreateAdditionalModel) != FileOpenSucceeded) { | 61 if (open(path, CreateAdditionalModel) != FileOpenSucceeded) { |
62 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" | 62 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" |
63 << path.toStdString() << "\"" << std::endl; | 63 << path << "\"" << std::endl; |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 } else if (message.getMethod() == "recent" || | 67 } else if (message.getMethod() == "recent" || |
68 message.getMethod() == "last") { | 68 message.getMethod() == "last") { |
75 } | 75 } |
76 std::vector<QString> recent = m_recentFiles.getRecent(); | 76 std::vector<QString> recent = m_recentFiles.getRecent(); |
77 if (n >= 0 && n < int(recent.size())) { | 77 if (n >= 0 && n < int(recent.size())) { |
78 if (open(recent[n], ReplaceMainModel) != FileOpenSucceeded) { | 78 if (open(recent[n], ReplaceMainModel) != FileOpenSucceeded) { |
79 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" | 79 std::cerr << "MainWindow::handleOSCMessage: File open failed for path \"" |
80 << recent[n].toStdString() << "\"" << std::endl; | 80 << recent[n] << "\"" << std::endl; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 } else if (message.getMethod() == "save") { | 84 } else if (message.getMethod() == "save") { |
85 | 85 |
304 LayerFactory::LayerType type = | 304 LayerFactory::LayerType type = |
305 LayerFactory::getInstance()->getLayerTypeForName(str); | 305 LayerFactory::getInstance()->getLayerTypeForName(str); |
306 | 306 |
307 if (type == LayerFactory::UnknownLayer) { | 307 if (type == LayerFactory::UnknownLayer) { |
308 std::cerr << "WARNING: MainWindow::handleOSCMessage: unknown layer " | 308 std::cerr << "WARNING: MainWindow::handleOSCMessage: unknown layer " |
309 << "type " << str.toStdString() << std::endl; | 309 << "type " << str << std::endl; |
310 } else { | 310 } else { |
311 | 311 |
312 LayerConfiguration configuration(type, | 312 LayerConfiguration configuration(type, |
313 getMainModel(), | 313 getMainModel(), |
314 channel); | 314 channel); |
428 | 428 |
429 deleteCurrentLayer(); | 429 deleteCurrentLayer(); |
430 | 430 |
431 } else { | 431 } else { |
432 | 432 |
433 std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target.toStdString() << std::endl; | 433 std::cerr << "WARNING: MainWindow::handleOSCMessage: Unknown delete target " << target << std::endl; |
434 } | 434 } |
435 } | 435 } |
436 | 436 |
437 } else if (message.getMethod() == "zoom") { | 437 } else if (message.getMethod() == "zoom") { |
438 | 438 |