|
|
|
@ -82,7 +82,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
|
|
|
|
|
if( DTD::dtd_ptr == NULL )
|
|
|
|
|
{
|
|
|
|
|
TQString errorStr = i18n("Unknown");
|
|
|
|
|
xmlErrorPtr errorPtr = xmlGetLastError();
|
|
|
|
|
// The type used is either xmlErrorPtr or const xmlError*
|
|
|
|
|
auto errorPtr = xmlGetLastError();
|
|
|
|
|
if (errorPtr != NULL)
|
|
|
|
|
{
|
|
|
|
|
TQString s = TQString::fromLatin1(errorPtr->message);
|
|
|
|
@ -98,7 +99,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
|
|
|
|
|
if (!s.isEmpty())
|
|
|
|
|
errorStr += "<br>" + s;
|
|
|
|
|
errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
|
|
|
|
|
xmlResetError(errorPtr);
|
|
|
|
|
xmlResetLastError();
|
|
|
|
|
}
|
|
|
|
|
KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").arg(errorStr));
|
|
|
|
|
return false;
|
|
|
|
|