Mercurial > hg > sonic-visualiser
comparison main/main.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 | 61111a6a229f |
children | ae68fc09bf16 |
comparison
equal
deleted
inserted
replaced
415:aa8117d79702 | 432:e1bde903c65c |
---|---|
243 bool audioOutput = true; | 243 bool audioOutput = true; |
244 bool oscSupport = true; | 244 bool oscSupport = true; |
245 | 245 |
246 if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { | 246 if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { |
247 std::cerr << QApplication::tr( | 247 std::cerr << QApplication::tr( |
248 "\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]).toStdString() << std::endl; | 248 "\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; |
249 exit(2); | 249 exit(2); |
250 } | 250 } |
251 | 251 |
252 if (args.contains("--no-audio")) audioOutput = false; | 252 if (args.contains("--no-audio")) audioOutput = false; |
253 if (args.contains("--no-osc")) oscSupport = false; | 253 if (args.contains("--no-osc")) oscSupport = false; |
295 | 295 |
296 QString language = QLocale::system().name(); | 296 QString language = QLocale::system().name(); |
297 | 297 |
298 QTranslator qtTranslator; | 298 QTranslator qtTranslator; |
299 QString qtTrName = QString("qt_%1").arg(language); | 299 QString qtTrName = QString("qt_%1").arg(language); |
300 std::cerr << "Loading " << qtTrName.toStdString() << "... "; | 300 std::cerr << "Loading " << qtTrName << "... "; |
301 bool success = false; | 301 bool success = false; |
302 if (!(success = qtTranslator.load(qtTrName))) { | 302 if (!(success = qtTranslator.load(qtTrName))) { |
303 QString qtDir = getenv("QTDIR"); | 303 QString qtDir = getenv("QTDIR"); |
304 if (qtDir != "") { | 304 if (qtDir != "") { |
305 success = qtTranslator.load | 305 success = qtTranslator.load |
313 } | 313 } |
314 application.installTranslator(&qtTranslator); | 314 application.installTranslator(&qtTranslator); |
315 | 315 |
316 QTranslator svTranslator; | 316 QTranslator svTranslator; |
317 QString svTrName = QString("sonic-visualiser_%1").arg(language); | 317 QString svTrName = QString("sonic-visualiser_%1").arg(language); |
318 std::cerr << "Loading " << svTrName.toStdString() << "... "; | 318 std::cerr << "Loading " << svTrName << "... "; |
319 svTranslator.load(svTrName, ":i18n"); | 319 svTranslator.load(svTrName, ":i18n"); |
320 std::cerr << "Done" << std::endl; | 320 std::cerr << "Done" << std::endl; |
321 application.installTranslator(&svTranslator); | 321 application.installTranslator(&svTranslator); |
322 | 322 |
323 StoreStartupLocale(); | 323 StoreStartupLocale(); |
460 if (status == MainWindow::FileOpenSucceeded) { | 460 if (status == MainWindow::FileOpenSucceeded) { |
461 haveSession = true; | 461 haveSession = true; |
462 haveMainModel = true; | 462 haveMainModel = true; |
463 } | 463 } |
464 } else { | 464 } else { |
465 std::cerr << "WARNING: Ignoring additional session file argument \"" << path.toStdString() << "\"" << std::endl; | 465 std::cerr << "WARNING: Ignoring additional session file argument \"" << path << "\"" << std::endl; |
466 status = MainWindow::FileOpenSucceeded; | 466 status = MainWindow::FileOpenSucceeded; |
467 } | 467 } |
468 } | 468 } |
469 if (status != MainWindow::FileOpenSucceeded) { | 469 if (status != MainWindow::FileOpenSucceeded) { |
470 if (!haveMainModel) { | 470 if (!haveMainModel) { |