summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-03 11:08:18 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-04 23:32:52 +0100
commit4d2ce949b3b41f8bf0af446fa20205ddd229e579 (patch)
tree01fa19471d9831b296bea5d7049f765e38b30bbb /rbutil/rbutilqt/base/bootloaderinstallhex.cpp
parent335ec75d60bba82f23fc47b20f9390e0cba9c9c5 (diff)
downloadrockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.gz
rockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.zip
Use cutelogger for Rockbox Utility internal trace.
Change tracing from qDebug() to use cutelogger, which is available under the LGPL2.1. This allows to automatically add filename and line number to the log, and also provides multiple log levels. Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallhex.cpp')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallhex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
index 506a05522a..39a2392731 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
@@ -20,6 +20,7 @@
20#include "bootloaderinstallbase.h" 20#include "bootloaderinstallbase.h"
21#include "bootloaderinstallhex.h" 21#include "bootloaderinstallhex.h"
22#include "utils.h" 22#include "utils.h"
23#include "Logger.h"
23 24
24#include "../../tools/iriver.h" 25#include "../../tools/iriver.h"
25#include "../../tools/mkboot.h" 26#include "../../tools/mkboot.h"
@@ -74,7 +75,7 @@ bool BootloaderInstallHex::install(void)
74 file.close(); 75 file.close();
75 QString hash = QCryptographicHash::hash(filedata, 76 QString hash = QCryptographicHash::hash(filedata,
76 QCryptographicHash::Md5).toHex(); 77 QCryptographicHash::Md5).toHex();
77 qDebug() << "[BootloaderInstallHex] hexfile hash:" << hash; 78 LOG_INFO() << "hexfile hash:" << hash;
78 if(file.error() != QFile::NoError) { 79 if(file.error() != QFile::NoError) {
79 emit logItem(tr("Could not verify original firmware file"), LOGERROR); 80 emit logItem(tr("Could not verify original firmware file"), LOGERROR);
80 emit done(true); 81 emit done(true);
@@ -112,7 +113,7 @@ bool BootloaderInstallHex::install(void)
112 int result; 113 int result;
113 result = iriver_decode(m_offile.toLatin1().data(), 114 result = iriver_decode(m_offile.toLatin1().data(),
114 m_descrambled.fileName().toLatin1().data(), FALSE, STRIP_NONE); 115 m_descrambled.fileName().toLatin1().data(), FALSE, STRIP_NONE);
115 qDebug() << "[BootloaderInstallHex] iriver_decode" << result; 116 LOG_INFO() << "iriver_decode():" << result;
116 117
117 if(result < 0) { 118 if(result < 0) {
118 emit logItem(tr("Error in descramble: %1").arg(scrambleError(result)), LOGERROR); 119 emit logItem(tr("Error in descramble: %1").arg(scrambleError(result)), LOGERROR);
@@ -200,7 +201,7 @@ void BootloaderInstallHex::installStage2(void)
200 targethex.close(); 201 targethex.close();
201 QString hash = QCryptographicHash::hash(filedata, 202 QString hash = QCryptographicHash::hash(filedata,
202 QCryptographicHash::Md5).toHex(); 203 QCryptographicHash::Md5).toHex();
203 qDebug() << "[BootloaderInstallHex] created hexfile hash:" << hash; 204 LOG_INFO() << "created hexfile hash:" << hash;
204 205
205 emit logItem(tr("Checking modified firmware file"), LOGINFO); 206 emit logItem(tr("Checking modified firmware file"), LOGINFO);
206 if(hash != QString(md5sums[m_hashindex].patched)) { 207 if(hash != QString(md5sums[m_hashindex].patched)) {