Ticket #5063: mytharchive.diff
File mytharchive.diff, 9.4 KB (added by , 16 years ago) |
---|
-
mytharchive/mytharchive/videoselector.cpp
307 307 if (file.exists()) 308 308 v->size = (unsigned long long)file.size(); 309 309 else 310 cout << "VideoSelector: Cannot find file: " 311 << v->filename.toLocal8Bit().constData() << endl; 310 VERBOSE(VB_IMPORTANT, 311 QString("VideoSelector: Cannot find file: %1") 312 .arg(v->filename.toLocal8Bit().constData())); 312 313 } 313 314 314 315 filesize_text->SetText(formatSize(v->size / 1024)); … … 461 462 } 462 463 else 463 464 { 464 cout << "VideoSelector: Failed to get any video's" << endl;465 VERBOSE(VB_IMPORTANT, "VideoSelector: Failed to get any video's"); 465 466 return NULL; 466 467 } 467 468 -
mytharchive/mytharchive/fileselector.cpp
207 207 if (!m_fileList || !m_locationEdit || !m_backButton || !m_okButton 208 208 || !m_cancelButton || !m_homeButton) 209 209 { 210 cout << "FileSelector: Your theme is missing some UI elements! Bailing out." << endl; 210 VERBOSE(VB_IMPORTANT, 211 "FileSelector: Your theme is missing some UI elements! " 212 "Bailing out."); 211 213 QTimer::singleShot(100, this, SLOT(reject())); 212 214 } 213 215 … … 442 444 else 443 445 { 444 446 m_locationEdit->setText("/"); 445 cout << "MythArchive: current directory does not exist!" << endl;447 VERBOSE(VB_IMPORTANT, "MythArchive: current directory does not exist!"); 446 448 } 447 449 448 450 m_fileList->refresh(); -
mytharchive/mytharchive/main.cpp
143 143 dialog.setFilenames(logDir + "/progress.log", logDir + "/mythburn.log"); 144 144 dialog.exec(); 145 145 #else 146 cout << "DVD creation is not compiled in!!" << endl;146 VERBOSE(VB_IMPORTANT, "DVD creation is not compiled in!!"); 147 147 #endif 148 148 } 149 149 … … 190 190 dialog.setFilenames(logDir + "/progress.log", logDir + "/mythburn.log"); 191 191 dialog.exec(); 192 192 #else 193 cout << "Native archive creation is not compiled in!!" << endl;193 VERBOSE(VB_IMPORTANT, "Native archive creation is not compiled in!!"); 194 194 #endif 195 195 } 196 196 … … 238 238 dialog.setFilenames(logDir + "/progress.log", logDir + "/mythburn.log"); 239 239 dialog.exec(); 240 240 #else 241 cout << "Native archive creation is not compiled in!!" << endl;241 VERBOSE(VB_IMPORTANT, "Native archive creation is not compiled in!!"); 242 242 #endif 243 243 } 244 244 … … 436 436 } 437 437 else 438 438 { 439 cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()440 << endl;439 VERBOSE(VB_IMPORTANT, QString("Couldn't find theme %1") 440 .arg(themedir.toLocal8Bit().constData())); 441 441 } 442 442 } 443 443 … … 469 469 } 470 470 else 471 471 { 472 cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()473 << endl;472 VERBOSE(VB_IMPORTANT, QString("Couldn't find theme %1") 473 .arg(themedir.toLocal8Bit().constData())); 474 474 } 475 475 } 476 476 … … 511 511 } 512 512 else 513 513 { 514 cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()515 << endl;514 VERBOSE(VB_IMPORTANT, QString("Couldn't find theme %1") 515 .arg(themedir.toLocal8Bit().constData())); 516 516 } 517 517 } 518 518 … … 526 526 if (!gContext->TestPopupVersion("mytharchive", libversion, 527 527 MYTH_BINARY_VERSION)) 528 528 { 529 cerr << "Test Popup Version Failed " << endl;529 VERBOSE(VB_IMPORTANT, "Test Popup Version Failed "); 530 530 return -1; 531 531 } 532 532 -
mytharchive/mytharchive/importnativewizard.cpp
260 260 if (!m_fileList || !m_locationEdit || !m_backButton || !m_nextButton 261 261 || !m_prevButton || !m_cancelButton || !m_homeButton) 262 262 { 263 cout << "ImportNativeWizard: Your theme is missing some UI elements! Bailing out." << endl;263 VERBOSE(VB_IMPORTANT, "ImportNativeWizard: Your theme is missing some UI elements! Bailing out."); 264 264 QTimer::singleShot(100, this, SLOT(reject())); 265 265 } 266 266 … … 459 459 else 460 460 { 461 461 m_locationEdit->setText("/"); 462 cout << "MythArchive: current directory does not exist!" << endl;462 VERBOSE(VB_IMPORTANT, "MythArchive: current directory does not exist!"); 463 463 } 464 464 465 465 m_fileList->refresh(); … … 512 512 513 513 if (itemNodeList.count() < 1) 514 514 { 515 cout << "Couldn't find an 'item' element in XML file" << endl;515 VERBOSE(VB_IMPORTANT, "Couldn't find an 'item' element in XML file"); 516 516 return; 517 517 } 518 518 … … 525 525 QDomNodeList nodeList = e.elementsByTagName("recorded"); 526 526 if (nodeList.count() < 1) 527 527 { 528 cout << "Couldn't find a 'recorded' element in XML file" << endl; 528 VERBOSE(VB_IMPORTANT, 529 "Couldn't find a 'recorded' element in XML file"); 529 530 return; 530 531 } 531 532 … … 572 573 nodeList = e.elementsByTagName("channel"); 573 574 if (nodeList.count() < 1) 574 575 { 575 cout << "Couldn't find a 'channel' element in XML file" << endl; 576 VERBOSE(VB_IMPORTANT, 577 "Couldn't find a 'channel' element in XML file"); 576 578 m_chanID_text->SetText(""); 577 579 m_chanNo_text->SetText(""); 578 580 m_chanName_text->SetText(""); … … 596 598 QDomNodeList nodeList = e.elementsByTagName("videometadata"); 597 599 if (nodeList.count() < 1) 598 600 { 599 cout << "Couldn't find a 'videometadata' element in XML file" << endl; 601 VERBOSE(VB_IMPORTANT, 602 "Couldn't find a 'videometadata' element in XML file"); 600 603 return; 601 604 } 602 605 … … 642 645 m_title_text->SetText(""); 643 646 m_subtitle_text->SetText(""); 644 647 m_starttime_text->SetText(""); 645 cout << "Not a native archive file" << endl;648 VERBOSE(VB_IMPORTANT, "Not a native archive file"); 646 649 } 647 650 } 648 651 -
mytharchive/mytharchive/exportnativewizard.cpp
600 600 QFile f(filename); 601 601 if (!f.open(QIODevice::WriteOnly)) 602 602 { 603 cout << "ExportNativeWizard::createConfigFile: Failed to open file for writing - " 604 << filename.toLocal8Bit().constData() << endl; 603 VERBOSE(VB_IMPORTANT, QString("ExportNativeWizard::createConfigFile: " 604 "Failed to open file for writing - %1") 605 .arg(filename.toLocal8Bit().constData())); 605 606 return; 606 607 } 607 608 -
mytharchive/mytharchive/mythburnwizard.cpp
863 863 setTheme(0); 864 864 } 865 865 else 866 cout << "MythArchive: Theme directory does not exist!" << endl;866 VERBOSE(VB_IMPORTANT, "MythArchive: Theme directory does not exist!"); 867 867 } 868 868 869 869 void MythburnWizard::setTheme(int item) … … 1268 1268 QFile f(filename); 1269 1269 if (!f.open(QIODevice::WriteOnly)) 1270 1270 { 1271 cout << "MythburnWizard::createConfigFile: Failed to open file for writing - " 1272 << filename.toLocal8Bit().constData() << endl; 1271 VERBOSE(VB_IMPORTANT, QString("MythburnWizard::createConfigFile: " 1272 "Failed to open file for writing - %1") 1273 .arg(filename.toLocal8Bit().constData())); 1273 1274 return; 1274 1275 } 1275 1276 -
mytharchive/mytharchivehelper/main.cpp
1615 1615 QDomNodeList nodeList = elem.elementsByTagName(nodeName); 1616 1616 if (nodeList.count() < 1) 1617 1617 { 1618 cout <<QString("Couldn't find a '%1' element in XML file")1619 .arg(nodeName).toLocal8Bit().constData() << endl;1618 VERBOSE(VB_IMPORTANT, QString("Couldn't find a '%1' element in XML file") 1619 .arg(nodeName).toLocal8Bit().constData()); 1620 1620 return ""; 1621 1621 } 1622 1622 … … 2281 2281 QFile f(outFile); 2282 2282 if (!f.open(QIODevice::WriteOnly)) 2283 2283 { 2284 cout << "MythArchiveHelper: Failed to open file for writing - " 2285 << outFile.toLocal8Bit().constData() << endl; 2284 VERBOSE(VB_IMPORTANT, QString("MythArchiveHelper: " 2285 "Failed to open file for writing - %1") 2286 .arg(outFile.toLocal8Bit().constData())); 2286 2287 return 1; 2287 2288 } 2288 2289