summaryrefslogtreecommitdiffstats
path: root/parts/documentation/protocols/chm/chm.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/documentation/protocols/chm/chm.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 lucida@users.sf.net
@@ -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;