diff options
Diffstat (limited to 'rbutil/rbutilqt/base/zipinstaller.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/zipinstaller.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/base/zipinstaller.cpp b/rbutil/rbutilqt/base/zipinstaller.cpp index e24199408e..b2c8e09178 100644 --- a/rbutil/rbutilqt/base/zipinstaller.cpp +++ b/rbutil/rbutilqt/base/zipinstaller.cpp | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "zipinstaller.h" | 20 | #include "zipinstaller.h" |
21 | #include "utils.h" | 21 | #include "utils.h" |
22 | #include "ziputil.h" | 22 | #include "ziputil.h" |
23 | #include "Logger.h" | ||
23 | 24 | ||
24 | ZipInstaller::ZipInstaller(QObject* parent): QObject(parent) | 25 | ZipInstaller::ZipInstaller(QObject* parent): QObject(parent) |
25 | { | 26 | { |
@@ -31,7 +32,7 @@ ZipInstaller::ZipInstaller(QObject* parent): QObject(parent) | |||
31 | 32 | ||
32 | void ZipInstaller::install() | 33 | void ZipInstaller::install() |
33 | { | 34 | { |
34 | qDebug() << "[ZipInstall] initializing installation"; | 35 | LOG_INFO() << "initializing installation"; |
35 | 36 | ||
36 | runner = 0; | 37 | runner = 0; |
37 | connect(this, SIGNAL(cont()), this, SLOT(installContinue())); | 38 | connect(this, SIGNAL(cont()), this, SLOT(installContinue())); |
@@ -44,17 +45,17 @@ void ZipInstaller::install() | |||
44 | 45 | ||
45 | void ZipInstaller::abort() | 46 | void ZipInstaller::abort() |
46 | { | 47 | { |
47 | qDebug() << "[ZipInstall] Aborted"; | 48 | LOG_INFO() << "Aborted"; |
48 | emit internalAborted(); | 49 | emit internalAborted(); |
49 | } | 50 | } |
50 | 51 | ||
51 | 52 | ||
52 | void ZipInstaller::installContinue() | 53 | void ZipInstaller::installContinue() |
53 | { | 54 | { |
54 | qDebug() << "[ZipInstall] continuing installation"; | 55 | LOG_INFO() << "continuing installation"; |
55 | 56 | ||
56 | runner++; // this gets called when a install finished, so increase first. | 57 | runner++; // this gets called when a install finished, so increase first. |
57 | qDebug() << "[ZipInstall] runner done:" << runner << "/" << m_urllist.size(); | 58 | LOG_INFO() << "runner done:" << runner << "/" << m_urllist.size(); |
58 | if(runner < m_urllist.size()) { | 59 | if(runner < m_urllist.size()) { |
59 | emit logItem(tr("done."), LOGOK); | 60 | emit logItem(tr("done."), LOGOK); |
60 | m_url = m_urllist.at(runner); | 61 | m_url = m_urllist.at(runner); |
@@ -74,7 +75,7 @@ void ZipInstaller::installContinue() | |||
74 | 75 | ||
75 | void ZipInstaller::installStart() | 76 | void ZipInstaller::installStart() |
76 | { | 77 | { |
77 | qDebug() << "[ZipInstall] starting installation"; | 78 | LOG_INFO() << "starting installation"; |
78 | 79 | ||
79 | emit logItem(tr("Downloading file %1.%2").arg(QFileInfo(m_url).baseName(), | 80 | emit logItem(tr("Downloading file %1.%2").arg(QFileInfo(m_url).baseName(), |
80 | QFileInfo(m_url).completeSuffix()),LOGINFO); | 81 | QFileInfo(m_url).completeSuffix()),LOGINFO); |
@@ -105,7 +106,7 @@ void ZipInstaller::installStart() | |||
105 | 106 | ||
106 | void ZipInstaller::downloadDone(bool error) | 107 | void ZipInstaller::downloadDone(bool error) |
107 | { | 108 | { |
108 | qDebug() << "[ZipInstall] download done, error:" << error; | 109 | LOG_INFO() << "download done, error:" << error; |
109 | QStringList zipContents; // needed later | 110 | QStringList zipContents; // needed later |
110 | // update progress bar | 111 | // update progress bar |
111 | 112 | ||
@@ -127,7 +128,7 @@ void ZipInstaller::downloadDone(bool error) | |||
127 | QCoreApplication::processEvents(); | 128 | QCoreApplication::processEvents(); |
128 | if(m_unzip) { | 129 | if(m_unzip) { |
129 | // unzip downloaded file | 130 | // unzip downloaded file |
130 | qDebug() << "[ZipInstall] about to unzip " << m_file << "to" << m_mountpoint; | 131 | LOG_INFO() << "about to unzip" << m_file << "to" << m_mountpoint; |
131 | 132 | ||
132 | emit logItem(tr("Extracting file."), LOGINFO); | 133 | emit logItem(tr("Extracting file."), LOGINFO); |
133 | QCoreApplication::processEvents(); | 134 | QCoreApplication::processEvents(); |
@@ -159,7 +160,7 @@ void ZipInstaller::downloadDone(bool error) | |||
159 | else { | 160 | else { |
160 | // only copy the downloaded file to the output location / name | 161 | // only copy the downloaded file to the output location / name |
161 | emit logItem(tr("Installing file."), LOGINFO); | 162 | emit logItem(tr("Installing file."), LOGINFO); |
162 | qDebug() << "[ZipInstall] saving downloaded file (no extraction)"; | 163 | LOG_INFO() << "saving downloaded file (no extraction)"; |
163 | 164 | ||
164 | m_downloadFile->open(); // copy fails if file is not opened (filename issue?) | 165 | m_downloadFile->open(); // copy fails if file is not opened (filename issue?) |
165 | // make sure the required path is existing | 166 | // make sure the required path is existing |