summaryrefslogtreecommitdiffstats
path: root/src/filelist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit3a2300ed7cee06b5b49c4bc71f38d5cee72171b5 (patch)
treeebc2fc901d7584145d9c40de18d9e4931283360a /src/filelist.cpp
parent633d093981e9e04c06921459694cd095cdf85c23 (diff)
downloadsoundkonverter-3a2300ed7cee06b5b49c4bc71f38d5cee72171b5.tar.gz
soundkonverter-3a2300ed7cee06b5b49c4bc71f38d5cee72171b5.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/filelist.cpp')
-rwxr-xr-xsrc/filelist.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/filelist.cpp b/src/filelist.cpp
index 7ef9c59..9cd560f 100755
--- a/src/filelist.cpp
+++ b/src/filelist.cpp
@@ -455,7 +455,7 @@ void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enable
int length = ( (*it).left(6) == "home:/" ) ? 6 : 14;
TQString username = *it;
username.remove( 0, length );
- username = username.left( username.tqfind("/") );
+ username = username.left( username.find("/") );
filePathName = *it;
filePathName.remove( 0, length + username.length() );
KUser user( username );
@@ -466,7 +466,7 @@ void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enable
int length = ( (*it).left(7) == "media:/" ) ? 7 : 14;
device = *it;
device.remove( 0, length );
- device = "/dev/" + device.left( device.tqfind( "/" ) );
+ device = "/dev/" + device.left( device.find( "/" ) );
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
@@ -501,7 +501,7 @@ void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enable
// newItem->mimeType="";
// HACK last choise is to use the extension without KDE's help
if( newItem->mimeType.isEmpty() || newItem->mimeType == "application/octet-stream" || newItem->mimeType == "text/plain" ) {
- newItem->fileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 );
+ newItem->fileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 );
FormatItem *formatItem = config->getFormatItem( newItem->fileFormat );
if( formatItem ) newItem->mimeType = formatItem->mime_types.first();
// logger->log( 1000, " " + i18n("Mime type") + ": " + newItem->mimeType + " (" + i18n("Format") + ": " + newItem->fileFormat + ")" );
@@ -536,8 +536,8 @@ void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enable
else {
// logger->log( 1000, " File is remote (not yet implemented) (" + *it + ")" );
filePathName = *it;
- newItem->fileName = filePathName.right( filePathName.length() - filePathName.tqfindRev("/") - 1 );
- newItem->fileFormat = newItem->fileName.right( newItem->fileName.length() - newItem->fileName.tqfindRev(".") - 1 ).lower();
+ newItem->fileName = filePathName.right( filePathName.length() - filePathName.findRev("/") - 1 );
+ newItem->fileFormat = newItem->fileName.right( newItem->fileName.length() - newItem->fileName.findRev(".") - 1 ).lower();
// NOTE http will not work with KMimeType - this just works
if( filePathName.startsWith("http://") ) {
newItem->mimeType = KMimeType::findByURL( "file:///" + newItem->fileName.lower() )->name();
@@ -734,7 +734,7 @@ void FileList::updateItem( FileListItem* item )
if( !item ) return;
if( !item->converting ) {
- if( config->data.general.conflictHandling == 1 && TQFile::exists(KURL::decode_string(OutputDirectory::calcPath(item,config))) ) { // was: .tqreplace("%2f","%252f")
+ if( config->data.general.conflictHandling == 1 && TQFile::exists(KURL::decode_string(OutputDirectory::calcPath(item,config))) ) { // was: .replace("%2f","%252f")
item->setText( columnByName(i18n("State")), i18n("Will be skipped") );
}
else {
@@ -745,10 +745,10 @@ void FileList::updateItem( FileListItem* item )
item->setText( columnByName(i18n("State")), i18n("Converting") );
}
- if( item->track >= 0 ) item->setText( columnByName(i18n("Input")), KURL::decode_string(item->fileName).tqreplace("%2f","/").tqreplace("%%","%") );
- else item->setText( columnByName(i18n("Input")), KURL::decode_string(item->options.filePathName).tqreplace("%2f","/").tqreplace("%%","%") );
+ if( item->track >= 0 ) item->setText( columnByName(i18n("Input")), KURL::decode_string(item->fileName).replace("%2f","/").replace("%%","%") );
+ else item->setText( columnByName(i18n("Input")), KURL::decode_string(item->options.filePathName).replace("%2f","/").replace("%%","%") );
- item->setText( columnByName(i18n("Output")), KURL::decode_string(OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item,config))).tqreplace("%2f","/").tqreplace("%%","%") );
+ item->setText( columnByName(i18n("Output")), KURL::decode_string(OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item,config))).replace("%2f","/").replace("%%","%") );
item->setText( columnByName(i18n("Quality")), config->getProfileName(item->options) );
}
@@ -917,7 +917,7 @@ void FileList::convertNextItem()
item = firstChild();
while( item != 0 && count < config->data.general.numFiles ) {
if( !item->converting && item->text(columnByName(i18n("State"))) == i18n("Waiting") ) {
- if( item->track >= 0 && devices.tqfindIndex(item->device) == -1 ) {
+ if( item->track >= 0 && devices.findIndex(item->device) == -1 ) {
convertItem( item );
count++;
devices += item->device;
@@ -1325,7 +1325,7 @@ TQString FileList::debug_params( ConversionOptions conversionOptions, FormatItem
else
sStrength = TQString::number( int(plugin->enc.strength.range_min - compressionLevel) );
}
- if( plugin->enc.strength.separator != '.' ) sStrength.tqreplace( TQChar('.'), plugin->enc.strength.separator );
+ if( plugin->enc.strength.separator != '.' ) sStrength.replace( TQChar('.'), plugin->enc.strength.separator );
}
else {
TQStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel );
@@ -1369,8 +1369,8 @@ TQString FileList::debug_params( ConversionOptions conversionOptions, FormatItem
//t_int -= t_int%plugin->enc.quality.step;
sQuality = TQString::number( t_int );
}
- if( plugin->enc.bin == "oggenc" ) sQuality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol());
- else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.tqreplace(TQChar('.'),plugin->enc.lossy.quality.separator);
+ if( plugin->enc.bin == "oggenc" ) sQuality.replace(TQChar('.'),KGlobal::locale()->decimalSymbol());
+ else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(TQChar('.'),plugin->enc.lossy.quality.separator);
}
else {
TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( int(conversionOptions.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) );
@@ -1434,12 +1434,12 @@ TQString FileList::debug_params( ConversionOptions conversionOptions, FormatItem
if( !plugin->enc.tag.year.isEmpty() ) param.append( " " + plugin->enc.tag.year );
}
- param.tqreplace( "%c", sStrength );
- param.tqreplace( "%b", sBitrate );
- param.tqreplace( "%q", sQuality );
- param.tqreplace( "%m", sMinBitrate );
- param.tqreplace( "%M", sMaxBitrate );
- param.tqreplace( "%s", sSamplingRate );
+ param.replace( "%c", sStrength );
+ param.replace( "%b", sBitrate );
+ param.replace( "%q", sQuality );
+ param.replace( "%m", sMinBitrate );
+ param.replace( "%M", sMaxBitrate );
+ param.replace( "%s", sSamplingRate );
- return conversionOptions.encodingOptions.sInOutFiles.tqreplace( "%p", param );
+ return conversionOptions.encodingOptions.sInOutFiles.replace( "%p", param );
}