summaryrefslogtreecommitdiffstats
path: root/kdoctools
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kdoctools
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
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
Diffstat (limited to 'kdoctools')
-rw-r--r--kdoctools/kio_help.cpp30
-rw-r--r--kdoctools/kio_help.h2
-rw-r--r--kdoctools/meinproc.cpp12
-rw-r--r--kdoctools/xslt.cpp12
4 files changed, 28 insertions, 28 deletions
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(
"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\"></head>\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:<br>%1" ).arg( file ) );
+ tqunicodeError( i18n( "The requested help file could not be parsed:<br>%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:<br>%1" ).arg( file ) );
+ tqunicodeError( i18n( "The requested help file could not be parsed:<br>%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( "<a name=" ), index);
+ index = mParsed.tqfind( TQRegExp( "<a name=" ), index);
if ( index == -1 ) {
kdDebug( 7119 ) << "no anchor\n";
break; // use whatever is the target, most likely index.html
@@ -283,12 +283,12 @@ void HelpProtocol::get( const KURL& url )
if ( mParsed.mid( index, 11 + anchor.length() ).lower() ==
TQString( "<a name=\"%1\">" ).arg( anchor ) )
{
- index = mParsed.findRev( "<FILENAME filename=", index ) +
+ index = mParsed.tqfindRev( "<FILENAME filename=", index ) +
strlen( "<FILENAME filename=\"" );
TQString filename=mParsed.mid( index, 2000 );
- filename = filename.left( filename.find( '\"' ) );
+ filename = filename.left( filename.tqfind( '\"' ) );
TQString path = target.path();
- path = path.left( path.findRev( '/' ) + 1) + filename;
+ path = path.left( path.tqfindRev( '/' ) + 1) + filename;
kdDebug( 7119 ) << "anchor found in " << path <<endl;
target.setPath( path );
break;
@@ -307,16 +307,16 @@ void HelpProtocol::emitFile( const KURL& url )
{
infoMessage(i18n("Looking up section"));
- TQString filename = url.path().mid(url.path().findRev('/') + 1);
+ TQString filename = url.path().mid(url.path().tqfindRev('/') + 1);
- int index = mParsed.find(TQString("<FILENAME filename=\"%1\"").arg(filename));
+ int index = mParsed.tqfind(TQString("<FILENAME filename=\"%1\"").arg(filename));
if (index == -1) {
if ( filename == "index.html" ) {
data( fromUnicode( mParsed ) );
return;
}
- unicodeError( i18n("Could not find filename %1 in %2.").arg(filename).arg( url.url() ) );
+ tqunicodeError( i18n("Could not find filename %1 in %2.").arg(filename).arg( url.url() ) );
return;
}
diff --git a/kdoctools/kio_help.h b/kdoctools/kio_help.h
index 13c198af1..c442e7c61 100644
--- a/kdoctools/kio_help.h
+++ b/kdoctools/kio_help.h
@@ -37,7 +37,7 @@ private:
TQString lookupFile(const TQString &fname, const TQString &query,
bool &redirect);
- void unicodeError( const TQString &t );
+ void tqunicodeError( const TQString &t );
TQString mParsed;
bool mGhelp;
diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp
index dd2e194e6..f3a5fc983 100644
--- a/kdoctools/meinproc.cpp
+++ b/kdoctools/meinproc.cpp
@@ -204,7 +204,7 @@ int main(int argc, char **argv) {
TQValueVector<const char *> 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( "<FILENAME " ) == -1 || args->isSet( "stdout" ) || args->isSet("output") )
+ if (output.tqfind( "<FILENAME " ) == -1 || args->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("<FILENAME ", index);
+ index = output.tqfind("<FILENAME ", index);
if (index == -1)
break;
int filename_index = index + strlen("<FILENAME filename=\"");
TQString filename = output.mid(filename_index,
- output.find("\"", filename_index) -
+ output.tqfind("\"", filename_index) -
filename_index);
TQString filedata = splitOut(output, index);
diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp
index 216773e7d..9cbf4cb4d 100644
--- a/kdoctools/xslt.cpp
+++ b/kdoctools/xslt.cpp
@@ -140,8 +140,8 @@ TQString splitOut(const TQString &parsed, int index)
TQString filedata;
while (true) {
- int endindex = parsed.find("</FILENAME>", index);
- int startindex = parsed.find("<FILENAME ", index) + 1;
+ int endindex = parsed.tqfind("</FILENAME>", index);
+ int startindex = parsed.tqfind("<FILENAME ", index) + 1;
// kdDebug() << "FILENAME " << startindex << " " << endindex << " " << inside << " " << parsed.mid(startindex + 18, 15)<< " " << parsed.length() << endl;
@@ -166,10 +166,10 @@ TQString splitOut(const TQString &parsed, int index)
}
- index = filedata.find("<FILENAME ");
+ index = filedata.tqfind("<FILENAME ");
if (index > 0) {
- int endindex = filedata.findRev("</FILENAME>");
+ int endindex = filedata.tqfindRev("</FILENAME>");
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;