diff options
Diffstat (limited to 'quanta/parsers/tag.cpp')
-rw-r--r-- | quanta/parsers/tag.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/quanta/parsers/tag.cpp b/quanta/parsers/tag.cpp index 54779d57..f6460fce 100644 --- a/quanta/parsers/tag.cpp +++ b/quanta/parsers/tag.cpp @@ -33,8 +33,8 @@ void TagAttr::save(TQDomElement& element) const { - element.setAttribute("name", name); // QString - element.setAttribute("value", value); // QString + element.setAttribute("name", name); // TQString + element.setAttribute("value", value); // TQString element.setAttribute("nameLine", nameLine); // int element.setAttribute("nameCol", nameCol); // int element.setAttribute("valueLine", valueLine); // int @@ -127,13 +127,13 @@ void Tag::init() void Tag::save(TQDomElement& element) const { - element.setAttribute("name", name); // QString - element.setAttribute("nameSpace", nameSpace); // QString - element.setAttribute("cleanStr", cleanStr); // QString + element.setAttribute("name", name); // TQString + element.setAttribute("nameSpace", nameSpace); // TQString + element.setAttribute("cleanStr", cleanStr); // TQString element.setAttribute("type", type); // int element.setAttribute("single", single); // bool element.setAttribute("closingMissing", closingMissing); // bool - element.setAttribute("structBeginStr", structBeginStr); // QString + element.setAttribute("structBeginStr", structBeginStr); // TQString element.setAttribute("validXMLTag", validXMLTag); // bool element.setAttribute("cleanStrBuilt", m_cleanStrBuilt); // bool element.setAttribute("indentationDone", m_indentationDone); // bool @@ -149,18 +149,18 @@ void Tag::save(TQDomElement& element) const (*it).save(child_element); } - element.setAttribute("tagStr", m_tagStr); // QString + element.setAttribute("tagStr", m_tagStr); // TQString } bool Tag::load(TQDomElement const& element) { - name = element.attribute("name"); // QString - nameSpace = element.attribute("nameSpace"); // QString - cleanStr = element.attribute("cleanStr"); // QString + name = element.attribute("name"); // TQString + nameSpace = element.attribute("nameSpace"); // TQString + cleanStr = element.attribute("cleanStr"); // TQString type = TQString(element.attribute("type")).toInt(); // int single = TQString(element.attribute("single")).toInt(); // bool closingMissing = TQString(element.attribute("closingMissing")).toInt(); // bool - structBeginStr = element.attribute("structBeginStr"); // QString + structBeginStr = element.attribute("structBeginStr"); // TQString validXMLTag = TQString(element.attribute("validXMLTag")).toInt(); // bool m_cleanStrBuilt = TQString(element.attribute("cleanStrBuilt")).toInt(); // bool m_indentationDone = TQString(element.attribute("indentationDone")).toInt(); // bool @@ -183,7 +183,7 @@ bool Tag::load(TQDomElement const& element) } } - m_tagStr = element.attribute("tagStr"); // QString + m_tagStr = element.attribute("tagStr"); // TQString return true; } @@ -209,7 +209,7 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) pos++; } name = m_tagStr.mid(1, pos - 1); - int nameSpacePos = name.find(':'); + int nameSpacePos = name.tqfind(':'); if (nameSpacePos != -1) { nameSpace = name.left(nameSpacePos); @@ -237,7 +237,7 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) attr.name = attr.name.left(attr.name.length() - 1).lower(); if (!attr.name.stripWhiteSpace().isEmpty()) { - attr.nameLine = m_tagStr.left(sPos).contains('\n') + m_area.bLine; + attr.nameLine = m_tagStr.left(sPos).tqcontains('\n') + m_area.bLine; if (attr.nameLine == m_area.bLine) attr.nameCol = sPos + m_area.bCol; else @@ -252,7 +252,7 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) } if (m_dtd && !m_dtd->caseSensitive) attr.name = attr.name.lower(); - attr.nameLine = m_tagStr.left(sPos).contains('\n') + m_area.bLine; + attr.nameLine = m_tagStr.left(sPos).tqcontains('\n') + m_area.bLine; if (attr.nameLine == m_area.bLine) attr.nameCol = sPos + m_area.bCol; else @@ -298,7 +298,7 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) pos--; attr.value = m_tagStr.mid(valueStartPos, pos - valueStartPos); } - attr.valueLine = m_tagStr.left(valueStartPos).contains('\n') + m_area.bLine; + attr.valueLine = m_tagStr.left(valueStartPos).tqcontains('\n') + m_area.bLine; if (attr.valueLine == m_area.bLine) attr.valueCol = valueStartPos + m_area.bCol; else @@ -322,13 +322,13 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) if ( !QuantaCommon::isKnownTag(m_dtd->name, tagName) && name[0] != '/' ) { - QTag *newTag = m_write->userTagList.find(tagName); + TQTag *newTag = m_write->userTagList.tqfind(tagName); bool insertNew = !newTag; if (insertNew) { - newTag = new QTag(); + newTag = new TQTag(); newTag->setName(name); - newTag->parentDTD = m_dtd; + newTag->tqparentDTD = m_dtd; } for (int i = 0; i >attrCount(); i++) { @@ -340,7 +340,7 @@ void Tag::parse(const TQString &p_tagStr, Document *p_write) } if (insertNew) { - m_write->userTagList.replace(tagName, newTag); + m_write->userTagList.tqreplace(tagName, newTag); } } } @@ -566,7 +566,7 @@ void Tag::deleteAttribute(const TQString& attrName) void Tag::modifyAttributes(TQDict<TQString> *attrDict) { - QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name); + TQTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name); TQDictIterator<TQString> it(*attrDict); TQString attribute; TQString value; @@ -574,7 +574,7 @@ void Tag::modifyAttributes(TQDict<TQString> *attrDict) { attribute = it.currentKey(); value = *(it.current()); - if (qTag && qTag->parentDTD->singleTagStyle == "xml" && attribute=="/") + if (qTag && qTag->tqparentDTD->singleTagStyle == "xml" && attribute=="/") { ++it; continue; @@ -584,7 +584,7 @@ void Tag::modifyAttributes(TQDict<TQString> *attrDict) } for (uint i = 0 ; i < attrs.count(); i++) { - if ( !attrDict->find(attrs[i].name) ) + if ( !attrDict->tqfind(attrs[i].name) ) { attrs.remove(attrs.at(i)); } @@ -593,7 +593,7 @@ void Tag::modifyAttributes(TQDict<TQString> *attrDict) TQString Tag::toString() { - QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name); + TQTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name); TQValueList<TagAttr>::Iterator it; TagAttr attr; TQString attrString; @@ -622,7 +622,7 @@ TQString Tag::toString() attrString.append(QuantaCommon::tagCase(name)); tagString.prepend(attrString); - if (attrs.isEmpty() && qTag && qTag->parentDTD->singleTagStyle == "xml" && + if (attrs.isEmpty() && qTag && qTag->tqparentDTD->singleTagStyle == "xml" && (qTag->isSingle() || (!qConfig.closeOptionalTags && qTag->isOptional()) || single) ) @@ -660,10 +660,10 @@ bool Tag::isInsideScript(const TQString &str) //This detects if the last char from str is inside a script area or not, to //treat cases like <a href="<? echo "foo" ?>"> correctly //TODO: speed up if you can... - if (str.find(m_dtd->specialAreaStartRx) != -1) + if (str.tqfind(m_dtd->specialAreaStartRx) != -1) { TQString foundString = m_dtd->specialAreaStartRx.cap(); - if (str.find(m_dtd->specialAreas[foundString]) == -1) + if (str.tqfind(m_dtd->specialAreas[foundString]) == -1) { return true; } |