From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: 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 --- parts/documentation/protocols/chm/chm.cpp | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'parts/documentation/protocols/chm/chm.cpp') 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("", false); mergeParam.setMinimal(true); - std::stack parents; + std::stack 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("
    |
", 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) == "
    ") { - 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 += "" + name + ""; //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 += " (link)"; m_bIndex = 1; output += " (link)"; @@ -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; -- cgit v1.2.1