diff options
Diffstat (limited to 'quanta/parsers/dtd/dtd.cpp')
-rw-r--r-- | quanta/parsers/dtd/dtd.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index 964c35fb..c0942441 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -30,8 +30,8 @@ #include <ktempfile.h> #include "dtd.h" -#include "../quantacommon.h" -#include "../qextfileinfo.h" +#include "../tquantacommon.h" +#include "../tqextfileinfo.h" DTD::DTD(const KURL &dtdURL, const TQString &dtepDir) @@ -51,7 +51,7 @@ TQStringList DTD::getTags() AttributeList* DTD::getTagAttributes(TQString tag) { - return tagAttributes.find(tag); + return tagAttributes.tqfind(tag); } @@ -84,7 +84,7 @@ void DTD::writeTagFiles() TQString dirName = m_dtepDir; KURL u; u.setPath(dirName); - if (!QExtFileInfo::createDir(dirName)) { + if (!TQExtFileInfo::createDir(dirName)) { QuantaCommon::dirCreationError(0, u); return; } @@ -121,10 +121,10 @@ void DTD::writeTagFiles() bool DTD::parseDTD(const KURL &url) { - TQString fileName = TQString::null; + TQString fileName = TQString(); if (!KIO::NetAccess::download(url, fileName)) { - KMessageBox::error(0, i18n("<qt>Cannot download the DTD from <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(0, i18n("<qt>Cannot download the DTD from <b>%1</b>.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); return false; } TQFile file(fileName); @@ -183,7 +183,7 @@ bool DTD::parseDTD(const KURL &url) parseDTD(entityURL); } else { - kdDebug(24000) << TQString("Unknown tag: [%1]").arg(line) << endl; + kdDebug(24000) << TQString("Unknown tag: [%1]").tqarg(line) << endl; } if (it != lines.end()) ++it; @@ -195,14 +195,14 @@ void DTD::parseDTDEntity(TQString line) { TQString name; TQString *value; - line.replace("\\end", " "); + line.tqreplace("\\end", " "); name = line.mid(11); - int firstSpace = name.find(' '); + int firstSpace = name.tqfind(' '); name = name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(11+firstSpace)); - value->remove(0, value->find("\"")+1); - value->remove(value->findRev("\""), value->length()); + value->remove(0, value->tqfind("\"")+1); + value->remove(value->tqfindRev("\""), value->length()); parseDTDReplace(value); stripSpaces(value); @@ -217,14 +217,14 @@ void DTD::parseDTDElement(const TQString &l) { TQString *value; TQString line = l; - line.replace("\\end", " "); + line.tqreplace("\\end", " "); name = line.mid(10); - int firstSpace = name.find(' '); + int firstSpace = name.tqfind(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->find("\"")+1); - value->remove(value->find(">"), 10000); + //value->remove(0, value->tqfind("\"")+1); + value->remove(value->tqfind(">"), 10000); parseDTDReplace(&name); parseDTDReplace(value); @@ -254,14 +254,14 @@ void DTD::parseDTDAttlist(const TQString &l) { TQString *value; TQString line = l; - line.replace("\\end", " "); + line.tqreplace("\\end", " "); name = line.mid(10); - int firstSpace = name.find(' '); + int firstSpace = name.tqfind(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->find("\"")+1); - value->remove(value->find(">"), 10000); + //value->remove(0, value->tqfind("\"")+1); + value->remove(value->tqfind(">"), 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->find("%"); - end = value->find(";"); + begin = value->tqfind("%"); + end = value->tqfind(";"); while (begin != -1 && end != -1) { TQString replaceText = value->mid(begin+1, end-begin-1); - TQString *replaceValue = entities.find(replaceText); + TQString *replaceValue = entities.tqfind(replaceText); if (replaceValue != 0L) { - value->replace(begin, end-begin+1, *replaceValue); + value->tqreplace(begin, end-begin+1, *replaceValue); } else { kdDebug(24000) << "Can not find entity: " << replaceText << endl; return; } - begin = value->find("%"); - end = value->find(";"); + begin = value->tqfind("%"); + end = value->tqfind(";"); } } void DTD::stripSpaces(TQString *value) { int index=-1; - while ( (index=value->find(' ',++index)) != -1 ) { - if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) + while ( (index=value->tqfind(' ',++index)) != -1 ) { + if ( value->tqfindRev('(',index) != -1 && value->tqfind(')',index) != -1) value->remove(index,1); } } void DTD::removeComments(TQString &value) { int begin, end; - begin = value.find("<!--"); - end = value.find("-->",begin+2); + begin = value.tqfind("<!--"); + end = value.tqfind("-->",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+3); - begin = value.find("<!--"); - end = value.find("-->",begin+2); + begin = value.tqfind("<!--"); + end = value.tqfind("-->",begin+2); } - begin = value.find("--"); - end = value.find("--",begin+2); + begin = value.tqfind("--"); + end = value.tqfind("--",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+2); - begin = value.find("--"); - end = value.find("--",begin+2); + begin = value.tqfind("--"); + end = value.tqfind("--",begin+2); } - value.replace(TQRegExp("<!>"), ""); + value.tqreplace(TQRegExp("<!>"), ""); } bool DTD::parseDTD() |