summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/mp3/k3bmaddecoder.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 /plugins/decoder/mp3/k3bmaddecoder.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 'plugins/decoder/mp3/k3bmaddecoder.cpp')
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/plugins/decoder/mp3/k3bmaddecoder.cpp b/plugins/decoder/mp3/k3bmaddecoder.cpp
index e3aef56..6f606c8 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.cpp
+++ b/plugins/decoder/mp3/k3bmaddecoder.cpp
@@ -35,9 +35,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqvaluevector.h>
#include <stdlib.h>
#include <cmath>
@@ -70,7 +70,7 @@ public:
K3bMad* handle;
- QValueVector<unsigned long long> seekPositions;
+ TQValueVector<unsigned long long> seekPositions;
bool bOutputFinished;
@@ -86,8 +86,8 @@ public:
-K3bMadDecoder::K3bMadDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bMadDecoder::K3bMadDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = new MadDecoderPrivate();
d->handle = new K3bMad();
@@ -102,10 +102,10 @@ K3bMadDecoder::~K3bMadDecoder()
}
-QString K3bMadDecoder::metaInfo( MetaDataField f )
+TQString K3bMadDecoder::metaInfo( MetaDataField f )
{
#ifdef HAVE_TAGLIB
- TagLib::MPEG::File file( QFile::encodeName( filename() ).data() );
+ TagLib::MPEG::File file( TQFile::encodeName( filename() ).data() );
if ( file.tag() ) {
switch( f ) {
@@ -116,11 +116,11 @@ QString K3bMadDecoder::metaInfo( MetaDataField f )
case META_COMMENT:
return TStringToQString( file.tag()->comment() );
default:
- return QString::null;
+ return TQString();
}
}
else {
- return QString::null;
+ return TQString();
}
#else
@@ -370,7 +370,7 @@ bool K3bMadDecoder::seekInternal( const K3b::Msf& pos )
}
-QString K3bMadDecoder::fileType() const
+TQString K3bMadDecoder::fileType() const
{
switch( d->firstHeader.layer ) {
case MAD_LAYER_I:
@@ -384,9 +384,9 @@ QString K3bMadDecoder::fileType() const
}
}
-QStringList K3bMadDecoder::supportedTechnicalInfos() const
+TQStringList K3bMadDecoder::supportedTechnicalInfos() const
{
- return QStringList::split( ";",
+ return TQStringList::split( ";",
i18n("Channels") + ";" +
i18n("Sampling Rate") + ";" +
i18n("Bitrate") + ";" +
@@ -398,7 +398,7 @@ QStringList K3bMadDecoder::supportedTechnicalInfos() const
}
-QString K3bMadDecoder::technicalInfo( const QString& name ) const
+TQString K3bMadDecoder::technicalInfo( const TQString& name ) const
{
if( name == i18n("Channels") ) {
switch( d->firstHeader.mode ) {
@@ -415,12 +415,12 @@ QString K3bMadDecoder::technicalInfo( const QString& name ) const
}
}
else if( name == i18n("Sampling Rate") )
- return i18n("%1 Hz").arg(d->firstHeader.samplerate);
+ return i18n("%1 Hz").tqarg(d->firstHeader.samplerate);
else if( name == i18n("Bitrate") ) {
if( d->vbr )
return i18n("VBR");
else
- return i18n("%1 bps").arg(d->firstHeader.bitrate);
+ return i18n("%1 bps").tqarg(d->firstHeader.bitrate);
}
else if( name == i18n("Layer") ){
switch( d->firstHeader.layer ) {
@@ -453,12 +453,12 @@ QString K3bMadDecoder::technicalInfo( const QString& name ) const
else if( name == i18n("CRC") )
return ( d->firstHeader.flags & MAD_FLAG_PROTECTION ? i18n("Yes") : i18n("No") );
else
- return QString::null;
+ return TQString();
}
-K3bMadDecoderFactory::K3bMadDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bMadDecoderFactory::K3bMadDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -468,10 +468,10 @@ K3bMadDecoderFactory::~K3bMadDecoderFactory()
}
-K3bAudioDecoder* K3bMadDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bMadDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bMadDecoder( parent, name );
+ return new K3bMadDecoder( tqparent, name );
}
@@ -484,14 +484,14 @@ bool K3bMadDecoderFactory::canDecode( const KURL& url )
// It always takes waves for mp3 files so we introduce this hack to
// filter out wave files. :(
//
- QFile f( url.path() );
+ TQFile f( url.path() );
if( !f.open( IO_ReadOnly ) )
return false;
char buffer[12];
if( f.readBlock( buffer, 12 ) != 12 )
return false;
- if( !qstrncmp( buffer, "RIFF", 4 ) &&
- !qstrncmp( buffer + 8, "WAVE", 4 ) )
+ if( !tqstrncmp( buffer, "RIFF", 4 ) &&
+ !tqstrncmp( buffer + 8, "WAVE", 4 ) )
return false;
f.close();
@@ -510,7 +510,7 @@ bool K3bMadDecoderFactory::canDecode( const KURL& url )
unsigned int s = handle.madFrame->header.samplerate;
//
- // find 4 more mp3 headers (random value since 2 was not enough)
+ // tqfind 4 more mp3 headers (random value since 2 was not enough)
// This way we get most of the mp3 files while sorting out
// for example wave files.
//