diff options
Diffstat (limited to 'src/config.cpp')
-rwxr-xr-x | src/config.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/config.cpp b/src/config.cpp index 0c6995c..12a1430 100755 --- a/src/config.cpp +++ b/src/config.cpp @@ -570,7 +570,7 @@ void Config::writeAmarokScript() if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) { if( !(*it).encoder->enc.lossy.enabled && !(*it).encoder->enc.lossless.enabled && !(*it).encoder->enc.hybrid.enabled ) continue; for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) { - if( content.tqfind(" "+(*b).lower()+" ") == -1 ) content += (*b).lower() + " "; + if( content.find(" "+(*b).lower()+" ") == -1 ) content += (*b).lower() + " "; num++; } } @@ -597,13 +597,13 @@ void Config::writeAmarokScript() if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) { if( (*it).encoder->enc.lossless.enabled ) { for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) { - if( content1.tqfind(","+(*b).lower()+",") == -1 ) content1 += (*b).lower() + ","; // NOTE the first entry will be shown twice + if( content1.find(","+(*b).lower()+",") == -1 ) content1 += (*b).lower() + ","; // NOTE the first entry will be shown twice num1++; } } if( (*it).encoder->enc.hybrid.enabled ) { for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) { - if( content2.tqfind(","+(*b).lower()+",") == -1 ) content2 += (*b).lower() + ","; // NOTE the first entry will be shown twice + if( content2.find(","+(*b).lower()+",") == -1 ) content2 += (*b).lower() + ","; // NOTE the first entry will be shown twice num2++; } } @@ -691,11 +691,11 @@ void Config::loadPlugins() version = convertPluginLoader->verifyFile( TQString(*a).append(*b) ); identifier = *b; identifier.remove( identifier.length() - 19, 19 ); - i = identifier.tqfindRev( "-" ); + i = identifier.findRev( "-" ); identifier.remove( i, identifier.length() - i ); -// i = identifier.tqfind( "." ); +// i = identifier.find( "." ); // identifier.remove( 0, i + 1 ); - if( !pluginMap.tqcontains(identifier) ) { + if( !pluginMap.contains(identifier) ) { PluginMapData data; data.version = 0; pluginMap.insert( identifier, data ); @@ -713,11 +713,11 @@ void Config::loadPlugins() version = replaygainPluginLoader->verifyFile( TQString(*a).append(*b) ); identifier = *b; identifier.remove( identifier.length() - 19, 19 ); - i = identifier.tqfindRev( "-" ); + i = identifier.findRev( "-" ); identifier.remove( i, identifier.length() - i ); -// i = identifier.tqfind( "." ); +// i = identifier.find( "." ); // identifier.remove( 0, i + 1 ); - if( !pluginMap.tqcontains(identifier) ) { + if( !pluginMap.contains(identifier) ) { PluginMapData data; data.version = 0; pluginMap.insert( identifier, data ); @@ -735,11 +735,11 @@ void Config::loadPlugins() version = ripperPluginLoader->verifyFile( TQString(*a).append(*b) ); identifier = *b; identifier.remove( identifier.length() - 19, 19 ); - i = identifier.tqfindRev( "-" ); + i = identifier.findRev( "-" ); identifier.remove( i, identifier.length() - i ); -// i = identifier.tqfind( "." ); +// i = identifier.find( "." ); // identifier.remove( 0, i + 1 ); - if( !pluginMap.tqcontains(identifier) ) { + if( !pluginMap.contains(identifier) ) { PluginMapData data; data.version = 0; pluginMap.insert( identifier, data ); @@ -870,9 +870,9 @@ void Config::loadPlugins() for( TQValueList<FormatItem>::Iterator c = formats.begin(); c != formats.end(); ++c ) { for( TQStringList::Iterator d = formatInfo->mime_types.begin(); d != formatInfo->mime_types.end(); ++d ) { - if( (*c).mime_types.tqfindIndex(*d) != -1 ) { + if( (*c).mime_types.findIndex(*d) != -1 ) { (*c).description = "<p>" + formatInfo->description + "</p>"; - (*c).description.tqreplace("\\n","</p>\n<p>"); + (*c).description.replace("\\n","</p>\n<p>"); for( TQStringList::Iterator d = formatInfo->urls.begin(); d != formatInfo->urls.end(); ++d ) { (*c).description += "\n<p><a href=\"" + (*d) + "\">" + (*d) + "</a></p>"; } @@ -926,7 +926,7 @@ void Config::registerFormatFeatures( const TQString &mime_type, // iterate through all file formats and search for an existing one for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(mime_type) != -1 ) { // we found an existing entry for our file format + if( (*it).mime_types.findIndex(mime_type) != -1 ) { // we found an existing entry for our file format //kdDebug() << " found an existing entry: `" << mime_type << "'" << endl; logger->log( 1000, " found an existing entry: `" + mime_type + "'" ); @@ -996,7 +996,7 @@ ConvertPlugin* Config::encoderForFormat( const TQString &format ) { // iterate through all file formats and search for our format in mime_types and extensions for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return (*it).encoder; } } @@ -1008,7 +1008,7 @@ ConvertPlugin* Config::decoderForFormat( const TQString &format ) { // iterate through all file formats and search for our format in mime_types and extensions for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return (*it).decoder; } } @@ -1020,7 +1020,7 @@ ReplayGainPlugin* Config::replaygainForFormat( const TQString &format ) { // iterate through all file formats and search for our format in mime_types and extensions for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return (*it).replaygain; } } @@ -1032,7 +1032,7 @@ FormatItem* Config::getFormatItem( const TQString &format ) { // iterate through all file formats and search for our format in mime_types and extensions for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return &(*it); } } @@ -1058,7 +1058,7 @@ TQStringList Config::allFormats() TQString extension = (*it).extensions.first().lower(); //kdDebug() << " extension: `" << extension << "'" << endl; logger->log( 1000, " extension: `" + extension + "'" ); - if( !extension.isEmpty() && !list.tqcontains(extension) ) { + if( !extension.isEmpty() && !list.contains(extension) ) { list.append( extension ); //kdDebug() << " (added)" << endl; logger->log( 1000, " (added)" ); @@ -1086,7 +1086,7 @@ TQStringList Config::allEncodableFormats() TQString extension = (*it).extensions.first().lower(); //kdDebug() << " extension: `" << extension << "'" << endl; logger->log( 1000, " extension: `" + extension + "'" ); - if( !extension.isEmpty() && !list.tqcontains(extension) ) { + if( !extension.isEmpty() && !list.contains(extension) ) { list.append( extension ); //kdDebug() << " (added)" << endl; logger->log( 1000, " (added)" ); @@ -1113,7 +1113,7 @@ TQStringList Config::allLossyEncodableFormats() TQString extension = (*it).extensions.first().lower(); //kdDebug() << " extension: `" << extension << "'" << endl; // logger->log( 1000, " extension: `" + extension + "'" ); - if( !extension.isEmpty() && !list.tqcontains(extension) ) { + if( !extension.isEmpty() && !list.contains(extension) ) { list.append( extension ); //kdDebug() << " (added)" << endl; // logger->log( 1000, " (added)" ); @@ -1140,7 +1140,7 @@ TQStringList Config::allLosslessEncodableFormats() TQString extension = (*it).extensions.first().lower(); //kdDebug() << " extension: `" << extension << "'" << endl; logger->log( 1000, " extension: `" + extension + "'" ); - if( !extension.isEmpty() && !list.tqcontains(extension) ) { + if( !extension.isEmpty() && !list.contains(extension) ) { list.append( extension ); //kdDebug() << " (added)" << endl; logger->log( 1000, " (added)" ); @@ -1167,7 +1167,7 @@ TQStringList Config::allHybridEncodableFormats() TQString extension = (*it).extensions.first().lower(); //kdDebug() << " extension: `" << extension << "'" << endl; logger->log( 1000, " extension: `" + extension + "'" ); - if( !extension.isEmpty() && !list.tqcontains(extension) ) { + if( !extension.isEmpty() && !list.contains(extension) ) { list.append( extension ); //kdDebug() << " (added)" << endl; logger->log( 1000, " (added)" ); @@ -1182,7 +1182,7 @@ TQString Config::getCorrectionExtension( const TQString &format ) { // iterate through all file formats and search for our format for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return (*it).correction_file_extensions.first(); } } @@ -1194,7 +1194,7 @@ TQString Config::getFormatDescription( const TQString &format ) // NOTE could be { // iterate through all file formats and search for our format for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it return (*it).description; } } @@ -1381,7 +1381,7 @@ bool Config::acceptFile( const TQString& format ) if( format == "audio/x-wav" || format == "wav" ) return true; for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it if( (*it).decoder != 0 ) return true; } } @@ -1392,7 +1392,7 @@ bool Config::acceptFile( const TQString& format ) bool Config::acceptReplayGainFile( const TQString& format ) { for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) { - if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it + if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it if( (*it).replaygain != 0 ) return true; } } @@ -1413,20 +1413,20 @@ TQString Config::fileFilter( bool wav ) temp = ""; for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) { filter1 += " *." + (*b); - if( !temp.tqcontains(*b,false) ) temp += " *." + (*b).lower(); + if( !temp.contains(*b,false) ) temp += " *." + (*b).lower(); } //temp.stripWhiteSpace(); // NOTE doesn't work if( temp != "" && temp.length() < 80 ) { temp.remove( 0, 1 ); temp = "\n" + temp + "|" + (*a).extensions.first() + " " + i18n("files") + " (" + temp + ")"; - if( !filter2.tqcontains(temp) ) { // HACK when unsing multiple mime types, there were too much entries + if( !filter2.contains(temp) ) { // HACK when unsing multiple mime types, there were too much entries filter2 += temp; } } else if( temp != "" ) { temp.remove( 0, 1 ); temp = "\n" + temp + "|" + (*a).extensions.first() + " " + i18n("files"); - if( !filter2.tqcontains(temp) ) { // HACK when unsing multiple mime types, there were too much entries + if( !filter2.contains(temp) ) { // HACK when unsing multiple mime types, there were too much entries filter2 += temp; } } @@ -1449,11 +1449,11 @@ TQStringList Config::fileTypes( bool wav ) if( (*a).decoder != 0 ) { temp = ""; for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) { - if( !temp.tqcontains(*b,false) ) temp.append( (*b).lower() + ", " ); + if( !temp.contains(*b,false) ) temp.append( (*b).lower() + ", " ); } if( temp != "" ) { temp = temp.left( temp.length() - 2 ); - if( types.tqfindIndex(temp) == -1 ) types.append( temp ); + if( types.findIndex(temp) == -1 ) types.append( temp ); } } } @@ -1472,7 +1472,7 @@ TQString Config::replayGainFilter() temp = ""; for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) { filter1 += " *." + (*b); - if( !temp.tqcontains(*b,false) ) temp += " *." + (*b).lower(); + if( !temp.contains(*b,false) ) temp += " *." + (*b).lower(); } //temp.stripWhiteSpace(); // NOTE doesn't work if( temp != "" && temp.length() < 80 ) { @@ -1501,11 +1501,11 @@ TQStringList Config::replayGainFileTypes() if( (*a).replaygain != 0 ) { temp = ""; for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) { - if( !temp.tqcontains(*b,false) ) temp.append( (*b).lower() + ", " ); + if( !temp.contains(*b,false) ) temp.append( (*b).lower() + ", " ); } if( temp != "" ) { temp = temp.left( temp.length() - 2 ); - if( types.tqfindIndex(temp) == -1 ) types.append( temp ); + if( types.findIndex(temp) == -1 ) types.append( temp ); } } } |