summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/errors.h12
-rw-r--r--src/libs/installer/lib7z_facade.h20
2 files changed, 16 insertions, 16 deletions
diff --git a/src/libs/installer/errors.h b/src/libs/installer/errors.h
index f8c105fcf..aa70f8e6d 100644
--- a/src/libs/installer/errors.h
+++ b/src/libs/installer/errors.h
@@ -45,13 +45,15 @@ namespace QInstaller {
class Error : public std::exception
{
public:
- Error() {}
+ Error()
+ {}
+
explicit Error(const QString &message)
: m_message(message)
- {
- qDebug() << "create Error-Exception:" << message;
- }
- virtual ~Error() throw() {}
+ {}
+
+ virtual ~Error() throw()
+ {}
QString message() const { return m_message; }
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