diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch) | |
tree | 629d3942958745660e36c30b0d6139af9459c0f8 /quanta/parsers/dtd | |
parent | 929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff) | |
download | tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parsers/dtd')
-rw-r--r-- | quanta/parsers/dtd/dtd.cpp | 60 | ||||
-rw-r--r-- | quanta/parsers/dtd/dtdparser.cpp | 4 |
2 files changed, 32 insertions, 32 deletions
diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index 2783acca..5008dcff 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -51,7 +51,7 @@ TQStringList DTD::getTags() AttributeList* DTD::getTagAttributes(TQString tag) { - return tagAttributes.tqfind(tag); + return tagAttributes.find(tag); } @@ -195,14 +195,14 @@ void DTD::parseDTDEntity(TQString line) { TQString name; TQString *value; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(11); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name = name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(11+firstSpace)); - value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfindRev("\""), value->length()); + value->remove(0, value->find("\"")+1); + value->remove(value->findRev("\""), value->length()); parseDTDReplace(value); stripSpaces(value); @@ -217,14 +217,14 @@ void DTD::parseDTDElement(const TQString &l) { TQString *value; TQString line = l; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(10); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfind(">"), 10000); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); parseDTDReplace(&name); parseDTDReplace(value); @@ -254,14 +254,14 @@ void DTD::parseDTDAttlist(const TQString &l) { TQString *value; TQString line = l; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(10); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfind(">"), 10000); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); parseDTDReplace(&name); parseDTDReplace(value); @@ -362,51 +362,51 @@ void DTD::parseTagAttributeValues(const TQString &name, TQString *value) { void DTD::parseDTDReplace(TQString *value) { int begin, end; - begin = value->tqfind("%"); - end = value->tqfind(";"); + begin = value->find("%"); + end = value->find(";"); while (begin != -1 && end != -1) { TQString replaceText = value->mid(begin+1, end-begin-1); - TQString *replaceValue = entities.tqfind(replaceText); + TQString *replaceValue = entities.find(replaceText); if (replaceValue != 0L) { - value->tqreplace(begin, end-begin+1, *replaceValue); + value->replace(begin, end-begin+1, *replaceValue); } else { kdDebug(24000) << "Can not find entity: " << replaceText << endl; return; } - begin = value->tqfind("%"); - end = value->tqfind(";"); + begin = value->find("%"); + end = value->find(";"); } } void DTD::stripSpaces(TQString *value) { int index=-1; - while ( (index=value->tqfind(' ',++index)) != -1 ) { - if ( value->tqfindRev('(',index) != -1 && value->tqfind(')',index) != -1) + while ( (index=value->find(' ',++index)) != -1 ) { + if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) value->remove(index,1); } } void DTD::removeComments(TQString &value) { int begin, end; - begin = value.tqfind("<!--"); - end = value.tqfind("-->",begin+2); + begin = value.find("<!--"); + end = value.find("-->",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+3); - begin = value.tqfind("<!--"); - end = value.tqfind("-->",begin+2); + begin = value.find("<!--"); + end = value.find("-->",begin+2); } - begin = value.tqfind("--"); - end = value.tqfind("--",begin+2); + begin = value.find("--"); + end = value.find("--",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+2); - begin = value.tqfind("--"); - end = value.tqfind("--",begin+2); + begin = value.find("--"); + end = value.find("--",begin+2); } - value.tqreplace(TQRegExp("<!>"), ""); + value.replace(TQRegExp("<!>"), ""); } bool DTD::parseDTD() diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 8b4ec503..72e7ea18 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -123,8 +123,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) m_name = w.dtdName->text(); m_nickName = w.nickName->text(); m_doctype = w.doctype->text(); - m_doctype.tqreplace(TQRegExp("<!doctype", false), ""); - m_doctype = m_doctype.left(m_doctype.tqfindRev(">")); + m_doctype.replace(TQRegExp("<!doctype", false), ""); + m_doctype = m_doctype.left(m_doctype.findRev(">")); m_dtdURLLine = w.dtdURL->text(); m_defaultExtension = w.defaultExtension->text(); m_caseSensitive = w.caseSensitive->isChecked(); |