diff options
Diffstat (limited to 'libkcddb/cache.cpp')
-rw-r--r-- | libkcddb/cache.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libkcddb/cache.cpp b/libkcddb/cache.cpp index 3c2d778e..01c5dec0 100644 --- a/libkcddb/cache.cpp +++ b/libkcddb/cache.cpp @@ -22,8 +22,8 @@ #include <kdebug.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include "cache.h" #include "config.h" @@ -31,9 +31,9 @@ namespace KCDDB { QString - Cache::fileName( const QString &category, const QString &discid, const QString &cacheDir ) + Cache::fileName( const TQString &category, const TQString &discid, const TQString &cacheDir ) { - QDir dir( cacheDir ); + TQDir dir( cacheDir ); if ( !dir.exists( category ) ) dir.mkdir( category ); @@ -41,34 +41,34 @@ namespace KCDDB } CDInfoList - Cache::lookup( const QString &cddbId ) + Cache::lookup( const TQString &cddbId ) { kdDebug(60010) << "Looking up " << cddbId << " in CDDB cache" << endl; CDInfoList infoList; Config c; c.readConfig(); - QStringList cddbCacheDirs = c.cacheLocations(); + TQStringList cddbCacheDirs = c.cacheLocations(); - for (QStringList::Iterator cddbCacheDir = cddbCacheDirs.begin(); + for (TQStringList::Iterator cddbCacheDir = cddbCacheDirs.begin(); cddbCacheDir != cddbCacheDirs.end(); ++cddbCacheDir) { - QDir dir( *cddbCacheDir ); - QStringList dirList = dir.entryList( QDir::Dirs ); + TQDir dir( *cddbCacheDir ); + TQStringList dirList = dir.entryList( TQDir::Dirs ); - QStringList::ConstIterator it = dirList.begin(); + TQStringList::ConstIterator it = dirList.begin(); while ( it != dirList.end() ) { - QString category( *it ); + TQString category( *it ); if ( category[ 0 ] != '.' ) { - QFile f( *cddbCacheDir + "/" + category + "/" + cddbId ); + TQFile f( *cddbCacheDir + "/" + category + "/" + cddbId ); if ( f.exists() && f.open(IO_ReadOnly) ) { - QTextStream ts(&f); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString cddbData = ts.read(); + TQTextStream ts(&f); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString cddbData = ts.read(); f.close(); CDInfo info; info.load(cddbData); @@ -102,25 +102,25 @@ namespace KCDDB Config c; c.readConfig(); - QString cacheDir = c.cacheLocations().first(); - QDir d(cacheDir); + TQString cacheDir = c.cacheLocations().first(); + TQDir d(cacheDir); if (!d.exists()) d.mkdir(cacheDir); // The same entry can contain several discids (separated by a ','), // so we save the entry to all of them - QStringList discids = QStringList::split(',', info.id); - for (QStringList::Iterator it = discids.begin(); it != discids.end(); ++it) + TQStringList discids = TQStringList::split(',', info.id); + for (TQStringList::Iterator it = discids.begin(); it != discids.end(); ++it) { - QString cacheFile = fileName(info.category, *it, cacheDir); + TQString cacheFile = fileName(info.category, *it, cacheDir); kdDebug(60010) << "Storing " << cacheFile << " in CDDB cache" << endl; - QFile f(cacheFile); + TQFile f(cacheFile); if ( f.open(IO_WriteOnly) ) { - QTextStream ts(&f); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(&f); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << info.toString(); f.close(); } |