Add missing class name to System Trace log.

To identify the source for System Trace entries qDebug() calls usually add the
class name at the beginning. Add some missing ones and remove some trailing
spaces.

Change-Id: I3179bb206e96de8b5a1c05c0fc0958936e4513f3
This commit is contained in:
Dominik Riebeling 2012-06-24 18:37:47 +02:00
parent 277533fb57
commit 388014567f
10 changed files with 39 additions and 38 deletions

View file

@ -45,31 +45,31 @@ bool BootloaderInstallMpio::install(void)
{
if(m_offile.isEmpty())
return false;
qDebug() << "[BootloaderInstallMpio] installing bootloader";
// download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
downloadBlStart(m_blurl);
return true;
}
void BootloaderInstallMpio::installStage2(void)
{
{
qDebug() << "[BootloaderInstallMpio] installStage2";
int origin = 0xe0000; /* MPIO HD200 bootloader address */
m_tempfile.open();
QString bootfile = m_tempfile.fileName();
m_tempfile.close();
int ret = mkmpioboot(m_offile.toLocal8Bit().data(),
bootfile.toLocal8Bit().data(), m_blfile.toLocal8Bit().data(), origin);
if(ret != 0)
{
QString error;
@ -106,13 +106,13 @@ void BootloaderInstallMpio::installStage2(void)
error = tr("Unknown error number: %1").arg(ret);
break;
}
qDebug() << tr("Patching original firmware failed: %1").arg(error);
qDebug() << "[BootloaderInstallMpio] Patching original firmware failed:" << error;
emit logItem(tr("Patching original firmware failed: %1").arg(error), LOGERROR);
emit done(true);
return;
}
//end of install
qDebug() << "[BootloaderInstallMpio] install successful";
emit logItem(tr("Success: modified firmware file created"), LOGINFO);

View file

@ -166,7 +166,7 @@ void BootloaderInstallSansa::installStage3(bool mounted)
emit logItem(tr("Writing log aborted"), LOGERROR);
emit done(true);
}
qDebug() << "version installed:" << m_blversion.toString(Qt::ISODate);
qDebug() << "[BootloaderInstallSansa] version installed:" << m_blversion.toString(Qt::ISODate);
}

View file

@ -178,7 +178,7 @@ bool EncoderLame::encode(QString input,QString output)
// input format used should be known. In case some TTS uses a
// different wave encoding some time this needs to get adjusted.
if(chunkdatalen < 16) {
qDebug() << "fmt chunk too small!";
qDebug() << "[EncoderLame] fmt chunk too small!";
}
else {
unsigned char *buf = new unsigned char[chunkdatalen];

View file

@ -160,7 +160,7 @@ bool TalkFileCreator::createTalkList(QDir startDir)
entry.target = dir.path() + "/_dirname.talk";
entry.voiced = false;
entry.encoded = false;
qDebug() << "toSpeak:" << entry.toSpeak
qDebug() << "[TalkFileCreator] toSpeak:" << entry.toSpeak
<< "target:" << entry.target
<< "intermediates:" << entry.wavfilename << entry.talkfilename;
m_talkList.append(entry);
@ -204,7 +204,7 @@ bool TalkFileCreator::createTalkList(QDir startDir)
entry.target = fileInf.path() + "/" + fileInf.fileName() + ".talk";
entry.voiced = false;
entry.encoded = false;
qDebug() << "toSpeak:" << entry.toSpeak
qDebug() << "[TalkFileCreator] toSpeak:" << entry.toSpeak
<< "target:" << entry.target
<< "intermediates:" <<
entry.wavfilename << entry.talkfilename;
@ -249,7 +249,8 @@ bool TalkFileCreator::copyTalkFiles(QString* errString)
QFile::remove(m_talkList[i].target);
// copying
qDebug() << "copying " << m_talkList[i].talkfilename << "to" << m_talkList[i].target;
qDebug() << "[TalkFileCreator] copying" << m_talkList[i].talkfilename
<< "to" << m_talkList[i].target;
if(!QFile::copy(m_talkList[i].talkfilename,m_talkList[i].target))
{
*errString = tr("Copying of %1 to %2 failed").arg(m_talkList[i].talkfilename).arg(m_talkList[i].target);

View file

@ -207,7 +207,8 @@ TalkGenerator::Status TalkGenerator::encodeList(QList<TalkEntry>* list)
//skip non-voiced entrys
if(list->at(i).voiced == false)
{
qDebug() << "non voiced entry" << list->at(i).toSpeak <<"detected";
qDebug() << "[TalkGenerator] non voiced entry detected:"
<< list->at(i).toSpeak;
emit logProgress(++m_progress,progressMax);
continue;
}

View file

@ -84,7 +84,7 @@ void TTSSapi::saveSettings()
void TTSSapi::updateVoiceList()
{
qDebug() << "update voiceList";
qDebug() << "[TTSSapi] updating voicelist";
QStringList voiceList = getVoiceList(getSetting(eLANGUAGE)->current().toString());
getSetting(eVOICE)->setList(voiceList);
if(voiceList.size() > 0) getSetting(eVOICE)->setCurrent(voiceList.at(0));

View file

@ -66,7 +66,7 @@ void Uninstaller::uninstall(void)
if(installlog.contains(toDeleteList.at(j)))
{
deleteFile = false;
qDebug() << "file still in use:" << toDeleteList.at(j);
qDebug() << "[Uninstaller] file still in use:" << toDeleteList.at(j);
}
installlog.endGroup();
}
@ -79,7 +79,7 @@ void Uninstaller::uninstall(void)
emit logItem(tr("Could not delete %1")
.arg(toDelete.filePath()), LOGWARNING);
installlog.remove(toDeleteList.at(j));
qDebug() << "deleted: " << toDelete.filePath() ;
qDebug() << "[Uninstaller] deleted:" << toDelete.filePath();
}
else // if it is a dir, remember it for later deletion
{

View file

@ -40,7 +40,6 @@ InstallTalkWindow::InstallTalkWindow(QWidget *parent) : QDialog(parent)
ui.treeView->setModel(fsm);
ui.treeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
ui.treeView->setRootIndex(fsm->index(mp));
qDebug() << fsm->columnCount();
fsm->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot);
for(int i = 1; i < fsm->columnCount(); i++)
ui.treeView->setColumnHidden(i, true);

View file

@ -145,20 +145,20 @@ void ProgressLoggerGui::saveErrorLog()
QDir::homePath(), "*.log");
if(filename == "")
return;
QFile file(filename);
if(!file.open(QIODevice::WriteOnly))
return;
//Logger texts
QString loggerTexts = "\n*********************************************\n"
QString loggerTexts = "\n*********************************************\n"
"*************** Logger *******************\n"
"*********************************************\n";
file.write(loggerTexts.toUtf8(), loggerTexts.size());
file.write(loggerTexts.toUtf8(), loggerTexts.size());
int i=0;
loggerTexts = "";
loggerTexts = "";
while(dp.listProgress->item(i) != NULL)
{
loggerTexts.append(dp.listProgress->item(i)->text());
@ -166,27 +166,25 @@ void ProgressLoggerGui::saveErrorLog()
i++;
}
file.write(loggerTexts.toUtf8(), loggerTexts.size());
//systeminfo
QString info = "\n*********************************************\n"
QString info = "\n*********************************************\n"
"************ SYSTEMINFO *******************\n"
"*********************************************\n";
file.write(info.toUtf8(), info.size());
info = Sysinfo::getInfo();
info.replace(QRegExp("(<[^>]+>)+"),"\n");
file.write(info.toUtf8(), info.size());
// trace
QString trace = "\n*********************************************\n"
QString trace = "\n*********************************************\n"
"*********** TRACE **************************\n"
"*********************************************\n";
file.write(trace.toUtf8(), trace.size());
trace = SysTrace::getTrace();
trace = SysTrace::getTrace();
file.write(trace.toUtf8(), trace.size());
file.close();
file.close();
}

View file

@ -1117,11 +1117,13 @@ void RbUtilQt::installPortable(void)
QUrl RbUtilQt::proxy()
{
QUrl proxy;
if(RbSettings::value(RbSettings::ProxyType) == "manual")
QString proxytype = RbSettings::value(RbSettings::ProxyType).toString();
if(proxytype == "manual")
proxy.setEncodedUrl(RbSettings::value(RbSettings::Proxy).toByteArray());
else if(RbSettings::value(RbSettings::ProxyType) == "system")
else if(proxytype == "system")
proxy = System::systemProxy();
qDebug() << proxy.userName() << proxy.password() << proxy.host() << proxy.port();
qDebug() << "[RbUtilQt] Proxy is" << proxy;
return proxy;
}