diff options
Diffstat (limited to 'quanta/parsers/sagroupparser.cpp')
-rw-r--r-- | quanta/parsers/sagroupparser.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp index 6e409509..e28abe78 100644 --- a/quanta/parsers/sagroupparser.cpp +++ b/quanta/parsers/sagroupparser.cpp @@ -35,14 +35,14 @@ extern GroupElementMapList globalGroupMap; -SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup) +SAGroupParser::SAGroupParser(SAParser *tqparent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup) { g_node = startNode; g_endNode = endNode; m_synchronous = synchronous; m_lastGroupParsed = paringLastGroup; m_parsingLastNode = parsingLastNode; - m_parent = parent; + m_parent = tqparent; m_write = write; m_count = 0; m_parseForGroupTimer = new TQTimer(this); @@ -117,7 +117,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) StructTreeGroup group; GroupElement *groupElement; GroupElementList* groupElementList; - KURL baseURL = QExtFileInfo::path(m_write->url()); + KURL baseURL = TQExtFileInfo::path(m_write->url()); TQString str = node->tag->cleanStr; TQString tagStr = node->tag->tagStr(); const DTDStruct* dtd = node->tag->dtd(); @@ -144,20 +144,20 @@ void SAGroupParser::parseForScriptGroup(Node *node) title = tagStr.mid(pos, group.definitionRx.matchedLength()); node->tag->beginPos(bl, bc); tmpStr = tagStr.left(pos); - int newLines = tmpStr.contains('\n'); + int newLines = tmpStr.tqcontains('\n'); bl += newLines; - int l = tmpStr.findRev('\n'); //the last EOL + int l = tmpStr.tqfindRev('\n'); //the last EOL bc = (l == -1) ? bc + pos : pos - l - 1; - newLines = title.contains('\n'); + newLines = title.tqcontains('\n'); l = title.length(); el = bl + newLines; - ec = (newLines > 0) ? l - title.findRev('\n') : bc + l - 1; + ec = (newLines > 0) ? l - title.tqfindRev('\n') : bc + l - 1; pos += l; AreaStruct area(bl, bc, el, ec); //get the list of elements which are present in this group and //have the same title. For example get the list of all group //element which are variable and the matched string was "$i" - int cap1Pos = str.find(group.definitionRx.cap(1)); + int cap1Pos = str.tqfind(group.definitionRx.cap(1)); TQString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length()); groupElementList = & (globalGroupMap[group.name + "|" + s]); //Create a new tag which point to the exact location of the matched string. @@ -178,40 +178,40 @@ void SAGroupParser::parseForScriptGroup(Node *node) Node *tmpNode = node; while (tmpNode && tmpNode->tag->dtd() == dtd && tmpNode->tag->type != Tag::ScriptStructureBegin) { - tmpNode = tmpNode->parent; + tmpNode = tmpNode->tqparent; } if (tmpNode && tmpNode->tag->type == Tag::ScriptStructureBegin) { - groupElement->parentNode = tmpNode; + groupElement->tqparentNode = tmpNode; } else { - groupElement->parentNode = 0L; + groupElement->tqparentNode = 0L; } groupElement->global = true; - tmpNode = node->parent; + tmpNode = node->tqparent; while (tmpNode && tmpNode->tag->dtd() == dtd) { if ( tmpNode->tag->type == Tag::ScriptStructureBegin && tmpNode->tag->dtd()->localScopeKeywordsRx.search(tmpNode->tag->cleanStr) != -1) { groupElement->global = false; - groupElement->parentNode = tmpNode; + groupElement->tqparentNode = tmpNode; break; } - tmpNode = tmpNode->parent; + tmpNode = tmpNode->tqparent; } if (group.appendToTags) { - QTag *qTag = new QTag(); + TQTag *qTag = new TQTag(); // The location of the first open bracket '(', also the end of the tag name - int nameEnd = s.find('('); + int nameEnd = s.tqfind('('); qTag->setName(s.left(nameEnd)); qTag->className = ""; - if (groupElement->parentNode) + if (groupElement->tqparentNode) { - for (GroupElementList::ConstIterator it2 = groupElement->parentNode->m_groupElements.constBegin(); it2 != groupElement->parentNode->m_groupElements.constEnd(); ++it2) + for (GroupElementList::ConstIterator it2 = groupElement->tqparentNode->m_groupElements.constBegin(); it2 != groupElement->tqparentNode->m_groupElements.constEnd(); ++it2) { - if ((*it2)->group->name == group.parentGroup) + if ((*it2)->group->name == group.tqparentGroup) { qTag->className = (*it2)->tag->name; break; @@ -219,24 +219,24 @@ void SAGroupParser::parseForScriptGroup(Node *node) } } // Test for variable or function Type by checking for an opening bracket "(" used by functions - // and store the type in the QTag type variable. + // and store the type in the TQTag type variable. bool isArgument=false; if (nameEnd == -1) { qTag->type="variable"; // If this tag is a class function argument, it should not belong to the class, so we need to remove it - if(qTag->className.length() != 0 && tagStr.contains('(') && tagStr.contains(')')) + if(qTag->className.length() != 0 && tagStr.tqcontains('(') && tagStr.tqcontains(')')) { // First we want to determine the whole line the tag is on TQString tagWholeLineStr = tagStr; // Remove lines before target line while(tagWholeLineStr.length() > 0) // this stops infinit looping in case something goes wrong! { - int firstNewline = tagWholeLineStr.find('\n'); + int firstNewline = tagWholeLineStr.tqfind('\n'); if(firstNewline == -1) //no new lines so we must be on the last break; TQString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length()); - if(checkLineStr.contains(s)) + if(checkLineStr.tqcontains(s)) tagWholeLineStr = checkLineStr; else break; @@ -244,23 +244,23 @@ void SAGroupParser::parseForScriptGroup(Node *node) // Remove lines after target line - essentially same as above while(tagWholeLineStr.length() > 0) { - int lastNewLine = tagWholeLineStr.findRev('\n'); + int lastNewLine = tagWholeLineStr.tqfindRev('\n'); if(lastNewLine == -1) break; TQString checkLineStr = tagWholeLineStr.mid(0,lastNewLine); - if(checkLineStr.contains(s)) + if(checkLineStr.tqcontains(s)) tagWholeLineStr = checkLineStr; else break; } - // Now we are left with the current line, lets check if the variable is inside parentheses - int lineOpenParenth=tagWholeLineStr.find('('); + // Now we are left with the current line, lets check if the variable is inside tqparentheses + int lineOpenParenth=tagWholeLineStr.tqfind('('); if(lineOpenParenth != -1) { - int lineCloseParenth=tagWholeLineStr.find(')'); + int lineCloseParenth=tagWholeLineStr.tqfind(')'); if(lineCloseParenth != -1) { - int lineNameLocation=tagWholeLineStr.find(s); + int lineNameLocation=tagWholeLineStr.tqfind(s); if(lineNameLocation > lineOpenParenth || lineNameLocation < lineCloseParenth) // Write the current tag to the list isArgument=true; } @@ -272,7 +272,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) qTag->type="function"; } if(!isArgument) - m_write->userTagList.replace(s.lower(), qTag); + m_write->userTagList.tqreplace(s.lower(), qTag); } @@ -294,7 +294,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) s.remove(group.fileNameRx); KURL url; QuantaCommon::setUrl(url, s.stripWhiteSpace()); - url = QExtFileInfo::toAbsolute(url, baseURL); + url = TQExtFileInfo::toAbsolute(url, baseURL); ParserCommon::includedFiles += url.path(); ParserCommon::includedFilesDTD.append(dtd); ParserCommon::includeWatch->addFile(url.path()); |