diff options
Diffstat (limited to 'rbutil/rbutilqt/base/mspackutil.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/mspackutil.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/base/mspackutil.cpp b/rbutil/rbutilqt/base/mspackutil.cpp index 4bc7307cd9..1ee250cd6d 100644 --- a/rbutil/rbutilqt/base/mspackutil.cpp +++ b/rbutil/rbutilqt/base/mspackutil.cpp | |||
@@ -17,7 +17,7 @@ | |||
17 | ****************************************************************************/ | 17 | ****************************************************************************/ |
18 | 18 | ||
19 | #include <QtCore> | 19 | #include <QtCore> |
20 | #include <QDebug> | 20 | #include "Logger.h" |
21 | #include "mspackutil.h" | 21 | #include "mspackutil.h" |
22 | #include "progressloggerinterface.h" | 22 | #include "progressloggerinterface.h" |
23 | 23 | ||
@@ -27,7 +27,7 @@ MsPackUtil::MsPackUtil(QObject* parent) | |||
27 | m_cabd = mspack_create_cab_decompressor(NULL); | 27 | m_cabd = mspack_create_cab_decompressor(NULL); |
28 | m_cabinet = NULL; | 28 | m_cabinet = NULL; |
29 | if(!m_cabd) | 29 | if(!m_cabd) |
30 | qDebug() << "[MsPackUtil] CAB decompressor creation failed!"; | 30 | LOG_ERROR() << "CAB decompressor creation failed!"; |
31 | } | 31 | } |
32 | 32 | ||
33 | MsPackUtil::~MsPackUtil() | 33 | MsPackUtil::~MsPackUtil() |
@@ -43,7 +43,7 @@ bool MsPackUtil::open(QString& mspackfile) | |||
43 | 43 | ||
44 | if(m_cabd == NULL) | 44 | if(m_cabd == NULL) |
45 | { | 45 | { |
46 | qDebug() << "[MsPackUtil] No CAB decompressor available: cannot open file!"; | 46 | LOG_ERROR() << "No CAB decompressor available: cannot open file!"; |
47 | return false; | 47 | return false; |
48 | } | 48 | } |
49 | m_cabinet = m_cabd->search(m_cabd, QFile::encodeName(mspackfile).constData()); | 49 | m_cabinet = m_cabd->search(m_cabd, QFile::encodeName(mspackfile).constData()); |
@@ -60,10 +60,10 @@ bool MsPackUtil::close(void) | |||
60 | 60 | ||
61 | bool MsPackUtil::extractArchive(const QString& dest, QString file) | 61 | bool MsPackUtil::extractArchive(const QString& dest, QString file) |
62 | { | 62 | { |
63 | qDebug() << "[MsPackUtil] extractArchive" << dest << file; | 63 | LOG_INFO() << "extractArchive" << dest << file; |
64 | if(!m_cabinet) | 64 | if(!m_cabinet) |
65 | { | 65 | { |
66 | qDebug() << "[MsPackUtil] CAB file not open!"; | 66 | LOG_ERROR() << "CAB file not open!"; |
67 | return false; | 67 | return false; |
68 | } | 68 | } |
69 | 69 | ||
@@ -78,7 +78,7 @@ bool MsPackUtil::extractArchive(const QString& dest, QString file) | |||
78 | struct mscabd_file *f = m_cabinet->files; | 78 | struct mscabd_file *f = m_cabinet->files; |
79 | if(f == NULL) | 79 | if(f == NULL) |
80 | { | 80 | { |
81 | qDebug() << "[MsPackUtil] CAB doesn't contain file" << file; | 81 | LOG_WARNING() << "CAB doesn't contain file" << file; |
82 | return true; | 82 | return true; |
83 | } | 83 | } |
84 | bool found = false; | 84 | bool found = false; |
@@ -99,7 +99,7 @@ bool MsPackUtil::extractArchive(const QString& dest, QString file) | |||
99 | if(!QDir().mkpath(QFileInfo(path).absolutePath())) | 99 | if(!QDir().mkpath(QFileInfo(path).absolutePath())) |
100 | { | 100 | { |
101 | emit logItem(tr("Creating output path failed"), LOGERROR); | 101 | emit logItem(tr("Creating output path failed"), LOGERROR); |
102 | qDebug() << "[MsPackUtil] creating output path failed for:" << path; | 102 | LOG_ERROR() << "creating output path failed for:" << path; |
103 | emit logProgress(1, 1); | 103 | emit logProgress(1, 1); |
104 | return false; | 104 | return false; |
105 | } | 105 | } |
@@ -107,7 +107,8 @@ bool MsPackUtil::extractArchive(const QString& dest, QString file) | |||
107 | if(ret != MSPACK_ERR_OK) | 107 | if(ret != MSPACK_ERR_OK) |
108 | { | 108 | { |
109 | emit logItem(tr("Error during CAB operation"), LOGERROR); | 109 | emit logItem(tr("Error during CAB operation"), LOGERROR); |
110 | qDebug() << "[MsPackUtil] mspack error: " << ret << "(" << errorStringMsPack(ret) << ")"; | 110 | LOG_ERROR() << "mspack error: " << ret |
111 | << "(" << errorStringMsPack(ret) << ")"; | ||
111 | emit logProgress(1, 1); | 112 | emit logProgress(1, 1); |
112 | return false; | 113 | return false; |
113 | } | 114 | } |
@@ -125,7 +126,7 @@ QStringList MsPackUtil::files(void) | |||
125 | QStringList list; | 126 | QStringList list; |
126 | if(!m_cabinet) | 127 | if(!m_cabinet) |
127 | { | 128 | { |
128 | qDebug() << "[MsPackUtil] CAB file not open!"; | 129 | LOG_WARNING() << "CAB file not open!"; |
129 | return list; | 130 | return list; |
130 | } | 131 | } |
131 | struct mscabd_file *file = m_cabinet->files; | 132 | struct mscabd_file *file = m_cabinet->files; |