Mercurial > hg > sonic-visualiser
comparison main/main.cpp @ 665:17fe7e0c23a1
Drop std:: from cerr, cout, endl; drop toStdString etc; build fix
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:17:48 +0000 |
parents | 86d1f640ae1e |
children | c32abd18048b |
comparison
equal
deleted
inserted
replaced
664:b4a7c98e4c83 | 665:17fe7e0c23a1 |
---|---|
177 static void | 177 static void |
178 signalHandler(int /* signal */) | 178 signalHandler(int /* signal */) |
179 { | 179 { |
180 // Avoid this happening more than once across threads | 180 // Avoid this happening more than once across threads |
181 | 181 |
182 std::cerr << "signalHandler: cleaning up and exiting" << std::endl; | 182 cerr << "signalHandler: cleaning up and exiting" << endl; |
183 cleanupMutex.lock(); | 183 cleanupMutex.lock(); |
184 if (!cleanedUp) { | 184 if (!cleanedUp) { |
185 TempDirectory::getInstance()->cleanup(); | 185 TempDirectory::getInstance()->cleanup(); |
186 cleanedUp = true; | 186 cleanedUp = true; |
187 } | 187 } |
264 | 264 |
265 bool audioOutput = true; | 265 bool audioOutput = true; |
266 bool oscSupport = true; | 266 bool oscSupport = true; |
267 | 267 |
268 if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { | 268 if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { |
269 std::cerr << QApplication::tr( | 269 cerr << QApplication::tr( |
270 "\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] [<file> ...]\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 <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << std::endl; | 270 "\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] [<file> ...]\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 <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << endl; |
271 exit(2); | 271 exit(2); |
272 } | 272 } |
273 | 273 |
274 if (args.contains("--no-audio")) audioOutput = false; | 274 if (args.contains("--no-audio")) audioOutput = false; |
275 if (args.contains("--no-osc")) oscSupport = false; | 275 if (args.contains("--no-osc")) oscSupport = false; |
333 } | 333 } |
334 } | 334 } |
335 if (!success) { | 335 if (!success) { |
336 SVDEBUG << "Failed\nFailed to load Qt translation for locale" << endl; | 336 SVDEBUG << "Failed\nFailed to load Qt translation for locale" << endl; |
337 } else { | 337 } else { |
338 std::cerr << "Done" << std::endl; | 338 cerr << "Done" << endl; |
339 } | 339 } |
340 application.installTranslator(&qtTranslator); | 340 application.installTranslator(&qtTranslator); |
341 | 341 |
342 QTranslator svTranslator; | 342 QTranslator svTranslator; |
343 QString svTrName = QString("sonic-visualiser_%1").arg(language); | 343 QString svTrName = QString("sonic-visualiser_%1").arg(language); |
503 if (status == MainWindow::FileOpenSucceeded) { | 503 if (status == MainWindow::FileOpenSucceeded) { |
504 haveSession = true; | 504 haveSession = true; |
505 haveMainModel = true; | 505 haveMainModel = true; |
506 } | 506 } |
507 } else { | 507 } else { |
508 std::cerr << "WARNING: Ignoring additional session file argument \"" << path << "\"" << std::endl; | 508 cerr << "WARNING: Ignoring additional session file argument \"" << path << "\"" << endl; |
509 status = MainWindow::FileOpenSucceeded; | 509 status = MainWindow::FileOpenSucceeded; |
510 } | 510 } |
511 } | 511 } |
512 if (status != MainWindow::FileOpenSucceeded) { | 512 if (status != MainWindow::FileOpenSucceeded) { |
513 if (!haveMainModel) { | 513 if (!haveMainModel) { |