summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/bootloaderinstallfile.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/bootloaderinstallfile.cpp
parent335ec75d60bba82f23fc47b20f9390e0cba9c9c5 (diff)
downloadrockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.gz
rockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.bz2
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/bootloaderinstallfile.cpp')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallfile.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
index fc293e54eb..70867b8868 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
@@ -20,6 +20,7 @@
#include <QtDebug>
#include "bootloaderinstallfile.h"
#include "utils.h"
+#include "Logger.h"
BootloaderInstallFile::BootloaderInstallFile(QObject *parent)
@@ -31,7 +32,7 @@ BootloaderInstallFile::BootloaderInstallFile(QObject *parent)
bool BootloaderInstallFile::install(void)
{
emit logItem(tr("Downloading bootloader"), LOGINFO);
- qDebug() << "[BootloaderInstallFile] installing bootloader";
+ LOG_INFO() << "installing bootloader";
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
return true;
@@ -46,7 +47,7 @@ void BootloaderInstallFile::installStage2(void)
QString fwfile(Utils::resolvePathCase(m_blfile));
if(!fwfile.isEmpty()) {
QString moved = Utils::resolvePathCase(m_blfile) + ".ORIG";
- qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved;
+ LOG_INFO() << "renaming" << fwfile << "to" << moved;
QFile::rename(fwfile, moved);
}
@@ -80,8 +81,8 @@ void BootloaderInstallFile::installStage2(void)
// place (new) bootloader
m_tempfile.open();
- qDebug() << "[BootloaderInstallFile] renaming" << m_tempfile.fileName()
- << "to" << fwfile;
+ LOG_INFO() << "renaming" << m_tempfile.fileName()
+ << "to" << fwfile;
m_tempfile.close();
if(!Utils::resolvePathCase(fwfile).isEmpty()) {
@@ -106,7 +107,7 @@ void BootloaderInstallFile::installStage2(void)
bool BootloaderInstallFile::uninstall(void)
{
- qDebug() << "[BootloaderInstallFile] Uninstalling bootloader";
+ LOG_INFO() << "Uninstalling bootloader";
emit logItem(tr("Removing Rockbox bootloader"), LOGINFO);
// check if a .ORIG file is present, and allow moving it back.
QString origbl = Utils::resolvePathCase(m_blfile + ".ORIG");
@@ -138,7 +139,7 @@ bool BootloaderInstallFile::uninstall(void)
//! @return BootloaderRockbox, BootloaderOther or BootloaderUnknown.
BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void)
{
- qDebug() << "[BootloaderInstallFile] checking installed bootloader";
+ LOG_INFO() << "checking installed bootloader";
if(!Utils::resolvePathCase(m_blfile).isEmpty()
&& !Utils::resolvePathCase(m_blfile + ".ORIG").isEmpty())
return BootloaderRockbox;
@@ -151,7 +152,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void)
BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void)
{
- qDebug() << "[BootloaderInstallFile] getting capabilities";
+ LOG_INFO() << "getting capabilities";
return Install | Uninstall | IsFile | CanCheckInstalled | Backup;
}