From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kappfinder/common.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kappfinder/common.cpp') diff --git a/kappfinder/common.cpp b/kappfinder/common.cpp index c6cd95a65..71ae2319e 100644 --- a/kappfinder/common.cpp +++ b/kappfinder/common.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include @@ -33,11 +33,11 @@ #define DBG_CODE 1213 -void copyFile( const QString &inFileName, const QString &outFileName ) +void copyFile( const TQString &inFileName, const TQString &outFileName ) { - QFile inFile( inFileName ); + TQFile inFile( inFileName ); if ( inFile.open( IO_ReadOnly ) ) { - QFile outFile( outFileName ); + TQFile outFile( outFileName ); if ( outFile.open( IO_WriteOnly ) ) { outFile.writeBlock( inFile.readAll() ); outFile.close(); @@ -47,13 +47,13 @@ void copyFile( const QString &inFileName, const QString &outFileName ) } } -bool scanDesktopFile( QPtrList &appCache, const QString &templ, - QString destDir ) +bool scanDesktopFile( TQPtrList &appCache, const TQString &templ, + TQString destDir ) { KDesktopFile desktop( templ, true ); // find out where to put the .desktop files - QString destName; + TQString destName; if ( destDir.isNull() ) destDir = KGlobal::dirs()->saveLocation( "apps" ); else @@ -74,7 +74,7 @@ bool scanDesktopFile( QPtrList &appCache, const QString &templ, } // determine for which executable to look - QString exec = desktop.readPathEntry( "TryExec" ); + TQString exec = desktop.readPathEntry( "TryExec" ); if ( exec.isEmpty() ) exec = desktop.readPathEntry( "Exec" ); pos = exec.find( ' ' ); @@ -82,8 +82,8 @@ bool scanDesktopFile( QPtrList &appCache, const QString &templ, exec = exec.left( pos ); // try to locate the binary - QString pexec = KGlobal::dirs()->findExe( exec, - QString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" ); + TQString pexec = KGlobal::dirs()->findExe( exec, + TQString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" ); if ( pexec.isEmpty() ) { kdDebug(DBG_CODE) << "looking for " << exec.local8Bit() << "\t\tnot found" << endl; @@ -103,22 +103,22 @@ bool scanDesktopFile( QPtrList &appCache, const QString &templ, return true; } -void createDesktopFiles( QPtrList &appCache, int &added ) +void createDesktopFiles( TQPtrList &appCache, int &added ) { AppLnkCache* cache; for ( cache = appCache.first(); cache; cache = appCache.next() ) { if ( cache->item == 0 || ( cache->item && cache->item->isOn() ) ) { added++; - QString destDir = cache->destDir; - QString destName = cache->destName; - QString templ = cache->templ; + TQString destDir = cache->destDir; + TQString destName = cache->destName; + TQString templ = cache->templ; destDir += "/"; - QDir d; + TQDir d; int pos = -1; while ( ( pos = destDir.find( '/', pos + 1 ) ) >= 0 ) { - QString path = destDir.left( pos + 1 ); + TQString path = destDir.left( pos + 1 ); d = path; if ( !d.exists() ) d.mkdir( path ); @@ -130,7 +130,7 @@ void createDesktopFiles( QPtrList &appCache, int &added ) } } -void decorateDirs( QString destDir ) +void decorateDirs( TQString destDir ) { // find out where to put the .directory files if ( destDir.isNull() ) @@ -138,19 +138,19 @@ void decorateDirs( QString destDir ) else destDir += "/"; - QStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true ); + TQStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true ); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = dirs.begin(); it != dirs.end(); ++it ) { // find out the name of the file to store - QString destName = *it; + TQString destName = *it; int pos = destName.find( "kappfinder/apps/" ); if ( pos > 0 ) destName = destName.mid( pos + strlen( "kappfinder/apps/" ) ); destName = destDir + "/" + destName; - if ( !QFile::exists( destName ) ) { + if ( !TQFile::exists( destName ) ) { kdDebug(DBG_CODE) << "Copy " << *it << " to " << destName << endl; copyFile( *it, destName ); } -- cgit v1.2.3