You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging-gentoo/trinity-base/quanta/files/quanta-xml2.patch

31 lines
1.2 KiB

diff -urN tdewebdev-trinity-14.1.1.orig/quanta/parsers/dtd/dtdparser.cpp tdewebdev-trinity-14.1.1/quanta/parsers/dtd/dtdparser.cpp
--- tdewebdev-trinity-14.1.1.orig/quanta/parsers/dtd/dtdparser.cpp 2024-03-24 16:56:37.726441132 +0300
+++ tdewebdev-trinity-14.1.1/quanta/parsers/dtd/dtdparser.cpp 2024-03-24 16:59:52.765432975 +0300
@@ -38,6 +38,7 @@
//other includes
#include <libxml/parser.h>
#include <libxml/valid.h>
+#include <unistd.h>
//own includes
#include "dtepeditdlg.h"
@@ -82,7 +83,8 @@
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 +100,7 @@
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;