summaryrefslogtreecommitdiffstats
path: root/libk3b/cddb/k3bcddblocalquery.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
commitd8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch)
treef295f1c545b319963d5357af79fe08991d8141d9 /libk3b/cddb/k3bcddblocalquery.cpp
parent2a39a080579fb52a2599c02b2939795385b89093 (diff)
downloadk3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz
k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip
TQt4 port k3b
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk3b/cddb/k3bcddblocalquery.cpp')
-rw-r--r--libk3b/cddb/k3bcddblocalquery.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/libk3b/cddb/k3bcddblocalquery.cpp b/libk3b/cddb/k3bcddblocalquery.cpp
index b3a1264..f70b6d8 100644
--- a/libk3b/cddb/k3bcddblocalquery.cpp
+++ b/libk3b/cddb/k3bcddblocalquery.cpp
@@ -16,17 +16,17 @@
#include "k3bcddblocalquery.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <klocale.h>
#include <kdebug.h>
-K3bCddbLocalQuery::K3bCddbLocalQuery( QObject* parent , const char* name )
- : K3bCddbQuery( parent, name )
+K3bCddbLocalQuery::K3bCddbLocalQuery( TQObject* tqparent , const char* name )
+ : K3bCddbQuery( tqparent, name )
{
}
@@ -38,33 +38,33 @@ K3bCddbLocalQuery::~K3bCddbLocalQuery()
void K3bCddbLocalQuery::doQuery()
{
- emit infoMessage( i18n("Searching entry in %1").arg( m_cddbDir ) );
+ emit infoMessage( i18n("Searching entry in %1").tqarg( m_cddbDir ) );
kapp->processEvents(); //BAD!
- QString path = preparePath( m_cddbDir );
+ TQString path = preparePath( m_cddbDir );
kdDebug() << "(K3bCddbLocalQuery) searching in dir " << path << " for "
- << QString::number( toc().discId(), 16 ).rightJustify( 8, '0' ) << endl;
+ << TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' ) << endl;
- for( QStringList::const_iterator it = categories().begin();
+ for( TQStringList::const_iterator it = categories().begin();
it != categories().end(); ++it ) {
- QString file = path + *it + "/" + QString::number( toc().discId(), 16 ).rightJustify( 8, '0' );
+ TQString file = path + *it + "/" + TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' );
- if( QFile::exists( file ) ) {
+ if( TQFile::exists( file ) ) {
// found file
- QFile f( file );
+ TQFile f( file );
if( !f.open( IO_ReadOnly ) ) {
kdDebug() << "(K3bCddbLocalQuery) Could not open file" << endl;
}
else {
- QTextStream t( &f );
+ TQTextStream t( &f );
K3bCddbResultEntry entry;
parseEntry( t, entry );
K3bCddbResultHeader header;
- header.discid = QString::number( toc().discId(), 16 ).rightJustify( 8, '0' );
+ header.discid = TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' );
header.category = *it;
header.title = entry.cdTitle;
header.artist = entry.cdArtist;
@@ -94,15 +94,15 @@ void K3bCddbLocalQuery::doQuery()
void K3bCddbLocalQuery::doMatchQuery()
{
- QString path = preparePath( m_cddbDir ) + header().category + "/" + header().discid;
+ TQString path = preparePath( m_cddbDir ) + header().category + "/" + header().discid;
- QFile f( path );
+ TQFile f( path );
if( !f.open( IO_ReadOnly ) ) {
kdDebug() << "(K3bCddbLocalQuery) Could not open file" << endl;
setError( READ_ERROR );
}
else {
- QTextStream t( &f );
+ TQTextStream t( &f );
parseEntry( t, result() );
result().discid = header().discid;
@@ -113,13 +113,13 @@ void K3bCddbLocalQuery::doMatchQuery()
}
-QString K3bCddbLocalQuery::preparePath( const QString& p )
+TQString K3bCddbLocalQuery::preparePath( const TQString& p )
{
- QString path = p;
+ TQString path = p;
if( path.startsWith( "~" ) )
- path.replace( 0, 1, QDir::homeDirPath() );
+ path.tqreplace( 0, 1, TQDir::homeDirPath() );
else if( !path.startsWith( "/" ) )
- path.prepend( QDir::homeDirPath() );
+ path.prepend( TQDir::homeDirPath() );
if( path[path.length()-1] != '/' )
path.append( "/" );