From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/parsers/parser.cpp | 286 +++++++++++++++++++++++----------------------- 1 file changed, 143 insertions(+), 143 deletions(-) (limited to 'quanta/parsers/parser.cpp') diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index 707d97b0..0a9441db 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -115,13 +115,13 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No bool nodeFound = false; bool goUp; Node *rootNode = 0L; - Node *parentNode = a_node; + Node *tqparentNode = a_node; Node *currentNode = a_node; if (currentNode && (currentNode->tag->type != Tag::XmlTag || currentNode->tag->single)) - parentNode = currentNode->parent; + tqparentNode = currentNode->tqparent; Tag *tag = 0L; - QTag *qTag = 0L; + TQTag *qTag = 0L; textLine.append(write->text(startLine, startCol, startLine, write->editIf->lineLength(startLine))); if (line == endLine) { @@ -137,21 +137,21 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No nodeFound = false; goUp = false; //find the first "<" and the first special area start definition in this line - tagStartPos = textLine.find('<', col); - specialStartPos = specialAreaCount ? textLine.find(m_dtd->specialAreaStartRx, col): -1; + tagStartPos = textLine.tqfind('<', col); + specialStartPos = specialAreaCount ? textLine.tqfind(m_dtd->specialAreaStartRx, col): -1; //if the special area start definition is before the first "<" it means //that we have found a special area if ( specialStartPos != -1 && (specialStartPos <= tagStartPos || tagStartPos == -1) ) { - currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, parentNode); + currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, tqparentNode); if (!rootNode) rootNode = currentNode; TQString foundText = m_dtd->specialAreaStartRx.cap(); //create a toplevel node for the special area AreaStruct area(line, specialStartPos, line, specialStartPos + foundText.length() - 1); - Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, parentNode, currentNode); - if (node->parent && node->prev == node->parent) //some strange cases, but it's possible, eg.: + Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, tqparentNode, currentNode); + if (node->tqparent && node->prev == node->tqparent) //some strange cases, but it's possible, eg.: { node->prev->next = 0L; node->prev = 0L; @@ -263,37 +263,37 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No tag->name.truncate(tag->name.length() - 1); } //the tag we found indicates the beginning of a special area, like