From 6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 23:15:51 +0000 Subject: TQt4 port soundkonverter This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1239038 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/paranoia.cpp | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/paranoia.cpp') diff --git a/src/paranoia.cpp b/src/paranoia.cpp index ef1048c..a7d553e 100755 --- a/src/paranoia.cpp +++ b/src/paranoia.cpp @@ -18,16 +18,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include -#include +#include #include #include @@ -60,10 +60,10 @@ Paranoia::Paranoia() -bool Paranoia::init( QString dev ) +bool Paranoia::init( TQString dev ) { - QString s; - QFile f; + TQString s; + TQFile f; if ( p!=0 ) paranoia_free( p ); if ( d!=0 ) cdda_close( d ); @@ -95,27 +95,27 @@ bool Paranoia::init( QString dev ) bool Paranoia::findCdrom() { - QFile *f; - QString c; - QString s=""; + TQFile *f; + TQString c; + TQString s=""; int pos, i; bool stop=false; char dev[4][4]={"","","",""}; - f = new QFile( "/proc/sys/dev/cdrom/info" ); + f = new TQFile( "/proc/sys/dev/cdrom/info" ); if ( !f->open(IO_ReadOnly) ) return false; - QTextStream t( f ); + TQTextStream t( f ); while ( !t.eof() && !stop ) { s = t.readLine(); - if ( s.contains("drive name:") ) + if ( s.tqcontains("drive name:") ) stop = true; } if ( !stop ) return false; - pos = s.find(":"); + pos = s.tqfind(":"); c = s.right( s.length()-pos-1 ); sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] ); @@ -129,19 +129,19 @@ bool Paranoia::findCdrom() -bool Paranoia::procCdrom( QString name ) +bool Paranoia::procCdrom( TQString name ) { int pos; - if ( name.contains("sr") ) { - pos = name.find("r"); + if ( name.tqcontains("sr") ) { + pos = name.tqfind("r"); name = name.right( name.length()-pos-1 ); name = "/dev/scd"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) return true; } - else if ( name.contains("hd") ) { + else if ( name.tqcontains("hd") ) { name = "/dev/"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) @@ -205,9 +205,9 @@ bool Paranoia::isAudio( int t ) -QString Paranoia::trackSize( int t ) +TQString Paranoia::trackSize( int t ) { - QString s, c; + TQString s, c; long total; total = CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) ); @@ -228,7 +228,7 @@ long Paranoia::trackSectorSize( int t ) long Paranoia::trackTime( int t ) { - QString c; + TQString c; long total, time; // int m, s; -- cgit v1.2.1