1 #include "WebEngineError.h"
6 WebEngineError::WebEngineError(int code
)
13 WebEngineError::getErrDesc(int code
)
15 // tr() musim dat s QObject::, protoze trida neni Qt trida (= potomek QObject)
16 static QVector
<QString
> errTable
;
17 if(errTable
.size() == 0)
19 errTable
.push_back(QObject::tr("Ok.")); // ERR_NO
20 errTable
.push_back(QObject::tr("Execution error!")); // ERR_REQUEST
21 errTable
.push_back(QObject::tr("Loading parser error!")); // ERR_PARSER
22 errTable
.push_back(QObject::tr("Parser error!")); // ERR_PARSING
24 if(code
>= errTable
.size())
26 m_desc
= QObject::tr("Unexpected error!");
28 m_desc
= errTable
[code
];