diff options
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallfile.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallfile.cpp | 15 |
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 @@ | |||
20 | #include <QtDebug> | 20 | #include <QtDebug> |
21 | #include "bootloaderinstallfile.h" | 21 | #include "bootloaderinstallfile.h" |
22 | #include "utils.h" | 22 | #include "utils.h" |
23 | #include "Logger.h" | ||
23 | 24 | ||
24 | 25 | ||
25 | BootloaderInstallFile::BootloaderInstallFile(QObject *parent) | 26 | BootloaderInstallFile::BootloaderInstallFile(QObject *parent) |
@@ -31,7 +32,7 @@ BootloaderInstallFile::BootloaderInstallFile(QObject *parent) | |||
31 | bool BootloaderInstallFile::install(void) | 32 | bool BootloaderInstallFile::install(void) |
32 | { | 33 | { |
33 | emit logItem(tr("Downloading bootloader"), LOGINFO); | 34 | emit logItem(tr("Downloading bootloader"), LOGINFO); |
34 | qDebug() << "[BootloaderInstallFile] installing bootloader"; | 35 | LOG_INFO() << "installing bootloader"; |
35 | downloadBlStart(m_blurl); | 36 | downloadBlStart(m_blurl); |
36 | connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); | 37 | connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); |
37 | return true; | 38 | return true; |
@@ -46,7 +47,7 @@ void BootloaderInstallFile::installStage2(void) | |||
46 | QString fwfile(Utils::resolvePathCase(m_blfile)); | 47 | QString fwfile(Utils::resolvePathCase(m_blfile)); |
47 | if(!fwfile.isEmpty()) { | 48 | if(!fwfile.isEmpty()) { |
48 | QString moved = Utils::resolvePathCase(m_blfile) + ".ORIG"; | 49 | QString moved = Utils::resolvePathCase(m_blfile) + ".ORIG"; |
49 | qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved; | 50 | LOG_INFO() << "renaming" << fwfile << "to" << moved; |
50 | QFile::rename(fwfile, moved); | 51 | QFile::rename(fwfile, moved); |
51 | } | 52 | } |
52 | 53 | ||
@@ -80,8 +81,8 @@ void BootloaderInstallFile::installStage2(void) | |||
80 | 81 | ||
81 | // place (new) bootloader | 82 | // place (new) bootloader |
82 | m_tempfile.open(); | 83 | m_tempfile.open(); |
83 | qDebug() << "[BootloaderInstallFile] renaming" << m_tempfile.fileName() | 84 | LOG_INFO() << "renaming" << m_tempfile.fileName() |
84 | << "to" << fwfile; | 85 | << "to" << fwfile; |
85 | m_tempfile.close(); | 86 | m_tempfile.close(); |
86 | 87 | ||
87 | if(!Utils::resolvePathCase(fwfile).isEmpty()) { | 88 | if(!Utils::resolvePathCase(fwfile).isEmpty()) { |
@@ -106,7 +107,7 @@ void BootloaderInstallFile::installStage2(void) | |||
106 | 107 | ||
107 | bool BootloaderInstallFile::uninstall(void) | 108 | bool BootloaderInstallFile::uninstall(void) |
108 | { | 109 | { |
109 | qDebug() << "[BootloaderInstallFile] Uninstalling bootloader"; | 110 | LOG_INFO() << "Uninstalling bootloader"; |
110 | emit logItem(tr("Removing Rockbox bootloader"), LOGINFO); | 111 | emit logItem(tr("Removing Rockbox bootloader"), LOGINFO); |
111 | // check if a .ORIG file is present, and allow moving it back. | 112 | // check if a .ORIG file is present, and allow moving it back. |
112 | QString origbl = Utils::resolvePathCase(m_blfile + ".ORIG"); | 113 | QString origbl = Utils::resolvePathCase(m_blfile + ".ORIG"); |
@@ -138,7 +139,7 @@ bool BootloaderInstallFile::uninstall(void) | |||
138 | //! @return BootloaderRockbox, BootloaderOther or BootloaderUnknown. | 139 | //! @return BootloaderRockbox, BootloaderOther or BootloaderUnknown. |
139 | BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) | 140 | BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) |
140 | { | 141 | { |
141 | qDebug() << "[BootloaderInstallFile] checking installed bootloader"; | 142 | LOG_INFO() << "checking installed bootloader"; |
142 | if(!Utils::resolvePathCase(m_blfile).isEmpty() | 143 | if(!Utils::resolvePathCase(m_blfile).isEmpty() |
143 | && !Utils::resolvePathCase(m_blfile + ".ORIG").isEmpty()) | 144 | && !Utils::resolvePathCase(m_blfile + ".ORIG").isEmpty()) |
144 | return BootloaderRockbox; | 145 | return BootloaderRockbox; |
@@ -151,7 +152,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) | |||
151 | 152 | ||
152 | BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void) | 153 | BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void) |
153 | { | 154 | { |
154 | qDebug() << "[BootloaderInstallFile] getting capabilities"; | 155 | LOG_INFO() << "getting capabilities"; |
155 | return Install | Uninstall | IsFile | CanCheckInstalled | Backup; | 156 | return Install | Uninstall | IsFile | CanCheckInstalled | Backup; |
156 | } | 157 | } |
157 | 158 | ||