summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/lib7z_facade.h
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-05-19 16:03:29 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-09 13:08:24 +0000
commitfa5f7c662841b1d13f6610db8817608a24e3a3f6 (patch)
tree0c1a4445fe09a0ce33c913fdfc3da2cf8eb2962b /src/libs/installer/lib7z_facade.h
parent1bf6fd620a16e7d9e7b1eebdefa60164eef609d0 (diff)
Inherit from existing QInstaller::Error class.
Remove superfluous qDebug to avoid printing the message always. Change-Id: Ia15815fc476e9e48d24d307e8c6875b0506ab7c0 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/lib7z_facade.h')
-rw-r--r--src/libs/installer/lib7z_facade.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/libs/installer/lib7z_facade.h b/src/libs/installer/lib7z_facade.h
index 39f9f04c7..ff0e7a1e4 100644
--- a/src/libs/installer/lib7z_facade.h
+++ b/src/libs/installer/lib7z_facade.h
@@ -35,6 +35,7 @@
#define LIB7Z_FACADE_H
#include "installer_global.h"
+#include "errors.h"
#include <QDateTime>
#include <QFile>
@@ -45,25 +46,22 @@
#include "Common/MyWindows.h"
-#include <stdexcept>
-#include <string>
-
QT_BEGIN_NAMESPACE
class QStringList;
template <typename T> class QVector;
QT_END_NAMESPACE
namespace Lib7z {
- class INSTALLER_EXPORT SevenZipException : public std::runtime_error {
+ class INSTALLER_EXPORT SevenZipException : public QInstaller::Error
+ {
public:
- explicit SevenZipException( const QString& msg ) : std::runtime_error( msg.toStdString() ), m_message( msg ) {}
- explicit SevenZipException( const char* msg ) : std::runtime_error( msg ), m_message( QString::fromLocal8Bit( msg ) ) {}
- explicit SevenZipException( const std::string& msg ) : std::runtime_error( msg ), m_message( QString::fromLocal8Bit( msg.c_str() ) ) {}
+ explicit SevenZipException(const QString &msg)
+ : QInstaller::Error(msg)
+ {}
- ~SevenZipException() throw() {}
- QString message() const { return m_message; }
- private:
- QString m_message;
+ explicit SevenZipException(const char *msg)
+ : QInstaller::Error(QString::fromLocal8Bit(msg))
+ {}
};
class INSTALLER_EXPORT File