diff options
Diffstat (limited to 'quanta/parsers')
-rw-r--r-- | quanta/parsers/CMakeLists.txt | 3 | ||||
-rw-r--r-- | quanta/parsers/dtd/CMakeLists.txt | 7 | ||||
-rw-r--r-- | quanta/parsers/dtd/dtdparser.cpp | 17 | ||||
-rw-r--r-- | quanta/parsers/parser.cpp | 16 | ||||
-rw-r--r-- | quanta/parsers/parser.h | 2 | ||||
-rw-r--r-- | quanta/parsers/sagroupparser.cpp | 2 | ||||
-rw-r--r-- | quanta/parsers/sagroupparser.h | 2 | ||||
-rw-r--r-- | quanta/parsers/saparser.cpp | 16 | ||||
-rw-r--r-- | quanta/parsers/saparser.h | 2 |
9 files changed, 38 insertions, 29 deletions
diff --git a/quanta/parsers/CMakeLists.txt b/quanta/parsers/CMakeLists.txt index 53536e0b..a7c6adc4 100644 --- a/quanta/parsers/CMakeLists.txt +++ b/quanta/parsers/CMakeLists.txt @@ -19,6 +19,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/quanta/utility ${CMAKE_SOURCE_DIR}/quanta/treeviews ${CMAKE_SOURCE_DIR}/quanta/parts/kafka +) + +include_directories( SYSTEM ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} ) diff --git a/quanta/parsers/dtd/CMakeLists.txt b/quanta/parsers/dtd/CMakeLists.txt index 7997cc5a..5d767f5e 100644 --- a/quanta/parsers/dtd/CMakeLists.txt +++ b/quanta/parsers/dtd/CMakeLists.txt @@ -9,13 +9,20 @@ # ################################################# +add_compile_options( ${ICU_CXXFLAGS} ) + + include_directories( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/quanta/dialogs ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/quanta/parsers ${CMAKE_SOURCE_DIR}/quanta/utility ${CMAKE_SOURCE_DIR}/quanta/dialogs +) + +include_directories( SYSTEM ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} ${LIBXML_INCLUDE_DIRS} diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 502551fd..9de0f39a 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -13,6 +13,10 @@ * * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + //qt includes #include <tqcheckbox.h> #include <tqfile.h> @@ -32,10 +36,6 @@ #include <tdeio/netaccess.h> //other includes -#ifdef LIBXML_2_5 -#include <libxml/hash.h> -#endif - #include <libxml/parser.h> #include <libxml/valid.h> @@ -82,8 +82,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) if( DTD::dtd_ptr == NULL ) { TQString errorStr = i18n("Unknown"); -#ifndef LIBXML_2_5 - xmlErrorPtr errorPtr = xmlGetLastError(); + // The type used is either xmlErrorPtr or const xmlError* + auto errorPtr = xmlGetLastError(); if (errorPtr != NULL) { TQString s = TQString::fromLatin1(errorPtr->message); @@ -99,9 +99,8 @@ 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(); } -#endif KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").arg(errorStr)); return false; } @@ -144,7 +143,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) TQFile file( DTD::dirName + "entities.tag" ); if ( file.open( IO_WriteOnly ) ) { - DTD::entityStream.setDevice(TQT_TQIODEVICE(&file)); + DTD::entityStream.setDevice(&file); DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8); DTD::entityStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; DTD::entityStream << "<!DOCTYPE TAGS>" << endl diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index cfca7279..775fa3ec 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -79,10 +79,10 @@ Parser::Parser() m_parsingNeeded = true; m_parseIncludedFiles = true; m_saParser = new SAParser(); - connect(m_saParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool))); - connect(m_saParser, TQT_SIGNAL(cleanGroups()), TQT_SLOT(cleanGroups())); + connect(m_saParser, TQ_SIGNAL(rebuildStructureTree(bool)), TQ_SIGNAL(rebuildStructureTree(bool))); + connect(m_saParser, TQ_SIGNAL(cleanGroups()), TQ_SLOT(cleanGroups())); ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); + connect(ParserCommon::includeWatch, TQ_SIGNAL(dirty(const TQString&)), TQ_SLOT(slotIncludedFileChanged(const TQString&))); } Parser::~Parser() @@ -567,7 +567,7 @@ Node *Parser::parse(Document *w, bool force) emit nodeTreeChanged(); if (saParserEnabled) - TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQ_SLOT(slotParseInDetail())); return m_node; } @@ -1244,7 +1244,7 @@ Node *Parser::rebuild(Document *w) m_saParser->init(m_node, w); if (saParserEnabled) - TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQ_SLOT(slotParseInDetail())); emit nodeTreeChanged(); m_parsingNeeded = false; return m_node; @@ -1297,7 +1297,7 @@ void Parser::clearGroups() ParserCommon::includedFilesDTD.clear(); delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); + connect(ParserCommon::includeWatch, TQ_SIGNAL(dirty(const TQString&)), TQ_SLOT(slotIncludedFileChanged(const TQString&))); m_parseIncludedFiles = true; } @@ -1345,7 +1345,7 @@ void Parser::cleanGroups() { delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); + connect(ParserCommon::includeWatch, TQ_SIGNAL(dirty(const TQString&)), TQ_SLOT(slotIncludedFileChanged(const TQString&))); parseIncludedFiles(); } } @@ -1751,7 +1751,7 @@ void Parser::synchParseInDetail() void Parser::setSAParserEnabled(bool enabled) { m_saParser->setParsingEnabled(enabled); - //kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled + //tdeApp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled } #include "parser.moc" diff --git a/quanta/parsers/parser.h b/quanta/parsers/parser.h index d717f6f2..e3869b6b 100644 --- a/quanta/parsers/parser.h +++ b/quanta/parsers/parser.h @@ -44,7 +44,7 @@ typedef TQMap<TQString, IncludedGroupElements> IncludedGroupElementsMap; class Parser: public TQObject { -Q_OBJECT +TQ_OBJECT public: diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp index 000ba002..1b665ebf 100644 --- a/quanta/parsers/sagroupparser.cpp +++ b/quanta/parsers/sagroupparser.cpp @@ -46,7 +46,7 @@ SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode, m_write = write; m_count = 0; m_parseForGroupTimer = new TQTimer(this); - connect(m_parseForGroupTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseForScriptGroup())); + connect(m_parseForGroupTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotParseForScriptGroup())); } void SAGroupParser::slotParseForScriptGroup() diff --git a/quanta/parsers/sagroupparser.h b/quanta/parsers/sagroupparser.h index ca4add8f..83ec62ef 100644 --- a/quanta/parsers/sagroupparser.h +++ b/quanta/parsers/sagroupparser.h @@ -31,7 +31,7 @@ class SAParser; */ class SAGroupParser : public TQObject { -Q_OBJECT +TQ_OBJECT public: public: diff --git a/quanta/parsers/saparser.cpp b/quanta/parsers/saparser.cpp index 691c2d2e..fcf9b17d 100644 --- a/quanta/parsers/saparser.cpp +++ b/quanta/parsers/saparser.cpp @@ -44,9 +44,9 @@ SAParser::SAParser() m_parsingEnabled = true; m_synchronous = true; m_parseOneLineTimer = new TQTimer(this); - connect(m_parseOneLineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseOneLine())); + connect(m_parseOneLineTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotParseOneLine())); m_parseInDetailTimer = new TQTimer(this); - connect(m_parseInDetailTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseNodeInDetail())); + connect(m_parseInDetailTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotParseNodeInDetail())); } SAParser::~SAParser() @@ -396,9 +396,9 @@ bool SAParser::slotParseOneLine() } } SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, g_endNode, m_synchronous, parsingLastNode, true); - connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool))); - connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups())); - connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*))); + connect(groupParser, TQ_SIGNAL(rebuildStructureTree(bool)), TQ_SIGNAL(rebuildStructureTree(bool))); + connect(groupParser, TQ_SIGNAL(cleanGroups()), TQ_SIGNAL(cleanGroups())); + connect(groupParser, TQ_SIGNAL(parsingDone(SAGroupParser*)), TQ_SLOT(slotGroupParsingDone(SAGroupParser*))); groupParser->slotParseForScriptGroup(); m_groupParsers.append(groupParser); } @@ -818,9 +818,9 @@ Node *SAParser::parsingDone() if (!m_synchronous) { SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, 0L, m_synchronous, true /*last node*/, true); - connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool))); - connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups())); - connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*))); + connect(groupParser, TQ_SIGNAL(rebuildStructureTree(bool)), TQ_SIGNAL(rebuildStructureTree(bool))); + connect(groupParser, TQ_SIGNAL(cleanGroups()), TQ_SIGNAL(cleanGroups())); + connect(groupParser, TQ_SIGNAL(parsingDone(SAGroupParser*)), TQ_SLOT(slotGroupParsingDone(SAGroupParser*))); groupParser->slotParseForScriptGroup(); m_groupParsers.append(groupParser); } diff --git a/quanta/parsers/saparser.h b/quanta/parsers/saparser.h index 463cf1b9..8360985d 100644 --- a/quanta/parsers/saparser.h +++ b/quanta/parsers/saparser.h @@ -40,7 +40,7 @@ class SAGroupParser; */ class SAParser: public TQObject { - Q_OBJECT + TQ_OBJECT public: |