From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdoctools/kio_help.cpp | 30 +++++++++++++++--------------- kdoctools/kio_help.h | 2 +- kdoctools/meinproc.cpp | 12 ++++++------ kdoctools/xslt.cpp | 12 ++++++------ 4 files changed, 28 insertions(+), 28 deletions(-) (limited to 'kdoctools') diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp index 292c4de13..f1f1c634b 100644 --- a/kdoctools/kio_help.cpp +++ b/kdoctools/kio_help.cpp @@ -75,7 +75,7 @@ TQString HelpProtocol::langLookup(const TQString& fname) if ( ( *it ).right( 5 ) == ".html" ) { - TQString file = (*it).left((*it).findRev('/')) + "/index.docbook"; + TQString file = (*it).left((*it).tqfindRev('/')) + "/index.docbook"; kdDebug( 7119 ) << "Looking for help in: " << file << endl; info.setFile(file); if (info.exists() && info.isFile() && info.isReadable()) @@ -112,7 +112,7 @@ TQString HelpProtocol::lookupFile(const TQString &fname, } else { - unicodeError( i18n("There is no documentation available for %1." ).arg(path) ); + tqunicodeError( i18n("There is no documentation available for %1." ).arg(path) ); finished(); return TQString::null; } @@ -123,7 +123,7 @@ TQString HelpProtocol::lookupFile(const TQString &fname, } -void HelpProtocol::unicodeError( const TQString &t ) +void HelpProtocol::tqunicodeError( const TQString &t ) { data(fromUnicode( TQString( "\n" @@ -189,7 +189,7 @@ void HelpProtocol::get( const KURL& url ) return; } } else { - TQString docbook_file = file.left(file.findRev('/')) + "/index.docbook"; + TQString docbook_file = file.left(file.tqfindRev('/')) + "/index.docbook"; if (!KStandardDirs::exists(file)) { file = docbook_file; } else { @@ -215,11 +215,11 @@ void HelpProtocol::get( const KURL& url ) kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; if (mParsed.isEmpty()) { - unicodeError( i18n( "The requested help file could not be parsed:
%1" ).arg( file ) ); + tqunicodeError( i18n( "The requested help file could not be parsed:
%1" ).arg( file ) ); } else { - int pos1 = mParsed.find( "charset=" ); + int pos1 = mParsed.tqfind( "charset=" ); if ( pos1 > 0 ) { - int pos2 = mParsed.find( '"', pos1 ); + int pos2 = mParsed.tqfind( '"', pos1 ); if ( pos2 > 0 ) { mParsed.replace( pos1, pos2 - pos1, "charset=UTF-8" ); } @@ -248,7 +248,7 @@ void HelpProtocol::get( const KURL& url ) kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; if (mParsed.isEmpty()) { - unicodeError( i18n( "The requested help file could not be parsed:
%1" ).arg( file ) ); + tqunicodeError( i18n( "The requested help file could not be parsed:
%1" ).arg( file ) ); } else { TQString query = url.query(), anchor; @@ -274,7 +274,7 @@ void HelpProtocol::get( const KURL& url ) { int index = 0; while ( true ) { - index = mParsed.find( TQRegExp( "" ).arg( anchor ) ) { - index = mParsed.findRev( " params; if (args->isSet( "output" ) ) { params.append( qstrdup( "outputFile" ) ); - params.append( qstrdup( TQFile::decodeName( args->getOption( "output" ) ).latin1() ) ); + params.append( qstrdup( TQString(TQFile::decodeName( args->getOption( "output" ) )).latin1() ) ); } { const QCStringList paramList = args->getOptionList( "param" ); @@ -212,7 +212,7 @@ int main(int argc, char **argv) { QCStringList::ConstIterator end = paramList.end(); for ( ; it != end; ++it ) { const TQCString tuple = *it; - const int ch = tuple.find( '=' ); + const int ch = tuple.tqfind( '=' ); if ( ch == -1 ) { kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl; return( 2 ); @@ -277,12 +277,12 @@ int main(int argc, char **argv) { TQString cache = args->getOption( "cache" ); if ( !cache.isEmpty() ) { if ( !saveToCache( output, cache ) ) { - kdError() << i18n( "Could not write to cache file %1." ).arg( cache ) << endl; + kdError() << TQString(i18n( "Could not write to cache file %1." ).arg( cache )) << endl; } goto end; } - if (output.find( "isSet( "stdout" ) || args->isSet("output") ) + if (output.tqfind( "isSet( "stdout" ) || args->isSet("output") ) { TQFile file; if (args->isSet( "stdout" ) ) { @@ -302,13 +302,13 @@ int main(int argc, char **argv) { } else { int index = 0; while (true) { - index = output.find("", index); - int startindex = parsed.find("", index); + int startindex = parsed.tqfind(" 0) { - int endindex = filedata.findRev(""); + int endindex = filedata.tqfindRev(""); while (filedata.at(endindex) != '>') endindex++; endindex++; filedata = filedata.left(index) + filedata.mid(endindex); @@ -205,7 +205,7 @@ static TQIODevice *getBZip2device(const TQString &fileName ) if ( base ) { - base->setDevice(f, true); + base->setDevice(TQT_TQIODEVICE(f), true); return new KFilterDev(base, true); } return 0; @@ -336,7 +336,7 @@ TQCString fromUnicode( const TQString &data ) buffer_len += test.length(); } else { TQString res; - res.sprintf( "&#%d;", part.at( i ).unicode() ); + res.sprintf( "&#%d;", TQChar(part.at( i )).tqunicode() ); test = locale->fromUnicode( res ); if (buffer_len + test.length() + 1 > sizeof(buffer)) break; -- cgit v1.2.3