summaryrefslogtreecommitdiffstats
path: root/parts/documentation/protocols/chm/chm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/protocols/chm/chm.cpp')
-rw-r--r--parts/documentation/protocols/chm/chm.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/parts/documentation/protocols/chm/chm.cpp b/parts/documentation/protocols/chm/chm.cpp
index 1d7543c3..dbcbb07f 100644
--- a/parts/documentation/protocols/chm/chm.cpp
+++ b/parts/documentation/protocols/chm/chm.cpp
@@ -76,7 +76,7 @@ ChmProtocol::~ChmProtocol()
void ChmProtocol::get( const KURL& url )
{
/** When :catalog is appended to the end, a plain-text representation of the catalog
- * is given out where each entry consists of four lines, an integer representing the parent
+ * is given out where each entry consists of four lines, an integer representing the tqparent
* of the node, an integer representing a node's ID, the Title of the Node, and it's hyperlink.
* When :contents is appended, all contained htm- and html-files will be printed, each in a line.
*/
@@ -105,7 +105,7 @@ void ChmProtocol::get( const KURL& url )
}
- if (m_dirMap.find(path) == m_dirMap.end()) {
+ if (m_dirMap.tqfind(path) == m_dirMap.end()) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return;
}
@@ -178,25 +178,25 @@ void ChmProtocol::get( const KURL& url )
TQRegExp mergeParam("<param name=\"Merge\" value=\"(.*)\">", false);
mergeParam.setMinimal(true);
- std::stack<int> parents;
+ std::stack<int> tqparents;
int counter = 1;
int current = 0;
int old = 0, pos = 0;
- parents.push(0);
- while ((pos = s.find(object, pos)) != -1) {
+ tqparents.push(0);
+ while ((pos = s.tqfind(object, pos)) != -1) {
if(htmlOutput) output += s.mid(old, pos - old);
if(catalog) {
TQRegExp ex("<UL>|</UL>", false); ex.setMinimal(true);
TQString ms = s.mid(old, pos - old);
int pos = 0;
- while( (pos = ms.find(ex, pos)) != -1) {
+ while( (pos = ms.tqfind(ex, pos)) != -1) {
if(ms.mid(pos, 4) == "<UL>") {
- parents.push(current);
+ tqparents.push(current);
} else{
- if(parents.empty()){
+ if(tqparents.empty()){
}else{
- current = parents.top();
- parents.pop();
+ current = tqparents.top();
+ tqparents.pop();
}
}
pos++;
@@ -206,9 +206,9 @@ void ChmProtocol::get( const KURL& url )
old = pos;
TQString obj = object.cap(1);
TQString name, local;
- if (obj.find(nameParam) != -1) {
+ if (obj.tqfind(nameParam) != -1) {
name = nameParam.cap(1);
- if (obj.find(localParam) != -1) {
+ if (obj.tqfind(localParam) != -1) {
local = localParam.cap(1);
//output += "<a href=\"" + local + "\">" + name + "</a>";
//added by lucida [email protected]
@@ -221,7 +221,7 @@ void ChmProtocol::get( const KURL& url )
KURL u = url;
u.setPath(bigpath + local);
TQString str;
- output += str.sprintf("%i\n%i\n", parents.top(), current);
+ output += str.sprintf("%i\n%i\n", tqparents.top(), current);
output += name + "\n" + u.prettyURL() + "\n";
}
m_bIndex = 1;
@@ -233,10 +233,10 @@ void ChmProtocol::get( const KURL& url )
if(htmlOutput) output += name;
}
}
- if (obj.find(mergeParam) != -1 && htmlOutput) {
+ if (obj.tqfind(mergeParam) != -1 && htmlOutput) {
TQString link = mergeParam.cap(1);
- TQString href = link.left(link.find("::"));
- TQString path = m_chmFile.left(m_chmFile.findRev("/") + 1);
+ TQString href = link.left(link.tqfind("::"));
+ TQString path = m_chmFile.left(m_chmFile.tqfindRev("/") + 1);
//output += " (<a href=\"" + path + href + "\">link</a>)";
m_bIndex = 1;
output += " (<a target=\"browse\" href=\"" + url.url() + path + href + "\">link</a>)";
@@ -301,7 +301,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
{
//kdDebug() << "ChmProtocol::checkNewFile " << fullPath << endl;
- fullPath = fullPath.replace(TQRegExp("::"), "");
+ fullPath = fullPath.tqreplace(TQRegExp("::"), "");
// Are we already looking at that file ?
if ( !m_chmFile.isEmpty() && fullPath.startsWith(m_chmFile) )
@@ -324,7 +324,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
fullPath += '/';
//kdDebug() << "the full path is " << fullPath << endl;
- while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
+ while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 )
{
TQString tryPath = fullPath.left( pos );
//kdDebug() << fullPath << " trying " << tryPath << endl;
@@ -342,7 +342,7 @@ bool ChmProtocol::checkNewFile( TQString fullPath, TQString& path )
}
else
{
- path = TQString::fromLatin1("/");
+ path = TQString::tqfromLatin1("/");
}
kdDebug() << "Found. chmFile=" << chmFile << " path=" << path << endl;
break;