summaryrefslogtreecommitdiffstats
path: root/libkcddb/cache.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /libkcddb/cache.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcddb/cache.cpp')
-rw-r--r--libkcddb/cache.cpp46
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();
}