rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 6d99e1e138
commit 33881ea444

@ -234,7 +234,7 @@ void K3bSetup2::updatePrograms()
d->binListMap.insert( b, bi ); d->binListMap.insert( b, bi );
// check the item on first insertion or if it was checked before // check the item on first insertion or if it was checked before
bi->setOn( checkMap.tqcontains(b) ? checkMap[b] : true ); bi->setOn( checkMap.contains(b) ? checkMap[b] : true );
int perm = s.st_mode & 0007777; int perm = s.st_mode & 0007777;
@ -289,12 +289,12 @@ void K3bSetup2::updateDevices()
K3bDevice::Device* device = *it; K3bDevice::Device* device = *it;
// check the item on first insertion or if it was checked before // check the item on first insertion or if it was checked before
TQCheckListItem* item = createDeviceItem( device->blockDeviceName() ); TQCheckListItem* item = createDeviceItem( device->blockDeviceName() );
item->setOn( checkMap.tqcontains(device->blockDeviceName()) ? checkMap[device->blockDeviceName()] : true ); item->setOn( checkMap.contains(device->blockDeviceName()) ? checkMap[device->blockDeviceName()] : true );
item->setText( 0, device->vendor() + " " + device->description() ); item->setText( 0, device->vendor() + " " + device->description() );
if( !device->genericDevice().isEmpty() ) { if( !device->genericDevice().isEmpty() ) {
TQCheckListItem* item = createDeviceItem( device->genericDevice() ); TQCheckListItem* item = createDeviceItem( device->genericDevice() );
item->setOn( checkMap.tqcontains(device->genericDevice()) ? checkMap[device->genericDevice()] : true ); item->setOn( checkMap.contains(device->genericDevice()) ? checkMap[device->genericDevice()] : true );
item->setText( 0, device->vendor() + " " + device->description() + " (" + i18n("Generic SCSI Device") + ")" ); item->setText( 0, device->vendor() + " " + device->description() + " (" + i18n("Generic SCSI Device") + ")" );
} }
} }

@ -171,7 +171,7 @@ void K3bCddb::slotQueryFinished( K3bCddbQuery* query )
K3bCddbQuery* K3bCddb::getQuery( const TQString& s ) K3bCddbQuery* K3bCddb::getQuery( const TQString& s )
{ {
TQStringList buf = TQStringList::split( ":", s.mid( s.tqfind(" ")+1 ) ); TQStringList buf = TQStringList::split( ":", s.mid( s.find(" ")+1 ) );
TQString server = buf[0]; TQString server = buf[0];
int port = buf[1].toInt(); int port = buf[1].toInt();

@ -117,7 +117,7 @@ TQString K3bCddbLocalQuery::preparePath( const TQString& p )
{ {
TQString path = p; TQString path = p;
if( path.startsWith( "~" ) ) if( path.startsWith( "~" ) )
path.tqreplace( 0, 1, TQDir::homeDirPath() ); path.replace( 0, 1, TQDir::homeDirPath() );
else if( !path.startsWith( "/" ) ) else if( !path.startsWith( "/" ) )
path.prepend( TQDir::homeDirPath() ); path.prepend( TQDir::homeDirPath() );
if( path[path.length()-1] != '/' ) if( path[path.length()-1] != '/' )

@ -40,7 +40,7 @@ void K3bCddbLocalSubmit::doSubmit()
{ {
TQString path = m_cddbDir; TQString path = m_cddbDir;
if( path.startsWith( "~" ) ) if( path.startsWith( "~" ) )
path.tqreplace( 0, 1, TQDir::homeDirPath() + "/" ); path.replace( 0, 1, TQDir::homeDirPath() + "/" );
else if( !path.startsWith( "/" ) ) else if( !path.startsWith( "/" ) )
path.prepend( TQDir::homeDirPath() + "/" ); path.prepend( TQDir::homeDirPath() + "/" );
if( path[path.length()-1] != '/' ) if( path[path.length()-1] != '/' )

@ -108,7 +108,7 @@ bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry )
} }
else if( line.startsWith( "TTITLE" ) ) { else if( line.startsWith( "TTITLE" ) ) {
int eqSgnPos = line.tqfind( "=" ); int eqSgnPos = line.find( "=" );
bool ok; bool ok;
uint trackNum = (uint)line.mid( 6, eqSgnPos - 6 ).toInt( &ok ); uint trackNum = (uint)line.mid( 6, eqSgnPos - 6 ).toInt( &ok );
if( !ok ) if( !ok )
@ -129,7 +129,7 @@ bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry )
} }
else if( line.startsWith( "EXTT" ) ) { else if( line.startsWith( "EXTT" ) ) {
int eqSgnPos = line.tqfind( "=" ); int eqSgnPos = line.find( "=" );
bool ok; bool ok;
uint trackNum = (uint)line.mid( 4, eqSgnPos - 4 ).toInt( &ok ); uint trackNum = (uint)line.mid( 4, eqSgnPos - 4 ).toInt( &ok );
if( !ok ) if( !ok )
@ -158,7 +158,7 @@ bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry )
// if no " / " delimiter is present title and artist are the same // if no " / " delimiter is present title and artist are the same
// ------------------------------------------------------------------- // -------------------------------------------------------------------
TQString fullTitle = entry.cdTitle; TQString fullTitle = entry.cdTitle;
int splitPos = fullTitle.tqfind( " / " ); int splitPos = fullTitle.find( " / " );
if( splitPos < 0 ) if( splitPos < 0 )
entry.cdArtist = fullTitle; entry.cdArtist = fullTitle;
else { else {
@ -171,7 +171,7 @@ bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry )
for( TQStringList::iterator it = entry.titles.begin(); for( TQStringList::iterator it = entry.titles.begin();
it != entry.titles.end(); ++it ) { it != entry.titles.end(); ++it ) {
TQString fullTitle = *it; TQString fullTitle = *it;
int splitPos = fullTitle.tqfind( " / " ); int splitPos = fullTitle.find( " / " );
if( splitPos < 0 ) if( splitPos < 0 )
entry.artists.append( entry.cdArtist ); entry.artists.append( entry.cdArtist );
else { else {
@ -185,23 +185,23 @@ bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry )
// replace all "\\n" with "\n" // replace all "\\n" with "\n"
for( TQStringList::iterator it = entry.titles.begin(); for( TQStringList::iterator it = entry.titles.begin();
it != entry.titles.end(); ++it ) { it != entry.titles.end(); ++it ) {
(*it).tqreplace( "\\\\\\\\n", "\\n" ); (*it).replace( "\\\\\\\\n", "\\n" );
} }
for( TQStringList::iterator it = entry.artists.begin(); for( TQStringList::iterator it = entry.artists.begin();
it != entry.artists.end(); ++it ) { it != entry.artists.end(); ++it ) {
(*it).tqreplace( "\\\\\\\\n", "\\n" ); (*it).replace( "\\\\\\\\n", "\\n" );
} }
for( TQStringList::iterator it = entry.extInfos.begin(); for( TQStringList::iterator it = entry.extInfos.begin();
it != entry.extInfos.end(); ++it ) { it != entry.extInfos.end(); ++it ) {
(*it).tqreplace( "\\\\\\\\n", "\\n" ); (*it).replace( "\\\\\\\\n", "\\n" );
} }
entry.cdTitle.tqreplace( "\\\\\\\\n", "\\n" ); entry.cdTitle.replace( "\\\\\\\\n", "\\n" );
entry.cdArtist.tqreplace( "\\\\\\\\n", "\\n" ); entry.cdArtist.replace( "\\\\\\\\n", "\\n" );
entry.cdExtInfo.tqreplace( "\\\\\\\\n", "\\n" ); entry.cdExtInfo.replace( "\\\\\\\\n", "\\n" );
entry.genre.tqreplace( "\\\\\\\\n", "\\n" ); entry.genre.replace( "\\\\\\\\n", "\\n" );
return true; return true;
} }
@ -254,7 +254,7 @@ bool K3bCddbQuery::parseMatchHeader( const TQString& line, K3bCddbResultHeader&
header.category = line.section( ' ', 0, 0 ); header.category = line.section( ' ', 0, 0 );
header.discid = line.section( ' ', 1, 1 ); header.discid = line.section( ' ', 1, 1 );
header.title = line.mid( header.category.length() + header.discid.length() + 2 ); header.title = line.mid( header.category.length() + header.discid.length() + 2 );
int slashPos = header.title.tqfind( "/" ); int slashPos = header.title.find( "/" );
if( slashPos > 0 ) { if( slashPos > 0 ) {
header.artist = header.title.left(slashPos).stripWhiteSpace(); header.artist = header.title.left(slashPos).stripWhiteSpace();
header.title = header.title.mid( slashPos+1 ).stripWhiteSpace(); header.title = header.title.mid( slashPos+1 ).stripWhiteSpace();

@ -346,7 +346,7 @@ void K3bCore::unblockDevice( K3bDevice::Device* dev )
bool K3bCore::internalBlockDevice( K3bDevice::Device* dev ) bool K3bCore::internalBlockDevice( K3bDevice::Device* dev )
{ {
if( !d->blockedDevices.tqcontains( dev ) ) { if( !d->blockedDevices.contains( dev ) ) {
d->blockedDevices.append( dev ); d->blockedDevices.append( dev );
return true; return true;
} }

@ -101,7 +101,7 @@ static TQString& debianWeirdnessHack( TQString& path )
TQFile f( path ); TQFile f( path );
f.open( IO_ReadOnly ); f.open( IO_ReadOnly );
TQString s = TQTextStream( &f ).read(); TQString s = TQTextStream( &f ).read();
if( s.tqcontains( "cdrecord.mmap" ) && s.tqcontains( "cdrecord.shm" ) ) { if( s.contains( "cdrecord.mmap" ) && s.contains( "cdrecord.shm" ) ) {
kdDebug() << "(K3bCdrecordProgram) Found Debian Wrapper script." << endl; kdDebug() << "(K3bCdrecordProgram) Found Debian Wrapper script." << endl;
TQString ext; TQString ext;
if( K3b::kernelVersion().versionString().left(3) > "2.2" ) if( K3b::kernelVersion().versionString().left(3) > "2.2" )
@ -155,23 +155,23 @@ bool K3bCdrecordProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = -1; int pos = -1;
if( wodim ) { if( wodim ) {
pos = out.output().tqfind( "Wodim" ); pos = out.output().find( "Wodim" );
} }
else if( m_dvdPro ) { else if( m_dvdPro ) {
pos = out.output().tqfind( "Cdrecord-ProDVD" ); pos = out.output().find( "Cdrecord-ProDVD" );
} }
else { else {
pos = out.output().tqfind( "Cdrecord" ); pos = out.output().find( "Cdrecord" );
} }
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 ); int endPos = out.output().find( TQRegExp("\\s"), pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -182,8 +182,8 @@ bool K3bCdrecordProgram::scan( const TQString& p )
if( wodim ) if( wodim )
bin->addFeature( "wodim" ); bin->addFeature( "wodim" );
pos = out.output().tqfind( "Copyright") + 14; pos = out.output().find( "Copyright") + 14;
endPos = out.output().tqfind( "\n", pos ); endPos = out.output().find( "\n", pos );
// cdrecord does not use local encoding for the copyright statement but plain latin1 // cdrecord does not use local encoding for the copyright statement but plain latin1
bin->copyright = TQString::tqfromLatin1( out.output().mid( pos, endPos-pos ).local8Bit() ).stripWhiteSpace(); bin->copyright = TQString::tqfromLatin1( out.output().mid( pos, endPos-pos ).local8Bit() ).stripWhiteSpace();
@ -203,17 +203,17 @@ bool K3bCdrecordProgram::scan( const TQString& p )
out.setProcess( &fp ); out.setProcess( &fp );
fp << path << "-help"; fp << path << "-help";
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "gracetime" ) ) if( out.output().contains( "gracetime" ) )
bin->addFeature( "gracetime" ); bin->addFeature( "gracetime" );
if( out.output().tqcontains( "-overburn" ) ) if( out.output().contains( "-overburn" ) )
bin->addFeature( "overburn" ); bin->addFeature( "overburn" );
if( out.output().tqcontains( "-text" ) ) if( out.output().contains( "-text" ) )
bin->addFeature( "cdtext" ); bin->addFeature( "cdtext" );
if( out.output().tqcontains( "-clone" ) ) if( out.output().contains( "-clone" ) )
bin->addFeature( "clone" ); bin->addFeature( "clone" );
if( out.output().tqcontains( "-tao" ) ) if( out.output().contains( "-tao" ) )
bin->addFeature( "tao" ); bin->addFeature( "tao" );
if( out.output().tqcontains( "cuefile=" ) && if( out.output().contains( "cuefile=" ) &&
( wodim || bin->version > K3bVersion( 2, 1, -1, "a14") ) ) // cuefile handling was still buggy in a14 ( wodim || bin->version > K3bVersion( 2, 1, -1, "a14") ) ) // cuefile handling was still buggy in a14
bin->addFeature( "cuefile" ); bin->addFeature( "cuefile" );
@ -222,7 +222,7 @@ bool K3bCdrecordProgram::scan( const TQString& p )
// just double-checked and the help page is proper but there is no harm in having // just double-checked and the help page is proper but there is no harm in having
// two checks) // two checks)
// and the version check does not handle versions like 2.01-dvd properly // and the version check does not handle versions like 2.01-dvd properly
if( out.output().tqcontains( "-xamix" ) || if( out.output().contains( "-xamix" ) ||
bin->version >= K3bVersion( 2, 1, -1, "a12" ) || bin->version >= K3bVersion( 2, 1, -1, "a12" ) ||
wodim ) wodim )
bin->addFeature( "xamix" ); bin->addFeature( "xamix" );
@ -303,18 +303,18 @@ bool K3bMkisofsProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = -1; int pos = -1;
if( genisoimage ) if( genisoimage )
pos = out.output().tqfind( "genisoimage" ); pos = out.output().find( "genisoimage" );
else else
pos = out.output().tqfind( "mkisofs" ); pos = out.output().find( "mkisofs" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( ' ', pos+1 ); int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -337,15 +337,15 @@ bool K3bMkisofsProgram::scan( const TQString& p )
fp << path << "-help"; fp << path << "-help";
out.setProcess( &fp ); out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "-udf" ) ) if( out.output().contains( "-udf" ) )
bin->addFeature( "udf" ); bin->addFeature( "udf" );
if( out.output().tqcontains( "-dvd-video" ) ) if( out.output().contains( "-dvd-video" ) )
bin->addFeature( "dvd-video" ); bin->addFeature( "dvd-video" );
if( out.output().tqcontains( "-joliet-long" ) ) if( out.output().contains( "-joliet-long" ) )
bin->addFeature( "joliet-long" ); bin->addFeature( "joliet-long" );
if( out.output().tqcontains( "-xa" ) ) if( out.output().contains( "-xa" ) )
bin->addFeature( "xa" ); bin->addFeature( "xa" );
if( out.output().tqcontains( "-sectype" ) ) if( out.output().contains( "-sectype" ) )
bin->addFeature( "sectype" ); bin->addFeature( "sectype" );
// check if we run mkisofs as root // check if we run mkisofs as root
@ -418,17 +418,17 @@ bool K3bReadcdProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = -1; int pos = -1;
if( readom ) if( readom )
pos = out.output().tqfind( "readom" ); pos = out.output().find( "readom" );
else else
pos = out.output().tqfind( "readcd" ); pos = out.output().find( "readcd" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( ' ', pos+1 ); int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -451,7 +451,7 @@ bool K3bReadcdProgram::scan( const TQString& p )
fp << path << "-help"; fp << path << "-help";
out.setProcess( &fp ); out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "-clone" ) ) if( out.output().contains( "-clone" ) )
bin->addFeature( "clone" ); bin->addFeature( "clone" );
// check if we run mkisofs as root // check if we run mkisofs as root
@ -507,15 +507,15 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
vp << path ; vp << path ;
K3bProcessOutputCollector out( &vp ); K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "Cdrdao version" ); int pos = out.output().find( "Cdrdao version" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( ' ', pos+1 ); int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -523,8 +523,8 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
bin->path = path; bin->path = path;
bin->version = out.output().mid( pos, endPos-pos ); bin->version = out.output().mid( pos, endPos-pos );
pos = out.output().tqfind( "(C)", endPos+1 ) + 4; pos = out.output().find( "(C)", endPos+1 ) + 4;
endPos = out.output().tqfind( '\n', pos ); endPos = out.output().find( '\n', pos );
bin->copyright = out.output().mid( pos, endPos-pos ); bin->copyright = out.output().mid( pos, endPos-pos );
} }
else { else {
@ -539,12 +539,12 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
fp << path << "write" << "-h"; fp << path << "write" << "-h";
out.setProcess( &fp ); out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "--overburn" ) ) if( out.output().contains( "--overburn" ) )
bin->addFeature( "overburn" ); bin->addFeature( "overburn" );
if( out.output().tqcontains( "--multi" ) ) if( out.output().contains( "--multi" ) )
bin->addFeature( "multisession" ); bin->addFeature( "multisession" );
if( out.output().tqcontains( "--buffer-under-run-protection" ) ) if( out.output().contains( "--buffer-under-run-protection" ) )
bin->addFeature( "disable-burnproof" ); bin->addFeature( "disable-burnproof" );
// check if we run cdrdao as root // check if we run cdrdao as root
@ -605,13 +605,13 @@ bool K3bTranscodeProgram::scan( const TQString& p )
vp << appPath << "-v"; vp << appPath << "-v";
K3bProcessOutputCollector out( &vp ); K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "transcode v" ); int pos = out.output().find( "transcode v" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos += 11; pos += 11;
int endPos = out.output().tqfind( TQRegExp("[\\s\\)]"), pos+1 ); int endPos = out.output().find( TQRegExp("[\\s\\)]"), pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -679,13 +679,13 @@ bool K3bVcdbuilderProgram::scan( const TQString& p )
vp << path << "-V"; vp << path << "-V";
K3bProcessOutputCollector out( &vp ); K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "GNU VCDImager" ); int pos = out.output().find( "GNU VCDImager" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos += 14; pos += 14;
int endPos = out.output().tqfind( TQRegExp("[\\n\\)]"), pos+1 ); int endPos = out.output().find( TQRegExp("[\\n\\)]"), pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -693,8 +693,8 @@ bool K3bVcdbuilderProgram::scan( const TQString& p )
bin->path = path; bin->path = path;
bin->version = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); bin->version = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
pos = out.output().tqfind( "Copyright" ) + 14; pos = out.output().find( "Copyright" ) + 14;
endPos = out.output().tqfind( "\n", pos ); endPos = out.output().find( "\n", pos );
bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
} }
else { else {
@ -737,15 +737,15 @@ bool K3bNormalizeProgram::scan( const TQString& p )
vp << path << "--version"; vp << path << "--version";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "normalize" ); int pos = out.output().find( "normalize" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("\\d"), pos ); pos = out.output().find( TQRegExp("\\d"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 ); int endPos = out.output().find( TQRegExp("\\s"), pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -753,8 +753,8 @@ bool K3bNormalizeProgram::scan( const TQString& p )
bin->path = path; bin->path = path;
bin->version = out.output().mid( pos, endPos-pos ); bin->version = out.output().mid( pos, endPos-pos );
pos = out.output().tqfind( "Copyright" )+14; pos = out.output().find( "Copyright" )+14;
endPos = out.output().tqfind( "\n", pos ); endPos = out.output().find( "\n", pos );
bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
} }
else { else {
@ -796,15 +796,15 @@ bool K3bGrowisofsProgram::scan( const TQString& p )
vp << path << "-version"; vp << path << "-version";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "growisofs" ); int pos = out.output().find( "growisofs" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( TQRegExp("\\d"), pos ); pos = out.output().find( TQRegExp("\\d"), pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
int endPos = out.output().tqfind( ",", pos+1 ); int endPos = out.output().find( ",", pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -863,18 +863,18 @@ bool K3bDvdformatProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
// different locales make searching for the +- char difficult // different locales make searching for the +- char difficult
// so we simply ignore it. // so we simply ignore it.
int pos = out.output().tqfind( TQRegExp("DVD.*RAM format utility") ); int pos = out.output().find( TQRegExp("DVD.*RAM format utility") );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( "version", pos ); pos = out.output().find( "version", pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos += 8; pos += 8;
// the version ends in a dot. // the version ends in a dot.
int endPos = out.output().tqfind( TQRegExp("\\.\\D"), pos ); int endPos = out.output().find( TQRegExp("\\.\\D"), pos );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -931,7 +931,7 @@ bool K3bDvdBooktypeProgram::scan( const TQString& p )
vp << path; vp << path;
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "dvd+rw-booktype" ); int pos = out.output().find( "dvd+rw-booktype" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
@ -980,18 +980,18 @@ bool K3bCdda2wavProgram::scan( const TQString& p )
vp << path << "-h"; vp << path << "-h";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "cdda2wav" ); int pos = out.output().find( "cdda2wav" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos = out.output().tqfind( "Version", pos ); pos = out.output().find( "Version", pos );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos += 8; pos += 8;
// the version does not end in a space but the kernel info // the version does not end in a space but the kernel info
int endPos = out.output().tqfind( TQRegExp("[^\\d\\.]"), pos ); int endPos = out.output().find( TQRegExp("[^\\d\\.]"), pos );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -1001,15 +1001,15 @@ bool K3bCdda2wavProgram::scan( const TQString& p )
// features (we do this since the cdda2wav help says that the short // features (we do this since the cdda2wav help says that the short
// options will disappear soon) // options will disappear soon)
if( out.output().tqfind( "-info-only" ) ) if( out.output().find( "-info-only" ) )
bin->addFeature( "info-only" ); // otherwise use the -J option bin->addFeature( "info-only" ); // otherwise use the -J option
if( out.output().tqfind( "-no-infofile" ) ) if( out.output().find( "-no-infofile" ) )
bin->addFeature( "no-infofile" ); // otherwise use the -H option bin->addFeature( "no-infofile" ); // otherwise use the -H option
if( out.output().tqfind( "-gui" ) ) if( out.output().find( "-gui" ) )
bin->addFeature( "gui" ); // otherwise use the -g option bin->addFeature( "gui" ); // otherwise use the -g option
if( out.output().tqfind( "-bulk" ) ) if( out.output().find( "-bulk" ) )
bin->addFeature( "bulk" ); // otherwise use the -B option bin->addFeature( "bulk" ); // otherwise use the -B option
if( out.output().tqfind( "dev=" ) ) if( out.output().find( "dev=" ) )
bin->addFeature( "dev" ); // otherwise use the -B option bin->addFeature( "dev" ); // otherwise use the -B option
} }
else { else {

@ -61,7 +61,7 @@ const TQString& K3bExternalBin::name() const
bool K3bExternalBin::hasFeature( const TQString& f ) const bool K3bExternalBin::hasFeature( const TQString& f ) const
{ {
return m_features.tqcontains( f ); return m_features.contains( f );
} }
@ -113,7 +113,7 @@ const K3bExternalBin* K3bExternalProgram::mostRecentBin() const
void K3bExternalProgram::addBin( K3bExternalBin* bin ) void K3bExternalProgram::addBin( K3bExternalBin* bin )
{ {
if( !m_bins.tqcontains( bin ) ) { if( !m_bins.contains( bin ) ) {
// insertion sort // insertion sort
// the first bin in the list is always the one used // the first bin in the list is always the one used
// so we default to using the newest one // so we default to using the newest one
@ -127,8 +127,8 @@ void K3bExternalProgram::addBin( K3bExternalBin* bin )
void K3bExternalProgram::setDefault( const K3bExternalBin* bin ) void K3bExternalProgram::setDefault( const K3bExternalBin* bin )
{ {
if( m_bins.tqcontains( bin ) ) if( m_bins.contains( bin ) )
m_bins.take( m_bins.tqfind( bin ) ); m_bins.take( m_bins.find( bin ) );
// the first bin in the list is always the one used // the first bin in the list is always the one used
m_bins.insert( 0, bin ); m_bins.insert( 0, bin );
@ -148,7 +148,7 @@ void K3bExternalProgram::setDefault( const TQString& path )
void K3bExternalProgram::addUserParameter( const TQString& p ) void K3bExternalProgram::addUserParameter( const TQString& p )
{ {
if( !m_userParameters.tqcontains( p ) ) if( !m_userParameters.contains( p ) )
m_userParameters.append(p); m_userParameters.append(p);
} }
@ -230,7 +230,7 @@ bool K3bExternalBinManager::saveConfig( KConfig* c )
bool K3bExternalBinManager::foundBin( const TQString& name ) bool K3bExternalBinManager::foundBin( const TQString& name )
{ {
if( m_programs.tqfind( name ) == m_programs.end() ) if( m_programs.find( name ) == m_programs.end() )
return false; return false;
else else
return (m_programs[name]->defaultBin() != 0); return (m_programs[name]->defaultBin() != 0);
@ -239,7 +239,7 @@ bool K3bExternalBinManager::foundBin( const TQString& name )
const TQString& K3bExternalBinManager::binPath( const TQString& name ) const TQString& K3bExternalBinManager::binPath( const TQString& name )
{ {
if( m_programs.tqfind( name ) == m_programs.end() ) if( m_programs.find( name ) == m_programs.end() )
return m_noPath; return m_noPath;
if( m_programs[name]->defaultBin() != 0 ) if( m_programs[name]->defaultBin() != 0 )
@ -251,7 +251,7 @@ const TQString& K3bExternalBinManager::binPath( const TQString& name )
const K3bExternalBin* K3bExternalBinManager::binObject( const TQString& name ) const K3bExternalBin* K3bExternalBinManager::binObject( const TQString& name )
{ {
if( m_programs.tqfind( name ) == m_programs.end() ) if( m_programs.find( name ) == m_programs.end() )
return 0; return 0;
return m_programs[name]->defaultBin(); return m_programs[name]->defaultBin();
@ -287,7 +287,7 @@ void K3bExternalBinManager::search()
TQString p = *it; TQString p = *it;
if( p[p.length()-1] == '/' ) if( p[p.length()-1] == '/' )
p.truncate( p.length()-1 ); p.truncate( p.length()-1 );
if( !paths.tqcontains( p ) && !paths.tqcontains( p + "/" ) ) if( !paths.contains( p ) && !paths.contains( p + "/" ) )
paths.append(p); paths.append(p);
} }
@ -299,7 +299,7 @@ void K3bExternalBinManager::search()
TQString p = *it; TQString p = *it;
if( p[p.length()-1] == '/' ) if( p[p.length()-1] == '/' )
p.truncate( p.length()-1 ); p.truncate( p.length()-1 );
if( !paths.tqcontains( p ) && !paths.tqcontains( p + "/" ) ) if( !paths.contains( p ) && !paths.contains( p + "/" ) )
paths.append(p); paths.append(p);
} }
} }
@ -334,7 +334,7 @@ void K3bExternalBinManager::search()
K3bExternalProgram* K3bExternalBinManager::program( const TQString& name ) const K3bExternalProgram* K3bExternalBinManager::program( const TQString& name ) const
{ {
if( m_programs.tqfind( name ) == m_programs.end() ) if( m_programs.find( name ) == m_programs.end() )
return 0; return 0;
else else
return m_programs[name]; return m_programs[name];
@ -363,7 +363,7 @@ void K3bExternalBinManager::setSearchPath( const TQStringList& list )
loadDefaultSearchPath(); loadDefaultSearchPath();
for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) {
if( !m_searchPath.tqcontains( *it ) ) if( !m_searchPath.contains( *it ) )
m_searchPath.append( *it ); m_searchPath.append( *it );
} }
} }
@ -371,7 +371,7 @@ void K3bExternalBinManager::setSearchPath( const TQStringList& list )
void K3bExternalBinManager::addSearchPath( const TQString& path ) void K3bExternalBinManager::addSearchPath( const TQString& path )
{ {
if( !m_searchPath.tqcontains( path ) ) if( !m_searchPath.contains( path ) )
m_searchPath.append( path ); m_searchPath.append( path );
} }

@ -195,7 +195,7 @@ TQString K3b::parentDir( const TQString& path )
if( path[path.length()-1] == '/' ) if( path[path.length()-1] == '/' )
tqparent.truncate( tqparent.length()-1 ); tqparent.truncate( tqparent.length()-1 );
int pos = tqparent.tqfindRev( '/' ); int pos = tqparent.findRev( '/' );
if( pos >= 0 ) if( pos >= 0 )
tqparent.truncate( pos+1 ); tqparent.truncate( pos+1 );
else // relative path, do anything... else // relative path, do anything...
@ -313,7 +313,7 @@ TQString K3b::cutFilename( const TQString& name, unsigned int len )
TQString ret = name; TQString ret = name;
// determine extension (we think of an extension to be at most 5 chars in length) // determine extension (we think of an extension to be at most 5 chars in length)
int pos = name.tqfind( '.', -6 ); int pos = name.find( '.', -6 );
if( pos > 0 ) if( pos > 0 )
len -= (name.length() - pos); len -= (name.length() - pos);
@ -332,7 +332,7 @@ TQString K3b::cutFilename( const TQString& name, unsigned int len )
TQString K3b::removeFilenameExtension( const TQString& name ) TQString K3b::removeFilenameExtension( const TQString& name )
{ {
TQString v = name; TQString v = name;
int dotpos = v.tqfindRev( '.' ); int dotpos = v.findRev( '.' );
if( dotpos > 0 ) if( dotpos > 0 )
v.truncate( dotpos ); v.truncate( dotpos );
return v; return v;
@ -344,7 +344,7 @@ TQString K3b::appendNumberToFilename( const TQString& name, int num, unsigned in
// determine extension (we think of an extension to be at most 5 chars in length) // determine extension (we think of an extension to be at most 5 chars in length)
TQString result = name; TQString result = name;
TQString ext; TQString ext;
int pos = name.tqfind( '.', -6 ); int pos = name.find( '.', -6 );
if( pos > 0 ) { if( pos > 0 ) {
ext = name.mid(pos); ext = name.mid(pos);
result.truncate( pos ); result.truncate( pos );
@ -426,7 +426,7 @@ TQString K3b::resolveLink( const TQString& file )
if( !p.startsWith( "/" ) ) if( !p.startsWith( "/" ) )
p.prepend( f.dirPath(true) + "/" ); p.prepend( f.dirPath(true) + "/" );
f.setFile( p ); f.setFile( p );
if( steps.tqcontains( f.absFilePath() ) ) { if( steps.contains( f.absFilePath() ) ) {
kdDebug() << "(K3b) symlink loop detected." << endl; kdDebug() << "(K3b) symlink loop detected." << endl;
break; break;
} }

@ -101,7 +101,7 @@ void K3bVersion::setVersion( const TQString& v )
// suffix = s and num = -1 is returned // suffix = s and num = -1 is returned
void K3bVersion::splitVersionString( const TQString& s, int& num, TQString& suffix ) void K3bVersion::splitVersionString( const TQString& s, int& num, TQString& suffix )
{ {
int pos = s.tqfind( TQRegExp("\\D") ); int pos = s.find( TQRegExp("\\D") );
if( pos < 0 ) { if( pos < 0 ) {
num = s.toInt(); num = s.toInt();
suffix = ""; suffix = "";

@ -96,7 +96,7 @@ bool K3bBinImageWritingJob::prepareWriter()
TQFile f( m_tocFile ); TQFile f( m_tocFile );
if( f.open( IO_ReadOnly ) ) { if( f.open( IO_ReadOnly ) ) {
TQTextStream fStr( &f ); TQTextStream fStr( &f );
if( fStr.read().tqcontains( "MODE1/2352" ) ) { if( fStr.read().contains( "MODE1/2352" ) ) {
kdDebug() << "(K3bBinImageWritingJob) cuefile contains MODE1/2352 track. using cdrdao." << endl; kdDebug() << "(K3bBinImageWritingJob) cuefile contains MODE1/2352 track. using cdrdao." << endl;
usedWritingApp = K3b::CDRDAO; usedWritingApp = K3b::CDRDAO;
} }

@ -311,7 +311,7 @@ void K3bCdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh )
} }
unsigned long avail, size; unsigned long avail, size;
TQString pathToTest = m_tempPath.left( m_tempPath.tqfindRev( '/' ) ); TQString pathToTest = m_tempPath.left( m_tempPath.findRev( '/' ) );
if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) { if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) {
emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR ); emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR );
d->error = true; d->error = true;

@ -95,7 +95,7 @@ void K3bCdda2wavReader::start( bool onlyInfo )
d->cdda2wavBin = k3bcore->externalBinManager()->binObject( "cdda2wav" ); d->cdda2wavBin = k3bcore->externalBinManager()->binObject( "cdda2wav" );
if( !d->cdda2wavBin ) { if( !d->cdda2wavBin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdda2wav"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdda2wav"), ERROR );
jobFinished(false); jobFinished(false);
d->running = false; d->running = false;
return; return;
@ -181,9 +181,9 @@ void K3bCdda2wavReader::slotProcessLine( const TQString& line )
static TQRegExp rx( "T\\d\\d:" ); static TQRegExp rx( "T\\d\\d:" );
if( rx.exactMatch( line.left(4) ) || line.startsWith( "Leadout" ) ) { if( rx.exactMatch( line.left(4) ) || line.startsWith( "Leadout" ) ) {
int pos = line.tqfind( " " ); int pos = line.find( " " );
int endpos = line.tqfind( TQRegExp( "\\d" ), pos ); int endpos = line.find( TQRegExp( "\\d" ), pos );
endpos = line.tqfind( " ", endpos ); endpos = line.find( " ", endpos );
bool ok; bool ok;
int offset = line.mid( pos, endpos-pos ).toInt(&ok); int offset = line.mid( pos, endpos-pos ).toInt(&ok);
if( ok ) if( ok )
@ -198,12 +198,12 @@ void K3bCdda2wavReader::slotProcessLine( const TQString& line )
emit nextTrack( d->currentTrack, d->trackOffsets.count() ); emit nextTrack( d->currentTrack, d->trackOffsets.count() );
} }
else if( line.tqcontains("successfully recorded") ) { else if( line.contains("successfully recorded") ) {
d->currentTrack++; d->currentTrack++;
emit nextTrack( d->currentTrack, d->trackOffsets.count() ); emit nextTrack( d->currentTrack, d->trackOffsets.count() );
} }
else if( line.tqcontains("%") ) { else if( line.contains("%") ) {
// parse progress // parse progress
bool ok; bool ok;
int p = line.left(3).toInt(&ok); int p = line.left(3).toInt(&ok);

@ -85,7 +85,7 @@ void K3bCloneJob::start()
// //
const K3bExternalBin* cdrecordBin = k3bcore->externalBinManager()->binObject( "cdrecord" ); const K3bExternalBin* cdrecordBin = k3bcore->externalBinManager()->binObject( "cdrecord" );
if( !cdrecordBin ) { if( !cdrecordBin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrecord"), ERROR );
jobFinished(false); jobFinished(false);
m_running = false; m_running = false;
return; return;

@ -314,7 +314,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh )
// //
KIO::filesize_t imageSpaceNeeded = (KIO::filesize_t)(d->lastSector.lba()+1)*2048; KIO::filesize_t imageSpaceNeeded = (KIO::filesize_t)(d->lastSector.lba()+1)*2048;
unsigned long avail, size; unsigned long avail, size;
TQString pathToTest = m_imagePath.left( m_imagePath.tqfindRev( '/' ) ); TQString pathToTest = m_imagePath.left( m_imagePath.findRev( '/' ) );
if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) { if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) {
emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR ); emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR );
jobFinished(false); jobFinished(false);

@ -218,15 +218,15 @@ void K3bDvdFormattingJob::slotStderrLine( const TQString& line )
emit debuggingOutput( "dvd+rw-format", line ); emit debuggingOutput( "dvd+rw-format", line );
// parsing for the -gui mode (since dvd+rw-format 4.6) // parsing for the -gui mode (since dvd+rw-format 4.6)
int pos = line.tqfind( "blanking" ); int pos = line.find( "blanking" );
if( pos < 0 ) if( pos < 0 )
pos = line.tqfind( "formatting" ); pos = line.find( "formatting" );
if( pos >= 0 ) { if( pos >= 0 ) {
pos = line.tqfind( TQRegExp( "\\d" ), pos ); pos = line.find( TQRegExp( "\\d" ), pos );
} }
// parsing for \b\b... stuff // parsing for \b\b... stuff
else if( !line.startsWith("*") ) { else if( !line.startsWith("*") ) {
pos = line.tqfind( TQRegExp( "\\d" ) ); pos = line.find( TQRegExp( "\\d" ) );
} }
else if( line.startsWith( ":-(" ) ) { else if( line.startsWith( ":-(" ) ) {
if( line.startsWith( ":-( unable to proceed with format" ) ) { if( line.startsWith( ":-( unable to proceed with format" ) ) {
@ -235,7 +235,7 @@ void K3bDvdFormattingJob::slotStderrLine( const TQString& line )
} }
if( pos >= 0 ) { if( pos >= 0 ) {
int endPos = line.tqfind( TQRegExp("[^\\d\\.]"), pos ) - 1; int endPos = line.find( TQRegExp("[^\\d\\.]"), pos ) - 1;
bool ok; bool ok;
int progress = (int)(line.mid( pos, endPos - pos ).toDouble(&ok)); int progress = (int)(line.mid( pos, endPos - pos ).toDouble(&ok));
if( ok ) { if( ok ) {
@ -472,7 +472,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo )
d->dvdFormatBin = k3bcore->externalBinManager()->binObject( "dvd+rw-format" ); d->dvdFormatBin = k3bcore->externalBinManager()->binObject( "dvd+rw-format" );
if( !d->dvdFormatBin ) { if( !d->dvdFormatBin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("dvd+rw-format"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("dvd+rw-format"), ERROR );
d->running = false; d->running = false;
jobFinished(false); jobFinished(false);
return; return;

@ -104,7 +104,7 @@ void K3bReadcdReader::start()
// the first thing to do is to check for readcd // the first thing to do is to check for readcd
d->readcdBinObject = k3bcore->externalBinManager()->binObject( "readcd" ); d->readcdBinObject = k3bcore->externalBinManager()->binObject( "readcd" );
if( !d->readcdBinObject ) { if( !d->readcdBinObject ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("readcd"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("readcd"), ERROR );
jobFinished(false); jobFinished(false);
return; return;
} }
@ -243,7 +243,7 @@ void K3bReadcdReader::slotStdLine( const TQString& line )
else if( line.startsWith( "addr:" ) ) { else if( line.startsWith( "addr:" ) ) {
bool ok; bool ok;
long currentReadBlock = line.mid( 6, line.tqfind("cnt")-7 ).toInt(&ok); long currentReadBlock = line.mid( 6, line.find("cnt")-7 ).toInt(&ok);
if( d->firstSector < d->lastSector ) if( d->firstSector < d->lastSector )
currentReadBlock -= d->firstSector.lba(); currentReadBlock -= d->firstSector.lba();
if( ok ) { if( ok ) {
@ -260,37 +260,37 @@ void K3bReadcdReader::slotStdLine( const TQString& line )
} }
else else
kdError() << "(K3bReadcdReader) currentReadBlock parsing error in line: " kdError() << "(K3bReadcdReader) currentReadBlock parsing error in line: "
<< line.mid( 6, line.tqfind("cnt")-7 ) << endl; << line.mid( 6, line.find("cnt")-7 ) << endl;
} }
else if( line.tqcontains("Cannot read source disk") ) { else if( line.contains("Cannot read source disk") ) {
emit infoMessage( i18n("Cannot read source disk."), ERROR ); emit infoMessage( i18n("Cannot read source disk."), ERROR );
} }
else if( (pos = line.tqfind("Retrying from sector")) >= 0 ) { else if( (pos = line.find("Retrying from sector")) >= 0 ) {
// parse the sector // parse the sector
pos += 21; pos += 21;
bool ok; bool ok;
int problemSector = line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ).toInt(&ok); int problemSector = line.mid( pos, line.find( TQRegExp("\\D"), pos )-pos ).toInt(&ok);
if( !ok ) { if( !ok ) {
kdError() << "(K3bReadcdReader) problemSector parsing error in line: " kdError() << "(K3bReadcdReader) problemSector parsing error in line: "
<< line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ) << endl; << line.mid( pos, line.find( TQRegExp("\\D"), pos )-pos ) << endl;
} }
emit infoMessage( i18n("Retrying from sector %1.").tqarg(problemSector), INFO ); emit infoMessage( i18n("Retrying from sector %1.").tqarg(problemSector), INFO );
} }
else if( (pos = line.tqfind("Error on sector")) >= 0 ) { else if( (pos = line.find("Error on sector")) >= 0 ) {
d->unreadableBlocks++; d->unreadableBlocks++;
pos += 16; pos += 16;
bool ok; bool ok;
int problemSector = line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ).toInt(&ok); int problemSector = line.mid( pos, line.find( TQRegExp("\\D"), pos )-pos ).toInt(&ok);
if( !ok ) { if( !ok ) {
kdError() << "(K3bReadcdReader) problemSector parsing error in line: " kdError() << "(K3bReadcdReader) problemSector parsing error in line: "
<< line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ) << endl; << line.mid( pos, line.find( TQRegExp("\\D"), pos )-pos ) << endl;
} }
if( line.tqcontains( "not corrected") ) { if( line.contains( "not corrected") ) {
emit infoMessage( i18n("Uncorrected error in sector %1").tqarg(problemSector), ERROR ); emit infoMessage( i18n("Uncorrected error in sector %1").tqarg(problemSector), ERROR );
} }
else { else {

@ -206,8 +206,8 @@ void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const TQString& lin
// parse progress // parse progress
// encoding frame [185], 24.02 fps, 93.0%, ETA: 0:00:00, ( 0| 0| 0) // encoding frame [185], 24.02 fps, 93.0%, ETA: 0:00:00, ( 0| 0| 0)
if( line.startsWith( "encoding frame" ) ) { if( line.startsWith( "encoding frame" ) ) {
int pos1 = line.tqfind( '[', 15 ); int pos1 = line.find( '[', 15 );
int pos2 = line.tqfind( ']', pos1+1 ); int pos2 = line.find( ']', pos1+1 );
if( pos1 > 0 && pos2 > 0 ) { if( pos1 > 0 && pos2 > 0 ) {
bool ok; bool ok;
int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok ); int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok );
@ -235,7 +235,7 @@ void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const TQString& lin
// [detectclipping#0] valid area: X: 5..719 Y: 72..507 -> -j 72,6,68,0 // [detectclipping#0] valid area: X: 5..719 Y: 72..507 -> -j 72,6,68,0
else if( line.startsWith( "[detectclipping" ) ) { else if( line.startsWith( "[detectclipping" ) ) {
int pos = line.tqfind( "-j" ); int pos = line.find( "-j" );
if( pos > 0 ) { if( pos > 0 ) {
TQStringList values = TQStringList::split( ',', line.mid( pos+3 ) ); TQStringList values = TQStringList::split( ',', line.mid( pos+3 ) );
m_clippingTop = TQMIN( m_clippingTop, values[0].toInt() ); m_clippingTop = TQMIN( m_clippingTop, values[0].toInt() );

@ -385,8 +385,8 @@ void K3bVideoDVDTitleTranscodingJob::slotTranscodeStderr( const TQString& line )
// parse progress // parse progress
// encoding frames [000000-000144], 27.58 fps, EMT: 0:00:05, ( 0| 0| 0) // encoding frames [000000-000144], 27.58 fps, EMT: 0:00:05, ( 0| 0| 0)
if( line.startsWith( "encoding frame" ) ) { if( line.startsWith( "encoding frame" ) ) {
int pos1 = line.tqfind( '-', 15 ); int pos1 = line.find( '-', 15 );
int pos2 = line.tqfind( ']', pos1+1 ); int pos2 = line.find( ']', pos1+1 );
if( pos1 > 0 && pos2 > 0 ) { if( pos1 > 0 && pos2 > 0 ) {
bool ok; bool ok;
int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok ); int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok );

@ -504,7 +504,7 @@ void K3bAudioDecoder::cleanup()
TQString K3bAudioDecoder::metaInfo( MetaDataField f ) TQString K3bAudioDecoder::metaInfo( MetaDataField f )
{ {
if( d->metaInfoMap.tqcontains( f ) ) if( d->metaInfoMap.contains( f ) )
return d->metaInfoMap[f]; return d->metaInfoMap[f];
// fall back to KFileMetaInfo // fall back to KFileMetaInfo

@ -63,7 +63,7 @@ TQStringList K3bPluginManager::groups() const
TQPtrList<K3bPlugin> fl; TQPtrList<K3bPlugin> fl;
for( TQPtrListIterator<K3bPlugin> it( d->plugins ); for( TQPtrListIterator<K3bPlugin> it( d->plugins );
it.current(); ++it ) { it.current(); ++it ) {
if( !grps.tqcontains( it.current()->group() ) ) if( !grps.contains( it.current()->group() ) )
grps.append( it.current()->group() ); grps.append( it.current()->group() );
} }

@ -382,7 +382,7 @@ K3bAudioDecoder* K3bAudioDoc::getDecoderForUrl( const KURL& url, bool* reused )
K3bAudioDecoder* decoder = 0; K3bAudioDecoder* decoder = 0;
// check if we already have a proper decoder // check if we already have a proper decoder
if( m_decoderPresenceMap.tqcontains( url.path() ) ) { if( m_decoderPresenceMap.contains( url.path() ) ) {
decoder = m_decoderPresenceMap[url.path()]; decoder = m_decoderPresenceMap[url.path()];
*reused = true; *reused = true;
} }
@ -997,7 +997,7 @@ void K3bAudioDoc::slotTrackRemoved( K3bAudioTrack* track )
void K3bAudioDoc::increaseDecoderUsage( K3bAudioDecoder* decoder ) void K3bAudioDoc::increaseDecoderUsage( K3bAudioDecoder* decoder )
{ {
kdDebug() << "(K3bAudioDoc::increaseDecoderUsage)" << endl; kdDebug() << "(K3bAudioDoc::increaseDecoderUsage)" << endl;
if( !m_decoderUsageCounterMap.tqcontains( decoder ) ) { if( !m_decoderUsageCounterMap.contains( decoder ) ) {
m_decoderUsageCounterMap[decoder] = 1; m_decoderUsageCounterMap[decoder] = 1;
m_decoderPresenceMap[decoder->filename()] = decoder; m_decoderPresenceMap[decoder->filename()] = decoder;
} }

@ -121,13 +121,13 @@ void K3bAudioNormalizeJob::slotStdLine( const TQString& line )
} }
} }
else if( line.tqcontains( "already normalized" ) ) { else if( line.contains( "already normalized" ) ) {
// no normalization necessary for the current track // no normalization necessary for the current track
emit infoMessage( i18n("Track %1 is already normalized.").tqarg(m_currentTrack), INFO ); emit infoMessage( i18n("Track %1 is already normalized.").tqarg(m_currentTrack), INFO );
m_currentTrack++; m_currentTrack++;
} }
else if( line.tqcontains( "--% done") ) { else if( line.contains( "--% done") ) {
if( m_currentAction == ADJUSTING_LEVELS ) { if( m_currentAction == ADJUSTING_LEVELS ) {
emit newTask( i18n("Adjusting volume level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) ); emit newTask( i18n("Adjusting volume level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) );
kdDebug() << "(K3bAudioNormalizeJob) adjusting level for track " kdDebug() << "(K3bAudioNormalizeJob) adjusting level for track "
@ -148,7 +148,7 @@ void K3bAudioNormalizeJob::slotStdLine( const TQString& line )
m_currentTrack++; m_currentTrack++;
} }
else if( int pos = line.tqfind( "% done" ) > 0 ) { else if( int pos = line.find( "% done" ) > 0 ) {
// parse progress: "XXX% done" and "batch XXX% done" // parse progress: "XXX% done" and "batch XXX% done"
pos -= 3; pos -= 3;
bool ok; bool ok;

@ -165,7 +165,7 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir )
TQString name( k3bname ); TQString name( k3bname );
if( cnt > 0 ) if( cnt > 0 )
name += TQString("_%1").tqarg(cnt); name += TQString("_%1").tqarg(cnt);
if( K3bDataItem* oldItem = dir->tqfind( name ) ) { if( K3bDataItem* oldItem = dir->find( name ) ) {
if( f.isDir() && oldItem->isDir() ) { if( f.isDir() && oldItem->isDir() ) {
// ok, just reuse the dir // ok, just reuse the dir
newDirItem = static_cast<K3bDirItem*>(oldItem); newDirItem = static_cast<K3bDirItem*>(oldItem);
@ -215,7 +215,7 @@ bool K3bDataDoc::nameAlreadyInDir( const TQString& name, K3bDirItem* dir )
if( !dir ) if( !dir )
return false; return false;
else else
return ( dir->tqfind( name ) != 0 ); return ( dir->find( name ) != 0 );
} }
@ -275,7 +275,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem )
TQDomNodeList nodes = rootElem->childNodes(); TQDomNodeList nodes = rootElem->childNodes();
if( nodes.item(0).nodeName() != "general" ) { if( nodes.item(0).nodeName() != "general" ) {
kdDebug() << "(K3bDataDoc) could not tqfind 'general' section." << endl; kdDebug() << "(K3bDataDoc) could not find 'general' section." << endl;
return false; return false;
} }
if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) if( !readGeneralDocumentData( nodes.item(0).toElement() ) )
@ -285,7 +285,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem )
// parse options // parse options
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(1).nodeName() != "options" ) { if( nodes.item(1).nodeName() != "options" ) {
kdDebug() << "(K3bDataDoc) could not tqfind 'options' section." << endl; kdDebug() << "(K3bDataDoc) could not find 'options' section." << endl;
return false; return false;
} }
if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) if( !loadDocumentDataOptions( nodes.item(1).toElement() ) )
@ -297,7 +297,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem )
// parse header // parse header
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(2).nodeName() != "header" ) { if( nodes.item(2).nodeName() != "header" ) {
kdDebug() << "(K3bDataDoc) could not tqfind 'header' section." << endl; kdDebug() << "(K3bDataDoc) could not find 'header' section." << endl;
return false; return false;
} }
if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) if( !loadDocumentDataHeader( nodes.item(2).toElement() ) )
@ -309,7 +309,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem )
// parse files // parse files
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(3).nodeName() != "files" ) { if( nodes.item(3).nodeName() != "files" ) {
kdDebug() << "(K3bDataDoc) could not tqfind 'files' section." << endl; kdDebug() << "(K3bDataDoc) could not find 'files' section." << endl;
return false; return false;
} }
@ -428,7 +428,7 @@ bool K3bDataDoc::loadDocumentDataOptions( TQDomElement elem )
else if( e.text() == "extended" ) else if( e.text() == "extended" )
m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::extended ); m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::extended );
else if( e.text() == "extended" ) else if( e.text() == "extended" )
m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::tqreplace ); m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::replace );
else else
m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::noChange ); m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::noChange );
} }
@ -565,7 +565,7 @@ bool K3bDataDoc::loadDataItem( TQDomElement& elem, K3bDirItem* tqparent )
else if( elem.nodeName() == "directory" ) { else if( elem.nodeName() == "directory" ) {
// This is for the VideoDVD project which already contains the *_TS folders // This is for the VideoDVD project which already contains the *_TS folders
K3bDirItem* newDirItem = 0; K3bDirItem* newDirItem = 0;
if( K3bDataItem* item = tqparent->tqfind( elem.attributeNode( "name" ).value() ) ) { if( K3bDataItem* item = tqparent->find( elem.attributeNode( "name" ).value() ) ) {
if( item->isDir() ) { if( item->isDir() ) {
newDirItem = static_cast<K3bDirItem*>(item); newDirItem = static_cast<K3bDirItem*>(item);
} }
@ -745,8 +745,8 @@ void K3bDataDoc::saveDocumentDataOptions( TQDomElement& optionsElem )
case K3bIsoOptions::extended: case K3bIsoOptions::extended:
topElem.appendChild( doc.createTextNode( "extended" ) ); topElem.appendChild( doc.createTextNode( "extended" ) );
break; break;
case K3bIsoOptions::tqreplace: case K3bIsoOptions::replace:
topElem.appendChild( doc.createTextNode( "tqreplace" ) ); topElem.appendChild( doc.createTextNode( "replace" ) );
break; break;
default: default:
topElem.appendChild( doc.createTextNode( "noChange" ) ); topElem.appendChild( doc.createTextNode( "noChange" ) );
@ -838,7 +838,7 @@ void K3bDataDoc::saveDocumentDataHeader( TQDomElement& headerElem )
void K3bDataDoc::saveDataItem( K3bDataItem* item, TQDomDocument* doc, TQDomElement* tqparent ) void K3bDataDoc::saveDataItem( K3bDataItem* item, TQDomDocument* doc, TQDomElement* tqparent )
{ {
if( K3bFileItem* fileItem = dynamic_cast<K3bFileItem*>( item ) ) { if( K3bFileItem* fileItem = dynamic_cast<K3bFileItem*>( item ) ) {
if( m_oldSession.tqcontains( fileItem ) ) { if( m_oldSession.contains( fileItem ) ) {
kdDebug() << "(K3bDataDoc) ignoring fileitem " << fileItem->k3bName() << " from old session while saving..." << endl; kdDebug() << "(K3bDataDoc) ignoring fileitem " << fileItem->k3bName() << " from old session while saving..." << endl;
} }
else { else {
@ -998,8 +998,8 @@ TQString K3bDataDoc::treatWhitespace( const TQString& path )
if( isoOptions().whiteSpaceTreatment() != K3bIsoOptions::noChange ) { if( isoOptions().whiteSpaceTreatment() != K3bIsoOptions::noChange ) {
TQString result = path; TQString result = path;
if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::tqreplace ) { if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::replace ) {
result.tqreplace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() ); result.replace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() );
} }
else if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::strip ) { else if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::strip ) {
result.remove( ' ' ); result.remove( ' ' );
@ -1220,7 +1220,7 @@ void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir,
for( TQStringList::const_iterator it = entries.begin(); for( TQStringList::const_iterator it = entries.begin();
it != entries.end(); ++it ) { it != entries.end(); ++it ) {
const K3bIso9660Entry* entry = importDir->entry( *it ); const K3bIso9660Entry* entry = importDir->entry( *it );
K3bDataItem* oldItem = tqparent->tqfind( entry->name() ); K3bDataItem* oldItem = tqparent->find( entry->name() );
if( entry->isDirectory() ) { if( entry->isDirectory() ) {
K3bDirItem* dir = 0; K3bDirItem* dir = 0;
if( oldItem && oldItem->isDir() ) { if( oldItem && oldItem->isDir() ) {
@ -1278,7 +1278,7 @@ void K3bDataDoc::clearImportedSession()
} }
else { else {
for( TQPtrListIterator<K3bDataItem> it( dir->tqchildren() ); it.current(); ++it ) { for( TQPtrListIterator<K3bDataItem> it( dir->tqchildren() ); it.current(); ++it ) {
if( !m_oldSession.tqcontains(it.current()) ) { if( !m_oldSession.contains(it.current()) ) {
m_oldSession.remove(); m_oldSession.remove();
// now the dir becomes a totally normal dir // now the dir becomes a totally normal dir
dir->setRemoveable(true); dir->setRemoveable(true);
@ -1308,7 +1308,7 @@ void K3bDataDoc::clearImportedSession()
K3bDirItem* K3bDataDoc::bootImageDir() K3bDirItem* K3bDataDoc::bootImageDir()
{ {
K3bDataItem* b = m_root->tqfind( "boot" ); K3bDataItem* b = m_root->find( "boot" );
if( !b ) { if( !b ) {
b = new K3bDirItem( "boot", this, m_root ); b = new K3bDirItem( "boot", this, m_root );
setModified( true ); setModified( true );

@ -116,13 +116,13 @@ K3b::Msf K3bDataItem::itemBlocks( bool followSymbolicLinks ) const
void K3bDataItem::setK3bName( const TQString& name ) { void K3bDataItem::setK3bName( const TQString& name ) {
if ( name != m_k3bName ) { if ( name != m_k3bName ) {
// test for not-allowed characters // test for not-allowed characters
if( name.tqcontains('/') ) { if( name.contains('/') ) {
kdDebug() << "(K3bDataItem) name contained invalid characters!" << endl; kdDebug() << "(K3bDataItem) name contained invalid characters!" << endl;
return; return;
} }
if( tqparent() ) { if( tqparent() ) {
K3bDataItem* item = tqparent()->tqfind( name ); K3bDataItem* item = tqparent()->find( name );
if( item && item != this ) { if( item && item != this ) {
kdDebug() << "(K3bDataItem) item with that name already exists." << endl; kdDebug() << "(K3bDataItem) item with that name already exists." << endl;
return; return;

@ -99,12 +99,12 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item )
} }
} }
if( m_tqchildren.tqfindRef( item ) == -1 ) { if( m_tqchildren.findRef( item ) == -1 ) {
if( item->isFile() ) { if( item->isFile() ) {
// do we replace an old item? // do we replace an old item?
TQString name = item->k3bName(); TQString name = item->k3bName();
int cnt = 1; int cnt = 1;
while( K3bDataItem* oldItem = tqfind( name ) ) { while( K3bDataItem* oldItem = find( name ) ) {
if( !oldItem->isDir() && oldItem->isFromOldSession() ) { if( !oldItem->isDir() && oldItem->isFromOldSession() ) {
// in this case we remove this item from it's tqparent and save it in the new one // in this case we remove this item from it's tqparent and save it in the new one
// to be able to recover it // to be able to recover it
@ -146,7 +146,7 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item )
K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item ) K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item )
{ {
int x = m_tqchildren.tqfindRef( item ); int x = m_tqchildren.findRef( item );
if( x > -1 ) { if( x > -1 ) {
K3bDataItem* item = m_tqchildren.take(); K3bDataItem* item = m_tqchildren.take();
updateSize( item, true ); updateSize( item, true );
@ -186,7 +186,7 @@ K3bDataItem* K3bDirItem::nextSibling() const
K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const
{ {
// search for prev in tqchildren // search for prev in tqchildren
if( m_tqchildren.tqfindRef( prev ) < 0 ) { if( m_tqchildren.findRef( prev ) < 0 ) {
return 0; return 0;
} }
else else
@ -196,11 +196,11 @@ K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const
bool K3bDirItem::alreadyInDirectory( const TQString& filename ) const bool K3bDirItem::alreadyInDirectory( const TQString& filename ) const
{ {
return (tqfind( filename ) != 0); return (find( filename ) != 0);
} }
K3bDataItem* K3bDirItem::tqfind( const TQString& filename ) const K3bDataItem* K3bDirItem::find( const TQString& filename ) const
{ {
for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) {
if( it.current()->k3bName() == filename ) if( it.current()->k3bName() == filename )
@ -218,12 +218,12 @@ K3bDataItem* K3bDirItem::findByPath( const TQString& p )
TQString path = p; TQString path = p;
if( path.startsWith("/") ) if( path.startsWith("/") )
path = path.mid(1); path = path.mid(1);
int pos = path.tqfind( "/" ); int pos = path.find( "/" );
if( pos < 0 ) if( pos < 0 )
return tqfind( path ); return find( path );
else { else {
// do it recursivly // do it recursivly
K3bDataItem* item = tqfind( path.left(pos) ); K3bDataItem* item = find( path.left(pos) );
if( item && item->isDir() ) if( item && item->isDir() )
return ((K3bDirItem*)item)->findByPath( path.mid( pos+1 ) ); return ((K3bDirItem*)item)->findByPath( path.mid( pos+1 ) );
else else
@ -249,7 +249,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath )
TQString restPath; TQString restPath;
TQString dirName; TQString dirName;
int pos = dirPath.tqfind( '/' ); int pos = dirPath.find( '/' );
if( pos == -1 ) { if( pos == -1 ) {
dirName = dirPath; dirName = dirPath;
} }
@ -258,7 +258,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath )
restPath = dirPath.mid( pos+1 ); restPath = dirPath.mid( pos+1 );
} }
K3bDataItem* dir = tqfind( dirName ); K3bDataItem* dir = find( dirName );
if( !dir ) if( !dir )
dir = new K3bDirItem( dirName, doc(), this ); dir = new K3bDirItem( dirName, doc(), this );
else if( !dir->isDir() ) else if( !dir->isDir() )

@ -56,7 +56,7 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem
K3bDataItem* nextChild( K3bDataItem* ) const; K3bDataItem* nextChild( K3bDataItem* ) const;
bool alreadyInDirectory( const TQString& fileName ) const; bool alreadyInDirectory( const TQString& fileName ) const;
K3bDataItem* tqfind( const TQString& filename ) const; K3bDataItem* find( const TQString& filename ) const;
K3bDataItem* findByPath( const TQString& ); K3bDataItem* findByPath( const TQString& );
long numFiles() const; long numFiles() const;

@ -114,7 +114,7 @@ public:
void removeFile( K3bFileItem* item, bool followSymlinks ) { void removeFile( K3bFileItem* item, bool followSymlinks ) {
InodeInfo& inodeInfo = inodeMap[item->localId(followSymlinks)]; InodeInfo& inodeInfo = inodeMap[item->localId(followSymlinks)];
if( inodeInfo.items.tqfindRef( item ) == -1 ) { if( inodeInfo.items.findRef( item ) == -1 ) {
kdError() << "(K3bFileCompilationSizeHandler) " kdError() << "(K3bFileCompilationSizeHandler) "
<< item->localPath() << item->localPath()
<< " has been removed without being added!" << endl; << " has been removed without being added!" << endl;
@ -136,7 +136,7 @@ public:
void removeSpecialItem( K3bDataItem* item ) { void removeSpecialItem( K3bDataItem* item ) {
// special files do not have a corresponding local file // special files do not have a corresponding local file
// so we just substract their k3bSize // so we just substract their k3bSize
if( specialItems.tqfindRef( item ) == -1 ) { if( specialItems.findRef( item ) == -1 ) {
kdError() << "(K3bFileCompilationSizeHandler) Special item " kdError() << "(K3bFileCompilationSizeHandler) Special item "
<< item->k3bName() << item->k3bName()
<< " has been removed without being added!" << endl; << " has been removed without being added!" << endl;

@ -273,7 +273,7 @@ bool K3bFileItem::isValid() const
} }
else { else {
// search for the item in dir // search for the item in dir
K3bDataItem* d = dir->tqfind( tokens[i] ); K3bDataItem* d = dir->find( tokens[i] );
if( d == 0 ) if( d == 0 )
return false; return false;

@ -77,7 +77,7 @@ public:
}; };
/** /**
* This is not the normal inode number but it also tqcontains * This is not the normal inode number but it also contains
* the device number. * the device number.
*/ */
Id localId() const; Id localId() const;

@ -400,7 +400,7 @@ void K3bIsoImager::slotMkisofsPrintSizeFinished()
else { else {
// parse the stderr output // parse the stderr output
// I hope parsing the last line is enough! // I hope parsing the last line is enough!
int pos = m_collectedMkisofsPrintSizeStderr.tqfindRev( "extents scheduled to be written" ); int pos = m_collectedMkisofsPrintSizeStderr.findRev( "extents scheduled to be written" );
if( pos == -1 ) if( pos == -1 )
success = false; success = false;
@ -857,7 +857,7 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream
// some versions of mkisofs seem to have a bug that prevents to use filenames // some versions of mkisofs seem to have a bug that prevents to use filenames
// that contain one or more backslashes // that contain one or more backslashes
if( item->writtenPath().tqcontains("\\") ) if( item->writtenPath().contains("\\") )
m_containsFilesWithMultibleBackslashes = true; m_containsFilesWithMultibleBackslashes = true;
@ -887,7 +887,7 @@ void K3bIsoImager::writePathSpecForFile( K3bFileItem* item, TQTextStream& stream
stream << escapeGraftPoint( item->writtenPath() ) stream << escapeGraftPoint( item->writtenPath() )
<< "="; << "=";
if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack if( m_doc->bootImages().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack
// create temp file // create temp file
KTempFile temp; KTempFile temp;
@ -976,7 +976,7 @@ bool K3bIsoImager::writeSortWeightFile()
K3bDataItem* item = m_doc->root(); K3bDataItem* item = m_doc->root();
while( (item = item->nextSibling()) ) { // we skip the root here while( (item = item->nextSibling()) ) { // we skip the root here
if( item->sortWeight() != 0 ) { if( item->sortWeight() != 0 ) {
if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack if( m_doc->bootImages().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack
*t << escapeGraftPoint( static_cast<K3bBootItem*>(item)->tempPath() ) << " " << item->sortWeight() << endl; *t << escapeGraftPoint( static_cast<K3bBootItem*>(item)->tempPath() ) << " " << item->sortWeight() << endl;
} }
else if( item->isDir() ) { else if( item->isDir() ) {
@ -1049,8 +1049,8 @@ TQString K3bIsoImager::escapeGraftPoint( const TQString& str )
++pos; ++pos;
} }
// enc.tqreplace( "\\\\", "\\\\\\\\" ); // enc.replace( "\\\\", "\\\\\\\\" );
// enc.tqreplace( "=", "\\=" ); // enc.replace( "=", "\\=" );
return enc; return enc;
} }

@ -118,8 +118,8 @@ void K3bIsoOptions::save( KConfigBase* c, bool saveVolumeDesc )
case extended: case extended:
c->writeEntry( "white_space_treatment", "extended" ); c->writeEntry( "white_space_treatment", "extended" );
break; break;
case tqreplace: case replace:
c->writeEntry( "white_space_treatment", "tqreplace" ); c->writeEntry( "white_space_treatment", "replace" );
break; break;
default: default:
c->writeEntry( "white_space_treatment", "noChange" ); c->writeEntry( "white_space_treatment", "noChange" );
@ -189,8 +189,8 @@ K3bIsoOptions K3bIsoOptions::load( KConfigBase* c, bool loadVolumeDesc )
options.setDoNotCacheInodes( c->readBoolEntry( "do not cache inodes", options.doNotCacheInodes() ) ); options.setDoNotCacheInodes( c->readBoolEntry( "do not cache inodes", options.doNotCacheInodes() ) );
TQString w = c->readEntry( "white_space_treatment", "noChange" ); TQString w = c->readEntry( "white_space_treatment", "noChange" );
if( w == "tqreplace" ) if( w == "replace" )
options.setWhiteSpaceTreatment( tqreplace ); options.setWhiteSpaceTreatment( replace );
else if( w == "strip" ) else if( w == "strip" )
options.setWhiteSpaceTreatment( strip ); options.setWhiteSpaceTreatment( strip );
else if( w == "extended" ) else if( w == "extended" )

@ -108,7 +108,7 @@ class LIBK3B_EXPORT K3bIsoOptions
void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; } void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; }
// ----------------------------------------------------------------- mkisofs-options ----------- // ----------------------------------------------------------------- mkisofs-options -----------
enum whiteSpaceTreatments { noChange = 0, tqreplace = 1, strip = 2, extended = 3 }; enum whiteSpaceTreatments { noChange = 0, replace = 1, strip = 2, extended = 3 };
void setWhiteSpaceTreatment( int i ) { m_whiteSpaceTreatment = i; } void setWhiteSpaceTreatment( int i ) { m_whiteSpaceTreatment = i; }
int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; } int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; }

@ -93,12 +93,12 @@ void K3bMkisofsHandler::parseMkisofsOutput( const TQString& line )
d->readError = true; d->readError = true;
} }
} }
else if( line.tqcontains( "done, estimate" ) ) { else if( line.contains( "done, estimate" ) ) {
int p = parseMkisofsProgress( line ); int p = parseMkisofsProgress( line );
if( p != -1 ) if( p != -1 )
handleMkisofsProgress( p ); handleMkisofsProgress( p );
} }
else if( line.tqcontains( "extents written" ) ) { else if( line.contains( "extents written" ) ) {
handleMkisofsProgress( 100 ); handleMkisofsProgress( 100 );
} }
else if( line.startsWith( "Incorrectly encoded string" ) ) { else if( line.startsWith( "Incorrectly encoded string" ) ) {
@ -134,7 +134,7 @@ int K3bMkisofsHandler::parseMkisofsProgress( const TQString& line )
// //
TQString perStr = line; TQString perStr = line;
perStr.truncate( perStr.tqfind('%') ); perStr.truncate( perStr.find('%') );
bool ok; bool ok;
double p = perStr.toDouble( &ok ); double p = perStr.toDouble( &ok );
if( !ok ) { if( !ok ) {

@ -53,7 +53,7 @@ void K3bMsInfoFetcher::start()
if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) { if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) {
kdDebug() << "(K3bMsInfoFetcher) could not find cdrecord executable" << endl; kdDebug() << "(K3bMsInfoFetcher) could not find cdrecord executable" << endl;
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), K3bJob::ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrecord"), K3bJob::ERROR );
jobFinished(false); jobFinished(false);
return; return;
} }
@ -89,7 +89,7 @@ void K3bMsInfoFetcher::getMsInfo()
bin = k3bcore->externalBinManager()->binObject( "cdrecord" ); bin = k3bcore->externalBinManager()->binObject( "cdrecord" );
if( !bin ) { if( !bin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR );
jobFinished(false); jobFinished(false);
return; return;
} }
@ -190,7 +190,7 @@ void K3bMsInfoFetcher::slotProcessExited()
kdDebug() << "(K3bMsInfoFetcher) msinfo fetched" << endl; kdDebug() << "(K3bMsInfoFetcher) msinfo fetched" << endl;
// now parse the output // now parse the output
TQString firstLine = m_collectedOutput.left( m_collectedOutput.tqfind("\n") ); TQString firstLine = m_collectedOutput.left( m_collectedOutput.find("\n") );
TQStringList list = TQStringList::split( ",", firstLine ); TQStringList list = TQStringList::split( ",", firstLine );
if( list.count() == 2 ) { if( list.count() == 2 ) {
bool ok1, ok2; bool ok1, ok2;

@ -285,7 +285,7 @@ void K3bDvdBooktypeJob::startBooktypeChange()
d->dvdBooktypeBin = k3bcore->externalBinManager()->binObject( "dvd+rw-booktype" ); d->dvdBooktypeBin = k3bcore->externalBinManager()->binObject( "dvd+rw-booktype" );
if( !d->dvdBooktypeBin ) { if( !d->dvdBooktypeBin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("dvd+rw-booktype"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("dvd+rw-booktype"), ERROR );
d->running = false; d->running = false;
jobFinished(false); jobFinished(false);
return; return;

@ -475,7 +475,7 @@ void K3bCdrdaoWriter::start()
m_cdrdaoBinObject = k3bcore->externalBinManager()->binObject("cdrdao"); m_cdrdaoBinObject = k3bcore->externalBinManager()->binObject("cdrdao");
if( !m_cdrdaoBinObject ) { if( !m_cdrdaoBinObject ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrdao"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrdao"), ERROR );
jobFinished(false); jobFinished(false);
return; return;
} }
@ -664,12 +664,12 @@ bool K3bCdrdaoWriter::cueSheet()
if ( !ts.eof() ) { if ( !ts.eof() ) {
TQString line = ts.readLine(); TQString line = ts.readLine();
f.close(); f.close();
int pos = line.tqfind( "FILE \"" ); int pos = line.find( "FILE \"" );
if( pos < 0 ) if( pos < 0 )
return false; return false;
pos += 6; pos += 6;
int endPos = line.tqfind( "\" BINARY", pos+1 ); int endPos = line.find( "\" BINARY", pos+1 );
if( endPos < 0 ) if( endPos < 0 )
return false; return false;
@ -802,11 +802,11 @@ void K3bCdrdaoWriter::slotProcessExited( KProcess* p )
void K3bCdrdaoWriter::unknownCdrdaoLine( const TQString& line ) void K3bCdrdaoWriter::unknownCdrdaoLine( const TQString& line )
{ {
if( line.tqcontains( "at speed" ) ) if( line.contains( "at speed" ) )
{ {
// parse the speed and inform the user if cdrdao switched it down // parse the speed and inform the user if cdrdao switched it down
int pos = line.tqfind( "at speed" ); int pos = line.find( "at speed" );
int po2 = line.tqfind( TQRegExp("\\D"), pos + 9 ); int po2 = line.find( TQRegExp("\\D"), pos + 9 );
int speed = line.mid( pos+9, po2-pos-9 ).toInt(); int speed = line.mid( pos+9, po2-pos-9 ).toInt();
if( speed < d->usedSpeed ) if( speed < d->usedSpeed )
{ {
@ -835,7 +835,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str )
{ {
parseCdrdaoError( str ); parseCdrdaoError( str );
} }
else if( (str).startsWith( "Wrote" ) && !str.tqcontains("blocks") ) else if( (str).startsWith( "Wrote" ) && !str.contains("blocks") )
{ {
parseCdrdaoWrote( str ); parseCdrdaoWrote( str );
} }
@ -870,7 +870,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str )
} }
else if( str.startsWith( "Found pre-gap" ) ) else if( str.startsWith( "Found pre-gap" ) )
{ {
emit infoMessage( i18n("Found pregap: %1").tqarg( str.mid(str.tqfind(":")+1) ), K3bJob::INFO ); emit infoMessage( i18n("Found pregap: %1").tqarg( str.mid(str.find(":")+1) ), K3bJob::INFO );
} }
else else
unknownCdrdaoLine(str); unknownCdrdaoLine(str);
@ -880,52 +880,52 @@ void K3bCdrdaoWriter::parseCdrdaoError( const TQString& line )
{ {
int pos = -1; int pos = -1;
if( line.tqcontains( "No driver found" ) || if( line.contains( "No driver found" ) ||
line.tqcontains( "use option --driver" ) ) line.contains( "use option --driver" ) )
{ {
emit infoMessage( i18n("No cdrdao driver found."), K3bJob::ERROR ); emit infoMessage( i18n("No cdrdao driver found."), K3bJob::ERROR );
emit infoMessage( i18n("Please select one manually in the device settings."), K3bJob::ERROR ); emit infoMessage( i18n("Please select one manually in the device settings."), K3bJob::ERROR );
emit infoMessage( i18n("For most current drives this would be 'generic-mmc'."), K3bJob::ERROR ); emit infoMessage( i18n("For most current drives this would be 'generic-mmc'."), K3bJob::ERROR );
m_knownError = true; m_knownError = true;
} }
else if( line.tqcontains( "Cannot setup device" ) ) else if( line.contains( "Cannot setup device" ) )
{ {
// no nothing... // no nothing...
} }
else if( line.tqcontains( "not ready") ) else if( line.contains( "not ready") )
{ {
emit infoMessage( i18n("Device not ready, waiting."),K3bJob::WARNING ); emit infoMessage( i18n("Device not ready, waiting."),K3bJob::WARNING );
} }
else if( line.tqcontains("Drive does not accept any cue sheet") ) else if( line.contains("Drive does not accept any cue sheet") )
{ {
emit infoMessage( i18n("Cue sheet not accepted."), K3bJob::ERROR ); emit infoMessage( i18n("Cue sheet not accepted."), K3bJob::ERROR );
m_knownError = true; m_knownError = true;
} }
else if( (pos = line.tqfind( "Illegal option" )) > 0 ) { else if( (pos = line.find( "Illegal option" )) > 0 ) {
// ERROR: Illegal option: -wurst // ERROR: Illegal option: -wurst
emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrdaoBinObject->name()).tqarg(line.mid(pos+16)), emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrdaoBinObject->name()).tqarg(line.mid(pos+16)),
ERROR ); ERROR );
m_knownError = true; m_knownError = true;
} }
else if( line.tqcontains( "exceeds capacity" ) ) { else if( line.contains( "exceeds capacity" ) ) {
emit infoMessage( i18n("Data does not fit on disk."), ERROR ); emit infoMessage( i18n("Data does not fit on disk."), ERROR );
if( m_cdrdaoBinObject->hasFeature("overburn") ) if( m_cdrdaoBinObject->hasFeature("overburn") )
emit infoMessage( i18n("Enable overburning in the advanced K3b settings to burn anyway."), INFO ); emit infoMessage( i18n("Enable overburning in the advanced K3b settings to burn anyway."), INFO );
m_knownError = true; m_knownError = true;
} }
// else if( !line.tqcontains( "remote progress message" ) ) // else if( !line.contains( "remote progress message" ) )
// emit infoMessage( line, K3bJob::ERROR ); // emit infoMessage( line, K3bJob::ERROR );
} }
void K3bCdrdaoWriter::parseCdrdaoWrote( const TQString& line ) void K3bCdrdaoWriter::parseCdrdaoWrote( const TQString& line )
{ {
int pos, po2; int pos, po2;
pos = line.tqfind( "Wrote" ); pos = line.find( "Wrote" );
po2 = line.tqfind( " ", pos + 6 ); po2 = line.find( " ", pos + 6 );
int processed = line.mid( pos+6, po2-pos-6 ).toInt(); int processed = line.mid( pos+6, po2-pos-6 ).toInt();
pos = line.tqfind( "of" ); pos = line.find( "of" );
po2 = line.tqfind( " ", pos + 3 ); po2 = line.find( " ", pos + 3 );
m_size = line.mid( pos+3, po2-pos-3 ).toInt(); m_size = line.mid( pos+3, po2-pos-3 ).toInt();
d->speedEst->dataWritten( processed*1024 ); d->speedEst->dataWritten( processed*1024 );
@ -1042,8 +1042,8 @@ TQString K3bCdrdaoWriter::findDriverFile( const K3bExternalBin* bin )
// cdrdao normally in (prefix)/bin and driver table in (prefix)/share/cdrdao // cdrdao normally in (prefix)/bin and driver table in (prefix)/share/cdrdao
TQString path = bin->path; TQString path = bin->path;
path.truncate( path.tqfindRev("/") ); path.truncate( path.findRev("/") );
path.truncate( path.tqfindRev("/") ); path.truncate( path.findRev("/") );
path += "/share/cdrdao/drivers"; path += "/share/cdrdao/drivers";
if( TQFile::exists(path) ) if( TQFile::exists(path) )
return path; return path;

@ -293,7 +293,7 @@ void K3bCdrecordWriter::start()
prepareProcess(); prepareProcess();
if( !m_cdrecordBinObject ) { if( !m_cdrecordBinObject ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrecord"), ERROR );
jobFinished(false); jobFinished(false);
return; return;
} }
@ -406,8 +406,8 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
m_totalTracks = tt; m_totalTracks = tt;
int sizeStart = line.tqfind( TQRegExp("\\d"), 10 ); int sizeStart = line.find( TQRegExp("\\d"), 10 );
int sizeEnd = line.tqfind( "MB", sizeStart ); int sizeEnd = line.find( "MB", sizeStart );
track.size = line.mid( sizeStart, sizeEnd-sizeStart ).toInt(&ok); track.size = line.mid( sizeStart, sizeEnd-sizeStart ).toInt(&ok);
if( ok ) { if( ok ) {
@ -474,7 +474,7 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
line.startsWith( m_cdrecordBinObject->path ) || line.startsWith( m_cdrecordBinObject->path ) ||
line.startsWith( m_cdrecordBinObject->path.left(m_cdrecordBinObject->path.length()-5) ) ) { line.startsWith( m_cdrecordBinObject->path.left(m_cdrecordBinObject->path.length()-5) ) ) {
// get rid of the path and the following colon and space // get rid of the path and the following colon and space
TQString errStr = line.mid( line.tqfind(':') + 2 ); TQString errStr = line.mid( line.find(':') + 2 );
if( errStr.startsWith( "Drive does not support SAO" ) ) { if( errStr.startsWith( "Drive does not support SAO" ) ) {
emit infoMessage( i18n("DAO (Disk At Once) recording not supported with this writer"), K3bJob::ERROR ); emit infoMessage( i18n("DAO (Disk At Once) recording not supported with this writer"), K3bJob::ERROR );
@ -508,7 +508,7 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
else if( errStr.startsWith("Bad Option") ) { else if( errStr.startsWith("Bad Option") ) {
m_cdrecordError = BAD_OPTION; m_cdrecordError = BAD_OPTION;
// parse option // parse option
int pos = line.tqfind( "Bad Option" ) + 13; int pos = line.find( "Bad Option" ) + 13;
int len = line.length() - pos - 1; int len = line.length() - pos - 1;
emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrecordBinObject->name()).tqarg(line.mid(pos, len)), emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrecordBinObject->name()).tqarg(line.mid(pos, len)),
ERROR ); ERROR );
@ -556,10 +556,10 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
// All other messages // All other messages
// //
else if( line.tqcontains( "at speed" ) ) { else if( line.contains( "at speed" ) ) {
// parse the speed and inform the user if cdrdao switched it down // parse the speed and inform the user if cdrdao switched it down
int pos = line.tqfind( "at speed" ); int pos = line.find( "at speed" );
int pos2 = line.tqfind( "in", pos+9 ); int pos2 = line.find( "in", pos+9 );
int speed = static_cast<int>( line.mid( pos+9, pos2-pos-10 ).toDouble() ); // cdrecord-dvd >= 2.01a25 uses 8.0 and stuff int speed = static_cast<int>( line.mid( pos+9, pos2-pos-10 ).toDouble() ); // cdrecord-dvd >= 2.01a25 uses 8.0 and stuff
if( speed != d->usedSpeed ) { if( speed != d->usedSpeed ) {
emit infoMessage( i18n("Medium or burner do not support writing at %1x speed").tqarg(d->usedSpeed), K3bJob::WARNING ); emit infoMessage( i18n("Medium or burner do not support writing at %1x speed").tqarg(d->usedSpeed), K3bJob::WARNING );
@ -640,10 +640,10 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
if( ok ) if( ok )
emit infoMessage( i18n("Buffer was low 1 time.", "Buffer was low %n times.", num), INFO ); emit infoMessage( i18n("Buffer was low 1 time.", "Buffer was low %n times.", num), INFO );
} }
else if( line.tqcontains("Medium Error") ) { else if( line.contains("Medium Error") ) {
m_cdrecordError = MEDIUM_ERROR; m_cdrecordError = MEDIUM_ERROR;
} }
else if( line.startsWith( "Error trying to open" ) && line.tqcontains( "(Device or resource busy)" ) ) { else if( line.startsWith( "Error trying to open" ) && line.contains( "(Device or resource busy)" ) ) {
m_cdrecordError = DEVICE_BUSY; m_cdrecordError = DEVICE_BUSY;
} }
else { else {

@ -76,7 +76,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
if( line.startsWith( ":-[" ) ) { if( line.startsWith( ":-[" ) ) {
// Error // Error
if( line.tqcontains( "ASC=30h" ) ) if( line.contains( "ASC=30h" ) )
m_error = ERROR_MEDIA; m_error = ERROR_MEDIA;
// :-[ PERFORM OPC failed with SK=3h/ASC=73h/ASCQ=03h // :-[ PERFORM OPC failed with SK=3h/ASC=73h/ASCQ=03h
@ -85,7 +85,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
// :-[ attempt -blank=full or re-run with -dvd-compat -dvd-compat to engage DAO ] // :-[ attempt -blank=full or re-run with -dvd-compat -dvd-compat to engage DAO ]
else if( !m_dao && else if( !m_dao &&
( line.tqcontains( "engage DAO" ) || line.tqcontains( "media is not formatted or unsupported" ) ) ) ( line.contains( "engage DAO" ) || line.contains( "media is not formatted or unsupported" ) ) )
emit infoMessage( i18n("Please try again with writing mode DAO."), K3bJob::ERROR ); emit infoMessage( i18n("Please try again with writing mode DAO."), K3bJob::ERROR );
else if( line.startsWith( ":-[ Failed to change write speed" ) ) { else if( line.startsWith( ":-[ Failed to change write speed" ) ) {
@ -93,10 +93,10 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
} }
} }
else if( line.startsWith( ":-(" ) ) { else if( line.startsWith( ":-(" ) ) {
if( line.tqcontains( "No space left on device" ) ) if( line.contains( "No space left on device" ) )
m_error = ERROR_OVERSIZE; m_error = ERROR_OVERSIZE;
else if( line.tqcontains( "blocks are free" ) && line.tqcontains( "to be written" ) ) { else if( line.contains( "blocks are free" ) && line.contains( "to be written" ) ) {
m_error = ERROR_OVERSIZE; m_error = ERROR_OVERSIZE;
if( k3bcore->globalSettings()->overburn() ) if( k3bcore->globalSettings()->overburn() )
emit infoMessage( i18n("Trying to write more than the official disk capacity"), K3bJob::WARNING ); emit infoMessage( i18n("Trying to write more than the official disk capacity"), K3bJob::WARNING );
@ -116,7 +116,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
else if( line.startsWith( "PERFORM OPC" ) ) { else if( line.startsWith( "PERFORM OPC" ) ) {
m_error = ERROR_OPC; m_error = ERROR_OPC;
} }
else if( line.tqcontains( "flushing cache" ) ) { else if( line.contains( "flushing cache" ) ) {
// here is where we already should stop queriying the buffer fill // here is where we already should stop queriying the buffer fill
// since the device is only used there so far... // since the device is only used there so far...
m_device = 0; m_device = 0;
@ -131,34 +131,34 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
// line = line.mid( dev->blockDeviceName().length() ); // line = line.mid( dev->blockDeviceName().length() );
// if( line.startsWith( "closing..... // if( line.startsWith( "closing.....
else if( line.tqcontains( "closing track" ) ) { else if( line.contains( "closing track" ) ) {
emit newSubTask( i18n("Closing Track") ); emit newSubTask( i18n("Closing Track") );
} }
else if( line.tqcontains( "closing disc" ) ) { else if( line.contains( "closing disc" ) ) {
emit newSubTask( i18n("Closing Disk") ); emit newSubTask( i18n("Closing Disk") );
} }
else if( line.tqcontains( "closing session" ) ) { else if( line.contains( "closing session" ) ) {
emit newSubTask( i18n("Closing Session") ); emit newSubTask( i18n("Closing Session") );
} }
else if( line.tqcontains( "updating RMA" ) ) { else if( line.contains( "updating RMA" ) ) {
emit newSubTask( i18n("Updating RMA") ); emit newSubTask( i18n("Updating RMA") );
emit infoMessage( i18n("Updating RMA") + "...", K3bJob::INFO ); emit infoMessage( i18n("Updating RMA") + "...", K3bJob::INFO );
} }
else if( line.tqcontains( "closing session" ) ) { else if( line.contains( "closing session" ) ) {
emit newSubTask( i18n("Closing Session") ); emit newSubTask( i18n("Closing Session") );
emit infoMessage( i18n("Closing Session") + "...", K3bJob::INFO ); emit infoMessage( i18n("Closing Session") + "...", K3bJob::INFO );
} }
else if( line.tqcontains( "writing lead-out" ) ) { else if( line.contains( "writing lead-out" ) ) {
emit newSubTask( i18n("Writing Lead-out") ); emit newSubTask( i18n("Writing Lead-out") );
emit infoMessage( i18n("Writing the lead-out may take some time."), K3bJob::INFO ); emit infoMessage( i18n("Writing the lead-out may take some time."), K3bJob::INFO );
} }
else if( line.tqcontains( "Quick Grow" ) ) { else if( line.contains( "Quick Grow" ) ) {
emit infoMessage( i18n("Removing reference to lead-out."), K3bJob::INFO ); emit infoMessage( i18n("Removing reference to lead-out."), K3bJob::INFO );
} }
else if( line.tqcontains( "copying volume descriptor" ) ) { else if( line.contains( "copying volume descriptor" ) ) {
emit infoMessage( i18n("Modifying ISO9660 volume descriptor"), K3bJob::INFO ); emit infoMessage( i18n("Modifying ISO9660 volume descriptor"), K3bJob::INFO );
} }
else if( line.tqcontains( "FEATURE 21h is not on" ) ) { else if( line.contains( "FEATURE 21h is not on" ) ) {
if( !m_dao ) { if( !m_dao ) {
// FIXME: it's not only the writer. It may be the media: something like does not support it with this media // FIXME: it's not only the writer. It may be the media: something like does not support it with this media
// da war was mit: wenn einmal formattiert, dann geht nur noch dao oder wenn einmal als overwrite // da war was mit: wenn einmal formattiert, dann geht nur noch dao oder wenn einmal als overwrite
@ -167,12 +167,12 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
emit infoMessage( i18n("Engaging DAO"), K3bJob::WARNING ); emit infoMessage( i18n("Engaging DAO"), K3bJob::WARNING );
} }
} }
else if( ( pos = line.tqfind( "Current Write Speed" ) ) > 0 ) { else if( ( pos = line.find( "Current Write Speed" ) ) > 0 ) {
// parse write speed // parse write speed
// /dev/sr0: "Current Write Speed" is 2.4x1385KBps // /dev/sr0: "Current Write Speed" is 2.4x1385KBps
pos += 24; pos += 24;
int endPos = line.tqfind( 'x', pos+1 ); int endPos = line.find( 'x', pos+1 );
bool ok = true; bool ok = true;
double speed = line.mid( pos, endPos-pos ).toDouble(&ok); double speed = line.mid( pos, endPos-pos ).toDouble(&ok);
if( ok ) if( ok )
@ -182,13 +182,13 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
else else
kdDebug() << "(K3bGrowisofsHandler) parsing error: '" << line.mid( pos, endPos-pos ) << "'" << endl; kdDebug() << "(K3bGrowisofsHandler) parsing error: '" << line.mid( pos, endPos-pos ) << "'" << endl;
} }
else if( (pos = line.tqfind( "RBU" )) > 0 ) { else if( (pos = line.find( "RBU" )) > 0 ) {
// FIXME: use TQRegExp // FIXME: use TQRegExp
// parse ring buffer fill for growisofs >= 6.0 // parse ring buffer fill for growisofs >= 6.0
pos += 4; pos += 4;
int endPos = line.tqfind( '%', pos+1 ); int endPos = line.find( '%', pos+1 );
bool ok = true; bool ok = true;
double val = line.mid( pos, endPos-pos ).toDouble( &ok ); double val = line.mid( pos, endPos-pos ).toDouble( &ok );
if( ok ) { if( ok ) {
@ -199,8 +199,8 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
} }
// device buffer for growisofs >= 7.0 // device buffer for growisofs >= 7.0
pos = line.tqfind( "UBU", pos ); pos = line.find( "UBU", pos );
endPos = line.tqfind( '%', pos+5 ); endPos = line.find( '%', pos+5 );
if( pos > 0 ) { if( pos > 0 ) {
pos += 4; pos += 4;
val = line.mid( pos, endPos-pos ).toDouble( &ok ); val = line.mid( pos, endPos-pos ).toDouble( &ok );

@ -155,7 +155,7 @@ bool K3bGrowisofsWriter::prepareProcess()
{ {
d->growisofsBin = k3bcore->externalBinManager()->binObject( "growisofs" ); d->growisofsBin = k3bcore->externalBinManager()->binObject( "growisofs" );
if( !d->growisofsBin ) { if( !d->growisofsBin ) {
emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("growisofs"), ERROR ); emit infoMessage( i18n("Could not find %1 executable.").tqarg("growisofs"), ERROR );
return false; return false;
} }
@ -465,7 +465,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line )
{ {
emit debuggingOutput( d->growisofsBin->name(), line ); emit debuggingOutput( d->growisofsBin->name(), line );
if( line.tqcontains( "remaining" ) ) { if( line.contains( "remaining" ) ) {
if( !d->writingStarted ) { if( !d->writingStarted ) {
d->writingStarted = true; d->writingStarted = true;
@ -473,10 +473,10 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line )
} }
// parse progress // parse progress
int pos = line.tqfind( "/" ); int pos = line.find( "/" );
unsigned long long done = line.left( pos ).toULongLong(); unsigned long long done = line.left( pos ).toULongLong();
bool ok = true; bool ok = true;
d->overallSizeFromOutput = line.mid( pos+1, line.tqfind( "(", pos ) - pos - 1 ).toULongLong( &ok ); d->overallSizeFromOutput = line.mid( pos+1, line.find( "(", pos ) - pos - 1 ).toULongLong( &ok );
if( d->firstSizeFromOutput == -1 ) if( d->firstSizeFromOutput == -1 )
d->firstSizeFromOutput = done; d->firstSizeFromOutput = done;
done -= d->firstSizeFromOutput; done -= d->firstSizeFromOutput;
@ -495,10 +495,10 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line )
} }
// try parsing write speed (since growisofs 5.11) // try parsing write speed (since growisofs 5.11)
pos = line.tqfind( '@' ); pos = line.find( '@' );
if( pos != -1 ) { if( pos != -1 ) {
pos += 1; pos += 1;
double speed = line.mid( pos, line.tqfind( 'x', pos ) - pos ).toDouble(&ok); double speed = line.mid( pos, line.find( 'x', pos ) - pos ).toDouble(&ok);
if( ok ) { if( ok ) {
if( d->lastWritingSpeed != speed ) if( d->lastWritingSpeed != speed )
emit writeSpeed( (int)(speed*1385.0), 1385 ); emit writeSpeed( (int)(speed*1385.0), 1385 );
@ -506,7 +506,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line )
} }
else else
kdDebug() << "(K3bGrowisofsWriter) speed parsing failed: '" kdDebug() << "(K3bGrowisofsWriter) speed parsing failed: '"
<< line.mid( pos, line.tqfind( 'x', pos ) - pos ) << "'" << endl; << line.mid( pos, line.find( 'x', pos ) - pos ) << "'" << endl;
} }
else { else {
d->speedEst->dataWritten( done/1024 ); d->speedEst->dataWritten( done/1024 );
@ -514,7 +514,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line )
} }
else else
kdDebug() << "(K3bGrowisofsWriter) progress parsing failed: '" kdDebug() << "(K3bGrowisofsWriter) progress parsing failed: '"
<< line.mid( pos+1, line.tqfind( "(", pos ) - pos - 1 ).stripWhiteSpace() << "'" << endl; << line.mid( pos+1, line.find( "(", pos ) - pos - 1 ).stripWhiteSpace() << "'" << endl;
} }
// else // else

@ -121,7 +121,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem )
TQDomNodeList nodes = rootElem->childNodes(); TQDomNodeList nodes = rootElem->childNodes();
if( nodes.item(0).nodeName() != "general" ) { if( nodes.item(0).nodeName() != "general" ) {
kdDebug() << "(K3bMovixDoc) could not tqfind 'general' section." << endl; kdDebug() << "(K3bMovixDoc) could not find 'general' section." << endl;
return false; return false;
} }
if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) if( !readGeneralDocumentData( nodes.item(0).toElement() ) )
@ -131,7 +131,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem )
// parse options // parse options
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(1).nodeName() != "data_options" ) { if( nodes.item(1).nodeName() != "data_options" ) {
kdDebug() << "(K3bMovixDoc) could not tqfind 'data_options' section." << endl; kdDebug() << "(K3bMovixDoc) could not find 'data_options' section." << endl;
return false; return false;
} }
if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) if( !loadDocumentDataOptions( nodes.item(1).toElement() ) )
@ -143,7 +143,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem )
// parse header // parse header
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(2).nodeName() != "data_header" ) { if( nodes.item(2).nodeName() != "data_header" ) {
kdDebug() << "(K3bMovixDoc) could not tqfind 'data_header' section." << endl; kdDebug() << "(K3bMovixDoc) could not find 'data_header' section." << endl;
return false; return false;
} }
if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) if( !loadDocumentDataHeader( nodes.item(2).toElement() ) )
@ -155,7 +155,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem )
// parse movix options // parse movix options
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(3).nodeName() != "movix_options" ) { if( nodes.item(3).nodeName() != "movix_options" ) {
kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_options' section." << endl; kdDebug() << "(K3bMovixDoc) could not find 'movix_options' section." << endl;
return false; return false;
} }
@ -203,7 +203,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem )
// parse files // parse files
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if( nodes.item(4).nodeName() != "movix_files" ) { if( nodes.item(4).nodeName() != "movix_files" ) {
kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_files' section." << endl; kdDebug() << "(K3bMovixDoc) could not find 'movix_files' section." << endl;
return false; return false;
} }
@ -370,7 +370,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item )
{ {
// check if it's a movix item // check if it's a movix item
if( K3bMovixFileItem* fi = dynamic_cast<K3bMovixFileItem*>(item) ) if( K3bMovixFileItem* fi = dynamic_cast<K3bMovixFileItem*>(item) )
if( m_movixFiles.tqcontainsRef( fi ) ) { if( m_movixFiles.containsRef( fi ) ) {
emit movixItemRemoved( fi ); emit movixItemRemoved( fi );
m_movixFiles.removeRef( fi ); m_movixFiles.removeRef( fi );
setModified(true); setModified(true);
@ -380,7 +380,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item )
int K3bMovixDoc::indexOf( K3bMovixFileItem* item ) int K3bMovixDoc::indexOf( K3bMovixFileItem* item )
{ {
return m_movixFiles.tqfindRef(item)+1; return m_movixFiles.findRef(item)+1;
} }
@ -390,12 +390,12 @@ void K3bMovixDoc::moveMovixItem( K3bMovixFileItem* item, K3bMovixFileItem* itemA
return; return;
// set the current item to track // set the current item to track
m_movixFiles.tqfindRef( item ); m_movixFiles.findRef( item );
// take the current item // take the current item
item = m_movixFiles.take(); item = m_movixFiles.take();
// if after == 0 tqfindRef returnes -1 // if after == 0 findRef returnes -1
int pos = m_movixFiles.tqfindRef( itemAfter ); int pos = m_movixFiles.findRef( itemAfter );
m_movixFiles.insert( pos+1, item ); m_movixFiles.insert( pos+1, item );
emit newMovixFileItems(); emit newMovixFileItems();

@ -204,7 +204,7 @@ bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const TQString& originalPath
if( TQTextStream* s = d->isolinuxConfigFile->textStream() ) { if( TQTextStream* s = d->isolinuxConfigFile->textStream() ) {
// now open the default isolinux.cfg and copy everything except the first line which tqcontains // now open the default isolinux.cfg and copy everything except the first line which contains
// the default boot label // the default boot label
TQFile f( originalPath ); TQFile f( originalPath );
if( f.open( IO_ReadOnly ) ) { if( f.open( IO_ReadOnly ) ) {
@ -464,7 +464,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath )
TQStringList docPathSections = TQStringList::split( '/', docPath ); TQStringList docPathSections = TQStringList::split( '/', docPath );
K3bDirItem* dir = d->doc->root(); K3bDirItem* dir = d->doc->root();
for( TQStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) { for( TQStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) {
K3bDataItem* next = dir->tqfind( *it ); K3bDataItem* next = dir->find( *it );
if( !next ) if( !next )
dir = new K3bDirItem( *it, d->doc, dir ); dir = new K3bDirItem( *it, d->doc, dir );
else if( next->isDir() ) else if( next->isDir() )
@ -480,7 +480,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath )
K3bDirItem* delDir = dir; K3bDirItem* delDir = dir;
while( delDir->tqparent() != d->doc->root() ) while( delDir->tqparent() != d->doc->root() )
delDir = delDir->tqparent(); delDir = delDir->tqparent();
if( d->newMovixItems.tqfindRef( delDir ) == -1 ) if( d->newMovixItems.findRef( delDir ) == -1 )
d->newMovixItems.append( delDir ); d->newMovixItems.append( delDir );
} }

@ -60,7 +60,7 @@ TQString K3bMovixFileItem::subTitleFileName( const TQString& name )
{ {
// remove ending from k3bName // remove ending from k3bName
TQString subName = name; TQString subName = name;
int pos = subName.tqfindRev("."); int pos = subName.findRev(".");
if( pos > 0 ) if( pos > 0 )
subName.truncate( pos ); subName.truncate( pos );
subName += ".sub"; subName += ".sub";

@ -79,7 +79,7 @@ bool K3bMovixProgram::scanNewEMovix( K3bMovixBin* bin, const TQString& path )
TQStringList files = bin->files(); TQStringList files = bin->files();
for( TQStringList::iterator it = files.begin(); for( TQStringList::iterator it = files.begin();
it != files.end(); ++it ) { it != files.end(); ++it ) {
if( (*it).tqcontains( "isolinux.cfg" ) ) { if( (*it).contains( "isolinux.cfg" ) ) {
bin->m_supportedBootLabels = determineSupportedBootLabels( TQStringList::split( " ", *it )[1] ); bin->m_supportedBootLabels = determineSupportedBootLabels( TQStringList::split( " ", *it )[1] );
break; break;
} }
@ -105,22 +105,22 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const TQString& path )
// //
TQDir dir( bin->movixDataDir() ); TQDir dir( bin->movixDataDir() );
TQStringList subdirs = dir.entryList( TQDir::Dirs ); TQStringList subdirs = dir.entryList( TQDir::Dirs );
if( !subdirs.tqcontains( "boot-messages" ) ) { if( !subdirs.contains( "boot-messages" ) ) {
kdDebug() << "(K3bMovixProgram) could not find subdir 'boot-messages'" << endl; kdDebug() << "(K3bMovixProgram) could not find subdir 'boot-messages'" << endl;
delete bin; delete bin;
return false; return false;
} }
if( !subdirs.tqcontains( "isolinux" ) ) { if( !subdirs.contains( "isolinux" ) ) {
kdDebug() << "(K3bMovixProgram) could not find subdir 'isolinux'" << endl; kdDebug() << "(K3bMovixProgram) could not find subdir 'isolinux'" << endl;
delete bin; delete bin;
return false; return false;
} }
if( !subdirs.tqcontains( "movix" ) ) { if( !subdirs.contains( "movix" ) ) {
kdDebug() << "(K3bMovixProgram) could not find subdir 'movix'" << endl; kdDebug() << "(K3bMovixProgram) could not find subdir 'movix'" << endl;
delete bin; delete bin;
return false; return false;
} }
if( !subdirs.tqcontains( "mplayer-fonts" ) ) { if( !subdirs.contains( "mplayer-fonts" ) ) {
kdDebug() << "(K3bMovixProgram) could not find subdir 'mplayer-fonts'" << endl; kdDebug() << "(K3bMovixProgram) could not find subdir 'mplayer-fonts'" << endl;
delete bin; delete bin;
return false; return false;
@ -241,7 +241,7 @@ TQString K3bMovixBin::subtitleFontDir( const TQString& font ) const
{ {
if( font == i18n("none" ) ) if( font == i18n("none" ) )
return ""; return "";
else if( m_supportedSubtitleFonts.tqcontains( font ) ) else if( m_supportedSubtitleFonts.contains( font ) )
return path + "/mplayer-fonts/" + font; return path + "/mplayer-fonts/" + font;
else else
return ""; return "";
@ -252,7 +252,7 @@ TQString K3bMovixBin::languageDir( const TQString& lang ) const
{ {
if( lang == i18n("default") ) if( lang == i18n("default") )
return languageDir( "en" ); return languageDir( "en" );
else if( m_supportedLanguages.tqcontains( lang ) ) else if( m_supportedLanguages.contains( lang ) )
return path + "/boot-messages/" + lang; return path + "/boot-messages/" + lang;
else else
return ""; return "";

@ -336,7 +336,7 @@ void K3bVcdDoc::removeTrack( K3bVcdTrack* track )
} }
// set the current item to track // set the current item to track
if ( m_tracks->tqfindRef( track ) >= 0 ) { if ( m_tracks->findRef( track ) >= 0 ) {
// take the current item // take the current item
track = m_tracks->take(); track = m_tracks->take();
@ -374,12 +374,12 @@ void K3bVcdDoc::moveTrack( const K3bVcdTrack* track, const K3bVcdTrack* after )
return ; return ;
// set the current item to track // set the current item to track
m_tracks->tqfindRef( track ); m_tracks->findRef( track );
// take the current item // take the current item
track = m_tracks->take(); track = m_tracks->take();
// if after == 0 tqfindRef returnes -1 // if after == 0 findRef returnes -1
int pos = m_tracks->tqfindRef( after ); int pos = m_tracks->findRef( after );
m_tracks->insert( pos + 1, track ); m_tracks->insert( pos + 1, track );
// reorder pbc tracks // reorder pbc tracks
@ -645,8 +645,8 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root )
track ->setPlayTime( trackElem.attribute( "playtime", "1" ).toInt() ); track ->setPlayTime( trackElem.attribute( "playtime", "1" ).toInt() );
track ->setWaitTime( trackElem.attribute( "waittime", "2" ).toInt() ); track ->setWaitTime( trackElem.attribute( "waittime", "2" ).toInt() );
track ->setReactivity( trackElem.attribute( "reactivity", "0" ).toInt() ); track ->setReactivity( trackElem.attribute( "reactivity", "0" ).toInt() );
track -> setPbcNumKeys( ( trackElem.attribute( "numkeys", "yes" ).tqcontains( "yes" ) ) ? true : false ); track -> setPbcNumKeys( ( trackElem.attribute( "numkeys", "yes" ).contains( "yes" ) ) ? true : false );
track -> setPbcNumKeysUserdefined( ( trackElem.attribute( "userdefinednumkeys", "no" ).tqcontains( "yes" ) ) ? true : false ); track -> setPbcNumKeysUserdefined( ( trackElem.attribute( "userdefinednumkeys", "no" ).contains( "yes" ) ) ? true : false );
addTrack( track, m_tracks->count() ); addTrack( track, m_tracks->count() );
} }
@ -667,7 +667,7 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root )
for ( uint i = 0; i < trackNodes.length(); i++ ) { for ( uint i = 0; i < trackNodes.length(); i++ ) {
TQDomElement trackElem = trackNodes.item( i ).toElement(); TQDomElement trackElem = trackNodes.item( i ).toElement();
TQString name = trackElem.tagName(); TQString name = trackElem.tagName();
if ( name.tqcontains( "pbc" ) ) { if ( name.contains( "pbc" ) ) {
if ( trackElem.hasAttribute ( "type" ) ) { if ( trackElem.hasAttribute ( "type" ) ) {
type = trackElem.attribute ( "type" ).toInt(); type = trackElem.attribute ( "type" ).toInt();
if ( trackElem.hasAttribute ( "pbctrack" ) ) { if ( trackElem.hasAttribute ( "pbctrack" ) ) {
@ -688,7 +688,7 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root )
} }
} }
} }
} else if ( name.tqcontains( "numkeys" ) ) { } else if ( name.contains( "numkeys" ) ) {
if ( trackElem.hasAttribute ( "key" ) ) { if ( trackElem.hasAttribute ( "key" ) ) {
int key = trackElem.attribute ( "key" ).toInt(); int key = trackElem.attribute ( "key" ).toInt();
if ( trackElem.hasAttribute ( "val" ) ) { if ( trackElem.hasAttribute ( "val" ) ) {

@ -133,7 +133,7 @@ void K3bVcdJob::start()
emit burning( false ); emit burning( false );
m_canceled = false; m_canceled = false;
int pos = TQString( m_doc->vcdImage() ).tqfind( ".bin", TQString( m_doc->vcdImage() ).length() - 4 ); int pos = TQString( m_doc->vcdImage() ).find( ".bin", TQString( m_doc->vcdImage() ).length() - 4 );
if ( pos > 0 ) { if ( pos > 0 ) {
m_cueFile = m_doc->vcdImage().left( pos ) + ".cue"; m_cueFile = m_doc->vcdImage().left( pos ) + ".cue";
} else { } else {
@ -184,7 +184,7 @@ void K3bVcdJob::vcdxBuild()
const K3bExternalBin* bin = k3bcore ->externalBinManager() ->binObject( "vcdxbuild" ); const K3bExternalBin* bin = k3bcore ->externalBinManager() ->binObject( "vcdxbuild" );
if ( !bin ) { if ( !bin ) {
kdDebug() << "(K3bVcdJob) could not find vcdxbuild executable" << endl; kdDebug() << "(K3bVcdJob) could not find vcdxbuild executable" << endl;
emit infoMessage( i18n( "Could not tqfind %1 executable." ).tqarg( "vcdxbuild" ), K3bJob::ERROR ); emit infoMessage( i18n( "Could not find %1 executable." ).tqarg( "vcdxbuild" ), K3bJob::ERROR );
emit infoMessage( i18n( "To create VideoCDs you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO ); emit infoMessage( i18n( "To create VideoCDs you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO );
emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO ); emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO );
cancelAll(); cancelAll();
@ -287,7 +287,7 @@ void K3bVcdJob::slotParseVcdxBuildOutput( KProcess*, char* output, int len )
if ( oper == "scan" ) { if ( oper == "scan" ) {
// Scan Video Files // Scan Video Files
if ( m_stage == stageUnknown || pos < m_bytesFinished ) { if ( m_stage == stageUnknown || pos < m_bytesFinished ) {
const uint index = el.attribute( "id" ).tqreplace( TQRegExp( "sequence-" ), "" ).toUInt(); const uint index = el.attribute( "id" ).replace( TQRegExp( "sequence-" ), "" ).toUInt();
m_currentWrittenTrack = m_doc->at( m_currentWrittenTrackNumber ); m_currentWrittenTrack = m_doc->at( m_currentWrittenTrackNumber );
emit newSubTask( i18n( "Scanning video file %1 of %2 (%3)" ).tqarg( index + 1 ).tqarg( doc() ->numOfTracks() ).tqarg( m_currentWrittenTrack->fileName() ) ); emit newSubTask( i18n( "Scanning video file %1 of %2 (%3)" ).tqarg( index + 1 ).tqarg( doc() ->numOfTracks() ).tqarg( m_currentWrittenTrack->fileName() ) );
@ -509,28 +509,28 @@ void K3bVcdJob::slotWriterJobFinished( bool success )
void K3bVcdJob::parseInformation( const TQString &text ) void K3bVcdJob::parseInformation( const TQString &text )
{ {
// parse warning // parse warning
if ( text.tqcontains( "mpeg user scan data: one or more BCD fields out of range for" ) ) { if ( text.contains( "mpeg user scan data: one or more BCD fields out of range for" ) ) {
int index = text.tqfind( " for" ); int index = text.find( " for" );
emit infoMessage( i18n( "One or more BCD fields out of range for %1" ).tqarg( text.mid( index + 4 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "One or more BCD fields out of range for %1" ).tqarg( text.mid( index + 4 ).stripWhiteSpace() ), K3bJob::WARNING );
} else if ( text.tqcontains( "mpeg user scan data: from now on, scan information data errors will not be reported anymore" ) ) { } else if ( text.contains( "mpeg user scan data: from now on, scan information data errors will not be reported anymore" ) ) {
emit infoMessage( i18n( "From now on, scan information data errors will not be reported anymore" ), K3bJob::INFO ); emit infoMessage( i18n( "From now on, scan information data errors will not be reported anymore" ), K3bJob::INFO );
emit infoMessage( i18n( "Consider enabling the 'update scan offsets' option, if it is not enabled already." ), K3bJob::INFO ); emit infoMessage( i18n( "Consider enabling the 'update scan offsets' option, if it is not enabled already." ), K3bJob::INFO );
} else if ( text.tqcontains( "APS' pts seems out of order (actual pts" ) ) { } else if ( text.contains( "APS' pts seems out of order (actual pts" ) ) {
int index = text.tqfind( "(actual pts" ); int index = text.find( "(actual pts" );
int index2 = text.tqfind( ", last seen pts" ); int index2 = text.find( ", last seen pts" );
int index3 = text.tqfind( ") -- ignoring this aps" ); int index3 = text.find( ") -- ignoring this aps" );
emit infoMessage( i18n( "APS' pts seems out of order (actual pts %1, last seen pts %2)" ).tqarg( text.mid( index + 12, index2 - index - 12 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 14, index3 - index2 - 14 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "APS' pts seems out of order (actual pts %1, last seen pts %2)" ).tqarg( text.mid( index + 12, index2 - index - 12 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 14, index3 - index2 - 14 ).stripWhiteSpace() ), K3bJob::WARNING );
emit infoMessage( i18n( "Ignoring this aps" ), K3bJob::INFO ); emit infoMessage( i18n( "Ignoring this aps" ), K3bJob::INFO );
} else if ( text.tqcontains( "bad packet at packet" ) ) { } else if ( text.contains( "bad packet at packet" ) ) {
int index = text.tqfind( "at packet #" ); int index = text.find( "at packet #" );
int index2 = text.tqfind( "(stream byte offset" ); int index2 = text.find( "(stream byte offset" );
int index3 = text.tqfind( ") -- remaining " ); int index3 = text.find( ") -- remaining " );
int index4 = text.tqfind( "bytes of stream will be ignored" ); int index4 = text.find( "bytes of stream will be ignored" );
emit infoMessage( i18n( "Bad packet at packet #%1 (stream byte offset %2)" ).tqarg( text.mid( index + 11, index2 - index - 11 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 19, index3 - index2 - 19 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "Bad packet at packet #%1 (stream byte offset %2)" ).tqarg( text.mid( index + 11, index2 - index - 11 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 19, index3 - index2 - 19 ).stripWhiteSpace() ), K3bJob::WARNING );
emit infoMessage( i18n( "Remaining %1 bytes of stream will be ignored." ).tqarg( text.mid( index3 + 15, index4 - index3 - 15 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "Remaining %1 bytes of stream will be ignored." ).tqarg( text.mid( index3 + 15, index4 - index3 - 15 ).stripWhiteSpace() ), K3bJob::WARNING );

@ -65,7 +65,7 @@ KIO::filesize_t K3bVcdTrack::size() const
int K3bVcdTrack::index() const int K3bVcdTrack::index() const
{ {
int i = m_parent->tqfind( this ); int i = m_parent->find( this );
if ( i < 0 ) if ( i < 0 )
kdDebug() << "(K3bVcdTrack) I'm not part of my tqparent!" << endl; kdDebug() << "(K3bVcdTrack) I'm not part of my tqparent!" << endl;
return i; return i;
@ -119,23 +119,23 @@ void K3bVcdTrack::delRefFromUs()
void K3bVcdTrack::setPbcTrack( int which, K3bVcdTrack* pbctrack ) void K3bVcdTrack::setPbcTrack( int which, K3bVcdTrack* pbctrack )
{ {
kdDebug() << "K3bVcdTrack::setPbcTrack " << which << ", " << pbctrack << endl; kdDebug() << "K3bVcdTrack::setPbcTrack " << which << ", " << pbctrack << endl;
m_pbctrackmap.tqreplace( which, pbctrack ); m_pbctrackmap.replace( which, pbctrack );
} }
void K3bVcdTrack::setPbcNonTrack( int which, int type ) void K3bVcdTrack::setPbcNonTrack( int which, int type )
{ {
kdDebug() << "K3bVcdTrack::setNonPbcTrack " << which << ", " << type << endl; kdDebug() << "K3bVcdTrack::setNonPbcTrack " << which << ", " << type << endl;
m_pbcnontrackmap.tqreplace( which, type ); m_pbcnontrackmap.replace( which, type );
} }
void K3bVcdTrack::setUserDefined( int which, bool ud ) void K3bVcdTrack::setUserDefined( int which, bool ud )
{ {
m_pbcusrdefmap.tqreplace( which, ud ); m_pbcusrdefmap.replace( which, ud );
} }
K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which ) K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which )
{ {
if ( m_pbctrackmap.tqfind( which ) == m_pbctrackmap.end() ) if ( m_pbctrackmap.find( which ) == m_pbctrackmap.end() )
return 0; return 0;
else else
return m_pbctrackmap[ which ]; return m_pbctrackmap[ which ];
@ -143,7 +143,7 @@ K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which )
int K3bVcdTrack::getNonPbcTrack( const int& which ) int K3bVcdTrack::getNonPbcTrack( const int& which )
{ {
if ( m_pbcnontrackmap.tqfind( which ) == m_pbcnontrackmap.end() ) if ( m_pbcnontrackmap.find( which ) == m_pbcnontrackmap.end() )
return 0; return 0;
else else
return m_pbcnontrackmap[ which ]; return m_pbcnontrackmap[ which ];

@ -210,7 +210,7 @@ void K3bVideoDvdImager::cleanup()
void K3bVideoDvdImager::slotReceivedStderr( const TQString& line ) void K3bVideoDvdImager::slotReceivedStderr( const TQString& line )
{ {
if( line.tqcontains( "Unable to make a DVD-Video image" ) ) { if( line.contains( "Unable to make a DVD-Video image" ) ) {
emit infoMessage( i18n("The project does not contain all necessary VideoDVD files."), WARNING ); emit infoMessage( i18n("The project does not contain all necessary VideoDVD files."), WARNING );
emit infoMessage( i18n("The resulting DVD will most likely not be playable on a Hifi DVD player."), WARNING ); emit infoMessage( i18n("The resulting DVD will most likely not be playable on a Hifi DVD player."), WARNING );
} }

@ -189,7 +189,7 @@ class K3bCdparanoiaLibData
long sector() const { return m_currentSector; } long sector() const { return m_currentSector; }
static K3bCdparanoiaLibData* data( K3bDevice::Device* dev ) { static K3bCdparanoiaLibData* data( K3bDevice::Device* dev ) {
TQMap<K3bDevice::Device*, K3bCdparanoiaLibData*>::const_iterator it = s_dataMap.tqfind( dev ); TQMap<K3bDevice::Device*, K3bCdparanoiaLibData*>::const_iterator it = s_dataMap.find( dev );
if( it == s_dataMap.constEnd() ) if( it == s_dataMap.constEnd() )
return new K3bCdparanoiaLibData( dev ); return new K3bCdparanoiaLibData( dev );
else else

@ -96,7 +96,7 @@ void K3bDeviceComboBox::addDevice( K3bDevice::Device* dev )
void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev ) void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev )
{ {
if( dev ) { if( dev ) {
if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { if( d->deviceIndexMap.contains(dev->devicename()) ) {
// let's make it easy and recreate the whole list // let's make it easy and recreate the whole list
K3bDevice::Device* selDev = selectedDevice(); K3bDevice::Device* selDev = selectedDevice();
TQPtrList<K3bDevice::Device> devices; TQPtrList<K3bDevice::Device> devices;
@ -126,7 +126,7 @@ void K3bDeviceComboBox::refreshDevices( const TQPtrList<K3bDevice::Device>& list
{ {
K3bDevice::Device* selDev = selectedDevice(); K3bDevice::Device* selDev = selectedDevice();
clear(); clear();
if( !list.tqcontainsRef( selDev ) ) if( !list.containsRef( selDev ) )
selDev = 0; selDev = 0;
addDevices( list ); addDevices( list );
setSelectedDevice( selDev ); setSelectedDevice( selDev );
@ -136,7 +136,7 @@ void K3bDeviceComboBox::refreshDevices( const TQPtrList<K3bDevice::Device>& list
void K3bDeviceComboBox::setSelectedDevice( K3bDevice::Device* dev ) void K3bDeviceComboBox::setSelectedDevice( K3bDevice::Device* dev )
{ {
if( dev ) { if( dev ) {
if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { if( d->deviceIndexMap.contains(dev->devicename()) ) {
setCurrentItem( d->deviceIndexMap[dev->devicename()] ); setCurrentItem( d->deviceIndexMap[dev->devicename()] );
emit selectionChanged( dev ); emit selectionChanged( dev );
} }
@ -162,7 +162,7 @@ void K3bDeviceComboBox::slotDeviceManagerChanged( K3bDevice::DeviceManager* dm )
{ {
unsigned int i = 0; unsigned int i = 0;
while( i < d->devices.size() ) { while( i < d->devices.size() ) {
if( !dm->allDevices().tqcontainsRef( d->devices[i] ) ) { if( !dm->allDevices().containsRef( d->devices[i] ) ) {
removeDevice( d->devices[i] ); removeDevice( d->devices[i] );
i = 0; i = 0;
} }

@ -25,7 +25,7 @@ bool K3bExceptions::brokenDaoAudio( K3bDevice::Device* dev )
if( dev->vendor().upper().startsWith("HL-DT-ST") ) if( dev->vendor().upper().startsWith("HL-DT-ST") )
if( dev->description().upper().startsWith("RW/DVD GCC-4320B") || if( dev->description().upper().startsWith("RW/DVD GCC-4320B") ||
dev->description().upper().tqcontains("GCE-8520B") ) dev->description().upper().contains("GCE-8520B") )
return true; return true;
if( dev->vendor().upper().startsWith("PHILIPS") && if( dev->vendor().upper().startsWith("PHILIPS") &&
@ -35,7 +35,7 @@ bool K3bExceptions::brokenDaoAudio( K3bDevice::Device* dev )
if( dev->vendor().upper().startsWith("LITE-ON") ) if( dev->vendor().upper().startsWith("LITE-ON") )
if( dev->description().upper().startsWith("LTR-32123S") || if( dev->description().upper().startsWith("LTR-32123S") ||
dev->description().upper().startsWith("LTR-40125S") || dev->description().upper().startsWith("LTR-40125S") ||
dev->description().upper().tqcontains("LTC-48161H") || dev->description().upper().contains("LTC-48161H") ||
dev->description().upper().startsWith("DVDRW LDW-811S") ) dev->description().upper().startsWith("DVDRW LDW-811S") )
return true; return true;

@ -135,7 +135,7 @@ TQString K3bFileSystemInfo::fixupPath( const TQString& path )
{ {
TQString s = K3b::fixupPath( path ); TQString s = K3b::fixupPath( path );
if( type() == K3bFileSystemInfo::FS_FAT ) if( type() == K3bFileSystemInfo::FS_FAT )
return s.tqreplace( TQRegExp("[\"\\?\\*/\\\\[\\]\\|\\=\\:;]"), "_" ); return s.replace( TQRegExp("[\"\\?\\*/\\\\[\\]\\|\\=\\:;]"), "_" );
else else
return s; return s;
} }

@ -59,7 +59,7 @@ int K3bIntMapComboBox::selectedValue() const
void K3bIntMapComboBox::setSelectedValue( int value ) void K3bIntMapComboBox::setSelectedValue( int value )
{ {
if( d->valueIndexMap.tqcontains( value ) ) if( d->valueIndexMap.contains( value ) )
KComboBox::setCurrentItem( d->valueIndexMap[value] ); KComboBox::setCurrentItem( d->valueIndexMap[value] );
} }
@ -75,7 +75,7 @@ void K3bIntMapComboBox::clear()
bool K3bIntMapComboBox::insertItem( int value, const TQString& text, const TQString& description, int index ) bool K3bIntMapComboBox::insertItem( int value, const TQString& text, const TQString& description, int index )
{ {
if( d->valueIndexMap.tqcontains( value ) ) if( d->valueIndexMap.contains( value ) )
return false; return false;
// FIXME: allow inserition at any index // FIXME: allow inserition at any index

@ -115,7 +115,7 @@ int K3bIso9660::isofs_callback( struct iso_directory_record *idr, void *udata )
path = isoPath; path = isoPath;
// remove the version field // remove the version field
int pos = path.tqfind( ';' ); int pos = path.find( ';' );
if( pos > 0 ) if( pos > 0 )
path.truncate( pos ); path.truncate( pos );
} }
@ -367,11 +367,11 @@ K3bIso9660Entry* K3bIso9660Directory::entry( const TQString& n )
name.truncate( name.length()-1 ); name.truncate( name.length()-1 );
} }
int pos = name.tqfind( '/' ); int pos = name.find( '/' );
while( pos == 0 ) { while( pos == 0 ) {
if( name.length() > 1 ) { if( name.length() > 1 ) {
name = name.mid( 1 ); // remove leading slash name = name.mid( 1 ); // remove leading slash
pos = name.tqfind( '/' ); // look again pos = name.find( '/' ); // look again
} }
else // "/" else // "/"
return this; return this;
@ -405,11 +405,11 @@ K3bIso9660Entry* K3bIso9660Directory::iso9660Entry( const TQString& n )
name.truncate( name.length()-1 ); name.truncate( name.length()-1 );
} }
int pos = name.tqfind( '/' ); int pos = name.find( '/' );
while( pos == 0 ) { while( pos == 0 ) {
if( name.length() > 1 ) { if( name.length() > 1 ) {
name = name.mid( 1 ); // remove leading slash name = name.mid( 1 ); // remove leading slash
pos = name.tqfind( '/' ); // look again pos = name.find( '/' ); // look again
} }
else // "/" else // "/"
return this; return this;

@ -734,7 +734,7 @@ TQWidget* K3bListView::prepareEditor( K3bListViewItem* item, int col )
} }
else { else {
m_editorComboBox->insertStringList( item->comboStrings(col) ); m_editorComboBox->insertStringList( item->comboStrings(col) );
int current = item->comboStrings(col).tqfindIndex( item->text(col) ); int current = item->comboStrings(col).findIndex( item->text(col) );
if( current != -1 ) if( current != -1 )
m_editorComboBox->setCurrentItem( current ); m_editorComboBox->setCurrentItem( current );
} }
@ -752,7 +752,7 @@ TQWidget* K3bListView::prepareEditor( K3bListViewItem* item, int col )
m_editorLineEdit->setText( txt ); m_editorLineEdit->setText( txt );
// select the edit text (handle extensions while doing so) // select the edit text (handle extensions while doing so)
int pos = txt.tqfindRev( '.' ); int pos = txt.findRev( '.' );
if( pos > 0 ) if( pos > 0 )
m_editorLineEdit->setSelection( 0, pos ); m_editorLineEdit->setSelection( 0, pos );
else else
@ -1258,7 +1258,7 @@ KPixmap K3bListView::createDragPixmap( const TQPtrList<TQListViewItem>& items )
bool alreadyDrawing = false; bool alreadyDrawing = false;
TQRect r = tqitemRect( item ); TQRect r = tqitemRect( item );
if( r.isValid() ) { if( r.isValid() ) {
if( items.tqcontainsRef( item ) ) { if( items.containsRef( item ) ) {
// paint all columns // paint all columns
int x = 0; int x = 0;
for( int i = 0; i < columns(); ++i ) { for( int i = 0; i < columns(); ++i ) {

@ -134,7 +134,7 @@ int K3bMsfEdit::currentStepValue() const
TQString text = editor()->text(); TQString text = editor()->text();
if( text.length() == 8 ) { if( text.length() == 8 ) {
text = text.mid( editor()->cursorPosition() ); text = text.mid( editor()->cursorPosition() );
int num = text.tqcontains( ':' ); int num = text.contains( ':' );
if( num == 1 ) if( num == 1 )
val = 75; val = 75;
else if( num == 2 ) else if( num == 2 )

@ -81,10 +81,10 @@ public:
TQRect titleTipRect( startPos, 0, m_label->d->displayTitleLength, m_label->height() ); TQRect titleTipRect( startPos, 0, m_label->d->displayTitleLength, m_label->height() );
TQRect subTitleTipRect( startPos + m_label->d->displayTitleLength, 0, m_label->d->displaySubTitleLength, m_label->height() ); TQRect subTitleTipRect( startPos + m_label->d->displayTitleLength, 0, m_label->d->displaySubTitleLength, m_label->height() );
if( titleTipRect.tqcontains( pos ) && if( titleTipRect.contains( pos ) &&
m_label->d->displayTitle != m_label->d->title ) m_label->d->displayTitle != m_label->d->title )
tip( titleTipRect, m_label->d->title ); tip( titleTipRect, m_label->d->title );
else if( subTitleTipRect.tqcontains( pos ) && else if( subTitleTipRect.contains( pos ) &&
m_label->d->displaySubTitle != m_label->d->subTitle ) m_label->d->displaySubTitle != m_label->d->subTitle )
tip( subTitleTipRect, m_label->d->subTitle ); tip( subTitleTipRect, m_label->d->subTitle );
} }

@ -82,7 +82,7 @@ void KCutLabel::cutTextToLabel()
TQToolTip::remove( this ); TQToolTip::remove( this );
TQToolTip::hide(); TQToolTip::hide();
if( m_fullText.tqcontains( "\n" ) ) { if( m_fullText.contains( "\n" ) ) {
TQString newText; TQString newText;
TQStringList lines = TQStringList::split( "\n", m_fullText ); TQStringList lines = TQStringList::split( "\n", m_fullText );
for( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { for( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -84,7 +84,7 @@ namespace K3bDevice
private: private:
// TODO: remove this (see above) // TODO: remove this (see above)
void fixup( TQString& s ) { s.tqreplace( '/', "_" ); s.tqreplace( '\"', "_" ); } void fixup( TQString& s ) { s.replace( '/', "_" ); s.replace( '\"', "_" ); }
TQString m_title; TQString m_title;
TQString m_performer; TQString m_performer;
@ -177,7 +177,7 @@ namespace K3bDevice
private: private:
// TODO: remove this (see above) // TODO: remove this (see above)
void fixup( TQString& s ) { s.tqreplace( '/', "_" ); s.tqreplace( '\"', "_" ); } void fixup( TQString& s ) { s.replace( '/', "_" ); s.replace( '\"', "_" ); }
const TQString& textForPackType( int packType, unsigned int track ) const; const TQString& textForPackType( int packType, unsigned int track ) const;
unsigned int textLengthForPackType( int packType ) const; unsigned int textLengthForPackType( int packType ) const;

@ -1651,7 +1651,7 @@ bool K3bDevice::Device::setAutoEjectEnabled( bool enabled ) const
void K3bDevice::Device::addDeviceNode( const TQString& n ) void K3bDevice::Device::addDeviceNode( const TQString& n )
{ {
if( !d->allNodes.tqcontains( n ) ) if( !d->allNodes.contains( n ) )
d->allNodes.append( n ); d->allNodes.append( n );
} }

@ -170,7 +170,7 @@ K3bDevice::Device* K3bDevice::DeviceManager::findDevice( const TQString& devicen
} }
TQPtrListIterator<K3bDevice::Device> it( d->allDevices ); TQPtrListIterator<K3bDevice::Device> it( d->allDevices );
while( it.current() ) { while( it.current() ) {
if( it.current()->deviceNodes().tqcontains(devicename) ) if( it.current()->deviceNodes().contains(devicename) )
return it.current(); return it.current();
++it; ++it;
@ -271,7 +271,7 @@ void K3bDevice::DeviceManager::LinuxDeviceScan()
TQRegExp re("[\t\n:]+"); TQRegExp re("[\t\n:]+");
while( info.readLine( line, 80 ) > 0 ) { while( info.readLine( line, 80 ) > 0 ) {
if( line.tqcontains("drive name") > 0 ) { if( line.contains("drive name") > 0 ) {
int i = 1; int i = 1;
TQString dev; TQString dev;
while( !(dev = line.section(re, i, i)).isEmpty() ) { while( !(dev = line.section(re, i, i)).isEmpty() ) {
@ -285,7 +285,7 @@ void K3bDevice::DeviceManager::LinuxDeviceScan()
// each physical device the next line should be better // each physical device the next line should be better
// else if ( dev.startsWith("sr") ) // else if ( dev.startsWith("sr") )
if ( dev.startsWith("sr") ) { if ( dev.startsWith("sr") ) {
if( addDevice(TQString("/dev/%1").tqarg(dev.tqreplace(TQRegExp("r"),"cd"))) ) if( addDevice(TQString("/dev/%1").tqarg(dev.replace(TQRegExp("r"),"cd"))) )
devstring += dev + "|"; devstring += dev + "|";
} }
++i; ++i;
@ -591,14 +591,14 @@ bool K3bDevice::DeviceManager::saveConfig( KConfig* c )
// remove duplicate entries (caused by buggy old implementations) // remove duplicate entries (caused by buggy old implementations)
TQStringList saveDeviceSearchPath; TQStringList saveDeviceSearchPath;
for( TQStringList::const_iterator it = deviceSearchPath.constBegin(); it != deviceSearchPath.constEnd(); ++it ) for( TQStringList::const_iterator it = deviceSearchPath.constBegin(); it != deviceSearchPath.constEnd(); ++it )
if( !saveDeviceSearchPath.tqcontains( *it ) ) if( !saveDeviceSearchPath.contains( *it ) )
saveDeviceSearchPath.append( *it ); saveDeviceSearchPath.append( *it );
for( TQPtrListIterator<K3bDevice::Device> it( d->allDevices ); *it; ++it ) { for( TQPtrListIterator<K3bDevice::Device> it( d->allDevices ); *it; ++it ) {
K3bDevice::Device* dev = *it; K3bDevice::Device* dev = *it;
// update device search path // update device search path
if( !saveDeviceSearchPath.tqcontains( dev->blockDeviceName() ) ) if( !saveDeviceSearchPath.contains( dev->blockDeviceName() ) )
saveDeviceSearchPath.append( dev->blockDeviceName() ); saveDeviceSearchPath.append( dev->blockDeviceName() );
// save the device type settings // save the device type settings

@ -223,7 +223,7 @@ void K3bDevice::HalConnection::addDevice( const char* udi )
TQCString du( deviceUdi ); TQCString du( deviceUdi );
libhal_free_string( deviceUdi ); libhal_free_string( deviceUdi );
if( d->udiDeviceMap.tqcontains( du ) ) { if( d->udiDeviceMap.contains( du ) ) {
// //
// A new medium has been inserted. Save this medium's udi so we can reuse it later // A new medium has been inserted. Save this medium's udi so we can reuse it later
// on for the mount/unmount/eject methods // on for the mount/unmount/eject methods
@ -239,7 +239,7 @@ void K3bDevice::HalConnection::addDevice( const char* udi )
void K3bDevice::HalConnection::removeDevice( const char* udi ) void K3bDevice::HalConnection::removeDevice( const char* udi )
{ {
TQMapIterator<TQCString, TQString> it = d->udiDeviceMap.tqfind( udi ); TQMapIterator<TQCString, TQString> it = d->udiDeviceMap.find( udi );
if( it != d->udiDeviceMap.end() ) { if( it != d->udiDeviceMap.end() ) {
k3bDebug() << "Unmapping udi " << udi << " from device " << it.data() << endl; k3bDebug() << "Unmapping udi " << udi << " from device " << it.data() << endl;
emit deviceRemoved( it.data() ); emit deviceRemoved( it.data() );
@ -253,7 +253,7 @@ void K3bDevice::HalConnection::removeDevice( const char* udi )
TQCString du( deviceUdi ); TQCString du( deviceUdi );
libhal_free_string( deviceUdi ); libhal_free_string( deviceUdi );
if( d->udiDeviceMap.tqcontains( du ) ) { if( d->udiDeviceMap.contains( du ) ) {
// //
// A medium has been removed/ejected. // A medium has been removed/ejected.
// //
@ -276,7 +276,7 @@ int K3bDevice::HalConnection::lock( Device* dev )
DBusMessage* reply = 0; DBusMessage* reply = 0;
DBusError error; DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) { if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) ) {
return org_freedesktop_Hal_Device_Volume_NoSuchDevice; return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
} }
@ -335,7 +335,7 @@ int K3bDevice::HalConnection::unlock( Device* dev )
DBusMessage* reply = 0; DBusMessage* reply = 0;
DBusError error; DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) { if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) ) {
return org_freedesktop_Hal_Device_Volume_NoSuchDevice; return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
} }
@ -394,10 +394,10 @@ int K3bDevice::HalConnection::mount( K3bDevice::Device* dev,
DBusMessage* reply = 0; DBusMessage* reply = 0;
DBusError error; DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
return org_freedesktop_Hal_NoSuchDevice; return org_freedesktop_Hal_NoSuchDevice;
if( !d->deviceMediumUdiMap.tqcontains( d->deviceUdiMap[dev->blockDeviceName()] ) ) if( !d->deviceMediumUdiMap.contains( d->deviceUdiMap[dev->blockDeviceName()] ) )
return org_freedesktop_Hal_Device_Volume_NoSuchDevice; return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]]; TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]];
@ -474,10 +474,10 @@ int K3bDevice::HalConnection::unmount( K3bDevice::Device* dev,
DBusMessage* reply = 0; DBusMessage* reply = 0;
DBusError error; DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
return org_freedesktop_Hal_NoSuchDevice; return org_freedesktop_Hal_NoSuchDevice;
if( !d->deviceMediumUdiMap.tqcontains( d->deviceUdiMap[dev->blockDeviceName()] ) ) if( !d->deviceMediumUdiMap.contains( d->deviceUdiMap[dev->blockDeviceName()] ) )
return org_freedesktop_Hal_Device_Volume_NoSuchDevice; return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]]; TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]];
@ -545,10 +545,10 @@ int K3bDevice::HalConnection::eject( K3bDevice::Device* dev,
DBusMessage* reply = 0; DBusMessage* reply = 0;
DBusError error; DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
return org_freedesktop_Hal_NoSuchDevice; return org_freedesktop_Hal_NoSuchDevice;
if( !d->deviceMediumUdiMap.tqcontains( d->deviceUdiMap[dev->blockDeviceName()] ) ) if( !d->deviceMediumUdiMap.contains( d->deviceUdiMap[dev->blockDeviceName()] ) )
return org_freedesktop_Hal_Device_Volume_NoSuchDevice; return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]]; TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]];

@ -510,7 +510,7 @@ bool K3bMadDecoderFactory::canDecode( const KURL& url )
unsigned int s = handle.madFrame->header.samplerate; unsigned int s = handle.madFrame->header.samplerate;
// //
// tqfind 4 more mp3 headers (random value since 2 was not enough) // find 4 more mp3 headers (random value since 2 was not enough)
// This way we get most of the mp3 files while sorting out // This way we get most of the mp3 files while sorting out
// for example wave files. // for example wave files.
// //

@ -218,16 +218,16 @@ bool K3bExternalEncoder::initEncoderInternal( const TQString& extension )
// create the commandline // create the commandline
TQStringList params = TQStringList::split( ' ', d->cmd.command, false ); TQStringList params = TQStringList::split( ' ', d->cmd.command, false );
for( TQStringList::iterator it = params.begin(); it != params.end(); ++it ) { for( TQStringList::iterator it = params.begin(); it != params.end(); ++it ) {
(*it).tqreplace( "%f", d->fileName ); (*it).replace( "%f", d->fileName );
(*it).tqreplace( "%a", d->artist ); (*it).replace( "%a", d->artist );
(*it).tqreplace( "%t", d->title ); (*it).replace( "%t", d->title );
(*it).tqreplace( "%c", d->comment ); (*it).replace( "%c", d->comment );
(*it).tqreplace( "%y", d->year ); (*it).replace( "%y", d->year );
(*it).tqreplace( "%m", d->cdTitle ); (*it).replace( "%m", d->cdTitle );
(*it).tqreplace( "%r", d->cdArtist ); (*it).replace( "%r", d->cdArtist );
(*it).tqreplace( "%x", d->cdComment ); (*it).replace( "%x", d->cdComment );
(*it).tqreplace( "%n", d->trackNumber ); (*it).replace( "%n", d->trackNumber );
(*it).tqreplace( "%g", d->genre ); (*it).replace( "%g", d->genre );
*d->process << *it; *d->process << *it;
} }

@ -86,7 +86,7 @@ void K3bExternalEncoderEditDialog::slotOk()
i18n("Please specify the command line."), i18n("Please specify the command line."),
i18n("No command line specified") ); i18n("No command line specified") );
} }
else if( !m_editW->m_editCommand->text().tqcontains( "%f" ) ) { else if( !m_editW->m_editCommand->text().contains( "%f" ) ) {
KMessageBox::error( this, KMessageBox::error( this,
i18n("Please add the output filename (%f) to the command line."), i18n("Please add the output filename (%f) to the command line."),
i18n("No filename specified") ); i18n("No filename specified") );

@ -73,10 +73,10 @@ class K3bSoxProgram : public K3bExternalProgram
vp << path << "-h"; vp << path << "-h";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "sox: SoX Version" ); int pos = out.output().find( "sox: SoX Version" );
if ( pos < 0 ) if ( pos < 0 )
pos = out.output().tqfind( "sox: SoX v" ); // newer sox versions pos = out.output().find( "sox: SoX v" ); // newer sox versions
int endPos = out.output().tqfind( "\n", pos ); int endPos = out.output().find( "\n", pos );
if( pos > 0 && endPos > 0 ) { if( pos > 0 && endPos > 0 ) {
pos += 17; pos += 17;
bin = new K3bExternalBin( this ); bin = new K3bExternalBin( this );
@ -88,8 +88,8 @@ class K3bSoxProgram : public K3bExternalProgram
return true; return true;
} }
else { else {
pos = out.output().tqfind( "sox: Version" ); pos = out.output().find( "sox: Version" );
endPos = out.output().tqfind( "\n", pos ); endPos = out.output().find( "\n", pos );
if( pos > 0 && endPos > 0 ) { if( pos > 0 && endPos > 0 ) {
pos += 13; pos += 13;
bin = new K3bExternalBin( this ); bin = new K3bExternalBin( this );

@ -264,7 +264,7 @@ TQString K3bAudioMetainfoRenamerPluginWidget::createNewName( K3bFileItem* item )
KMimeType::Ptr mimetype = KMimeType::findByPath( item->localPath() ); KMimeType::Ptr mimetype = KMimeType::findByPath( item->localPath() );
// sometimes ogg-vorbis files go as "application/x-ogg" // sometimes ogg-vorbis files go as "application/x-ogg"
if( mimetype != 0 && if( mimetype != 0 &&
( mimetype->name().tqcontains( "audio" ) || mimetype->name().tqcontains("ogg") ) ) { ( mimetype->name().contains( "audio" ) || mimetype->name().contains("ogg") ) ) {
TQString artist, title, track; TQString artist, title, track;
@ -324,7 +324,7 @@ TQString K3bAudioMetainfoRenamerPluginWidget::createNewName( K3bFileItem* item )
// remove white spaces from end and beginning // remove white spaces from end and beginning
newName = newName.stripWhiteSpace(); newName = newName.stripWhiteSpace();
TQString extension = item->k3bName().mid( item->k3bName().tqfindRev(".") ); TQString extension = item->k3bName().mid( item->k3bName().findRev(".") );
if( !newName.isEmpty() ) { if( !newName.isEmpty() ) {
// //
@ -353,7 +353,7 @@ TQString K3bAudioMetainfoRenamerPluginWidget::createNewName( K3bFileItem* item )
bool K3bAudioMetainfoRenamerPluginWidget::existsOtherItemWithSameName( K3bFileItem* item, const TQString& name ) bool K3bAudioMetainfoRenamerPluginWidget::existsOtherItemWithSameName( K3bFileItem* item, const TQString& name )
{ {
K3bDirItem* dir = item->tqparent(); K3bDirItem* dir = item->tqparent();
K3bDataItem* otherItem = dir->tqfind( name ); K3bDataItem* otherItem = dir->find( name );
if( otherItem && otherItem != item ) if( otherItem && otherItem != item )
return true; return true;

@ -75,7 +75,7 @@ TQString K3bPlayListViewItem::text( int c ) const
switch( c ) { switch( c ) {
case 0: case 0:
{ {
int pos = m_filename.tqfindRev("/"); int pos = m_filename.findRev("/");
if( pos >= 0 ) if( pos >= 0 )
return m_filename.mid(pos+1); return m_filename.mid(pos+1);
return m_filename; return m_filename;
@ -513,7 +513,7 @@ long K3bAudioPlayer::position()
// FIXME: let my do some useful stuff! // FIXME: let my do some useful stuff!
bool K3bAudioPlayer::supportsMimetype( const TQString& mimetype ) bool K3bAudioPlayer::supportsMimetype( const TQString& mimetype )
{ {
if( mimetype.tqcontains("audio") || mimetype.tqcontains("ogg") ) if( mimetype.contains("audio") || mimetype.contains("ogg") )
return true; return true;
else else
return false; return false;
@ -580,7 +580,7 @@ void K3bAudioPlayer::slotUpdateFilename()
{ {
if( m_currentItem ) { if( m_currentItem ) {
TQString display = m_currentItem->filename(); TQString display = m_currentItem->filename();
int pos = display.tqfindRev("/"); int pos = display.findRev("/");
if( pos >= 0 ) if( pos >= 0 )
display = display.mid(pos+1); display = display.mid(pos+1);

@ -41,7 +41,7 @@ bool K3bDataProjectInterface::createFolder( const TQString& name )
bool K3bDataProjectInterface::createFolder( const TQString& name, const TQString& tqparent ) bool K3bDataProjectInterface::createFolder( const TQString& name, const TQString& tqparent )
{ {
K3bDataItem* p = m_dataDoc->root()->findByPath( tqparent ); K3bDataItem* p = m_dataDoc->root()->findByPath( tqparent );
if( p && p->isDir() && !static_cast<K3bDirItem*>(p)->tqfind( name ) ) { if( p && p->isDir() && !static_cast<K3bDirItem*>(p)->find( name ) ) {
m_dataDoc->addEmptyDir( name, static_cast<K3bDirItem*>(p) ); m_dataDoc->addEmptyDir( name, static_cast<K3bDirItem*>(p) );
return true; return true;
} }

@ -85,7 +85,7 @@ void K3bDebuggingOutputDialog::setOutput( const TQMap<TQString, TQStringList>& m
void K3bDebuggingOutputDialog::addOutput( const TQString& app, const TQString& msg ) void K3bDebuggingOutputDialog::addOutput( const TQString& app, const TQString& msg )
{ {
TQMap<TQString, int>::Iterator it = m_paragraphMap.tqfind( app ); TQMap<TQString, int>::Iterator it = m_paragraphMap.find( app );
if( it == m_paragraphMap.end() ) { if( it == m_paragraphMap.end() ) {
// create new section // create new section

@ -213,9 +213,9 @@ void K3bFileTreeComboBox::slotGoUrl()
} }
// check for our own internal format // check for our own internal format
else if( p.tqcontains("/dev/") ) { else if( p.contains("/dev/") ) {
int pos1 = p.tqfindRev('('); int pos1 = p.findRev('(');
int pos2 = p.tqfindRev(')'); int pos2 = p.findRev(')');
TQString devStr = p.mid( pos1+1, pos2-pos1-1 ); TQString devStr = p.mid( pos1+1, pos2-pos1-1 );
if( K3bDevice::Device* dev = k3bcore->deviceManager()->findDevice( devStr ) ) { if( K3bDevice::Device* dev = k3bcore->deviceManager()->findDevice( devStr ) ) {
emit deviceExecuted( dev ); emit deviceExecuted( dev );
@ -239,13 +239,13 @@ void K3bFileTreeComboBox::slotGoUrl()
while( ( pos = someUsersHomeDir.search( p, pos ) ) != -1 ) { while( ( pos = someUsersHomeDir.search( p, pos ) ) != -1 ) {
KUser user( someUsersHomeDir.cap(1) ); KUser user( someUsersHomeDir.cap(1) );
if( user.isValid() ) if( user.isValid() )
p.tqreplace( pos, someUsersHomeDir.cap(1).length() + 1, user.homeDir() ); p.replace( pos, someUsersHomeDir.cap(1).length() + 1, user.homeDir() );
else else
++pos; // skip this ~ ++pos; // skip this ~
} }
// now replace the unmatched tildes with our home dir // now replace the unmatched tildes with our home dir
p.tqreplace( "~", K3b::prepareDir( TQDir::homeDirPath() ) ); p.replace( "~", K3b::prepareDir( TQDir::homeDirPath() ) );
lineEdit()->setText( p ); lineEdit()->setText( p );
@ -273,7 +273,7 @@ bool K3bFileTreeComboBox::eventFilter( TQObject* o, TQEvent* e )
} }
else if( e->type() == TQEvent::MouseButtonPress ) { else if( e->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent* me = (TQMouseEvent*)e; TQMouseEvent* me = (TQMouseEvent*)e;
if ( !TQT_TQRECT_OBJECT(m_fileTreeView->rect()).tqcontains( me->pos() ) ) { if ( !TQT_TQRECT_OBJECT(m_fileTreeView->rect()).contains( me->pos() ) ) {
TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxArrow); TQStyle::SC_ComboBoxArrow);
arrowRect = TQStyle::tqvisualRect(arrowRect, this); arrowRect = TQStyle::tqvisualRect(arrowRect, this);
@ -282,7 +282,7 @@ bool K3bFileTreeComboBox::eventFilter( TQObject* o, TQEvent* e )
// and thus has a rect that doesn't fit the button. // and thus has a rect that doesn't fit the button.
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( arrowRect.tqcontains( mapFromGlobal(me->globalPos()) ) ) { if ( arrowRect.contains( mapFromGlobal(me->globalPos()) ) ) {
d->ignoreNextMouseClick = true; // in the case we hit the arrow button d->ignoreNextMouseClick = true; // in the case we hit the arrow button
} }
popdown(); popdown();
@ -316,7 +316,7 @@ void K3bFileTreeComboBox::mousePressEvent( TQMouseEvent* e )
// and thus has a rect that doesn't fit the button. // and thus has a rect that doesn't fit the button.
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( arrowRect.tqcontains( e->pos() ) ) { if ( arrowRect.contains( e->pos() ) ) {
popup(); popup();
tqrepaint( FALSE ); tqrepaint( FALSE );
} }

@ -216,7 +216,7 @@ void K3bDeviceBranchViewItem::paintCell( TQPainter* p, const TQColorGroup& cg, i
} }
ypos += fm.ascent(); ypos += fm.ascent();
TQString line1 = text(0).left( text(0).tqfind('\n') ); TQString line1 = text(0).left( text(0).find('\n') );
p->drawText( xpos, ypos, line1 ); p->drawText( xpos, ypos, line1 );
TQFont f( listView()->font() ); TQFont f( listView()->font() );
@ -226,7 +226,7 @@ void K3bDeviceBranchViewItem::paintCell( TQPainter* p, const TQColorGroup& cg, i
p->setFont( f ); p->setFont( f );
ypos += p->fontMetrics().height() + 1; ypos += p->fontMetrics().height() + 1;
TQString line2 = text(0).mid( text(0).tqfind('\n')+1 ); TQString line2 = text(0).mid( text(0).find('\n')+1 );
p->drawText( xpos - p->fontMetrics().leftBearing( line2[0] ), ypos, line2 ); p->drawText( xpos - p->fontMetrics().leftBearing( line2[0] ), ypos, line2 );
@ -256,12 +256,12 @@ int K3bDeviceBranchViewItem::widthHint() const
if ( m_bCurrent ) { if ( m_bCurrent ) {
f.setBold( true ); f.setBold( true );
} }
int w = TQFontMetrics(f).width( text(0).left( text(0).tqfind('\n') ) ); int w = TQFontMetrics(f).width( text(0).left( text(0).find('\n') ) );
f.setItalic( true ); f.setItalic( true );
f.setBold( false ); f.setBold( false );
f.setPointSize( f.pointSize() - 2 ); f.setPointSize( f.pointSize() - 2 );
w = TQMAX( w, TQFontMetrics(f).width( text(0).mid( text(0).tqfind('\n')+1 ) ) ); w = TQMAX( w, TQFontMetrics(f).width( text(0).mid( text(0).find('\n')+1 ) ) );
w++; // see paintCell w++; // see paintCell
@ -334,7 +334,7 @@ void K3bDeviceTreeToolTip::maybeTip( const TQPoint& pos )
TQGridLayout* lay = new TQGridLayout( tooltip, 2, 2, tooltip->frameWidth()*2 /*margin*/, 6 /*spacing*/ ); TQGridLayout* lay = new TQGridLayout( tooltip, 2, 2, tooltip->frameWidth()*2 /*margin*/, 6 /*spacing*/ );
TQString text = k3bappcore->mediaCache()->medium( dev ).longString(); TQString text = k3bappcore->mediaCache()->medium( dev ).longString();
int detailsStart = text.tqfind( "<p>", 3 ); int detailsStart = text.find( "<p>", 3 );
TQString details = text.mid( detailsStart ); TQString details = text.mid( detailsStart );
text.truncate( detailsStart ); text.truncate( detailsStart );
@ -579,7 +579,7 @@ KFileTreeBranch* K3bFileTreeView::addBranch( const KURL& url, const TQString& na
void K3bFileTreeView::slotItemExecuted( TQListViewItem* item ) void K3bFileTreeView::slotItemExecuted( TQListViewItem* item )
{ {
KFileTreeViewItem* treeItem = static_cast<KFileTreeViewItem*>(item); KFileTreeViewItem* treeItem = static_cast<KFileTreeViewItem*>(item);
if( d->branchDeviceMap.tqcontains( treeItem->branch() ) && if( d->branchDeviceMap.contains( treeItem->branch() ) &&
treeItem == treeItem->branch()->root() ) { treeItem == treeItem->branch()->root() ) {
K3bDevice::Device* dev = d->branchDeviceMap[treeItem->branch()]; K3bDevice::Device* dev = d->branchDeviceMap[treeItem->branch()];
k3bappcore->appDeviceManager()->setCurrentDevice( dev ); k3bappcore->appDeviceManager()->setCurrentDevice( dev );
@ -601,7 +601,7 @@ void K3bFileTreeView::followUrl( const KURL& url )
// TODO: first try the current branch // TODO: first try the current branch
KFileTreeBranchIterator it( branches() ); KFileTreeBranchIterator it( branches() );
for( ; *it; ++it ) { for( ; *it; ++it ) {
if( !d->branchDeviceMap.tqcontains( *it ) ) if( !d->branchDeviceMap.contains( *it ) )
if( KFileTreeViewItem* item = (*it)->findTVIByURL( url ) ) { if( KFileTreeViewItem* item = (*it)->findTVIByURL( url ) ) {
setCurrentItem( item ); setCurrentItem( item );
setSelected(item, true); setSelected(item, true);
@ -618,7 +618,7 @@ void K3bFileTreeView::slotContextMenu( KListView*, TQListViewItem* item, const T
if( treeItem ) { if( treeItem ) {
K3bDevice::Device* device = 0; K3bDevice::Device* device = 0;
TQMap<KFileTreeBranch*, K3bDevice::Device*>::iterator devIt = TQMap<KFileTreeBranch*, K3bDevice::Device*>::iterator devIt =
d->branchDeviceMap.tqfind( treeItem->branch() ); d->branchDeviceMap.find( treeItem->branch() );
if( devIt != d->branchDeviceMap.end() ) if( devIt != d->branchDeviceMap.end() )
device = devIt.data(); device = devIt.data();
@ -641,7 +641,7 @@ K3bDevice::Device* K3bFileTreeView::selectedDevice() const
{ {
KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem()); KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem());
if( treeItem ) { if( treeItem ) {
if( d->branchDeviceMap.tqcontains( treeItem->branch() ) ) if( d->branchDeviceMap.contains( treeItem->branch() ) )
return d->branchDeviceMap[treeItem->branch()]; return d->branchDeviceMap[treeItem->branch()];
} }
return 0; return 0;
@ -652,7 +652,7 @@ KURL K3bFileTreeView::selectedUrl() const
{ {
KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem()); KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem());
if( treeItem ) { if( treeItem ) {
if( !d->branchDeviceMap.tqcontains( treeItem->branch() ) ) if( !d->branchDeviceMap.contains( treeItem->branch() ) )
return treeItem->url(); return treeItem->url();
} }
return KURL(); return KURL();
@ -684,7 +684,7 @@ void K3bFileTreeView::setSelectedDevice( K3bDevice::Device* dev )
K3bDeviceBranch* K3bFileTreeView::branch( K3bDevice::Device* dev ) K3bDeviceBranch* K3bFileTreeView::branch( K3bDevice::Device* dev )
{ {
return d->deviceBranchDict.tqfind( (void*)dev ); return d->deviceBranchDict.find( (void*)dev );
} }

@ -150,7 +150,7 @@ void K3bFileView::slotFilterChanged()
TQString filter = m_filterWidget->currentFilter(); TQString filter = m_filterWidget->currentFilter();
m_dirOp->clearFilter(); m_dirOp->clearFilter();
if( filter.tqfind( '/' ) > -1 ) { if( filter.find( '/' ) > -1 ) {
TQStringList types = TQStringList::split( " ", filter ); TQStringList types = TQStringList::split( " ", filter );
types.prepend( "inode/directory" ); types.prepend( "inode/directory" );
m_dirOp->setMimeFilter( types ); m_dirOp->setMimeFilter( types );

@ -340,7 +340,7 @@ void K3bMediaCache::buildDeviceList( K3bDevice::DeviceManager* dm )
const TQPtrList<K3bDevice::Device>& devices = dm->allDevices(); const TQPtrList<K3bDevice::Device>& devices = dm->allDevices();
for( TQPtrListIterator<K3bDevice::Device> it( devices ); *it; ++it ) { for( TQPtrListIterator<K3bDevice::Device> it( devices ); *it; ++it ) {
m_deviceMap.insert( *it, new DeviceEntry( this, *it ) ); m_deviceMap.insert( *it, new DeviceEntry( this, *it ) );
TQMap<K3bDevice::Device*, int>::const_iterator bi_it = blockedIds.tqfind( *it ); TQMap<K3bDevice::Device*, int>::const_iterator bi_it = blockedIds.find( *it );
if( bi_it != blockedIds.end() ) if( bi_it != blockedIds.end() )
m_deviceMap[*it]->blockedId = bi_it.data(); m_deviceMap[*it]->blockedId = bi_it.data();
} }
@ -356,7 +356,7 @@ void K3bMediaCache::buildDeviceList( K3bDevice::DeviceManager* dm )
K3bMediaCache::DeviceEntry* K3bMediaCache::findDeviceEntry( K3bDevice::Device* dev ) K3bMediaCache::DeviceEntry* K3bMediaCache::findDeviceEntry( K3bDevice::Device* dev )
{ {
TQMap<K3bDevice::Device*, DeviceEntry*>::iterator it = m_deviceMap.tqfind( dev ); TQMap<K3bDevice::Device*, DeviceEntry*>::iterator it = m_deviceMap.find( dev );
if( it != m_deviceMap.end() ) if( it != m_deviceMap.end() )
return it.data(); return it.data();
else else

@ -157,7 +157,7 @@ TQValueList<K3bDevice::Device*> K3bMediaSelectionComboBox::allDevices() const
void K3bMediaSelectionComboBox::setSelectedDevice( K3bDevice::Device* dev ) void K3bMediaSelectionComboBox::setSelectedDevice( K3bDevice::Device* dev )
{ {
if( dev && d->deviceIndexMap.tqcontains( dev ) ) { if( dev && d->deviceIndexMap.contains( dev ) ) {
setCurrentItem( d->deviceIndexMap[dev] ); setCurrentItem( d->deviceIndexMap[dev] );
emit selectionChanged( dev ); emit selectionChanged( dev );
} }
@ -298,7 +298,7 @@ void K3bMediaSelectionComboBox::updateMedia()
emit selectionChanged( 0 ); emit selectionChanged( 0 );
} }
} }
else if( selected && d->deviceIndexMap.tqcontains( selected ) ) { else if( selected && d->deviceIndexMap.contains( selected ) ) {
setCurrentItem( d->deviceIndexMap[selected] ); setCurrentItem( d->deviceIndexMap[selected] );
} }
else { else {
@ -346,7 +346,7 @@ void K3bMediaSelectionComboBox::addMedium( K3bDevice::Device* dev )
// Now let's see if this string is already contained in the list // Now let's see if this string is already contained in the list
// and if so add the device name to both // and if so add the device name to both
// //
if( d->mediaStringMap.tqcontains( s ) ) { if( d->mediaStringMap.contains( s ) ) {
// //
// insert the modified string // insert the modified string
// //

@ -104,7 +104,7 @@ const TQPtrList<K3bDoc>& K3bProjectManager::projects() const
void K3bProjectManager::addProject( K3bDoc* doc ) void K3bProjectManager::addProject( K3bDoc* doc )
{ {
if( !d->projects.tqcontainsRef( doc ) ) { if( !d->projects.containsRef( doc ) ) {
kdDebug() << "(K3bProjectManager) adding doc " << doc->URL().path() << endl; kdDebug() << "(K3bProjectManager) adding doc " << doc->URL().path() << endl;
d->projects.append(doc); d->projects.append(doc);
@ -120,7 +120,7 @@ void K3bProjectManager::addProject( K3bDoc* doc )
void K3bProjectManager::removeProject( K3bDoc* doc ) void K3bProjectManager::removeProject( K3bDoc* doc )
{ {
// //
// TQPtrList.tqfindRef seems to be buggy. Everytime we search for the // TQPtrList.findRef seems to be buggy. Everytime we search for the
// first added item it is not found! // first added item it is not found!
// //
for( TQPtrListIterator<K3bDoc> it( d->projects ); for( TQPtrListIterator<K3bDoc> it( d->projects );
@ -128,7 +128,7 @@ void K3bProjectManager::removeProject( K3bDoc* doc )
if( it.current() == doc ) { if( it.current() == doc ) {
// remove the DCOP interface // remove the DCOP interface
TQMap<K3bDoc*, K3bProjectInterface*>::iterator it = d->projectInterfaceMap.tqfind( doc ); TQMap<K3bDoc*, K3bProjectInterface*>::iterator it = d->projectInterfaceMap.find( doc );
if( it != d->projectInterfaceMap.end() ) { if( it != d->projectInterfaceMap.end() ) {
// delete the interface // delete the interface
delete it.data(); delete it.data();
@ -172,7 +172,7 @@ void K3bProjectManager::setActive( K3bDoc* doc )
} }
// //
// TQPtrList.tqfindRef seems to be buggy. Everytime we search for the // TQPtrList.findRef seems to be buggy. Everytime we search for the
// first added item it is not found! // first added item it is not found!
// //
for( TQPtrListIterator<K3bDoc> it( d->projects ); for( TQPtrListIterator<K3bDoc> it( d->projects );
@ -449,7 +449,7 @@ void K3bProjectManager::loadDefaults( K3bDoc* doc )
K3bProjectInterface* K3bProjectManager::dcopInterface( K3bDoc* doc ) K3bProjectInterface* K3bProjectManager::dcopInterface( K3bDoc* doc )
{ {
TQMap<K3bDoc*, K3bProjectInterface*>::iterator it = d->projectInterfaceMap.tqfind( doc ); TQMap<K3bDoc*, K3bProjectInterface*>::iterator it = d->projectInterfaceMap.find( doc );
if( it == d->projectInterfaceMap.end() ) { if( it == d->projectInterfaceMap.end() ) {
K3bProjectInterface* dcopInterface = 0; K3bProjectInterface* dcopInterface = 0;
if( doc->type() == K3bDoc::DATA || doc->type() == K3bDoc::DVD ) if( doc->type() == K3bDoc::DATA || doc->type() == K3bDoc::DVD )

@ -104,7 +104,7 @@ void K3bStatusBarManager::update()
TQString path = K3b::defaultTempPath(); TQString path = K3b::defaultTempPath();
if( !TQFile::exists( path ) ) if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') ); path.truncate( path.findRev('/') );
unsigned long size, avail; unsigned long size, avail;
if( K3b::kbFreeOnFs( path, size, avail ) ) if( K3b::kbFreeOnFs( path, size, avail ) )

@ -59,8 +59,8 @@
static TQString markupString( const TQString& s_ ) static TQString markupString( const TQString& s_ )
{ {
TQString s(s_); TQString s(s_);
s.tqreplace( '<', "&lt;" ); s.replace( '<', "&lt;" );
s.tqreplace( '>', "&gt;" ); s.replace( '>', "&gt;" );
return s; return s;
} }
@ -186,9 +186,9 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
// 1. cdrecord, cdrdao // 1. cdrecord, cdrdao
if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) { if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) {
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL, problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("Unable to tqfind %1 executable").tqarg("cdrecord"), i18n("Unable to find %1 executable").tqarg("cdrecord"),
i18n("K3b uses cdrecord to actually write CDs."), i18n("K3b uses cdrecord to actually write CDs."),
i18n("Install the cdrtools package which tqcontains " i18n("Install the cdrtools package which contains "
"cdrecord."), "cdrecord."),
false ) ); false ) );
} }
@ -242,7 +242,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
} }
if( !k3bcore->externalBinManager()->foundBin( "cdrdao" ) ) { if( !k3bcore->externalBinManager()->foundBin( "cdrdao" ) ) {
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL, problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("Unable to tqfind %1 executable").tqarg("cdrdao"), i18n("Unable to find %1 executable").tqarg("cdrdao"),
i18n("K3b uses cdrdao to actually write CDs."), i18n("K3b uses cdrdao to actually write CDs."),
i18n("Install the cdrdao package."), i18n("Install the cdrdao package."),
false ) ); false ) );
@ -268,7 +268,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
if( !k3bcore->deviceManager()->dvdWriter().isEmpty() ) { if( !k3bcore->deviceManager()->dvdWriter().isEmpty() ) {
if( !k3bcore->externalBinManager()->foundBin( "growisofs" ) ) { if( !k3bcore->externalBinManager()->foundBin( "growisofs" ) ) {
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL, problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("Unable to tqfind %1 executable").tqarg("growisofs"), i18n("Unable to find %1 executable").tqarg("growisofs"),
i18n("K3b uses growisofs to actually write dvds. " i18n("K3b uses growisofs to actually write dvds. "
"Without growisofs you will not be able to write dvds. " "Without growisofs you will not be able to write dvds. "
"Make sure to install at least version 5.10."), "Make sure to install at least version 5.10."),
@ -317,7 +317,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
if( !k3bcore->externalBinManager()->foundBin( "dvd+rw-format" ) ) { if( !k3bcore->externalBinManager()->foundBin( "dvd+rw-format" ) ) {
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL, problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("Unable to tqfind %1 executable").tqarg("dvd+rw-format"), i18n("Unable to find %1 executable").tqarg("dvd+rw-format"),
i18n("K3b uses dvd+rw-format to format DVD-RWs and DVD+RWs."), i18n("K3b uses dvd+rw-format to format DVD-RWs and DVD+RWs."),
i18n("Install the dvd+rw-tools package."), i18n("Install the dvd+rw-tools package."),
false ) ); false ) );
@ -412,7 +412,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
if( !k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "hacked-atapi" ) && if( !k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "hacked-atapi" ) &&
!k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "plain-atapi") ) { !k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "plain-atapi") ) {
// FIXME: tqreplace ">" with "&gt;" // FIXME: replace ">" with "&gt;"
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL, problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("%1 %2 does not support ATAPI") i18n("%1 %2 does not support ATAPI")
.tqarg("cdrdao").tqarg(k3bcore->externalBinManager()->binObject("cdrdao")->version), .tqarg("cdrdao").tqarg(k3bcore->externalBinManager()->binObject("cdrdao")->version),
@ -633,9 +633,9 @@ int K3bSystemProblemDialog::dmaActivated( K3bDevice::Device* dev )
// //
// But we ignore the on/off since it might be translated // But we ignore the on/off since it might be translated
// //
if( out.output().tqcontains( "1 (" ) ) if( out.output().contains( "1 (" ) )
return 1; return 1;
else if( out.output().tqcontains( "0 (" ) ) else if( out.output().contains( "0 (" ) )
return 0; return 0;
else else
return -1; return -1;

@ -93,7 +93,7 @@ unsigned long K3bTempDirSelectionWidget::freeTempSpace() const
TQString path = m_editDirectory->url(); TQString path = m_editDirectory->url();
if( !TQFile::exists( path ) ) if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') ); path.truncate( path.findRev('/') );
unsigned long size; unsigned long size;
K3b::kbFreeOnFs( path, size, m_freeTempSpace ); K3b::kbFreeOnFs( path, size, m_freeTempSpace );
@ -184,7 +184,7 @@ TQString K3bTempDirSelectionWidget::tempDirectory() const
// now we treat the last section as a filename and return the path // now we treat the last section as a filename and return the path
// in front of it // in front of it
td.truncate( td.tqfindRev( '/' ) + 1 ); td.truncate( td.findRev( '/' ) + 1 );
return td; return td;
} }
@ -248,7 +248,7 @@ void K3bTempDirSelectionWidget::setDefaultImageFileName( const TQString& name )
} }
m_defaultImageFileName = name; m_defaultImageFileName = name;
if ( !m_defaultImageFileName.tqcontains( '.' ) ) { if ( !m_defaultImageFileName.contains( '.' ) ) {
m_defaultImageFileName += ".iso"; m_defaultImageFileName += ".iso";
} }
fixTempPath( changeImageName ); fixTempPath( changeImageName );

@ -57,7 +57,7 @@ TQColor K3bTheme::foregroundColor() const
const TQPixmap& K3bTheme::pixmap( const TQString& name ) const const TQPixmap& K3bTheme::pixmap( const TQString& name ) const
{ {
TQMap<TQString, TQPixmap>::const_iterator it = m_pixmapMap.tqfind( name ); TQMap<TQString, TQPixmap>::const_iterator it = m_pixmapMap.find( name );
if( it != m_pixmapMap.end() ) if( it != m_pixmapMap.end() )
return *it; return *it;
@ -270,7 +270,7 @@ void K3bThemeManager::loadThemes()
// every theme dir needs to contain a k3b.theme file // every theme dir needs to contain a k3b.theme file
for( TQStringList::const_iterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt ) { for( TQStringList::const_iterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt ) {
TQString themeDir = *dirIt + *entryIt + "/"; TQString themeDir = *dirIt + *entryIt + "/";
if( !themeNames.tqcontains( *entryIt ) && TQFile::exists( themeDir + "k3b.theme" ) ) { if( !themeNames.contains( *entryIt ) && TQFile::exists( themeDir + "k3b.theme" ) ) {
bool themeValid = true; bool themeValid = true;
// check for all nessessary pixmaps (this is a little evil hacking) // check for all nessessary pixmaps (this is a little evil hacking)

@ -153,7 +153,7 @@ bool K3bToolTip::eventFilter( TQObject* o, TQEvent* e )
m_tipTimer->stop(); m_tipTimer->stop();
if( m_currentTip ) { if( m_currentTip ) {
// see if we have to hide it // see if we have to hide it
if( !m_currentTipRect.tqcontains( m_lastMousePos ) ) { if( !m_currentTipRect.contains( m_lastMousePos ) ) {
hideTip(); hideTip();
// in case we moved the mouse from one tip area to the next without leaving // in case we moved the mouse from one tip area to the next without leaving

@ -432,7 +432,7 @@ void K3bWelcomeWidget::contentsMousePressEvent( TQMouseEvent* e )
for ( int i = 0; s_allActions[i]; ++i ) { for ( int i = 0; s_allActions[i]; ++i ) {
if ( s_allActions[i][0] != '_' ) { if ( s_allActions[i][0] != '_' ) {
KAction* a = m_mainWindow->actionCollection()->action( s_allActions[i] ); KAction* a = m_mainWindow->actionCollection()->action( s_allActions[i] );
if ( a && !main->m_actions.tqcontainsRef(a) ) { if ( a && !main->m_actions.containsRef(a) ) {
map.insert( addPop.insertItem( a->iconSet(), a->text() ), a ); map.insert( addPop.insertItem( a->iconSet(), a->text() ), a );
} }
} }

@ -322,7 +322,7 @@ void K3bWriterSelectionWidget::clearSpeedCombo()
void K3bWriterSelectionWidget::insertSpeedItem( int speed ) void K3bWriterSelectionWidget::insertSpeedItem( int speed )
{ {
if( !d->speedIndexMap.tqcontains( speed ) ) { if( !d->speedIndexMap.contains( speed ) ) {
d->indexSpeedMap[m_comboSpeed->count()] = speed; d->indexSpeedMap[m_comboSpeed->count()] = speed;
d->speedIndexMap[speed] = m_comboSpeed->count(); d->speedIndexMap[speed] = m_comboSpeed->count();
@ -367,7 +367,7 @@ void K3bWriterSelectionWidget::setSpeed( int s )
if( d->haveIgnoreSpeed && s < 0 ) if( d->haveIgnoreSpeed && s < 0 )
m_comboSpeed->setCurrentItem( 1 ); // Ignore m_comboSpeed->setCurrentItem( 1 ); // Ignore
else if( d->speedIndexMap.tqcontains( s ) ) else if( d->speedIndexMap.contains( s ) )
m_comboSpeed->setCurrentItem( d->speedIndexMap[s] ); m_comboSpeed->setCurrentItem( d->speedIndexMap[s] );
else { else {
m_comboSpeed->setCurrentItem( 0 ); // Auto m_comboSpeed->setCurrentItem( 0 ); // Auto

@ -252,7 +252,7 @@ void K3bBlankingDialog::slotWritingAppChanged(int app)
TQWhatsThis::add( m_comboEraseMode, whatsThisInfo ); TQWhatsThis::add( m_comboEraseMode, whatsThisInfo );
// try to reset last mode // try to reset last mode
if( d->typeComboMap.tqcontains( lastMode ) ) if( d->typeComboMap.contains( lastMode ) )
m_comboEraseMode->setCurrentItem( d->typeComboMap[lastMode] ); m_comboEraseMode->setCurrentItem( d->typeComboMap[lastMode] );
else else
m_comboEraseMode->setCurrentItem( d->typeComboMap[K3bBlankingJob::Fast] ); m_comboEraseMode->setCurrentItem( d->typeComboMap[K3bBlankingJob::Fast] );

@ -173,7 +173,7 @@ void K3bCddbOptionTab::readSettings()
for( TQStringList::const_iterator it = cddbServer.begin(); it != cddbServer.end(); ++it ) { for( TQStringList::const_iterator it = cddbServer.begin(); it != cddbServer.end(); ++it ) {
const TQString& s = *it; const TQString& s = *it;
TQStringList buf = TQStringList::split( ":", s.mid( s.tqfind(" ")+1 ) ); TQStringList buf = TQStringList::split( ":", s.mid( s.find(" ")+1 ) );
TQString server = buf[0]; TQString server = buf[0];
int port = buf[1].toInt(); int port = buf[1].toInt();
if( s.startsWith("Http") ) if( s.startsWith("Http") )

@ -280,7 +280,7 @@ void K3bAudioTrackView::slotDropped( TQDropEvent* e, TQListViewItem* tqparent, T
// //
TQPtrListIterator<K3bAudioDataSource> srcIt( sources ); TQPtrListIterator<K3bAudioDataSource> srcIt( sources );
while( srcIt.current() ) { while( srcIt.current() ) {
if( tracks.tqcontainsRef( srcIt.current()->track() ) ) if( tracks.containsRef( srcIt.current()->track() ) )
sources.removeRef( *srcIt ); sources.removeRef( *srcIt );
else else
++srcIt; ++srcIt;
@ -439,11 +439,11 @@ void K3bAudioTrackView::slotChanged()
K3bAudioTrackViewItem* K3bAudioTrackView::getTrackViewItem( K3bAudioTrack* track, bool* isNewItem ) K3bAudioTrackViewItem* K3bAudioTrackView::getTrackViewItem( K3bAudioTrack* track, bool* isNewItem )
{ {
TQMap<K3bAudioTrack*, K3bAudioTrackViewItem*>::iterator itemIt = m_trackItemMap.tqfind(track); TQMap<K3bAudioTrack*, K3bAudioTrackViewItem*>::iterator itemIt = m_trackItemMap.find(track);
if( itemIt == m_trackItemMap.end() ) { if( itemIt == m_trackItemMap.end() ) {
kdDebug() << "(K3bAudioTrackView) new track " << track << endl; kdDebug() << "(K3bAudioTrackView) new track " << track << endl;
K3bAudioTrackViewItem* prevItem = 0; K3bAudioTrackViewItem* prevItem = 0;
if( track->prev() && m_trackItemMap.tqcontains( track->prev() ) ) if( track->prev() && m_trackItemMap.contains( track->prev() ) )
prevItem = m_trackItemMap[track->prev()]; prevItem = m_trackItemMap[track->prev()];
K3bAudioTrackViewItem* newItem = new K3bAudioTrackViewItem( this, prevItem, track ); K3bAudioTrackViewItem* newItem = new K3bAudioTrackViewItem( this, prevItem, track );
// //
@ -491,7 +491,7 @@ void K3bAudioTrackView::slotTrackChanged( K3bAudioTrack* track )
// FIXME: only do this if the position really changed // FIXME: only do this if the position really changed
// move the item if the position has changed // move the item if the position has changed
if( track->prev() && m_trackItemMap.tqcontains(track->prev()) ) if( track->prev() && m_trackItemMap.contains(track->prev()) )
item->moveItem( m_trackItemMap[track->prev()] ); item->moveItem( m_trackItemMap[track->prev()] );
else if( !track->prev() ) { else if( !track->prev() ) {
takeItem( item ); takeItem( item );
@ -735,7 +735,7 @@ void K3bAudioTrackView::slotRemove()
// //
TQPtrListIterator<K3bAudioDataSource> srcIt( sources ); TQPtrListIterator<K3bAudioDataSource> srcIt( sources );
while( srcIt.current() ) { while( srcIt.current() ) {
if( tracks.tqcontainsRef( srcIt.current()->track() ) ) if( tracks.containsRef( srcIt.current()->track() ) )
sources.removeRef( *srcIt ); sources.removeRef( *srcIt );
else else
++srcIt; ++srcIt;
@ -993,7 +993,7 @@ void K3bAudioTrackView::slotQueryMusicBrainz()
// only one may use the tracks at the same time // only one may use the tracks at the same time
if( m_currentlyPlayingTrack && if( m_currentlyPlayingTrack &&
tracks.tqcontainsRef( m_currentlyPlayingTrack ) ) tracks.containsRef( m_currentlyPlayingTrack ) )
m_player->stop(); m_player->stop();
// now do the lookup on the files. // now do the lookup on the files.

@ -242,7 +242,7 @@ void K3bDataDirTreeView::slotDataItemRemoved( K3bDataItem* item )
{ {
if( item->isDir() ) { if( item->isDir() ) {
K3bDirItem* dirItem = static_cast<K3bDirItem*>( item ); K3bDirItem* dirItem = static_cast<K3bDirItem*>( item );
TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> it = m_itemMap.tqfind( dirItem ); TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> it = m_itemMap.find( dirItem );
if( it != m_itemMap.end() ) { if( it != m_itemMap.end() ) {
K3bDataDirViewItem* viewItem = it.data(); K3bDataDirViewItem* viewItem = it.data();
m_itemMap.remove( it ); m_itemMap.remove( it );
@ -263,7 +263,7 @@ void K3bDataDirTreeView::slotDataItemRemoved( K3bDataItem* item )
void K3bDataDirTreeView::setCurrentDir( K3bDirItem* dirItem ) void K3bDataDirTreeView::setCurrentDir( K3bDirItem* dirItem )
{ {
TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> it = m_itemMap.tqfind( dirItem ); TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> it = m_itemMap.find( dirItem );
if( it != m_itemMap.end() ) { if( it != m_itemMap.end() ) {
setCurrentItem( it.data() ); setCurrentItem( it.data() );
it.data()->setOpen(true); it.data()->setOpen(true);
@ -454,7 +454,7 @@ void K3bDataDirTreeView::checkForNewItems()
{ {
K3bDirItem* dirItem = dynamic_cast<K3bDirItem*>( item ); K3bDirItem* dirItem = dynamic_cast<K3bDirItem*>( item );
TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> itDirItem = m_itemMap.tqfind( dirItem ); TQMapIterator<K3bDirItem*, K3bDataDirViewItem*> itDirItem = m_itemMap.find( dirItem );
if( itDirItem == m_itemMap.end() ) { if( itDirItem == m_itemMap.end() ) {
K3bDataDirViewItem* parentViewItem = m_itemMap[dirItem->tqparent()]; K3bDataDirViewItem* parentViewItem = m_itemMap[dirItem->tqparent()];
K3bDataDirViewItem* newDirItem = new K3bDataDirViewItem( dirItem, parentViewItem ); K3bDataDirViewItem* newDirItem = new K3bDataDirViewItem( dirItem, parentViewItem );

@ -153,7 +153,7 @@ void K3bDataFileView::slotDataItemRemoved( K3bDataItem* item )
} }
} }
if( m_itemMap.tqcontains( item ) ) { if( m_itemMap.contains( item ) ) {
delete m_itemMap[item]; delete m_itemMap[item];
m_itemMap.remove(item); m_itemMap.remove(item);
} }
@ -166,7 +166,7 @@ void K3bDataFileView::checkForNewItems()
// add items that are not there yet // add items that are not there yet
for( TQPtrListIterator<K3bDataItem> it( m_currentDir->tqchildren() ); it.current(); ++it ) { for( TQPtrListIterator<K3bDataItem> it( m_currentDir->tqchildren() ); it.current(); ++it ) {
if( !m_itemMap.tqcontains( it.current() ) ) { if( !m_itemMap.contains( it.current() ) ) {
slotItemAdded( it.current() ); slotItemAdded( it.current() );
} }
} }

@ -353,7 +353,7 @@ void K3bDataImageSettingsWidget::load( const K3bIsoOptions& o )
case K3bIsoOptions::extended: case K3bIsoOptions::extended:
m_comboSpaceHandling->setCurrentItem( WS_EXTENDED_STRIP ); m_comboSpaceHandling->setCurrentItem( WS_EXTENDED_STRIP );
break; break;
case K3bIsoOptions::tqreplace: case K3bIsoOptions::replace:
m_comboSpaceHandling->setCurrentItem( WS_REPLACE ); m_comboSpaceHandling->setCurrentItem( WS_REPLACE );
break; break;
default: default:
@ -387,7 +387,7 @@ void K3bDataImageSettingsWidget::save( K3bIsoOptions& o )
o.setWhiteSpaceTreatment( K3bIsoOptions::extended ); o.setWhiteSpaceTreatment( K3bIsoOptions::extended );
break; break;
case WS_REPLACE: case WS_REPLACE:
o.setWhiteSpaceTreatment( K3bIsoOptions::tqreplace ); o.setWhiteSpaceTreatment( K3bIsoOptions::replace );
break; break;
default: default:
o.setWhiteSpaceTreatment( K3bIsoOptions::noChange ); o.setWhiteSpaceTreatment( K3bIsoOptions::noChange );

@ -99,7 +99,7 @@ K3bDataPropertiesDialog::K3bDataPropertiesDialog( K3bDataItem* dataItem, TQWidge
m_labelType->setText( kFileItem.mimeComment() ); m_labelType->setText( kFileItem.mimeComment() );
m_labelLocalName->setText( kFileItem.name() ); m_labelLocalName->setText( kFileItem.name() );
TQString localLocation = kFileItem.url().path(-1); TQString localLocation = kFileItem.url().path(-1);
localLocation.truncate( localLocation.tqfindRev('/') ); localLocation.truncate( localLocation.findRev('/') );
m_labelLocalLocation->setText( localLocation ); m_labelLocalLocation->setText( localLocation );
m_labelSize->setText( KIO::convertSize(dataItem->size()) ); m_labelSize->setText( KIO::convertSize(dataItem->size()) );
} }
@ -132,7 +132,7 @@ K3bDataPropertiesDialog::K3bDataPropertiesDialog( K3bDataItem* dataItem, TQWidge
TQString location = "/" + dataItem->k3bPath(); TQString location = "/" + dataItem->k3bPath();
if( location[location.length()-1] == '/' ) if( location[location.length()-1] == '/' )
location.truncate( location.length()-1 ); location.truncate( location.length()-1 );
location.truncate( location.tqfindRev('/') ); location.truncate( location.findRev('/') );
if( location.isEmpty() ) if( location.isEmpty() )
location = "/"; location = "/";
m_labelLocation->setText( location ); m_labelLocation->setText( location );

@ -384,7 +384,7 @@ void K3bDataUrlAddingDialog::slotAddUrls()
// and if so handle it properly // and if so handle it properly
// //
if( valid ) { if( valid ) {
if( K3bDataItem* oldItem = dir->tqfind( newName ) ) { if( K3bDataItem* oldItem = dir->find( newName ) ) {
// //
// reuse an existing dir // reuse an existing dir
// //
@ -450,7 +450,7 @@ void K3bDataUrlAddingDialog::slotAddUrls()
case 2: // replace all case 2: // replace all
m_bExistingItemsReplaceAll = true; m_bExistingItemsReplaceAll = true;
// fallthrough // fallthrough
case 1: // tqreplace case 1: // replace
// if we replace an item from an old session the K3bFileItem constructor takes care // if we replace an item from an old session the K3bFileItem constructor takes care
// of replacing the item // of replacing the item
if( !oldItem->isFromOldSession() ) if( !oldItem->isFromOldSession() )
@ -618,7 +618,7 @@ void K3bDataUrlAddingDialog::slotCopyMoveItems()
// //
// Let's see if an item with that name alredy exists // Let's see if an item with that name alredy exists
// //
if( K3bDataItem* oldItem = dir->tqfind( item->k3bName() ) ) { if( K3bDataItem* oldItem = dir->find( item->k3bName() ) ) {
// //
// reuse an existing dir: move all child items into the old dir // reuse an existing dir: move all child items into the old dir
// //
@ -686,7 +686,7 @@ void K3bDataUrlAddingDialog::slotCopyMoveItems()
case 2: // replace all case 2: // replace all
m_bExistingItemsReplaceAll = true; m_bExistingItemsReplaceAll = true;
// fallthrough // fallthrough
case 1: // tqreplace case 1: // replace
// //
// if we replace an item from an old session K3bDirItem::addDataItem takes care // if we replace an item from an old session K3bDirItem::addDataItem takes care
// of replacing the item // of replacing the item
@ -751,7 +751,7 @@ bool K3bDataUrlAddingDialog::getNewName( const TQString& oldName, K3bDirItem* di
i18n("A file with that name already exists. Please enter a new name:"), i18n("A file with that name already exists. Please enter a new name:"),
newName, &ok, this, "renamedialog", validator ); newName, &ok, this, "renamedialog", validator );
} while( ok && dir->tqfind( newName ) ); } while( ok && dir->find( newName ) );
delete validator; delete validator;

@ -219,7 +219,7 @@ void K3bMovixListView::slotNewFileItems()
K3bMovixFileItem* lastItem = 0; K3bMovixFileItem* lastItem = 0;
for( TQPtrListIterator<K3bMovixFileItem> it( m_doc->movixFileItems() ); it.current(); ++it ) { for( TQPtrListIterator<K3bMovixFileItem> it( m_doc->movixFileItems() ); it.current(); ++it ) {
K3bMovixFileItem* item = it.current(); K3bMovixFileItem* item = it.current();
if( !m_itemMap.tqcontains( item ) ) if( !m_itemMap.contains( item ) )
m_itemMap.insert( item, new K3bMovixFileViewItem( m_doc, item, this, lastItem ? m_itemMap[lastItem] : 0L ) ); m_itemMap.insert( item, new K3bMovixFileViewItem( m_doc, item, this, lastItem ? m_itemMap[lastItem] : 0L ) );
if( item->subTitleItem() ) { if( item->subTitleItem() ) {
@ -240,7 +240,7 @@ void K3bMovixListView::slotNewFileItems()
void K3bMovixListView::slotFileItemRemoved( K3bMovixFileItem* item ) void K3bMovixListView::slotFileItemRemoved( K3bMovixFileItem* item )
{ {
if( m_itemMap.tqcontains( item ) ) { if( m_itemMap.contains( item ) ) {
K3bMovixFileViewItem* vi = m_itemMap[item]; K3bMovixFileViewItem* vi = m_itemMap[item];
m_itemMap.erase(item); m_itemMap.erase(item);
delete vi; delete vi;
@ -250,7 +250,7 @@ void K3bMovixListView::slotFileItemRemoved( K3bMovixFileItem* item )
void K3bMovixListView::slotSubTitleItemRemoved( K3bMovixFileItem* item ) void K3bMovixListView::slotSubTitleItemRemoved( K3bMovixFileItem* item )
{ {
if( m_itemMap.tqcontains( item ) ) { if( m_itemMap.contains( item ) ) {
K3bMovixFileViewItem* vi = m_itemMap[item]; K3bMovixFileViewItem* vi = m_itemMap[item];
if( vi->childCount() >= 1 ) if( vi->childCount() >= 1 )
delete vi->firstChild(); delete vi->firstChild();

@ -65,7 +65,7 @@ public:
} }
void setLanguage( const TQString& l ) { void setLanguage( const TQString& l ) {
TQMap<TQString,int>::const_iterator it = m_indexMap.tqfind(l); TQMap<TQString,int>::const_iterator it = m_indexMap.find(l);
if( it == m_indexMap.end() ) if( it == m_indexMap.end() )
m_box->setCurrentItem( 0 ); m_box->setCurrentItem( 0 );
else else

@ -245,7 +245,7 @@ void K3bMusicBrainzJob::slotMbJobFinished( bool success )
// so to not let the user have to choose between two equal entries we trim the list down // so to not let the user have to choose between two equal entries we trim the list down
for( TQStringList::const_iterator it = resultStrings.begin(); for( TQStringList::const_iterator it = resultStrings.begin();
it != resultStrings.end(); ++it ) it != resultStrings.end(); ++it )
if( resultStringsUnique.tqfind( *it ) == resultStringsUnique.end() ) if( resultStringsUnique.find( *it ) == resultStringsUnique.end() )
resultStringsUnique.append( *it ); resultStringsUnique.append( *it );
TQString s; TQString s;
@ -264,7 +264,7 @@ void K3bMusicBrainzJob::slotMbJobFinished( bool success )
s = resultStringsUnique.first(); s = resultStringsUnique.first();
if( ok ) { if( ok ) {
int i = resultStrings.tqfindIndex( s ); int i = resultStrings.findIndex( s );
m_tracks.current()->setTitle( m_mbThread->title(i) ); m_tracks.current()->setTitle( m_mbThread->title(i) );
m_tracks.current()->setArtist( m_mbThread->artist(i) ); m_tracks.current()->setArtist( m_mbThread->artist(i) );
} }

@ -250,7 +250,7 @@ void K3bVcdListView::slotUpdateItems()
K3bVcdTrack * track = m_doc->first(); K3bVcdTrack * track = m_doc->first();
K3bVcdTrack* lastTrack = 0; K3bVcdTrack* lastTrack = 0;
while ( track != 0 ) { while ( track != 0 ) {
if ( !m_itemMap.tqcontains( track ) ) if ( !m_itemMap.contains( track ) )
m_itemMap.insert( track, new K3bVcdListViewItem( track, this, m_itemMap[ lastTrack ] ) ); m_itemMap.insert( track, new K3bVcdListViewItem( track, this, m_itemMap[ lastTrack ] ) );
lastTrack = track; lastTrack = track;

@ -159,7 +159,7 @@ void K3bVcdTrackDialog::slotApply()
} }
TQMap<TQString, K3bVcdTrack*>::Iterator mit; TQMap<TQString, K3bVcdTrack*>::Iterator mit;
mit = m_numkeysmap.tqfind( it.current() ->text( 1 ) ); mit = m_numkeysmap.find( it.current() ->text( 1 ) );
if ( mit != m_numkeysmap.end() ) if ( mit != m_numkeysmap.end() )
if ( mit.data() ) { if ( mit.data() ) {
selectedTrack->setDefinedNumKey( it.current() ->text( 0 ).toInt(), mit.data() ); selectedTrack->setDefinedNumKey( it.current() ->text( 0 ).toInt(), mit.data() );
@ -718,11 +718,11 @@ void K3bVcdTrackDialog::setDefinedNumKeys( )
while ( it.current() ) { while ( it.current() ) {
int itemId = it.current() ->text( 0 ).toInt(); int itemId = it.current() ->text( 0 ).toInt();
TQMap<int, K3bVcdTrack*>::const_iterator keyit = definedkeysmap.tqfind( itemId ); TQMap<int, K3bVcdTrack*>::const_iterator keyit = definedkeysmap.find( itemId );
if ( keyit != definedkeysmap.end() ) { if ( keyit != definedkeysmap.end() ) {
if ( keyit.data() ) { if ( keyit.data() ) {
if ( m_tracks.tqfindRef( keyit.data() ) >= 0 ) { if ( m_tracks.findRef( keyit.data() ) >= 0 ) {
it.current() ->setText( 1 , displayName( keyit.data() ) ) ; it.current() ->setText( 1 , displayName( keyit.data() ) ) ;
} else { } else {
it.current() ->setText( 1 , "" ) ; it.current() ->setText( 1 , "" ) ;

@ -208,7 +208,7 @@ bool KoStore::open( const TQString & _name )
if ( m_mode == Write ) if ( m_mode == Write )
{ {
kdDebug(s_area) << "KoStore: opening for writing '" << m_sName << "'" << endl; kdDebug(s_area) << "KoStore: opening for writing '" << m_sName << "'" << endl;
if ( m_strFiles.tqfindIndex( m_sName ) != -1 ) // just check if it's there if ( m_strFiles.findIndex( m_sName ) != -1 ) // just check if it's there
{ {
kdWarning(s_area) << "KoStore: Duplicate filename " << m_sName << endl; kdWarning(s_area) << "KoStore: Duplicate filename " << m_sName << endl;
//return KIO::ERR_FILE_ALREADY_EXIST; //return KIO::ERR_FILE_ALREADY_EXIST;
@ -379,7 +379,7 @@ bool KoStore::enterDirectory( const TQString& directory )
bool success = true; bool success = true;
TQString tmp( directory ); TQString tmp( directory );
while ( ( pos = tmp.tqfind( '/' ) ) != -1 && while ( ( pos = tmp.find( '/' ) ) != -1 &&
( success = enterDirectoryInternal( tmp.left( pos ) ) ) ) ( success = enterDirectoryInternal( tmp.left( pos ) ) ) )
tmp = tmp.mid( pos + 1 ); tmp = tmp.mid( pos + 1 );
@ -562,7 +562,7 @@ TQString KoStore::expandEncodedPath( TQString intern ) const
TQString result; TQString result;
int pos; int pos;
if ( ( pos = intern.tqfindRev( '/', -1 ) ) != -1 ) { if ( ( pos = intern.findRev( '/', -1 ) ) != -1 ) {
result = expandEncodedDirectory( intern.left( pos ) ) + '/'; result = expandEncodedDirectory( intern.left( pos ) ) + '/';
intern = intern.mid( pos + 1 ); intern = intern.mid( pos + 1 );
} }
@ -595,7 +595,7 @@ TQString KoStore::expandEncodedDirectory( TQString intern ) const
TQString result; TQString result;
int pos; int pos;
while ( ( pos = intern.tqfind( '/' ) ) != -1 ) { while ( ( pos = intern.find( '/' ) ) != -1 ) {
if ( TQChar(intern.at(0)).isDigit() ) if ( TQChar(intern.at(0)).isDigit() )
result += "part"; result += "part";
result += intern.left( pos + 1 ); // copy numbers (or "pictures") + "/" result += intern.left( pos + 1 ); // copy numbers (or "pictures") + "/"

@ -171,7 +171,7 @@ void K3bAudioConvertingOptionWidget::slotUpdateFreeTempSpace()
TQString path = m_editBaseDir->url(); TQString path = m_editBaseDir->url();
if( !TQFile::exists( path ) ) if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') ); path.truncate( path.findRev('/') );
unsigned long size, avail; unsigned long size, avail;
if( K3b::kbFreeOnFs( path, size, avail ) ) { if( K3b::kbFreeOnFs( path, size, avail ) ) {
@ -257,7 +257,7 @@ void K3bAudioConvertingOptionWidget::saveConfig( KConfigBase* c )
c->writeEntry( "create_playlist", m_checkCreatePlaylist->isChecked() ); c->writeEntry( "create_playlist", m_checkCreatePlaylist->isChecked() );
c->writeEntry( "relative_path_in_playlist", m_checkPlaylistRelative->isChecked() ); c->writeEntry( "relative_path_in_playlist", m_checkPlaylistRelative->isChecked() );
if( d->extensionMap.tqcontains(m_comboFileType->currentItem()) ) if( d->extensionMap.contains(m_comboFileType->currentItem()) )
c->writeEntry( "filetype", d->extensionMap[m_comboFileType->currentItem()] ); c->writeEntry( "filetype", d->extensionMap[m_comboFileType->currentItem()] );
else else
c->writeEntry( "filetype", "wav" ); c->writeEntry( "filetype", "wav" );

@ -108,7 +108,7 @@ void K3bAudioProjectConvertingThread::run()
if( m_singleFile ) { if( m_singleFile ) {
TQString& filename = m_tracks[0].second; TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.tqfindRev("/") ); TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) { if( !KStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
emitFinished(false); emitFinished(false);
@ -194,7 +194,7 @@ void K3bAudioProjectConvertingThread::run()
bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const TQString& filename ) bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const TQString& filename )
{ {
TQString dir = filename.left( filename.tqfindRev("/") ); TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) { if( !KStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
return false; return false;
@ -301,7 +301,7 @@ void K3bAudioProjectConvertingThread::cancel()
bool K3bAudioProjectConvertingThread::writePlaylist() bool K3bAudioProjectConvertingThread::writePlaylist()
{ {
// this is an absolut path so there is always a "/" // this is an absolut path so there is always a "/"
TQString playlistDir = m_playlistFilename.left( m_playlistFilename.tqfindRev( "/" ) ); TQString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) );
if( !KStandardDirs::makeDir( playlistDir ) ) { if( !KStandardDirs::makeDir( playlistDir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR );
@ -324,8 +324,8 @@ bool K3bAudioProjectConvertingThread::writePlaylist()
if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() ) if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() )
t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl; t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl;
else else
t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1, t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5) m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5)
<< endl; // filename without extension << endl; // filename without extension
// filename // filename
@ -345,9 +345,9 @@ bool K3bAudioProjectConvertingThread::writePlaylist()
if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() ) if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() )
t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl; t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl;
else else
t << m_tracks[i].second.mid(m_tracks[i].second.tqfindRev("/") + 1, t << m_tracks[i].second.mid(m_tracks[i].second.findRev("/") + 1,
m_tracks[i].second.length() m_tracks[i].second.length()
- m_tracks[i].second.tqfindRev("/") - 5) - m_tracks[i].second.findRev("/") - 5)
<< endl; // filename without extension << endl; // filename without extension
// filename // filename
@ -406,7 +406,7 @@ bool K3bAudioProjectConvertingThread::writeCueFile()
// use the same base name as the image file // use the same base name as the image file
TQString cueFile = m_tracks[0].second; TQString cueFile = m_tracks[0].second;
cueFile.truncate( cueFile.tqfindRev(".") ); cueFile.truncate( cueFile.findRev(".") );
cueFile += ".cue"; cueFile += ".cue";
emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO ); emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO );
@ -421,17 +421,17 @@ TQString K3bAudioProjectConvertingThread::findRelativePath( const TQString& absP
TQString path = K3b::fixupPath( absPath ); TQString path = K3b::fixupPath( absPath );
// both paths have an equal beginning. That's just how it's configured by K3b // both paths have an equal beginning. That's just how it's configured by K3b
int pos = baseDir_.tqfind( "/" ); int pos = baseDir_.find( "/" );
int oldPos = pos; int oldPos = pos;
while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) { while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) {
oldPos = pos; oldPos = pos;
pos = baseDir_.tqfind( "/", pos+1 ); pos = baseDir_.find( "/", pos+1 );
} }
// now the paths are equal up to oldPos, so that's how "deep" we go // now the paths are equal up to oldPos, so that's how "deep" we go
path = path.mid( oldPos+1 ); path = path.mid( oldPos+1 );
baseDir_ = baseDir_.mid( oldPos+1 ); baseDir_ = baseDir_.mid( oldPos+1 );
int numberOfDirs = baseDir_.tqcontains( '/' ); int numberOfDirs = baseDir_.contains( '/' );
for( int i = 0; i < numberOfDirs; ++i ) for( int i = 0; i < numberOfDirs; ++i )
path.prepend( "../" ); path.prepend( "../" );

@ -194,7 +194,7 @@ void K3bAudioRipThread::run()
if( m_singleFile ) { if( m_singleFile ) {
TQString& filename = m_tracks[0].second; TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.tqfindRev("/") ); TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) { if( !KStandardDirs::makeDir( dir, 0777 ) ) {
d->paranoiaLib->close(); d->paranoiaLib->close();
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
@ -298,7 +298,7 @@ bool K3bAudioRipThread::ripTrack( int track, const TQString& filename )
long trackSectorsRead = 0; long trackSectorsRead = 0;
TQString dir = filename.left( filename.tqfindRev("/") ); TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) { if( !KStandardDirs::makeDir( dir, 0777 ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
return false; return false;
@ -444,7 +444,7 @@ void K3bAudioRipThread::cleanupAfterCancellation()
bool K3bAudioRipThread::writePlaylist() bool K3bAudioRipThread::writePlaylist()
{ {
// this is an absolut path so there is always a "/" // this is an absolut path so there is always a "/"
TQString playlistDir = m_playlistFilename.left( m_playlistFilename.tqfindRev( "/" ) ); TQString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) );
if( !KStandardDirs::makeDir( playlistDir ) ) { if( !KStandardDirs::makeDir( playlistDir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR ); emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR );
@ -467,8 +467,8 @@ bool K3bAudioRipThread::writePlaylist()
if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() ) if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() )
t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl; t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl;
else else
t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1, t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5) m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5)
<< endl; // filename without extension << endl; // filename without extension
// filename // filename
@ -488,9 +488,9 @@ bool K3bAudioRipThread::writePlaylist()
if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() ) if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() )
t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl; t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl;
else else
t << m_tracks[i].second.mid(m_tracks[i].second.tqfindRev("/") + 1, t << m_tracks[i].second.mid(m_tracks[i].second.findRev("/") + 1,
m_tracks[i].second.length() m_tracks[i].second.length()
- m_tracks[i].second.tqfindRev("/") - 5) - m_tracks[i].second.findRev("/") - 5)
<< endl; // filename without extension << endl; // filename without extension
// filename // filename
@ -548,7 +548,7 @@ bool K3bAudioRipThread::writeCueFile()
// use the same base name as the image file // use the same base name as the image file
TQString cueFile = m_tracks[0].second; TQString cueFile = m_tracks[0].second;
cueFile.truncate( cueFile.tqfindRev(".") ); cueFile.truncate( cueFile.findRev(".") );
cueFile += ".cue"; cueFile += ".cue";
emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO ); emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO );
@ -563,17 +563,17 @@ TQString K3bAudioRipThread::findRelativePath( const TQString& absPath, const TQS
TQString path = K3b::fixupPath( absPath ); TQString path = K3b::fixupPath( absPath );
// both paths have an equal beginning. That's just how it's configured by K3b // both paths have an equal beginning. That's just how it's configured by K3b
int pos = baseDir_.tqfind( "/" ); int pos = baseDir_.find( "/" );
int oldPos = pos; int oldPos = pos;
while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) { while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) {
oldPos = pos; oldPos = pos;
pos = baseDir_.tqfind( "/", pos+1 ); pos = baseDir_.find( "/", pos+1 );
} }
// now the paths are equal up to oldPos, so that's how "deep" we go // now the paths are equal up to oldPos, so that's how "deep" we go
path = path.mid( oldPos+1 ); path = path.mid( oldPos+1 );
baseDir_ = baseDir_.mid( oldPos+1 ); baseDir_ = baseDir_.mid( oldPos+1 );
int numberOfDirs = baseDir_.tqcontains( '/' ); int numberOfDirs = baseDir_.contains( '/' );
for( int i = 0; i < numberOfDirs; ++i ) for( int i = 0; i < numberOfDirs; ++i )
path.prepend( "../" ); path.prepend( "../" );

@ -28,7 +28,7 @@
TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
unsigned int trackNumber, unsigned int trackNumber,
const TQString& pattern, const TQString& pattern,
bool tqreplace, bool replace,
const TQString& replaceString ) const TQString& replaceString )
{ {
if( entry.titles.count() < trackNumber ) if( entry.titles.count() < trackNumber )
@ -115,18 +115,18 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
switch( c ) { switch( c ) {
case ARTIST: case ARTIST:
s = entry.artists[trackNumber-1]; s = entry.artists[trackNumber-1];
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); // for conditional inclusion s.replace( '}', '*' ); // for conditional inclusion
dir.append( s.isEmpty() dir.append( s.isEmpty()
? i18n("unknown") + TQString(" %1").tqarg(trackNumber) ? i18n("unknown") + TQString(" %1").tqarg(trackNumber)
: s ); : s );
break; break;
case TITLE: case TITLE:
s = entry.titles[trackNumber-1]; s = entry.titles[trackNumber-1];
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); s.replace( '}', '*' );
dir.append( s.isEmpty() dir.append( s.isEmpty()
? i18n("Track %1").tqarg(trackNumber) ? i18n("Track %1").tqarg(trackNumber)
: s ); : s );
@ -139,16 +139,16 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
break; break;
case COMMENT: case COMMENT:
s = entry.extInfos[trackNumber-1]; s = entry.extInfos[trackNumber-1];
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); s.replace( '}', '*' );
dir.append( s ); dir.append( s );
break; break;
case GENRE: case GENRE:
s = ( entry.genre.isEmpty() ? entry.category : entry.genre ); s = ( entry.genre.isEmpty() ? entry.category : entry.genre );
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); s.replace( '}', '*' );
dir.append( s ); dir.append( s );
break; break;
case ALBUMARTIST: case ALBUMARTIST:
@ -157,17 +157,17 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
break; break;
case ALBUMTITLE: case ALBUMTITLE:
s = entry.cdTitle; s = entry.cdTitle;
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); s.replace( '}', '*' );
dir.append( s.isEmpty() dir.append( s.isEmpty()
? i18n("unknown") : s ); ? i18n("unknown") : s );
break; break;
case ALBUMCOMMENT: case ALBUMCOMMENT:
s = entry.cdExtInfo; s = entry.cdExtInfo;
s.tqreplace( '/', '_' ); s.replace( '/', '_' );
s.tqreplace( '*', '_' ); s.replace( '*', '_' );
s.tqreplace( '}', '*' ); s.replace( '}', '*' );
dir.append( s ); // I think it makes more sense to allow empty comments dir.append( s ); // I think it makes more sense to allow empty comments
break; break;
case DATE: case DATE:
@ -267,7 +267,7 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
else { // with string matching, e.g. ?y='2004'{text} else { // with string matching, e.g. ?y='2004'{text}
// Be aware that there might be ' in the condition text // Be aware that there might be ' in the condition text
int endOfCondition = dir.tqfind( '{', offset+4 )-1; int endOfCondition = dir.find( '{', offset+4 )-1;
TQString condition = dir.mid( offset+4, TQString condition = dir.mid( offset+4,
endOfCondition - (offset+4) ); endOfCondition - (offset+4) );
@ -280,7 +280,7 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
isIncluded = !isIncluded; isIncluded = !isIncluded;
// Leave it when it's '@'. // Leave it when it's '@'.
dir.tqreplace( offset, length, ( isIncluded ? inclusion : TQString("") ) ); dir.replace( offset, length, ( isIncluded ? inclusion : TQString("") ) );
if( isIncluded == TRUE ) if( isIncluded == TRUE )
i -= length - inclusion.length(); i -= length - inclusion.length();
@ -289,17 +289,17 @@ TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry,
continue; continue;
} // end of tqreplace (at closing bracket '}') } // end of replace (at closing bracket '}')
} // end of conditional inclusion for(...) } // end of conditional inclusion for(...)
// end of Conditional Inclusion */ // end of Conditional Inclusion */
dir.tqreplace( '*', '}' ); // bring the brackets back, if there were any dir.replace( '*', '}' ); // bring the brackets back, if there were any
if( tqreplace ) if( replace )
dir.tqreplace( TQRegExp( "\\s" ), replaceString ); dir.replace( TQRegExp( "\\s" ), replaceString );
return dir; return dir;
} }

@ -31,7 +31,7 @@ class K3bPatternParser
static TQString parsePattern( const K3bCddbResultEntry& entry, static TQString parsePattern( const K3bCddbResultEntry& entry,
unsigned int trackNumber, unsigned int trackNumber,
const TQString& pattern, const TQString& pattern,
bool tqreplace = false, bool replace = false,
const TQString& replaceString = "_" ); const TQString& replaceString = "_" );
private: private:

@ -90,7 +90,7 @@ void K3bVideoCdInfo::slotParseOutput( KProcess*, char* output, int len )
TQStringList::Iterator end( lines.end()); TQStringList::Iterator end( lines.end());
for ( TQStringList::Iterator str = lines.begin(); str != end; ++str ) { for ( TQStringList::Iterator str = lines.begin(); str != end; ++str ) {
if ( ( *str ).tqcontains( "<?xml" ) ) if ( ( *str ).contains( "<?xml" ) )
m_isXml = true; m_isXml = true;
if ( m_isXml ) if ( m_isXml )
@ -98,7 +98,7 @@ void K3bVideoCdInfo::slotParseOutput( KProcess*, char* output, int len )
else else
kdDebug() << "(K3bVideoCdInfo::slotParseOutput) " << *str << endl; kdDebug() << "(K3bVideoCdInfo::slotParseOutput) " << *str << endl;
if ( ( *str ).tqcontains( "</videocd>" ) ) if ( ( *str ).contains( "</videocd>" ) )
m_isXml = false; m_isXml = false;
} }
} }

@ -97,7 +97,7 @@ void K3bVideoCdRip::vcdxRip()
if ( !bin ) { if ( !bin ) {
kdDebug() << "(K3bVideoCdRip) could not find vcdxrip executable" << endl; kdDebug() << "(K3bVideoCdRip) could not find vcdxrip executable" << endl;
emit infoMessage( i18n( "Could not tqfind %1 executable." ).tqarg( "vcdxrip" ), K3bJob::ERROR ); emit infoMessage( i18n( "Could not find %1 executable." ).tqarg( "vcdxrip" ), K3bJob::ERROR );
emit infoMessage( i18n( "To rip VideoCD's you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO ); emit infoMessage( i18n( "To rip VideoCD's you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO );
emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO ); emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO );
cancelAll(); cancelAll();
@ -288,7 +288,7 @@ void K3bVideoCdRip::slotVcdXRipFinished()
void K3bVideoCdRip::parseInformation( TQString text ) void K3bVideoCdRip::parseInformation( TQString text )
{ {
// parse warning // parse warning
if ( text.tqcontains( "encountered non-form2 sector" ) ) { if ( text.contains( "encountered non-form2 sector" ) ) {
// I think this is an error not a warning. Finish ripping with invalid mpegs. // I think this is an error not a warning. Finish ripping with invalid mpegs.
emit infoMessage( i18n( "%1 encountered non-form2 sector" ).tqarg("Vcdxrip"), K3bJob::ERROR ); emit infoMessage( i18n( "%1 encountered non-form2 sector" ).tqarg("Vcdxrip"), K3bJob::ERROR );
emit infoMessage( i18n( "leaving loop" ), K3bJob::ERROR ); emit infoMessage( i18n( "leaving loop" ), K3bJob::ERROR );
@ -298,22 +298,22 @@ void K3bVideoCdRip::parseInformation( TQString text )
} }
// parse extra info // parse extra info
else if ( text.tqcontains( "detected extended VCD2.0 PBC files" ) ) else if ( text.contains( "detected extended VCD2.0 PBC files" ) )
emit infoMessage( i18n( "detected extended VCD2.0 PBC files" ), K3bJob::INFO ); emit infoMessage( i18n( "detected extended VCD2.0 PBC files" ), K3bJob::INFO );
// parse startposition and extracting sequence info // parse startposition and extracting sequence info
// extracting avseq05.mpg... (start lsn 32603 (+28514)) // extracting avseq05.mpg... (start lsn 32603 (+28514))
else if ( text.startsWith( "extracting" ) ) { else if ( text.startsWith( "extracting" ) ) {
if ( text.tqcontains( "(start lsn" ) ) { if ( text.contains( "(start lsn" ) ) {
int index = text.tqfind( "(start lsn" ); int index = text.find( "(start lsn" );
int end = text.tqfind( " (+" ); int end = text.find( " (+" );
if ( end > 0) { if ( end > 0) {
m_subPosition = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong(); m_subPosition = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong();
} }
else { else {
// found segment here we can get only the start lsn :) // found segment here we can get only the start lsn :)
// extracting item0001.mpg... (start lsn 225, 1 segments) // extracting item0001.mpg... (start lsn 225, 1 segments)
int end = text.tqfind( ",", index ); int end = text.find( ",", index );
int overallPos = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong(); int overallPos = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong();
double relOverallWritten = ( ( double ) overallPos * 2352 ) / ( double ) m_videooptions ->getVideoCdSize() ; double relOverallWritten = ( ( double ) overallPos * 2352 ) / ( double ) m_videooptions ->getVideoCdSize() ;
int newpercent = ( int ) ( 100 * relOverallWritten ); int newpercent = ( int ) ( 100 * relOverallWritten );
@ -325,17 +325,17 @@ void K3bVideoCdRip::parseInformation( TQString text )
index = 11; index = 11;
end = text.tqfind( "(start lsn" ); end = text.find( "(start lsn" );
emit newSubTask( i18n( "Extracting %1" ).tqarg( text.mid( index, end - index ).stripWhiteSpace() ) ); emit newSubTask( i18n( "Extracting %1" ).tqarg( text.mid( index, end - index ).stripWhiteSpace() ) );
} }
// parse extracting files info // parse extracting files info
// extracting CDI/CDI_IMAG.RTF to _cdi_cdi_imag.rtf (lsn 258, size 1315168, raw 1) // extracting CDI/CDI_IMAG.RTF to _cdi_cdi_imag.rtf (lsn 258, size 1315168, raw 1)
else if ( text.tqcontains( "(lsn" ) && text.tqcontains( "size" ) ) { else if ( text.contains( "(lsn" ) && text.contains( "size" ) ) {
int index = 11; int index = 11;
int end = text.tqfind( "to" ); int end = text.find( "to" );
TQString extractFileName = text.mid( index, end - index ).stripWhiteSpace(); TQString extractFileName = text.mid( index, end - index ).stripWhiteSpace();
index = text.tqfind( " to " ); index = text.find( " to " );
end = text.tqfind( " (lsn" ); end = text.find( " (lsn" );
TQString toFileName = text.mid( index + 4, end - index - 4 ).stripWhiteSpace(); TQString toFileName = text.mid( index + 4, end - index - 4 ).stripWhiteSpace();
emit newSubTask( i18n( "Extracting %1 to %2" ).tqarg( extractFileName ).tqarg( toFileName ) ); emit newSubTask( i18n( "Extracting %1 to %2" ).tqarg( extractFileName ).tqarg( toFileName ) );
} }

@ -220,7 +220,7 @@ void K3bVideoCdRippingDialog::slotUpdateFreeSpace()
TQString path = m_editDirectory->url(); TQString path = m_editDirectory->url();
if( !TQFile::exists( path ) ) if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') ); path.truncate( path.findRev('/') );
unsigned long size, avail; unsigned long size, avail;
if( K3b::kbFreeOnFs( path, size, avail ) ) if( K3b::kbFreeOnFs( path, size, avail ) )

@ -262,7 +262,7 @@ void K3bVideoDVDRippingDialog::slotUpdateFilenames()
it != m_titleRipInfos.end(); ++it ) { it != m_titleRipInfos.end(); ++it ) {
TQString f = d->fsInfo.fixupPath( createFilename( it.data(), m_w->m_comboFilenamePattern->currentText() ) ); TQString f = d->fsInfo.fixupPath( createFilename( it.data(), m_w->m_comboFilenamePattern->currentText() ) );
if( m_w->m_checkBlankReplace->isChecked() ) if( m_w->m_checkBlankReplace->isChecked() )
f.tqreplace( TQRegExp( "\\s" ), m_w->m_editBlankReplace->text() ); f.replace( TQRegExp( "\\s" ), m_w->m_editBlankReplace->text() );
it.data().filename = baseDir + f; it.data().filename = baseDir + f;
it.key()->setText( 3, f ); it.key()->setText( 3, f );
} }
@ -331,7 +331,7 @@ TQString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::
// first check if we have a long keyword instead of a one-char // first check if we have a long keyword instead of a one-char
// //
if( pattern[i] == '{' ) { if( pattern[i] == '{' ) {
int j = pattern.tqfind( '}', i ); int j = pattern.find( '}', i );
if( j < 0 ) // no closing bracket -> no valid pattern if( j < 0 ) // no closing bracket -> no valid pattern
c = '*'; c = '*';
else { else {

@ -249,7 +249,7 @@ void K3bVideoDVDRippingWidget::slotUpdateFreeTempSpace()
TQString path = m_editBaseDir->url(); TQString path = m_editBaseDir->url();
if( !TQFile::exists( path ) ) if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') ); path.truncate( path.findRev('/') );
unsigned long size, avail; unsigned long size, avail;
if( K3b::kbFreeOnFs( path, size, avail ) ) { if( K3b::kbFreeOnFs( path, size, avail ) ) {

Loading…
Cancel
Save