From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdoctools/meinproc.cpp | 76 +++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'kdoctools/meinproc.cpp') diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index c48706451..dd2e194e6 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -12,30 +12,30 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include -#include +#include extern int xmlLoadExtDtdDefaultValue; class MyPair { public: - QString word; + TQString word; int base;}; -typedef QValueList PairList; +typedef TQValueList PairList; void parseEntry(PairList &list, xmlNodePtr cur, int base) { @@ -51,9 +51,9 @@ void parseEntry(PairList &list, xmlNodePtr cur, int base) while (cur != NULL) { if ( cur->type == XML_TEXT_NODE ) { - QString words = QString::fromUtf8( ( char* )cur->content ); - QStringList wlist = QStringList::split( ' ', words.simplifyWhiteSpace() ); - for ( QStringList::ConstIterator it = wlist.begin(); + TQString words = TQString::fromUtf8( ( char* )cur->content ); + TQStringList wlist = TQStringList::split( ' ', words.simplifyWhiteSpace() ); + for ( TQStringList::ConstIterator it = wlist.begin(); it != wlist.end(); ++it ) { MyPair m; @@ -110,15 +110,15 @@ int main(int argc, char **argv) { } // Need to set SRCDIR before calling fillInstance - QString srcdir; + TQString srcdir; if ( args->isSet( "srcdir" ) ) - srcdir = QDir( QFile::decodeName( args->getOption( "srcdir" ) ) ).absPath(); + srcdir = TQDir( TQFile::decodeName( args->getOption( "srcdir" ) ) ).absPath(); fillInstance(ins,srcdir); LIBXML_TEST_VERSION - QString checkFilename = QFile::decodeName(args->arg( 0 )); - QFileInfo checkFile(checkFilename); + TQString checkFilename = TQFile::decodeName(args->arg( 0 )); + TQFileInfo checkFile(checkFilename); if (!checkFile.exists()) { kdError() << "File '" << checkFilename << "' does not exist." << endl; @@ -141,7 +141,7 @@ int main(int argc, char **argv) { #else char pwd_buffer[PATH_MAX]; #endif - QFileInfo file( QFile::decodeName(args->arg( 0 )) ); + TQFileInfo file( TQFile::decodeName(args->arg( 0 )) ); #if !defined(PATH_MAX) && defined(__GLIBC__) if ( !(pwd_buffer = getcwd( NULL, 0 ) ) ) #else @@ -152,28 +152,28 @@ int main(int argc, char **argv) { return 2; } - QString catalogs; + TQString catalogs; catalogs += locate( "dtd", "customization/catalog" ); catalogs += " "; catalogs += locate( "dtd", "docbook/xml-dtd-4.1.2/docbook.cat" ); - setenv( "SGML_CATALOG_FILES", QFile::encodeName( catalogs ).data(), 1); - QString exe; + setenv( "SGML_CATALOG_FILES", TQFile::encodeName( catalogs ).data(), 1); + TQString exe; #if defined( XMLLINT ) exe = XMLLINT; #endif - if ( (::access( QFile::encodeName( exe ), X_OK )!=0) ) { + if ( (::access( TQFile::encodeName( exe ), X_OK )!=0) ) { exe = KStandardDirs::findExe( "xmllint" ); if (exe.isEmpty()) exe = locate( "exe", "xmllint" ); } - if ( ::access( QFile::encodeName( exe ), X_OK )==0 ) { - chdir( QFile::encodeName( file.dirPath( true ) ) ); - QString cmd = exe; + if ( ::access( TQFile::encodeName( exe ), X_OK )==0 ) { + chdir( TQFile::encodeName( file.dirPath( true ) ) ); + TQString cmd = exe; cmd += " --catalogs --valid --noout "; cmd += KProcess::quote(file.fileName()); cmd += " 2>&1"; - FILE *xmllint = popen( QFile::encodeName( cmd ), "r"); + FILE *xmllint = popen( TQFile::encodeName( cmd ), "r"); char buf[ 512 ]; bool noout = true; unsigned int n; @@ -201,17 +201,17 @@ int main(int argc, char **argv) { xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; - QValueVector params; + TQValueVector params; if (args->isSet( "output" ) ) { params.append( qstrdup( "outputFile" ) ); - params.append( qstrdup( QFile::decodeName( args->getOption( "output" ) ).latin1() ) ); + params.append( qstrdup( TQFile::decodeName( args->getOption( "output" ) ).latin1() ) ); } { const QCStringList paramList = args->getOptionList( "param" ); QCStringList::ConstIterator it = paramList.begin(); QCStringList::ConstIterator end = paramList.end(); for ( ; it != end; ++it ) { - const QCString tuple = *it; + const TQCString tuple = *it; const int ch = tuple.find( '=' ); if ( ch == -1 ) { kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl; @@ -224,7 +224,7 @@ int main(int argc, char **argv) { params.append( NULL ); bool index = args->isSet( "htdig" ); - QString tss = args->getOption( "stylesheet" ); + TQString tss = args->getOption( "stylesheet" ); if ( tss.isEmpty() ) tss = "customization/kde-chunk.xsl"; if ( index ) @@ -238,7 +238,7 @@ int main(int argc, char **argv) { if (style_sheet != NULL) { - xmlDocPtr doc = xmlParseFile( QFile::encodeName( args->arg( 0 ) ) ); + xmlDocPtr doc = xmlParseFile( TQFile::encodeName( args->arg( 0 ) ) ); xmlDocPtr res = xsltApplyStylesheet(style_sheet, doc, ¶ms[0]); @@ -268,13 +268,13 @@ int main(int argc, char **argv) { } } else { - QString output = transform(args->arg( 0 ) , tss, params); + TQString output = transform(args->arg( 0 ) , tss, params); if (output.isEmpty()) { fprintf(stderr, "unable to parse %s\n", args->arg( 0 )); return(1); } - QString cache = args->getOption( "cache" ); + TQString cache = args->getOption( "cache" ); if ( !cache.isEmpty() ) { if ( !saveToCache( output, cache ) ) { kdError() << i18n( "Could not write to cache file %1." ).arg( cache ) << endl; @@ -284,19 +284,19 @@ int main(int argc, char **argv) { if (output.find( "isSet( "stdout" ) || args->isSet("output") ) { - QFile file; + TQFile file; if (args->isSet( "stdout" ) ) { file.open( IO_WriteOnly, stdout ); } else { if (args->isSet( "output" ) ) - file.setName( QFile::decodeName(args->getOption( "output" ))); + file.setName( TQFile::decodeName(args->getOption( "output" ))); else file.setName( "index.html" ); file.open(IO_WriteOnly); } replaceCharsetHeader( output ); - QCString data = output.local8Bit(); + TQCString data = output.local8Bit(); file.writeBlock(data.data(), data.length()); file.close(); } else { @@ -307,15 +307,15 @@ int main(int argc, char **argv) { break; int filename_index = index + strlen("