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 );
// 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;
@ -289,12 +289,12 @@ void K3bSetup2::updateDevices()
K3bDevice::Device* device = *it;
// check the item on first insertion or if it was checked before
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() );
if( !device->genericDevice().isEmpty() ) {
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") + ")" );
}
}

@ -171,7 +171,7 @@ void K3bCddb::slotQueryFinished( K3bCddbQuery* query )
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];
int port = buf[1].toInt();

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

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

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

@ -101,7 +101,7 @@ static TQString& debianWeirdnessHack( TQString& path )
TQFile f( path );
f.open( IO_ReadOnly );
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;
TQString ext;
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 ) ) {
int pos = -1;
if( wodim ) {
pos = out.output().tqfind( "Wodim" );
pos = out.output().find( "Wodim" );
}
else if( m_dvdPro ) {
pos = out.output().tqfind( "Cdrecord-ProDVD" );
pos = out.output().find( "Cdrecord-ProDVD" );
}
else {
pos = out.output().tqfind( "Cdrecord" );
pos = out.output().find( "Cdrecord" );
}
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos );
pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 );
int endPos = out.output().find( TQRegExp("\\s"), pos+1 );
if( endPos < 0 )
return false;
@ -182,8 +182,8 @@ bool K3bCdrecordProgram::scan( const TQString& p )
if( wodim )
bin->addFeature( "wodim" );
pos = out.output().tqfind( "Copyright") + 14;
endPos = out.output().tqfind( "\n", pos );
pos = out.output().find( "Copyright") + 14;
endPos = out.output().find( "\n", pos );
// 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();
@ -203,17 +203,17 @@ bool K3bCdrecordProgram::scan( const TQString& p )
out.setProcess( &fp );
fp << path << "-help";
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "gracetime" ) )
if( out.output().contains( "gracetime" ) )
bin->addFeature( "gracetime" );
if( out.output().tqcontains( "-overburn" ) )
if( out.output().contains( "-overburn" ) )
bin->addFeature( "overburn" );
if( out.output().tqcontains( "-text" ) )
if( out.output().contains( "-text" ) )
bin->addFeature( "cdtext" );
if( out.output().tqcontains( "-clone" ) )
if( out.output().contains( "-clone" ) )
bin->addFeature( "clone" );
if( out.output().tqcontains( "-tao" ) )
if( out.output().contains( "-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
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
// two checks)
// 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" ) ||
wodim )
bin->addFeature( "xamix" );
@ -303,18 +303,18 @@ bool K3bMkisofsProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = -1;
if( genisoimage )
pos = out.output().tqfind( "genisoimage" );
pos = out.output().find( "genisoimage" );
else
pos = out.output().tqfind( "mkisofs" );
pos = out.output().find( "mkisofs" );
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos );
pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( ' ', pos+1 );
int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 )
return false;
@ -337,15 +337,15 @@ bool K3bMkisofsProgram::scan( const TQString& p )
fp << path << "-help";
out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "-udf" ) )
if( out.output().contains( "-udf" ) )
bin->addFeature( "udf" );
if( out.output().tqcontains( "-dvd-video" ) )
if( out.output().contains( "-dvd-video" ) )
bin->addFeature( "dvd-video" );
if( out.output().tqcontains( "-joliet-long" ) )
if( out.output().contains( "-joliet-long" ) )
bin->addFeature( "joliet-long" );
if( out.output().tqcontains( "-xa" ) )
if( out.output().contains( "-xa" ) )
bin->addFeature( "xa" );
if( out.output().tqcontains( "-sectype" ) )
if( out.output().contains( "-sectype" ) )
bin->addFeature( "sectype" );
// check if we run mkisofs as root
@ -418,17 +418,17 @@ bool K3bReadcdProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = -1;
if( readom )
pos = out.output().tqfind( "readom" );
pos = out.output().find( "readom" );
else
pos = out.output().tqfind( "readcd" );
pos = out.output().find( "readcd" );
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos );
pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( ' ', pos+1 );
int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 )
return false;
@ -451,7 +451,7 @@ bool K3bReadcdProgram::scan( const TQString& p )
fp << path << "-help";
out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "-clone" ) )
if( out.output().contains( "-clone" ) )
bin->addFeature( "clone" );
// check if we run mkisofs as root
@ -507,15 +507,15 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
vp << path ;
K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "Cdrdao version" );
int pos = out.output().find( "Cdrdao version" );
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("[0-9]"), pos );
pos = out.output().find( TQRegExp("[0-9]"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( ' ', pos+1 );
int endPos = out.output().find( ' ', pos+1 );
if( endPos < 0 )
return false;
@ -523,8 +523,8 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
bin->path = path;
bin->version = out.output().mid( pos, endPos-pos );
pos = out.output().tqfind( "(C)", endPos+1 ) + 4;
endPos = out.output().tqfind( '\n', pos );
pos = out.output().find( "(C)", endPos+1 ) + 4;
endPos = out.output().find( '\n', pos );
bin->copyright = out.output().mid( pos, endPos-pos );
}
else {
@ -539,12 +539,12 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
fp << path << "write" << "-h";
out.setProcess( &fp );
if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
if( out.output().tqcontains( "--overburn" ) )
if( out.output().contains( "--overburn" ) )
bin->addFeature( "overburn" );
if( out.output().tqcontains( "--multi" ) )
if( out.output().contains( "--multi" ) )
bin->addFeature( "multisession" );
if( out.output().tqcontains( "--buffer-under-run-protection" ) )
if( out.output().contains( "--buffer-under-run-protection" ) )
bin->addFeature( "disable-burnproof" );
// check if we run cdrdao as root
@ -605,13 +605,13 @@ bool K3bTranscodeProgram::scan( const TQString& p )
vp << appPath << "-v";
K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "transcode v" );
int pos = out.output().find( "transcode v" );
if( pos < 0 )
return false;
pos += 11;
int endPos = out.output().tqfind( TQRegExp("[\\s\\)]"), pos+1 );
int endPos = out.output().find( TQRegExp("[\\s\\)]"), pos+1 );
if( endPos < 0 )
return false;
@ -679,13 +679,13 @@ bool K3bVcdbuilderProgram::scan( const TQString& p )
vp << path << "-V";
K3bProcessOutputCollector out( &vp );
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "GNU VCDImager" );
int pos = out.output().find( "GNU VCDImager" );
if( pos < 0 )
return false;
pos += 14;
int endPos = out.output().tqfind( TQRegExp("[\\n\\)]"), pos+1 );
int endPos = out.output().find( TQRegExp("[\\n\\)]"), pos+1 );
if( endPos < 0 )
return false;
@ -693,8 +693,8 @@ bool K3bVcdbuilderProgram::scan( const TQString& p )
bin->path = path;
bin->version = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
pos = out.output().tqfind( "Copyright" ) + 14;
endPos = out.output().tqfind( "\n", pos );
pos = out.output().find( "Copyright" ) + 14;
endPos = out.output().find( "\n", pos );
bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
}
else {
@ -737,15 +737,15 @@ bool K3bNormalizeProgram::scan( const TQString& p )
vp << path << "--version";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "normalize" );
int pos = out.output().find( "normalize" );
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("\\d"), pos );
pos = out.output().find( TQRegExp("\\d"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 );
int endPos = out.output().find( TQRegExp("\\s"), pos+1 );
if( endPos < 0 )
return false;
@ -753,8 +753,8 @@ bool K3bNormalizeProgram::scan( const TQString& p )
bin->path = path;
bin->version = out.output().mid( pos, endPos-pos );
pos = out.output().tqfind( "Copyright" )+14;
endPos = out.output().tqfind( "\n", pos );
pos = out.output().find( "Copyright" )+14;
endPos = out.output().find( "\n", pos );
bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace();
}
else {
@ -796,15 +796,15 @@ bool K3bGrowisofsProgram::scan( const TQString& p )
vp << path << "-version";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "growisofs" );
int pos = out.output().find( "growisofs" );
if( pos < 0 )
return false;
pos = out.output().tqfind( TQRegExp("\\d"), pos );
pos = out.output().find( TQRegExp("\\d"), pos );
if( pos < 0 )
return false;
int endPos = out.output().tqfind( ",", pos+1 );
int endPos = out.output().find( ",", pos+1 );
if( endPos < 0 )
return false;
@ -863,18 +863,18 @@ bool K3bDvdformatProgram::scan( const TQString& p )
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
// different locales make searching for the +- char difficult
// 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 )
return false;
pos = out.output().tqfind( "version", pos );
pos = out.output().find( "version", pos );
if( pos < 0 )
return false;
pos += 8;
// 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 )
return false;
@ -931,7 +931,7 @@ bool K3bDvdBooktypeProgram::scan( const TQString& p )
vp << path;
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 )
return false;
@ -980,18 +980,18 @@ bool K3bCdda2wavProgram::scan( const TQString& p )
vp << path << "-h";
if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
int pos = out.output().tqfind( "cdda2wav" );
int pos = out.output().find( "cdda2wav" );
if( pos < 0 )
return false;
pos = out.output().tqfind( "Version", pos );
pos = out.output().find( "Version", pos );
if( pos < 0 )
return false;
pos += 8;
// 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 )
return false;
@ -1001,15 +1001,15 @@ bool K3bCdda2wavProgram::scan( const TQString& p )
// features (we do this since the cdda2wav help says that the short
// 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
if( out.output().tqfind( "-no-infofile" ) )
if( out.output().find( "-no-infofile" ) )
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
if( out.output().tqfind( "-bulk" ) )
if( out.output().find( "-bulk" ) )
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
}
else {

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

@ -195,7 +195,7 @@ TQString K3b::parentDir( const TQString& path )
if( path[path.length()-1] == '/' )
tqparent.truncate( tqparent.length()-1 );
int pos = tqparent.tqfindRev( '/' );
int pos = tqparent.findRev( '/' );
if( pos >= 0 )
tqparent.truncate( pos+1 );
else // relative path, do anything...
@ -313,7 +313,7 @@ TQString K3b::cutFilename( const TQString& name, unsigned int len )
TQString ret = name;
// 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 )
len -= (name.length() - pos);
@ -332,7 +332,7 @@ TQString K3b::cutFilename( const TQString& name, unsigned int len )
TQString K3b::removeFilenameExtension( const TQString& name )
{
TQString v = name;
int dotpos = v.tqfindRev( '.' );
int dotpos = v.findRev( '.' );
if( dotpos > 0 )
v.truncate( dotpos );
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)
TQString result = name;
TQString ext;
int pos = name.tqfind( '.', -6 );
int pos = name.find( '.', -6 );
if( pos > 0 ) {
ext = name.mid(pos);
result.truncate( pos );
@ -426,7 +426,7 @@ TQString K3b::resolveLink( const TQString& file )
if( !p.startsWith( "/" ) )
p.prepend( f.dirPath(true) + "/" );
f.setFile( p );
if( steps.tqcontains( f.absFilePath() ) ) {
if( steps.contains( f.absFilePath() ) ) {
kdDebug() << "(K3b) symlink loop detected." << endl;
break;
}

@ -101,7 +101,7 @@ void K3bVersion::setVersion( const TQString& v )
// suffix = s and num = -1 is returned
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 ) {
num = s.toInt();
suffix = "";

@ -96,7 +96,7 @@ bool K3bBinImageWritingJob::prepareWriter()
TQFile f( m_tocFile );
if( f.open( IO_ReadOnly ) ) {
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;
usedWritingApp = K3b::CDRDAO;
}

@ -311,7 +311,7 @@ void K3bCdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh )
}
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 ) ) {
emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR );
d->error = true;

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

@ -85,7 +85,7 @@ void K3bCloneJob::start()
//
const K3bExternalBin* cdrecordBin = k3bcore->externalBinManager()->binObject( "cdrecord" );
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);
m_running = false;
return;

@ -314,7 +314,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh )
//
KIO::filesize_t imageSpaceNeeded = (KIO::filesize_t)(d->lastSector.lba()+1)*2048;
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 ) ) {
emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR );
jobFinished(false);

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

@ -104,7 +104,7 @@ void K3bReadcdReader::start()
// the first thing to do is to check for readcd
d->readcdBinObject = k3bcore->externalBinManager()->binObject( "readcd" );
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);
return;
}
@ -243,7 +243,7 @@ void K3bReadcdReader::slotStdLine( const TQString& line )
else if( line.startsWith( "addr:" ) ) {
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 )
currentReadBlock -= d->firstSector.lba();
if( ok ) {
@ -260,37 +260,37 @@ void K3bReadcdReader::slotStdLine( const TQString& line )
}
else
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 );
}
else if( (pos = line.tqfind("Retrying from sector")) >= 0 ) {
else if( (pos = line.find("Retrying from sector")) >= 0 ) {
// parse the sector
pos += 21;
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 ) {
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 );
}
else if( (pos = line.tqfind("Error on sector")) >= 0 ) {
else if( (pos = line.find("Error on sector")) >= 0 ) {
d->unreadableBlocks++;
pos += 16;
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 ) {
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 );
}
else {

@ -206,8 +206,8 @@ void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const TQString& lin
// parse progress
// encoding frame [185], 24.02 fps, 93.0%, ETA: 0:00:00, ( 0| 0| 0)
if( line.startsWith( "encoding frame" ) ) {
int pos1 = line.tqfind( '[', 15 );
int pos2 = line.tqfind( ']', pos1+1 );
int pos1 = line.find( '[', 15 );
int pos2 = line.find( ']', pos1+1 );
if( pos1 > 0 && pos2 > 0 ) {
bool 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
else if( line.startsWith( "[detectclipping" ) ) {
int pos = line.tqfind( "-j" );
int pos = line.find( "-j" );
if( pos > 0 ) {
TQStringList values = TQStringList::split( ',', line.mid( pos+3 ) );
m_clippingTop = TQMIN( m_clippingTop, values[0].toInt() );

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

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

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

@ -382,7 +382,7 @@ K3bAudioDecoder* K3bAudioDoc::getDecoderForUrl( const KURL& url, bool* reused )
K3bAudioDecoder* decoder = 0;
// 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()];
*reused = true;
}
@ -997,7 +997,7 @@ void K3bAudioDoc::slotTrackRemoved( K3bAudioTrack* track )
void K3bAudioDoc::increaseDecoderUsage( K3bAudioDecoder* decoder )
{
kdDebug() << "(K3bAudioDoc::increaseDecoderUsage)" << endl;
if( !m_decoderUsageCounterMap.tqcontains( decoder ) ) {
if( !m_decoderUsageCounterMap.contains( decoder ) ) {
m_decoderUsageCounterMap[decoder] = 1;
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
emit infoMessage( i18n("Track %1 is already normalized.").tqarg(m_currentTrack), INFO );
m_currentTrack++;
}
else if( line.tqcontains( "--% done") ) {
else if( line.contains( "--% done") ) {
if( m_currentAction == ADJUSTING_LEVELS ) {
emit newTask( i18n("Adjusting volume level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) );
kdDebug() << "(K3bAudioNormalizeJob) adjusting level for track "
@ -148,7 +148,7 @@ void K3bAudioNormalizeJob::slotStdLine( const TQString& line )
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"
pos -= 3;
bool ok;

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

@ -116,13 +116,13 @@ K3b::Msf K3bDataItem::itemBlocks( bool followSymbolicLinks ) const
void K3bDataItem::setK3bName( const TQString& name ) {
if ( name != m_k3bName ) {
// test for not-allowed characters
if( name.tqcontains('/') ) {
if( name.contains('/') ) {
kdDebug() << "(K3bDataItem) name contained invalid characters!" << endl;
return;
}
if( tqparent() ) {
K3bDataItem* item = tqparent()->tqfind( name );
K3bDataItem* item = tqparent()->find( name );
if( item && item != this ) {
kdDebug() << "(K3bDataItem) item with that name already exists." << endl;
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() ) {
// do we replace an old item?
TQString name = item->k3bName();
int cnt = 1;
while( K3bDataItem* oldItem = tqfind( name ) ) {
while( K3bDataItem* oldItem = find( name ) ) {
if( !oldItem->isDir() && oldItem->isFromOldSession() ) {
// in this case we remove this item from it's tqparent and save it in the new one
// to be able to recover it
@ -146,7 +146,7 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item )
K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item )
{
int x = m_tqchildren.tqfindRef( item );
int x = m_tqchildren.findRef( item );
if( x > -1 ) {
K3bDataItem* item = m_tqchildren.take();
updateSize( item, true );
@ -186,7 +186,7 @@ K3bDataItem* K3bDirItem::nextSibling() const
K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const
{
// search for prev in tqchildren
if( m_tqchildren.tqfindRef( prev ) < 0 ) {
if( m_tqchildren.findRef( prev ) < 0 ) {
return 0;
}
else
@ -196,11 +196,11 @@ K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) 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 ) {
if( it.current()->k3bName() == filename )
@ -218,12 +218,12 @@ K3bDataItem* K3bDirItem::findByPath( const TQString& p )
TQString path = p;
if( path.startsWith("/") )
path = path.mid(1);
int pos = path.tqfind( "/" );
int pos = path.find( "/" );
if( pos < 0 )
return tqfind( path );
return find( path );
else {
// do it recursivly
K3bDataItem* item = tqfind( path.left(pos) );
K3bDataItem* item = find( path.left(pos) );
if( item && item->isDir() )
return ((K3bDirItem*)item)->findByPath( path.mid( pos+1 ) );
else
@ -249,7 +249,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath )
TQString restPath;
TQString dirName;
int pos = dirPath.tqfind( '/' );
int pos = dirPath.find( '/' );
if( pos == -1 ) {
dirName = dirPath;
}
@ -258,7 +258,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath )
restPath = dirPath.mid( pos+1 );
}
K3bDataItem* dir = tqfind( dirName );
K3bDataItem* dir = find( dirName );
if( !dir )
dir = new K3bDirItem( dirName, doc(), this );
else if( !dir->isDir() )

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

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

@ -273,7 +273,7 @@ bool K3bFileItem::isValid() const
}
else {
// search for the item in dir
K3bDataItem* d = dir->tqfind( tokens[i] );
K3bDataItem* d = dir->find( tokens[i] );
if( d == 0 )
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.
*/
Id localId() const;

@ -400,7 +400,7 @@ void K3bIsoImager::slotMkisofsPrintSizeFinished()
else {
// parse the stderr output
// 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 )
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
// that contain one or more backslashes
if( item->writtenPath().tqcontains("\\") )
if( item->writtenPath().contains("\\") )
m_containsFilesWithMultibleBackslashes = true;
@ -887,7 +887,7 @@ void K3bIsoImager::writePathSpecForFile( K3bFileItem* item, TQTextStream& stream
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
KTempFile temp;
@ -976,7 +976,7 @@ bool K3bIsoImager::writeSortWeightFile()
K3bDataItem* item = m_doc->root();
while( (item = item->nextSibling()) ) { // we skip the root here
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;
}
else if( item->isDir() ) {
@ -1049,8 +1049,8 @@ TQString K3bIsoImager::escapeGraftPoint( const TQString& str )
++pos;
}
// enc.tqreplace( "\\\\", "\\\\\\\\" );
// enc.tqreplace( "=", "\\=" );
// enc.replace( "\\\\", "\\\\\\\\" );
// enc.replace( "=", "\\=" );
return enc;
}

@ -118,8 +118,8 @@ void K3bIsoOptions::save( KConfigBase* c, bool saveVolumeDesc )
case extended:
c->writeEntry( "white_space_treatment", "extended" );
break;
case tqreplace:
c->writeEntry( "white_space_treatment", "tqreplace" );
case replace:
c->writeEntry( "white_space_treatment", "replace" );
break;
default:
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() ) );
TQString w = c->readEntry( "white_space_treatment", "noChange" );
if( w == "tqreplace" )
options.setWhiteSpaceTreatment( tqreplace );
if( w == "replace" )
options.setWhiteSpaceTreatment( replace );
else if( w == "strip" )
options.setWhiteSpaceTreatment( strip );
else if( w == "extended" )

@ -108,7 +108,7 @@ class LIBK3B_EXPORT K3bIsoOptions
void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; }
// ----------------------------------------------------------------- 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; }
int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; }

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

@ -53,7 +53,7 @@ void K3bMsInfoFetcher::start()
if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) {
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);
return;
}
@ -89,7 +89,7 @@ void K3bMsInfoFetcher::getMsInfo()
bin = k3bcore->externalBinManager()->binObject( "cdrecord" );
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);
return;
}
@ -190,7 +190,7 @@ void K3bMsInfoFetcher::slotProcessExited()
kdDebug() << "(K3bMsInfoFetcher) msinfo fetched" << endl;
// 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 );
if( list.count() == 2 ) {
bool ok1, ok2;

@ -285,7 +285,7 @@ void K3bDvdBooktypeJob::startBooktypeChange()
d->dvdBooktypeBin = k3bcore->externalBinManager()->binObject( "dvd+rw-booktype" );
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;
jobFinished(false);
return;

@ -475,7 +475,7 @@ void K3bCdrdaoWriter::start()
m_cdrdaoBinObject = k3bcore->externalBinManager()->binObject("cdrdao");
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);
return;
}
@ -664,12 +664,12 @@ bool K3bCdrdaoWriter::cueSheet()
if ( !ts.eof() ) {
TQString line = ts.readLine();
f.close();
int pos = line.tqfind( "FILE \"" );
int pos = line.find( "FILE \"" );
if( pos < 0 )
return false;
pos += 6;
int endPos = line.tqfind( "\" BINARY", pos+1 );
int endPos = line.find( "\" BINARY", pos+1 );
if( endPos < 0 )
return false;
@ -802,11 +802,11 @@ void K3bCdrdaoWriter::slotProcessExited( KProcess* p )
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
int pos = line.tqfind( "at speed" );
int po2 = line.tqfind( TQRegExp("\\D"), pos + 9 );
int pos = line.find( "at speed" );
int po2 = line.find( TQRegExp("\\D"), pos + 9 );
int speed = line.mid( pos+9, po2-pos-9 ).toInt();
if( speed < d->usedSpeed )
{
@ -835,7 +835,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str )
{
parseCdrdaoError( str );
}
else if( (str).startsWith( "Wrote" ) && !str.tqcontains("blocks") )
else if( (str).startsWith( "Wrote" ) && !str.contains("blocks") )
{
parseCdrdaoWrote( str );
}
@ -870,7 +870,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str )
}
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
unknownCdrdaoLine(str);
@ -880,52 +880,52 @@ void K3bCdrdaoWriter::parseCdrdaoError( const TQString& line )
{
int pos = -1;
if( line.tqcontains( "No driver found" ) ||
line.tqcontains( "use option --driver" ) )
if( line.contains( "No driver found" ) ||
line.contains( "use option --driver" ) )
{
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("For most current drives this would be 'generic-mmc'."), K3bJob::ERROR );
m_knownError = true;
}
else if( line.tqcontains( "Cannot setup device" ) )
else if( line.contains( "Cannot setup device" ) )
{
// no nothing...
}
else if( line.tqcontains( "not ready") )
else if( line.contains( "not ready") )
{
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 );
m_knownError = true;
}
else if( (pos = line.tqfind( "Illegal option" )) > 0 ) {
else if( (pos = line.find( "Illegal option" )) > 0 ) {
// ERROR: Illegal option: -wurst
emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrdaoBinObject->name()).tqarg(line.mid(pos+16)),
ERROR );
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 );
if( m_cdrdaoBinObject->hasFeature("overburn") )
emit infoMessage( i18n("Enable overburning in the advanced K3b settings to burn anyway."), INFO );
m_knownError = true;
}
// else if( !line.tqcontains( "remote progress message" ) )
// else if( !line.contains( "remote progress message" ) )
// emit infoMessage( line, K3bJob::ERROR );
}
void K3bCdrdaoWriter::parseCdrdaoWrote( const TQString& line )
{
int pos, po2;
pos = line.tqfind( "Wrote" );
po2 = line.tqfind( " ", pos + 6 );
pos = line.find( "Wrote" );
po2 = line.find( " ", pos + 6 );
int processed = line.mid( pos+6, po2-pos-6 ).toInt();
pos = line.tqfind( "of" );
po2 = line.tqfind( " ", pos + 3 );
pos = line.find( "of" );
po2 = line.find( " ", pos + 3 );
m_size = line.mid( pos+3, po2-pos-3 ).toInt();
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
TQString path = bin->path;
path.truncate( path.tqfindRev("/") );
path.truncate( path.tqfindRev("/") );
path.truncate( path.findRev("/") );
path.truncate( path.findRev("/") );
path += "/share/cdrdao/drivers";
if( TQFile::exists(path) )
return path;

@ -293,7 +293,7 @@ void K3bCdrecordWriter::start()
prepareProcess();
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);
return;
}
@ -406,8 +406,8 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
m_totalTracks = tt;
int sizeStart = line.tqfind( TQRegExp("\\d"), 10 );
int sizeEnd = line.tqfind( "MB", sizeStart );
int sizeStart = line.find( TQRegExp("\\d"), 10 );
int sizeEnd = line.find( "MB", sizeStart );
track.size = line.mid( sizeStart, sizeEnd-sizeStart ).toInt(&ok);
if( ok ) {
@ -474,7 +474,7 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
line.startsWith( m_cdrecordBinObject->path ) ||
line.startsWith( m_cdrecordBinObject->path.left(m_cdrecordBinObject->path.length()-5) ) ) {
// 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" ) ) {
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") ) {
m_cdrecordError = BAD_OPTION;
// parse option
int pos = line.tqfind( "Bad Option" ) + 13;
int pos = line.find( "Bad Option" ) + 13;
int len = line.length() - pos - 1;
emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrecordBinObject->name()).tqarg(line.mid(pos, len)),
ERROR );
@ -556,10 +556,10 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line )
// 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
int pos = line.tqfind( "at speed" );
int pos2 = line.tqfind( "in", pos+9 );
int pos = line.find( "at speed" );
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
if( speed != d->usedSpeed ) {
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 )
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;
}
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;
}
else {

@ -76,7 +76,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
if( line.startsWith( ":-[" ) ) {
// Error
if( line.tqcontains( "ASC=30h" ) )
if( line.contains( "ASC=30h" ) )
m_error = ERROR_MEDIA;
// :-[ 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 ]
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 );
else if( line.startsWith( ":-[ Failed to change write speed" ) ) {
@ -93,10 +93,10 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
}
}
else if( line.startsWith( ":-(" ) ) {
if( line.tqcontains( "No space left on device" ) )
if( line.contains( "No space left on device" ) )
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;
if( k3bcore->globalSettings()->overburn() )
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" ) ) {
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
// since the device is only used there so far...
m_device = 0;
@ -131,34 +131,34 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
// line = line.mid( dev->blockDeviceName().length() );
// if( line.startsWith( "closing.....
else if( line.tqcontains( "closing track" ) ) {
else if( line.contains( "closing track" ) ) {
emit newSubTask( i18n("Closing Track") );
}
else if( line.tqcontains( "closing disc" ) ) {
else if( line.contains( "closing disc" ) ) {
emit newSubTask( i18n("Closing Disk") );
}
else if( line.tqcontains( "closing session" ) ) {
else if( line.contains( "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 infoMessage( i18n("Updating RMA") + "...", K3bJob::INFO );
}
else if( line.tqcontains( "closing session" ) ) {
else if( line.contains( "closing session" ) ) {
emit newSubTask( i18n("Closing Session") );
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 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 );
}
else if( line.tqcontains( "copying volume descriptor" ) ) {
else if( line.contains( "copying volume descriptor" ) ) {
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 ) {
// 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
@ -167,12 +167,12 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
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
// /dev/sr0: "Current Write Speed" is 2.4x1385KBps
pos += 24;
int endPos = line.tqfind( 'x', pos+1 );
int endPos = line.find( 'x', pos+1 );
bool ok = true;
double speed = line.mid( pos, endPos-pos ).toDouble(&ok);
if( ok )
@ -182,13 +182,13 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
else
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
// parse ring buffer fill for growisofs >= 6.0
pos += 4;
int endPos = line.tqfind( '%', pos+1 );
int endPos = line.find( '%', pos+1 );
bool ok = true;
double val = line.mid( pos, endPos-pos ).toDouble( &ok );
if( ok ) {
@ -199,8 +199,8 @@ void K3bGrowisofsHandler::handleLine( const TQString& line )
}
// device buffer for growisofs >= 7.0
pos = line.tqfind( "UBU", pos );
endPos = line.tqfind( '%', pos+5 );
pos = line.find( "UBU", pos );
endPos = line.find( '%', pos+5 );
if( pos > 0 ) {
pos += 4;
val = line.mid( pos, endPos-pos ).toDouble( &ok );

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

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

@ -204,7 +204,7 @@ bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const TQString& originalPath
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
TQFile f( originalPath );
if( f.open( IO_ReadOnly ) ) {
@ -464,7 +464,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath )
TQStringList docPathSections = TQStringList::split( '/', docPath );
K3bDirItem* dir = d->doc->root();
for( TQStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) {
K3bDataItem* next = dir->tqfind( *it );
K3bDataItem* next = dir->find( *it );
if( !next )
dir = new K3bDirItem( *it, d->doc, dir );
else if( next->isDir() )
@ -480,7 +480,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath )
K3bDirItem* delDir = dir;
while( delDir->tqparent() != d->doc->root() )
delDir = delDir->tqparent();
if( d->newMovixItems.tqfindRef( delDir ) == -1 )
if( d->newMovixItems.findRef( delDir ) == -1 )
d->newMovixItems.append( delDir );
}

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

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

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

@ -133,7 +133,7 @@ void K3bVcdJob::start()
emit burning( 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 ) {
m_cueFile = m_doc->vcdImage().left( pos ) + ".cue";
} else {
@ -184,7 +184,7 @@ void K3bVcdJob::vcdxBuild()
const K3bExternalBin* bin = k3bcore ->externalBinManager() ->binObject( "vcdxbuild" );
if ( !bin ) {
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( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO );
cancelAll();
@ -287,7 +287,7 @@ void K3bVcdJob::slotParseVcdxBuildOutput( KProcess*, char* output, int len )
if ( oper == "scan" ) {
// Scan Video Files
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 );
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 )
{
// parse warning
if ( text.tqcontains( "mpeg user scan data: one or more BCD fields out of range for" ) ) {
int index = text.tqfind( " for" );
if ( text.contains( "mpeg user scan data: one or more BCD fields out of range 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 );
} 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( "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" ) ) {
int index = text.tqfind( "(actual pts" );
int index2 = text.tqfind( ", last seen pts" );
int index3 = text.tqfind( ") -- ignoring this aps" );
} else if ( text.contains( "APS' pts seems out of order (actual pts" ) ) {
int index = text.find( "(actual pts" );
int index2 = text.find( ", last seen pts" );
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( "Ignoring this aps" ), K3bJob::INFO );
} else if ( text.tqcontains( "bad packet at packet" ) ) {
int index = text.tqfind( "at packet #" );
int index2 = text.tqfind( "(stream byte offset" );
int index3 = text.tqfind( ") -- remaining " );
int index4 = text.tqfind( "bytes of stream will be ignored" );
} else if ( text.contains( "bad packet at packet" ) ) {
int index = text.find( "at packet #" );
int index2 = text.find( "(stream byte offset" );
int index3 = text.find( ") -- remaining " );
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( "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 i = m_parent->tqfind( this );
int i = m_parent->find( this );
if ( i < 0 )
kdDebug() << "(K3bVcdTrack) I'm not part of my tqparent!" << endl;
return i;
@ -119,23 +119,23 @@ void K3bVcdTrack::delRefFromUs()
void K3bVcdTrack::setPbcTrack( int which, K3bVcdTrack* pbctrack )
{
kdDebug() << "K3bVcdTrack::setPbcTrack " << which << ", " << pbctrack << endl;
m_pbctrackmap.tqreplace( which, pbctrack );
m_pbctrackmap.replace( which, pbctrack );
}
void K3bVcdTrack::setPbcNonTrack( int which, int type )
{
kdDebug() << "K3bVcdTrack::setNonPbcTrack " << which << ", " << type << endl;
m_pbcnontrackmap.tqreplace( which, type );
m_pbcnontrackmap.replace( which, type );
}
void K3bVcdTrack::setUserDefined( int which, bool ud )
{
m_pbcusrdefmap.tqreplace( which, ud );
m_pbcusrdefmap.replace( which, ud );
}
K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which )
{
if ( m_pbctrackmap.tqfind( which ) == m_pbctrackmap.end() )
if ( m_pbctrackmap.find( which ) == m_pbctrackmap.end() )
return 0;
else
return m_pbctrackmap[ which ];
@ -143,7 +143,7 @@ K3bVcdTrack* K3bVcdTrack::getPbcTrack( 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;
else
return m_pbcnontrackmap[ which ];

@ -210,7 +210,7 @@ void K3bVideoDvdImager::cleanup()
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 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; }
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() )
return new K3bCdparanoiaLibData( dev );
else

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

@ -25,7 +25,7 @@ bool K3bExceptions::brokenDaoAudio( K3bDevice::Device* dev )
if( dev->vendor().upper().startsWith("HL-DT-ST") )
if( dev->description().upper().startsWith("RW/DVD GCC-4320B") ||
dev->description().upper().tqcontains("GCE-8520B") )
dev->description().upper().contains("GCE-8520B") )
return true;
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->description().upper().startsWith("LTR-32123S") ||
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") )
return true;

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

@ -59,7 +59,7 @@ int K3bIntMapComboBox::selectedValue() const
void K3bIntMapComboBox::setSelectedValue( int value )
{
if( d->valueIndexMap.tqcontains( value ) )
if( d->valueIndexMap.contains( 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 )
{
if( d->valueIndexMap.tqcontains( value ) )
if( d->valueIndexMap.contains( value ) )
return false;
// FIXME: allow inserition at any index

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

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

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

@ -81,10 +81,10 @@ public:
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() );
if( titleTipRect.tqcontains( pos ) &&
if( titleTipRect.contains( pos ) &&
m_label->d->displayTitle != 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 )
tip( subTitleTipRect, m_label->d->subTitle );
}

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

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE
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
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"
@ -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
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
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include

@ -84,7 +84,7 @@ namespace K3bDevice
private:
// 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_performer;
@ -177,7 +177,7 @@ namespace K3bDevice
private:
// 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;
unsigned int textLengthForPackType( int packType ) const;

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

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

@ -223,7 +223,7 @@ void K3bDevice::HalConnection::addDevice( const char* udi )
TQCString du( 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
// 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 )
{
TQMapIterator<TQCString, TQString> it = d->udiDeviceMap.tqfind( udi );
TQMapIterator<TQCString, TQString> it = d->udiDeviceMap.find( udi );
if( it != d->udiDeviceMap.end() ) {
k3bDebug() << "Unmapping udi " << udi << " from device " << it.data() << endl;
emit deviceRemoved( it.data() );
@ -253,7 +253,7 @@ void K3bDevice::HalConnection::removeDevice( const char* udi )
TQCString du( deviceUdi );
libhal_free_string( deviceUdi );
if( d->udiDeviceMap.tqcontains( du ) ) {
if( d->udiDeviceMap.contains( du ) ) {
//
// A medium has been removed/ejected.
//
@ -276,7 +276,7 @@ int K3bDevice::HalConnection::lock( Device* dev )
DBusMessage* reply = 0;
DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) {
if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) ) {
return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
}
@ -335,7 +335,7 @@ int K3bDevice::HalConnection::unlock( Device* dev )
DBusMessage* reply = 0;
DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) ) {
if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) ) {
return org_freedesktop_Hal_Device_Volume_NoSuchDevice;
}
@ -394,10 +394,10 @@ int K3bDevice::HalConnection::mount( K3bDevice::Device* dev,
DBusMessage* reply = 0;
DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) )
if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
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;
TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]];
@ -474,10 +474,10 @@ int K3bDevice::HalConnection::unmount( K3bDevice::Device* dev,
DBusMessage* reply = 0;
DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) )
if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
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;
TQCString mediumUdi = d->deviceMediumUdiMap[d->deviceUdiMap[dev->blockDeviceName()]];
@ -545,10 +545,10 @@ int K3bDevice::HalConnection::eject( K3bDevice::Device* dev,
DBusMessage* reply = 0;
DBusError error;
if( !d->deviceUdiMap.tqcontains( dev->blockDeviceName() ) )
if( !d->deviceUdiMap.contains( dev->blockDeviceName() ) )
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;
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;
//
// 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
// for example wave files.
//

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

@ -86,7 +86,7 @@ void K3bExternalEncoderEditDialog::slotOk()
i18n("Please specify the command line."),
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,
i18n("Please add the output filename (%f) to the command line."),
i18n("No filename specified") );

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

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

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

@ -41,7 +41,7 @@ bool K3bDataProjectInterface::createFolder( const TQString& name )
bool K3bDataProjectInterface::createFolder( const TQString& name, const TQString& 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) );
return true;
}

@ -85,7 +85,7 @@ void K3bDebuggingOutputDialog::setOutput( const TQMap<TQString, TQStringList>& m
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() ) {
// create new section

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

@ -216,7 +216,7 @@ void K3bDeviceBranchViewItem::paintCell( TQPainter* p, const TQColorGroup& cg, i
}
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 );
TQFont f( listView()->font() );
@ -226,7 +226,7 @@ void K3bDeviceBranchViewItem::paintCell( TQPainter* p, const TQColorGroup& cg, i
p->setFont( f );
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 );
@ -256,12 +256,12 @@ int K3bDeviceBranchViewItem::widthHint() const
if ( m_bCurrent ) {
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.setBold( false );
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
@ -334,7 +334,7 @@ void K3bDeviceTreeToolTip::maybeTip( const TQPoint& pos )
TQGridLayout* lay = new TQGridLayout( tooltip, 2, 2, tooltip->frameWidth()*2 /*margin*/, 6 /*spacing*/ );
TQString text = k3bappcore->mediaCache()->medium( dev ).longString();
int detailsStart = text.tqfind( "<p>", 3 );
int detailsStart = text.find( "<p>", 3 );
TQString details = text.mid( detailsStart );
text.truncate( detailsStart );
@ -579,7 +579,7 @@ KFileTreeBranch* K3bFileTreeView::addBranch( const KURL& url, const TQString& na
void K3bFileTreeView::slotItemExecuted( TQListViewItem* item )
{
KFileTreeViewItem* treeItem = static_cast<KFileTreeViewItem*>(item);
if( d->branchDeviceMap.tqcontains( treeItem->branch() ) &&
if( d->branchDeviceMap.contains( treeItem->branch() ) &&
treeItem == treeItem->branch()->root() ) {
K3bDevice::Device* dev = d->branchDeviceMap[treeItem->branch()];
k3bappcore->appDeviceManager()->setCurrentDevice( dev );
@ -601,7 +601,7 @@ void K3bFileTreeView::followUrl( const KURL& url )
// TODO: first try the current branch
KFileTreeBranchIterator it( branches() );
for( ; *it; ++it ) {
if( !d->branchDeviceMap.tqcontains( *it ) )
if( !d->branchDeviceMap.contains( *it ) )
if( KFileTreeViewItem* item = (*it)->findTVIByURL( url ) ) {
setCurrentItem( item );
setSelected(item, true);
@ -618,7 +618,7 @@ void K3bFileTreeView::slotContextMenu( KListView*, TQListViewItem* item, const T
if( treeItem ) {
K3bDevice::Device* device = 0;
TQMap<KFileTreeBranch*, K3bDevice::Device*>::iterator devIt =
d->branchDeviceMap.tqfind( treeItem->branch() );
d->branchDeviceMap.find( treeItem->branch() );
if( devIt != d->branchDeviceMap.end() )
device = devIt.data();
@ -641,7 +641,7 @@ K3bDevice::Device* K3bFileTreeView::selectedDevice() const
{
KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem());
if( treeItem ) {
if( d->branchDeviceMap.tqcontains( treeItem->branch() ) )
if( d->branchDeviceMap.contains( treeItem->branch() ) )
return d->branchDeviceMap[treeItem->branch()];
}
return 0;
@ -652,7 +652,7 @@ KURL K3bFileTreeView::selectedUrl() const
{
KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(selectedItem());
if( treeItem ) {
if( !d->branchDeviceMap.tqcontains( treeItem->branch() ) )
if( !d->branchDeviceMap.contains( treeItem->branch() ) )
return treeItem->url();
}
return KURL();
@ -684,7 +684,7 @@ void K3bFileTreeView::setSelectedDevice( 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();
m_dirOp->clearFilter();
if( filter.tqfind( '/' ) > -1 ) {
if( filter.find( '/' ) > -1 ) {
TQStringList types = TQStringList::split( " ", filter );
types.prepend( "inode/directory" );
m_dirOp->setMimeFilter( types );

@ -340,7 +340,7 @@ void K3bMediaCache::buildDeviceList( K3bDevice::DeviceManager* dm )
const TQPtrList<K3bDevice::Device>& devices = dm->allDevices();
for( TQPtrListIterator<K3bDevice::Device> it( devices ); *it; ++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() )
m_deviceMap[*it]->blockedId = bi_it.data();
}
@ -356,7 +356,7 @@ void K3bMediaCache::buildDeviceList( K3bDevice::DeviceManager* dm )
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() )
return it.data();
else

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

@ -104,7 +104,7 @@ const TQPtrList<K3bDoc>& K3bProjectManager::projects() const
void K3bProjectManager::addProject( K3bDoc* doc )
{
if( !d->projects.tqcontainsRef( doc ) ) {
if( !d->projects.containsRef( doc ) ) {
kdDebug() << "(K3bProjectManager) adding doc " << doc->URL().path() << endl;
d->projects.append(doc);
@ -120,7 +120,7 @@ void K3bProjectManager::addProject( 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!
//
for( TQPtrListIterator<K3bDoc> it( d->projects );
@ -128,7 +128,7 @@ void K3bProjectManager::removeProject( K3bDoc* doc )
if( it.current() == doc ) {
// 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() ) {
// delete the interface
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!
//
for( TQPtrListIterator<K3bDoc> it( d->projects );
@ -449,7 +449,7 @@ void K3bProjectManager::loadDefaults( 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() ) {
K3bProjectInterface* dcopInterface = 0;
if( doc->type() == K3bDoc::DATA || doc->type() == K3bDoc::DVD )

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

@ -59,8 +59,8 @@
static TQString markupString( const TQString& s_ )
{
TQString s(s_);
s.tqreplace( '<', "&lt;" );
s.tqreplace( '>', "&gt;" );
s.replace( '<', "&lt;" );
s.replace( '>', "&gt;" );
return s;
}
@ -186,9 +186,9 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
// 1. cdrecord, cdrdao
if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) {
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("Install the cdrtools package which tqcontains "
i18n("Install the cdrtools package which contains "
"cdrecord."),
false ) );
}
@ -242,7 +242,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
}
if( !k3bcore->externalBinManager()->foundBin( "cdrdao" ) ) {
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("Install the cdrdao package."),
false ) );
@ -268,7 +268,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
if( !k3bcore->deviceManager()->dvdWriter().isEmpty() ) {
if( !k3bcore->externalBinManager()->foundBin( "growisofs" ) ) {
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. "
"Without growisofs you will not be able to write dvds. "
"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" ) ) {
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("Install the dvd+rw-tools package."),
false ) );
@ -412,7 +412,7 @@ void K3bSystemProblemDialog::checkSystem( TQWidget* tqparent,
if( !k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "hacked-atapi" ) &&
!k3bcore->externalBinManager()->binObject( "cdrdao" )->hasFeature( "plain-atapi") ) {
// FIXME: tqreplace ">" with "&gt;"
// FIXME: replace ">" with "&gt;"
problems.append( K3bSystemProblem( K3bSystemProblem::CRITICAL,
i18n("%1 %2 does not support ATAPI")
.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
//
if( out.output().tqcontains( "1 (" ) )
if( out.output().contains( "1 (" ) )
return 1;
else if( out.output().tqcontains( "0 (" ) )
else if( out.output().contains( "0 (" ) )
return 0;
else
return -1;

@ -93,7 +93,7 @@ unsigned long K3bTempDirSelectionWidget::freeTempSpace() const
TQString path = m_editDirectory->url();
if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') );
path.truncate( path.findRev('/') );
unsigned long size;
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
// in front of it
td.truncate( td.tqfindRev( '/' ) + 1 );
td.truncate( td.findRev( '/' ) + 1 );
return td;
}
@ -248,7 +248,7 @@ void K3bTempDirSelectionWidget::setDefaultImageFileName( const TQString& name )
}
m_defaultImageFileName = name;
if ( !m_defaultImageFileName.tqcontains( '.' ) ) {
if ( !m_defaultImageFileName.contains( '.' ) ) {
m_defaultImageFileName += ".iso";
}
fixTempPath( changeImageName );

@ -57,7 +57,7 @@ TQColor K3bTheme::foregroundColor() 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() )
return *it;
@ -270,7 +270,7 @@ void K3bThemeManager::loadThemes()
// every theme dir needs to contain a k3b.theme file
for( TQStringList::const_iterator entryIt = entries.begin(); entryIt != entries.end(); ++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;
// 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();
if( m_currentTip ) {
// see if we have to hide it
if( !m_currentTipRect.tqcontains( m_lastMousePos ) ) {
if( !m_currentTipRect.contains( m_lastMousePos ) ) {
hideTip();
// 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 ) {
if ( s_allActions[i][0] != '_' ) {
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 );
}
}

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

@ -252,7 +252,7 @@ void K3bBlankingDialog::slotWritingAppChanged(int app)
TQWhatsThis::add( m_comboEraseMode, whatsThisInfo );
// try to reset last mode
if( d->typeComboMap.tqcontains( lastMode ) )
if( d->typeComboMap.contains( lastMode ) )
m_comboEraseMode->setCurrentItem( d->typeComboMap[lastMode] );
else
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 ) {
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];
int port = buf[1].toInt();
if( s.startsWith("Http") )

@ -280,7 +280,7 @@ void K3bAudioTrackView::slotDropped( TQDropEvent* e, TQListViewItem* tqparent, T
//
TQPtrListIterator<K3bAudioDataSource> srcIt( sources );
while( srcIt.current() ) {
if( tracks.tqcontainsRef( srcIt.current()->track() ) )
if( tracks.containsRef( srcIt.current()->track() ) )
sources.removeRef( *srcIt );
else
++srcIt;
@ -439,11 +439,11 @@ void K3bAudioTrackView::slotChanged()
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() ) {
kdDebug() << "(K3bAudioTrackView) new track " << track << endl;
K3bAudioTrackViewItem* prevItem = 0;
if( track->prev() && m_trackItemMap.tqcontains( track->prev() ) )
if( track->prev() && m_trackItemMap.contains( track->prev() ) )
prevItem = m_trackItemMap[track->prev()];
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
// 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()] );
else if( !track->prev() ) {
takeItem( item );
@ -735,7 +735,7 @@ void K3bAudioTrackView::slotRemove()
//
TQPtrListIterator<K3bAudioDataSource> srcIt( sources );
while( srcIt.current() ) {
if( tracks.tqcontainsRef( srcIt.current()->track() ) )
if( tracks.containsRef( srcIt.current()->track() ) )
sources.removeRef( *srcIt );
else
++srcIt;
@ -993,7 +993,7 @@ void K3bAudioTrackView::slotQueryMusicBrainz()
// only one may use the tracks at the same time
if( m_currentlyPlayingTrack &&
tracks.tqcontainsRef( m_currentlyPlayingTrack ) )
tracks.containsRef( m_currentlyPlayingTrack ) )
m_player->stop();
// now do the lookup on the files.

@ -242,7 +242,7 @@ void K3bDataDirTreeView::slotDataItemRemoved( K3bDataItem* item )
{
if( item->isDir() ) {
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() ) {
K3bDataDirViewItem* viewItem = it.data();
m_itemMap.remove( it );
@ -263,7 +263,7 @@ void K3bDataDirTreeView::slotDataItemRemoved( K3bDataItem* item )
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() ) {
setCurrentItem( it.data() );
it.data()->setOpen(true);
@ -454,7 +454,7 @@ void K3bDataDirTreeView::checkForNewItems()
{
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() ) {
K3bDataDirViewItem* parentViewItem = m_itemMap[dirItem->tqparent()];
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];
m_itemMap.remove(item);
}
@ -166,7 +166,7 @@ void K3bDataFileView::checkForNewItems()
// add items that are not there yet
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() );
}
}

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

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

@ -384,7 +384,7 @@ void K3bDataUrlAddingDialog::slotAddUrls()
// and if so handle it properly
//
if( valid ) {
if( K3bDataItem* oldItem = dir->tqfind( newName ) ) {
if( K3bDataItem* oldItem = dir->find( newName ) ) {
//
// reuse an existing dir
//
@ -450,7 +450,7 @@ void K3bDataUrlAddingDialog::slotAddUrls()
case 2: // replace all
m_bExistingItemsReplaceAll = true;
// fallthrough
case 1: // tqreplace
case 1: // replace
// if we replace an item from an old session the K3bFileItem constructor takes care
// of replacing the item
if( !oldItem->isFromOldSession() )
@ -618,7 +618,7 @@ void K3bDataUrlAddingDialog::slotCopyMoveItems()
//
// 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
//
@ -686,7 +686,7 @@ void K3bDataUrlAddingDialog::slotCopyMoveItems()
case 2: // replace all
m_bExistingItemsReplaceAll = true;
// fallthrough
case 1: // tqreplace
case 1: // replace
//
// if we replace an item from an old session K3bDirItem::addDataItem takes care
// 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:"),
newName, &ok, this, "renamedialog", validator );
} while( ok && dir->tqfind( newName ) );
} while( ok && dir->find( newName ) );
delete validator;

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

@ -65,7 +65,7 @@ public:
}
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() )
m_box->setCurrentItem( 0 );
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
for( TQStringList::const_iterator it = resultStrings.begin();
it != resultStrings.end(); ++it )
if( resultStringsUnique.tqfind( *it ) == resultStringsUnique.end() )
if( resultStringsUnique.find( *it ) == resultStringsUnique.end() )
resultStringsUnique.append( *it );
TQString s;
@ -264,7 +264,7 @@ void K3bMusicBrainzJob::slotMbJobFinished( bool success )
s = resultStringsUnique.first();
if( ok ) {
int i = resultStrings.tqfindIndex( s );
int i = resultStrings.findIndex( s );
m_tracks.current()->setTitle( m_mbThread->title(i) );
m_tracks.current()->setArtist( m_mbThread->artist(i) );
}

@ -250,7 +250,7 @@ void K3bVcdListView::slotUpdateItems()
K3bVcdTrack * track = m_doc->first();
K3bVcdTrack* lastTrack = 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 ] ) );
lastTrack = track;

@ -159,7 +159,7 @@ void K3bVcdTrackDialog::slotApply()
}
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.data() ) {
selectedTrack->setDefinedNumKey( it.current() ->text( 0 ).toInt(), mit.data() );
@ -718,11 +718,11 @@ void K3bVcdTrackDialog::setDefinedNumKeys( )
while ( it.current() ) {
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.data() ) {
if ( m_tracks.tqfindRef( keyit.data() ) >= 0 ) {
if ( m_tracks.findRef( keyit.data() ) >= 0 ) {
it.current() ->setText( 1 , displayName( keyit.data() ) ) ;
} else {
it.current() ->setText( 1 , "" ) ;

@ -208,7 +208,7 @@ bool KoStore::open( const TQString & _name )
if ( m_mode == Write )
{
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;
//return KIO::ERR_FILE_ALREADY_EXIST;
@ -379,7 +379,7 @@ bool KoStore::enterDirectory( const TQString& directory )
bool success = true;
TQString tmp( directory );
while ( ( pos = tmp.tqfind( '/' ) ) != -1 &&
while ( ( pos = tmp.find( '/' ) ) != -1 &&
( success = enterDirectoryInternal( tmp.left( pos ) ) ) )
tmp = tmp.mid( pos + 1 );
@ -562,7 +562,7 @@ TQString KoStore::expandEncodedPath( TQString intern ) const
TQString result;
int pos;
if ( ( pos = intern.tqfindRev( '/', -1 ) ) != -1 ) {
if ( ( pos = intern.findRev( '/', -1 ) ) != -1 ) {
result = expandEncodedDirectory( intern.left( pos ) ) + '/';
intern = intern.mid( pos + 1 );
}
@ -595,7 +595,7 @@ TQString KoStore::expandEncodedDirectory( TQString intern ) const
TQString result;
int pos;
while ( ( pos = intern.tqfind( '/' ) ) != -1 ) {
while ( ( pos = intern.find( '/' ) ) != -1 ) {
if ( TQChar(intern.at(0)).isDigit() )
result += "part";
result += intern.left( pos + 1 ); // copy numbers (or "pictures") + "/"

@ -171,7 +171,7 @@ void K3bAudioConvertingOptionWidget::slotUpdateFreeTempSpace()
TQString path = m_editBaseDir->url();
if( !TQFile::exists( path ) )
path.truncate( path.tqfindRev('/') );
path.truncate( path.findRev('/') );
unsigned long 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( "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()] );
else
c->writeEntry( "filetype", "wav" );

@ -108,7 +108,7 @@ void K3bAudioProjectConvertingThread::run()
if( m_singleFile ) {
TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.tqfindRev("/") );
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
emitFinished(false);
@ -194,7 +194,7 @@ void K3bAudioProjectConvertingThread::run()
bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const TQString& filename )
{
TQString dir = filename.left( filename.tqfindRev("/") );
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
return false;
@ -301,7 +301,7 @@ void K3bAudioProjectConvertingThread::cancel()
bool K3bAudioProjectConvertingThread::writePlaylist()
{
// 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 ) ) {
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() )
t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl;
else
t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5)
t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5)
<< endl; // filename without extension
// filename
@ -345,9 +345,9 @@ bool K3bAudioProjectConvertingThread::writePlaylist()
if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() )
t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl;
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.tqfindRev("/") - 5)
- m_tracks[i].second.findRev("/") - 5)
<< endl; // filename without extension
// filename
@ -406,7 +406,7 @@ bool K3bAudioProjectConvertingThread::writeCueFile()
// use the same base name as the image file
TQString cueFile = m_tracks[0].second;
cueFile.truncate( cueFile.tqfindRev(".") );
cueFile.truncate( cueFile.findRev(".") );
cueFile += ".cue";
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 );
// 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;
while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) {
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
path = path.mid( oldPos+1 );
baseDir_ = baseDir_.mid( oldPos+1 );
int numberOfDirs = baseDir_.tqcontains( '/' );
int numberOfDirs = baseDir_.contains( '/' );
for( int i = 0; i < numberOfDirs; ++i )
path.prepend( "../" );

@ -194,7 +194,7 @@ void K3bAudioRipThread::run()
if( m_singleFile ) {
TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.tqfindRev("/") );
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) {
d->paranoiaLib->close();
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;
TQString dir = filename.left( filename.tqfindRev("/") );
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) {
emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR );
return false;
@ -444,7 +444,7 @@ void K3bAudioRipThread::cleanupAfterCancellation()
bool K3bAudioRipThread::writePlaylist()
{
// 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 ) ) {
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() )
t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl;
else
t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5)
t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1,
m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5)
<< endl; // filename without extension
// filename
@ -488,9 +488,9 @@ bool K3bAudioRipThread::writePlaylist()
if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() )
t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl;
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.tqfindRev("/") - 5)
- m_tracks[i].second.findRev("/") - 5)
<< endl; // filename without extension
// filename
@ -548,7 +548,7 @@ bool K3bAudioRipThread::writeCueFile()
// use the same base name as the image file
TQString cueFile = m_tracks[0].second;
cueFile.truncate( cueFile.tqfindRev(".") );
cueFile.truncate( cueFile.findRev(".") );
cueFile += ".cue";
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 );
// 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;
while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) {
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
path = path.mid( oldPos+1 );
baseDir_ = baseDir_.mid( oldPos+1 );
int numberOfDirs = baseDir_.tqcontains( '/' );
int numberOfDirs = baseDir_.contains( '/' );
for( int i = 0; i < numberOfDirs; ++i )
path.prepend( "../" );

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

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

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

@ -97,7 +97,7 @@ void K3bVideoCdRip::vcdxRip()
if ( !bin ) {
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( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO );
cancelAll();
@ -288,7 +288,7 @@ void K3bVideoCdRip::slotVcdXRipFinished()
void K3bVideoCdRip::parseInformation( TQString text )
{
// 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.
emit infoMessage( i18n( "%1 encountered non-form2 sector" ).tqarg("Vcdxrip"), K3bJob::ERROR );
emit infoMessage( i18n( "leaving loop" ), K3bJob::ERROR );
@ -298,22 +298,22 @@ void K3bVideoCdRip::parseInformation( TQString text )
}
// 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 );
// parse startposition and extracting sequence info
// extracting avseq05.mpg... (start lsn 32603 (+28514))
else if ( text.startsWith( "extracting" ) ) {
if ( text.tqcontains( "(start lsn" ) ) {
int index = text.tqfind( "(start lsn" );
int end = text.tqfind( " (+" );
if ( text.contains( "(start lsn" ) ) {
int index = text.find( "(start lsn" );
int end = text.find( " (+" );
if ( end > 0) {
m_subPosition = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong();
}
else {
// found segment here we can get only the start lsn :)
// 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();
double relOverallWritten = ( ( double ) overallPos * 2352 ) / ( double ) m_videooptions ->getVideoCdSize() ;
int newpercent = ( int ) ( 100 * relOverallWritten );
@ -325,17 +325,17 @@ void K3bVideoCdRip::parseInformation( TQString text )
index = 11;
end = text.tqfind( "(start lsn" );
end = text.find( "(start lsn" );
emit newSubTask( i18n( "Extracting %1" ).tqarg( text.mid( index, end - index ).stripWhiteSpace() ) );
}
// parse extracting files info
// 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 end = text.tqfind( "to" );
int end = text.find( "to" );
TQString extractFileName = text.mid( index, end - index ).stripWhiteSpace();
index = text.tqfind( " to " );
end = text.tqfind( " (lsn" );
index = text.find( " to " );
end = text.find( " (lsn" );
TQString toFileName = text.mid( index + 4, end - index - 4 ).stripWhiteSpace();
emit newSubTask( i18n( "Extracting %1 to %2" ).tqarg( extractFileName ).tqarg( toFileName ) );
}

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

@ -262,7 +262,7 @@ void K3bVideoDVDRippingDialog::slotUpdateFilenames()
it != m_titleRipInfos.end(); ++it ) {
TQString f = d->fsInfo.fixupPath( createFilename( it.data(), m_w->m_comboFilenamePattern->currentText() ) );
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.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
//
if( pattern[i] == '{' ) {
int j = pattern.tqfind( '}', i );
int j = pattern.find( '}', i );
if( j < 0 ) // no closing bracket -> no valid pattern
c = '*';
else {

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

Loading…
Cancel
Save