comparison main/main.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 868f73825b37
comparison
equal deleted inserted replaced
432:e1bde903c65c 433:ae68fc09bf16
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 << "... "; 300 DEBUG << "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
306 (qtTrName, QDir(qtDir).filePath("translations")); 306 (qtTrName, QDir(qtDir).filePath("translations"));
307 } 307 }
308 } 308 }
309 if (!success) { 309 if (!success) {
310 std::cerr << "Failed\nFailed to load Qt translation for locale" << std::endl; 310 DEBUG << "Failed\nFailed to load Qt translation for locale" << endl;
311 } else { 311 } else {
312 std::cerr << "Done" << std::endl; 312 std::cerr << "Done" << std::endl;
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 << "... "; 318 DEBUG << "Loading " << svTrName << "... ";
319 svTranslator.load(svTrName, ":i18n"); 319 svTranslator.load(svTrName, ":i18n");
320 std::cerr << "Done" << std::endl; 320 DEBUG << "Done" << endl;
321 application.installTranslator(&svTranslator); 321 application.installTranslator(&svTranslator);
322 322
323 StoreStartupLocale(); 323 StoreStartupLocale();
324 324
325 // Permit size_t and PropertyName to be used as args in queued signal calls 325 // Permit size_t and PropertyName to be used as args in queued signal calls