summaryrefslogtreecommitdiffstats
path: root/trinity-base/quanta/files/quanta-xml2.patch
blob: 6067892482cb2a0de70c2614558e6110231d1241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/quanta/parsers/dtd/dtdparser.cpp	2024-03-24 17:50:30.532305927 +0300
+++ b/quanta/parsers/dtd/dtdparser.cpp	2024-03-24 17:51:05.456304466 +0300
@@ -82,7 +82,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 +99,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;