diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/cddb.cpp | 24 | ||||
-rwxr-xr-x | src/config.cpp | 72 | ||||
-rwxr-xr-x | src/configbackendspage.cpp | 16 | ||||
-rwxr-xr-x | src/configdialog.cpp | 2 | ||||
-rwxr-xr-x | src/configgeneralpage.cpp | 12 | ||||
-rwxr-xr-x | src/configpluginspage.cpp | 66 | ||||
-rwxr-xr-x | src/convert.cpp | 204 | ||||
-rwxr-xr-x | src/cuesheeteditor.cpp | 30 | ||||
-rwxr-xr-x | src/filelist.cpp | 40 | ||||
-rwxr-xr-x | src/logviewer.cpp | 8 | ||||
-rwxr-xr-x | src/metadata/tagengine.cpp | 6 | ||||
-rwxr-xr-x | src/options.cpp | 2 | ||||
-rwxr-xr-x | src/optionsdetailed.cpp | 28 | ||||
-rwxr-xr-x | src/optionseditor.cpp | 2 | ||||
-rwxr-xr-x | src/optionsrequester.cpp | 2 | ||||
-rwxr-xr-x | src/optionssimple.cpp | 8 | ||||
-rwxr-xr-x | src/outputdirectory.cpp | 100 | ||||
-rwxr-xr-x | src/paranoia.cpp | 10 | ||||
-rwxr-xr-x | src/pluginloader/pluginloaderbase.h | 2 | ||||
-rwxr-xr-x | src/replaygain.cpp | 8 | ||||
-rwxr-xr-x | src/replaygainfilelist.cpp | 48 | ||||
-rwxr-xr-x | src/soundkonverter.cpp | 8 |
22 files changed, 349 insertions, 349 deletions
diff --git a/src/cddb.cpp b/src/cddb.cpp index 5129987..c1ef793 100755 --- a/src/cddb.cpp +++ b/src/cddb.cpp @@ -126,7 +126,7 @@ CDDB::readLine(TQCString& ret) while (read_length < 40000) { // Look for a \n in buf - int ni = buf.tqfind('\n'); + int ni = buf.find('\n'); if (ni >= 0) { // Nice, so return this substring (without the \n), @@ -231,14 +231,14 @@ static void parse_query_resp (const TQCString& _r, TQCString& catg, TQCString& d_id, TQCString& title) { TQCString r = _r.stripWhiteSpace(); - int i = r.tqfind(' '); + int i = r.find(' '); if (i) { catg = r.left(i).stripWhiteSpace(); r.remove(0, i+1); r = r.stripWhiteSpace(); } - i = r.tqfind(' '); + i = r.find(' '); if (i) { d_id = r.left(i).stripWhiteSpace(); @@ -318,7 +318,7 @@ CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream) else if (r.left(6) == "TTITLE") { r.remove(0, 6); - int e = r.tqfind('='); + int e = r.find('='); if (e) { bool ok; @@ -347,7 +347,7 @@ CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream) /* XXX We should canonicalize the strings ("\n" --> '\n' e.g.) */ - int si = m_title.tqfind(" / "); + int si = m_title.find(" / "); if (si > 0) { m_artist = m_title.left(si).stripWhiteSpace(); @@ -355,7 +355,7 @@ CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream) m_title = m_title.stripWhiteSpace(); } - si = m_title.tqfind(" - CD"); + si = m_title.find(" - CD"); if (si > 0) { TQString disc = m_title.right(m_title.length()-(si+5)).stripWhiteSpace(); @@ -367,22 +367,22 @@ CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream) if (m_title.isEmpty()) m_title = i18n("No Title"); /*else - m_title.tqreplace(TQRegExp("/"), "%2f");*/ + m_title.replace(TQRegExp("/"), "%2f");*/ if (m_artist.isEmpty()) m_artist = i18n("Unknown"); /*else - m_artist.tqreplace(TQRegExp("/"), "%2f");*/ + m_artist.replace(TQRegExp("/"), "%2f");*/ //kdDebug(7101) << "CDDB: found Title: `" << m_title << "'" << endl; for (int i = 0; i < m_tracks; i++) { if (m_names[i].isEmpty()) m_names[i] += i18n("Track %1").tqarg(i); - //m_names[i].tqreplace(TQRegExp("/"), "%2f"); - si = m_names[i].tqfind(" - "); + //m_names[i].replace(TQRegExp("/"), "%2f"); + si = m_names[i].find(" - "); if (si < 0) { - si = m_names[i].tqfind(" / "); + si = m_names[i].find(" / "); } if (si > 0) { @@ -561,7 +561,7 @@ CDDB::queryCD(TQValueList<int>& track_ofs) } file.close(); /*TQString newname (file.name()); - newname.truncate(newname.tqfindRev('.')); + newname.truncate(newname.findRev('.')); if (TQDir::current().rename(file.name(), newname)) { //kdDebug(7101) << "CDDB: rename failed" << endl; file.remove(); 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 ); } } } diff --git a/src/configbackendspage.cpp b/src/configbackendspage.cpp index 5d61cb3..ace3e06 100755 --- a/src/configbackendspage.cpp +++ b/src/configbackendspage.cpp @@ -237,12 +237,12 @@ void ConfigBackendsPage::rebuild() TQString title; if( formatItem ) { for( TQStringList::Iterator at = formatItem->extensions.begin(); at != formatItem->extensions.end(); ++at ) { - if( !title.tqcontains((*at).lower()) ) title += (*at).lower() + ", "; + if( !title.contains((*at).lower()) ) title += (*at).lower() + ", "; } title = title.left( title.length() - 2 ); /* title += " ["; for( TQStringList::Iterator bt = formatItem->mime_types.begin(); bt != formatItem->mime_types.end(); ++bt ) { - if( !title.tqcontains((*bt).lower()) ) title += (*bt).lower() + ", "; + if( !title.contains((*bt).lower()) ) title += (*bt).lower() + ", "; } title = title.left( title.length() - 2 ) + "]";*/ } @@ -467,21 +467,21 @@ void ConfigBackendsPage::strengthChanged() if( (*b)->enc.strength.profiles.empty() ) { if( (*b)->enc.strength.step < 1 ) { if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min ) - strength.tqreplace( "%c", TQString::number( compressionLevel * (*b)->enc.strength.step ) ); + strength.replace( "%c", TQString::number( compressionLevel * (*b)->enc.strength.step ) ); else - strength.tqreplace( "%c", TQString::number( (*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step ) ); + strength.replace( "%c", TQString::number( (*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step ) ); } else { if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min ) - strength.tqreplace( "%c", TQString::number( (int)(compressionLevel * (*b)->enc.strength.step) ) ); + strength.replace( "%c", TQString::number( (int)(compressionLevel * (*b)->enc.strength.step) ) ); else - strength.tqreplace( "%c", TQString::number( (int)((*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step) ) ); + strength.replace( "%c", TQString::number( (int)((*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step) ) ); } - if( (*b)->enc.strength.separator != '.' ) strength.tqreplace( TQChar('.'), (*b)->enc.strength.separator ); + if( (*b)->enc.strength.separator != '.' ) strength.replace( TQChar('.'), (*b)->enc.strength.separator ); } else { TQStringList::Iterator it = (*b)->enc.strength.profiles.at( (int)compressionLevel ); - strength.tqreplace( "%c", *it ); + strength.replace( "%c", *it ); } (*a).lStrengthDisplay->setText( "( \"" + strength + "\" )" ); } diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 789d59c..9b05254 100755 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -77,7 +77,7 @@ ConfigDialog::ConfigDialog( Config* _config, TQWidget *tqparent, const char *nam configPluginsPage, TQT_SLOT(resetDefaults()) ); - environmentPage = addPage( i18n("Environment"), "filetqfind" ); + environmentPage = addPage( i18n("Environment"), "filefind" ); configEnvironmentPage = new ConfigEnvironmentPage( config, &binaries, environmentPage, "configEnvironmentPage" ); connect( configEnvironmentPage, TQT_SIGNAL(configChanged()), this, TQT_SLOT(configChanged()) diff --git a/src/configgeneralpage.cpp b/src/configgeneralpage.cpp index 295b700..337b099 100755 --- a/src/configgeneralpage.cpp +++ b/src/configgeneralpage.cpp @@ -231,29 +231,29 @@ void ConfigGeneralPage::saveSettings() int ConfigGeneralPage::profileIndex( const TQString &string ) { - return sDefaultProfile.tqfindIndex( string ); + return sDefaultProfile.findIndex( string ); } int ConfigGeneralPage::formatIndex( const TQString &string ) { - return sDefaultFormat.tqfindIndex( string ); + return sDefaultFormat.findIndex( string ); } // void ConfigGeneralPage::selectDir() // { // TQString startDir = lDir->text(); -// int i = startDir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") ); +// int i = startDir.find( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") ); // if( i != -1 ) { -// i = startDir.tqfindRev( "/", i ); +// i = startDir.findRev( "/", i ); // startDir = startDir.left( i ); // } // // TQString directory = KFileDialog::getExistingDirectory( startDir, 0, i18n("Choose an output directory") ); // if( !directory.isEmpty() ) { // TQString dir = lDir->text(); -// i = dir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") ); +// i = dir.find( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") ); // if( i != -1 ) { -// i = dir.tqfindRev( "/", i ); +// i = dir.findRev( "/", i ); // lDir->setText( directory + dir.mid(i) ); // } // else { diff --git a/src/configpluginspage.cpp b/src/configpluginspage.cpp index a79f852..99eb7b1 100755 --- a/src/configpluginspage.cpp +++ b/src/configpluginspage.cpp @@ -124,14 +124,14 @@ ConfigPluginsPage::ConfigPluginsPage( Config* _config, TQWidget* tqparent, const TQTextStream stream( &file ); while( !stream.atEnd() ) { line = stream.readLine(); // line of text excluding '\n' - line.tqreplace( "&", "&" ); - line.tqreplace( "ä", "ä" ); - line.tqreplace( "Ä", "Ä" ); - line.tqreplace( "ö", "ö" ); - line.tqreplace( "Ö", "Ö" ); - line.tqreplace( "ü", "ü" ); - line.tqreplace( "Ü", "Ü" ); - line.tqreplace( "ß", "ß" ); + line.replace( "&", "&" ); + line.replace( "ä", "ä" ); + line.replace( "Ä", "Ä" ); + line.replace( "ö", "ö" ); + line.replace( "Ö", "Ö" ); + line.replace( "ü", "ü" ); + line.replace( "Ü", "Ü" ); + line.replace( "ß", "ß" ); add = true; for( uint i=0; i<lPlugins->count(); i++ ) { @@ -228,7 +228,7 @@ void ConfigPluginsPage::getPlugin() TQString url = KFileDialog::getOpenFileName( TQDir::homeDirPath(), i18n("*.soundkonverter.xml|Plugins (*.soundkonverter.xml)"), this, i18n("Choose a plugin to add!") ); if( !url.isEmpty() ) { TQString filePathName = KURL::decode_string( url ); - TQString fileName = filePathName.right( filePathName.length() - filePathName.tqfindRev("/") ); + TQString fileName = filePathName.right( filePathName.length() - filePathName.findRev("/") ); getPluginFilePathName = locateLocal("data","soundkonverter/plugins/") + fileName; getPluginJob = KIO::file_copy( url, getPluginFilePathName, -1, true, false, false ); connect( getPluginJob, TQT_SIGNAL(result(KIO::Job*)), @@ -447,14 +447,14 @@ void ConfigPluginsPage::refreshOnlinePluginsFinished( KIO::Job* job ) TQTextStream stream( &file ); while( !stream.atEnd() ) { line = stream.readLine(); // line of text excluding '\n' - line.tqreplace( "&", "&" ); - line.tqreplace( "ä", "ä" ); - line.tqreplace( "Ä", "Ä" ); - line.tqreplace( "ö", "ö" ); - line.tqreplace( "Ö", "Ö" ); - line.tqreplace( "ü", "ü" ); - line.tqreplace( "Ü", "Ü" ); - line.tqreplace( "ß", "ß" ); + line.replace( "&", "&" ); + line.replace( "ä", "ä" ); + line.replace( "Ä", "Ä" ); + line.replace( "ö", "ö" ); + line.replace( "Ö", "Ö" ); + line.replace( "ü", "ü" ); + line.replace( "Ü", "Ü" ); + line.replace( "ß", "ß" ); add = true; for( uint i=0; i<lPlugins->count(); i++ ) { @@ -494,14 +494,14 @@ void ConfigPluginsPage::getOnlinePlugin() } } - name.tqreplace( "&", "&" ); - name.tqreplace( "ä", "ä" ); - name.tqreplace( "Ä", "Ä" ); - name.tqreplace( "ö", "ö" ); - name.tqreplace( "Ö", "Ö" ); - name.tqreplace( "ü", "ü" ); - name.tqreplace( "Ü", "Ü" ); - name.tqreplace( "ß", "ß" ); + name.replace( "&", "&" ); + name.replace( "ä", "ä" ); + name.replace( "Ä", "Ä" ); + name.replace( "ö", "ö" ); + name.replace( "Ö", "Ö" ); + name.replace( "ü", "ü" ); + name.replace( "Ü", "Ü" ); + name.replace( "ß", "ß" ); KURL::encode_string( name ); getOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/getfile.php?version=" + TQString::number(config->data.app.configVersion) + "&file=" + name, locateLocal("data","soundkonverter/plugins/newplugin.xml"), -1, true, false, false ); @@ -593,14 +593,14 @@ void ConfigPluginsPage::aboutOnlinePlugin() pAboutOnlinePlugin->setEnabled( false ); TQString name = lOnlinePlugins->currentText(); - name.tqreplace( "&", "&" ); - name.tqreplace( "ä", "ä" ); - name.tqreplace( "Ä", "Ä" ); - name.tqreplace( "ö", "ö" ); - name.tqreplace( "Ö", "Ö" ); - name.tqreplace( "ü", "ü" ); - name.tqreplace( "Ü", "Ü" ); - name.tqreplace( "ß", "ß" ); + name.replace( "&", "&" ); + name.replace( "ä", "ä" ); + name.replace( "Ä", "Ä" ); + name.replace( "ö", "ö" ); + name.replace( "Ö", "Ö" ); + name.replace( "ü", "ü" ); + name.replace( "Ü", "Ü" ); + name.replace( "ß", "ß" ); KURL::encode_string( name ); aboutOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/info.php?file=" + name + "&lang=" + TQLocale::languageToString(TQLocale::system().language()), locateLocal("data","soundkonverter/plugin_info.txt"), -1, true, false, false ); diff --git a/src/convert.cpp b/src/convert.cpp index 6b274e3..9f5000a 100755 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -85,7 +85,7 @@ void Convert::get( ConvertItem* item ) item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... 00 %" ); - KURL source( item->fileListItem->options.filePathName.tqreplace("?","%3f") ); + KURL source( item->fileListItem->options.filePathName.replace("?","%3f") ); KURL destination( item->tempInFile->name() ); if( source.isLocalFile() && destination.isLocalFile() ) { @@ -219,9 +219,9 @@ void Convert::rip( ConvertItem* item ) item->track = 0; } -// if( plugin->rip.out_file.tqfind("%p") != -1 ) { +// if( plugin->rip.out_file.find("%p") != -1 ) { // TQString t_str = plugin->rip.out_file; -// t_str.tqreplace( "%p", param ); +// t_str.replace( "%p", param ); // param = plugin->rip.bin + " " + t_str; // } // else { @@ -229,7 +229,7 @@ void Convert::rip( ConvertItem* item ) // } TQString t_str = plugin->rip.out_file; - t_str.tqreplace( "%p", param ); + t_str.replace( "%p", param ); param = config->binaries[plugin->rip.bin] + " " + t_str; param.simplifyWhiteSpace(); @@ -239,17 +239,17 @@ void Convert::rip( ConvertItem* item ) for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.tqreplace( "%d", item->fileListItem->device ); - paramSplinter.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); - paramSplinter.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); - paramSplinter.tqreplace( "%o", item->tempWavFile->name() ); + paramSplinter.replace( "%d", item->fileListItem->device ); + paramSplinter.replace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); + paramSplinter.replace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); + paramSplinter.replace( "%o", item->tempWavFile->name() ); *(item->convertProcess) << paramSplinter; } - param.tqreplace( "%d", item->fileListItem->device ); - param.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); - param.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); - param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" ); + param.replace( "%d", item->fileListItem->device ); + param.replace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); + param.replace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); + param.replace( "%o", "\""+item->tempWavFile->name()+"\"" ); logger->log( item->logID, param ); //kdDebug() << " Executing: `" << param << "'" << endl; @@ -286,7 +286,7 @@ void Convert::decode( ConvertItem* item ) if( !plugin->dec.overwrite.isEmpty() ) param.append( " " + plugin->dec.overwrite ); TQString t_str = plugin->dec.in_out_files; - t_str.tqreplace( "%p", param ); + t_str.replace( "%p", param ); param = config->binaries[plugin->dec.bin] + " " + t_str; param = param.simplifyWhiteSpace(); @@ -296,13 +296,13 @@ void Convert::decode( ConvertItem* item ) for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.tqreplace( "%i", item->tempInFile->name() ); - paramSplinter.tqreplace( "%o", item->tempWavFile->name() ); + paramSplinter.replace( "%i", item->tempInFile->name() ); + paramSplinter.replace( "%o", item->tempWavFile->name() ); *(item->convertProcess) << paramSplinter; } - param.tqreplace( "%i", "\""+item->tempInFile->name()+"\"" ); - param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" ); + param.replace( "%i", "\""+item->tempInFile->name()+"\"" ); + param.replace( "%o", "\""+item->tempWavFile->name()+"\"" ); //item->log = param; logger->log( item->logID, param ); @@ -376,7 +376,7 @@ void Convert::encode( ConvertItem* item ) else sStrength = TQString::number( int(plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step) ); } - 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 ); @@ -420,8 +420,8 @@ void Convert::encode( ConvertItem* item ) //t_int -= t_int%plugin->enc.quality.step; sQuality = TQString::number( t_int ); } - if( plugin->enc.bin == "oggenc" ) sQuality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges - 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()); // HACK make oggenc usable with all langauges + 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( rint(item->fileListItem->options.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) ); @@ -486,7 +486,7 @@ void Convert::encode( ConvertItem* item ) } TQString sInOutFiles = item->fileListItem->options.encodingOptions.sInOutFiles; - param = sInOutFiles.tqreplace( "%p", param ); + param = sInOutFiles.replace( "%p", param ); // cosmetic surgery param = param.simplifyWhiteSpace(); @@ -500,49 +500,49 @@ void Convert::encode( ConvertItem* item ) for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.tqreplace( "%i", inputFile ); - paramSplinter.tqreplace( "%o", item->tempOutFile->name() ); - paramSplinter.tqreplace( "%c", sStrength ); - paramSplinter.tqreplace( "%b", sBitrate ); - paramSplinter.tqreplace( "%q", sQuality ); - paramSplinter.tqreplace( "%m", sMinBitrate ); - paramSplinter.tqreplace( "%M", sMaxBitrate ); - paramSplinter.tqreplace( "%s", sSamplingRate ); + paramSplinter.replace( "%i", inputFile ); + paramSplinter.replace( "%o", item->tempOutFile->name() ); + paramSplinter.replace( "%c", sStrength ); + paramSplinter.replace( "%b", sBitrate ); + paramSplinter.replace( "%q", sQuality ); + paramSplinter.replace( "%m", sMinBitrate ); + paramSplinter.replace( "%M", sMaxBitrate ); + paramSplinter.replace( "%s", sSamplingRate ); if( item->fileListItem->tags ) { - paramSplinter.tqreplace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") ); - paramSplinter.tqreplace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") ); - paramSplinter.tqreplace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") ); - paramSplinter.tqreplace( "%td", ( TQString::number(item->fileListItem->tags->disc) != "" ) ? TQString::number(item->fileListItem->tags->disc) : "0" ); - paramSplinter.tqreplace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") ); - paramSplinter.tqreplace( "%tn", ( TQString::number(item->fileListItem->tags->track) != "" ) ? TQString::number(item->fileListItem->tags->track) : "0" ); - paramSplinter.tqreplace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") ); - paramSplinter.tqreplace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") ); - paramSplinter.tqreplace( "%ty", ( TQString::number(item->fileListItem->tags->year) != "" ) ? TQString::number(item->fileListItem->tags->year) : "0" ); + paramSplinter.replace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") ); + paramSplinter.replace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") ); + paramSplinter.replace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") ); + paramSplinter.replace( "%td", ( TQString::number(item->fileListItem->tags->disc) != "" ) ? TQString::number(item->fileListItem->tags->disc) : "0" ); + paramSplinter.replace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") ); + paramSplinter.replace( "%tn", ( TQString::number(item->fileListItem->tags->track) != "" ) ? TQString::number(item->fileListItem->tags->track) : "0" ); + paramSplinter.replace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") ); + paramSplinter.replace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") ); + paramSplinter.replace( "%ty", ( TQString::number(item->fileListItem->tags->year) != "" ) ? TQString::number(item->fileListItem->tags->year) : "0" ); } if( paramSplinter != "" && paramSplinter != " " ) *(item->convertProcess) << paramSplinter; // NOTE fixes wavpack encoding } - param.tqreplace( "%i", "\""+inputFile+"\"" ); - param.tqreplace( "%o", "\""+item->tempOutFile->name()+"\"" ); - 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( "%i", "\""+inputFile+"\"" ); + param.replace( "%o", "\""+item->tempOutFile->name()+"\"" ); + param.replace( "%c", sStrength ); + param.replace( "%b", sBitrate ); + param.replace( "%q", sQuality ); + param.replace( "%m", sMinBitrate ); + param.replace( "%M", sMaxBitrate ); + param.replace( "%s", sSamplingRate ); if( item->fileListItem->tags ) { - param.tqreplace( "%ta", "\""+item->fileListItem->tags->artist+"\"" ); - param.tqreplace( "%tb", "\""+item->fileListItem->tags->album+"\"" ); - param.tqreplace( "%tc", "\""+item->fileListItem->tags->comment+"\"" ); - param.tqreplace( "%td", TQString::number(item->fileListItem->tags->disc) ); - param.tqreplace( "%tg", "\""+item->fileListItem->tags->genre+"\"" ); - param.tqreplace( "%tn", TQString::number(item->fileListItem->tags->track) ); - param.tqreplace( "%tp", "\""+item->fileListItem->tags->composer+"\"" ); - param.tqreplace( "%tt", "\""+item->fileListItem->tags->title+"\"" ); - param.tqreplace( "%ty", TQString::number(item->fileListItem->tags->year) ); + param.replace( "%ta", "\""+item->fileListItem->tags->artist+"\"" ); + param.replace( "%tb", "\""+item->fileListItem->tags->album+"\"" ); + param.replace( "%tc", "\""+item->fileListItem->tags->comment+"\"" ); + param.replace( "%td", TQString::number(item->fileListItem->tags->disc) ); + param.replace( "%tg", "\""+item->fileListItem->tags->genre+"\"" ); + param.replace( "%tn", TQString::number(item->fileListItem->tags->track) ); + param.replace( "%tp", "\""+item->fileListItem->tags->composer+"\"" ); + param.replace( "%tt", "\""+item->fileListItem->tags->title+"\"" ); + param.replace( "%ty", TQString::number(item->fileListItem->tags->year) ); } logger->log( item->logID, param ); @@ -616,7 +616,7 @@ void Convert::put( ConvertItem* item ) else src = item->tempWavFile->name(); item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... 00 %" ); - item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).tqreplace("%2f","%252f"); + item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).replace("%2f","%252f"); KURL source( src ); KURL destination( item->outputFilePathName ); @@ -651,7 +651,7 @@ void Convert::putCorrection( ConvertItem* item ) TQString src = item->correctionOutFile; - TQString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).tqreplace("%2f","%252f"); + TQString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).replace("%2f","%252f"); KURL source( src ); // KURL destination( dest ); @@ -934,10 +934,10 @@ void Convert::processOutput( KProcess* proc, char* data, int ) if( (*item)->convertProcess == proc ) { TQString log_data = data; -/* log_data.tqreplace("\n","\\n"); - log_data.tqreplace("\t","\\t"); - log_data.tqreplace("\r","\\r"); - log_data.tqreplace("\b","\\b");*/ +/* log_data.replace("\n","\\n"); + log_data.replace("\t","\\t"); + log_data.replace("\r","\\r"); + log_data.replace("\b","\\b");*/ logger->log( (*item)->logID, " " + i18n("Output") + ": " + log_data ); //if( (*item)->readOutputTimer.elapsed() < /*config->pauseTime*/ 100 ) return; // TODO use config value @@ -951,26 +951,26 @@ void Convert::processOutput( KProcess* proc, char* data, int ) // TODO null pointer check TQString outputPattern = plugin->dec.output; - //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.tqfind("%p") != -1 ) { - outputPattern.tqreplace( "%p", "%i" ); + if( outputPattern.find("%p") != -1 ) { + outputPattern.replace( "%p", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.tqfind("%t") != -1 ) { - outputPattern.tqreplace( "%t", "%i" ); + else if( outputPattern.find("%t") != -1 ) { + outputPattern.replace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { - if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { + if( outputPattern.find("%0") < outputPattern.find("%1") ) { + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -996,26 +996,26 @@ void Convert::processOutput( KProcess* proc, char* data, int ) else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "cbr" ) outputPattern = plugin->enc.lossy.bitrate.cbr.output; else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "abr" ) outputPattern = plugin->enc.lossy.bitrate.abr.output; - //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.tqfind("%p") != -1 ) { - outputPattern.tqreplace( "%p", "%i" ); + if( outputPattern.find("%p") != -1 ) { + outputPattern.replace( "%p", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.tqfind("%t") != -1 ) { - outputPattern.tqreplace( "%t", "%i" ); + else if( outputPattern.find("%t") != -1 ) { + outputPattern.replace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { - if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { + if( outputPattern.find("%0") < outputPattern.find("%1") ) { + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -1038,27 +1038,27 @@ void Convert::processOutput( KProcess* proc, char* data, int ) TQString outputPattern; if( (*item)->fileListItem->track != 0 ) outputPattern = plugin->rip.output; else outputPattern = plugin->rip.full_disc.output; - //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.tqfind("%p") != -1 || outputPattern.tqfind("%a") != -1 ) { - outputPattern.tqreplace( "%p", "%i" ); - outputPattern.tqreplace( "%a", "%i" ); + if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) { + outputPattern.replace( "%p", "%i" ); + outputPattern.replace( "%a", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.tqfind("%t") != -1 ) { - outputPattern.tqreplace( "%t", "%i" ); + else if( outputPattern.find("%t") != -1 ) { + outputPattern.replace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { - if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { + if( outputPattern.find("%0") < outputPattern.find("%1") ) { + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -1068,7 +1068,7 @@ void Convert::processOutput( KProcess* proc, char* data, int ) { // TODO guess progress, when no signal is received (*item)->lastOutputTimer.start(); - if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.tqfind("%a") != -1 ) { + if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.find("%a") != -1 ) { if( iPercent < (*item)->lastPercent ) (*item)->track++; (*item)->lastPercent = iPercent; (*item)->percent = (*item)->track * 100 / (*item)->tracks + iPercent / (*item)->tracks; @@ -1469,9 +1469,9 @@ void Convert::remove( ConvertItem* item, int state ) if( item->fileListItem->notify != "" ) { TQString command = item->fileListItem->notify; - command.tqreplace( "%u", item->fileListItem->url ); - command.tqreplace( "%i", item->fileListItem->options.filePathName.tqreplace(" ","%20") ); - command.tqreplace( "%o", item->outputFilePathName.tqreplace(" ","%20") ); + command.replace( "%u", item->fileListItem->url ); + command.replace( "%i", item->fileListItem->options.filePathName.replace(" ","%20") ); + command.replace( "%o", item->outputFilePathName.replace(" ","%20") ); logger->log( item->logID, " "+i18n("Executing command: \"%1\"").tqarg(command) ); notify.clearArguments(); TQString paramSplinter; @@ -1481,9 +1481,9 @@ void Convert::remove( ConvertItem* item, int state ) for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.tqreplace( "%u", item->fileListItem->url ); - paramSplinter.tqreplace( "%i", item->fileListItem->options.filePathName ); - paramSplinter.tqreplace( "%o", item->outputFilePathName ); + paramSplinter.replace( "%u", item->fileListItem->url ); + paramSplinter.replace( "%i", item->fileListItem->options.filePathName ); + paramSplinter.replace( "%o", item->outputFilePathName ); notify << paramSplinter; } notify.start( KProcess::DontCare ); diff --git a/src/cuesheeteditor.cpp b/src/cuesheeteditor.cpp index 56d88cf..ca1b7c5 100755 --- a/src/cuesheeteditor.cpp +++ b/src/cuesheeteditor.cpp @@ -126,17 +126,17 @@ void CuesheetEditor::generate() while( index != -1 ) { - index = text.tqfind( " - " ); + index = text.find( " - " ); if( index == -1 ) break; titleList.append( text.left(index) ); text.remove( 0, index + 3 ); - index=text.tqfind( " [" ); + index=text.find( " [" ); if( index == -1 ) break; performerList.append( text.left(index) ); text.remove( 0, index + 2 ); - index = text.tqfind( "]" ); + index = text.find( "]" ); if( index == -1 ) break; time = text.left( index ); @@ -189,12 +189,12 @@ void CuesheetEditor::convert() while( index!=-1 ) { - index=text.tqfind("\""); + index=text.find("\""); if( index==-1 ) break; newText+=text.left(index+1); text.remove(0,index+1); - index=text.tqfind("\""); + index=text.find("\""); tmpText=text.left(index+1); text.remove(0,index+1); if( newText.right(6) == "FILE \"" ) @@ -256,19 +256,19 @@ void CuesheetEditor::shift() //move the title to "PERFORMER" and performer to "T while( index !=- 1 ) { - index = text.tqfind("\n"); + index = text.find("\n"); if( index == -1 ) break; line = text.left(index+1); text.remove(0,index+1); // TODO clean up - if( line.tqfind( "TITLE" ) != -1 ) { - line.tqreplace( "TITLE", "PERFORMER" ); + if( line.find( "TITLE" ) != -1 ) { + line.replace( "TITLE", "PERFORMER" ); if( performer != "" ) newText += performer; performer=line; } - else if( line.tqfind( "PERFORMER" ) != -1 ) { - line.tqreplace( "PERFORMER", "TITLE" ); + else if( line.find( "PERFORMER" ) != -1 ) { + line.replace( "PERFORMER", "TITLE" ); if( title != "" ) newText += title; title = line; } @@ -302,17 +302,17 @@ void CuesheetEditor::shift() //replace title by performer and reverse while( index!=-1 ) { - index=text.tqfind("\n"); + index=text.find("\n"); if( index==-1 ) break; line=text.left(index+1); text.remove(0,index+1); - if( line.tqfind(" TITLE \"") != -1 ) { - line.tqreplace(" TITLE \""," PERFORMER \""); + if( line.find(" TITLE \"") != -1 ) { + line.replace(" TITLE \""," PERFORMER \""); newText+=line; } - else if( line.tqfind(" PERFORMER \"") != -1 ) { - line.tqreplace(" PERFORMER \""," TITLE \""); + else if( line.find(" PERFORMER \"") != -1 ) { + line.replace(" PERFORMER \""," TITLE \""); newText+=line; } else { 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 ); } diff --git a/src/logviewer.cpp b/src/logviewer.cpp index 0cd0d73..97720d9 100755 --- a/src/logviewer.cpp +++ b/src/logviewer.cpp @@ -130,7 +130,7 @@ void LogViewer::refillLogs() lLogs->clear(); TQValueList<LoggerItem*> logs = logger->getLogs(); for( TQValueList<LoggerItem*>::Iterator a = logs.begin(); a != logs.end(); ++a ) { - tqparent = new LogViewerItem( lLogs, tqparent, KURL::decode_string((*a)->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number((*a)->id) ); + tqparent = new LogViewerItem( lLogs, tqparent, KURL::decode_string((*a)->filename).replace("%2f","/").replace("%%","%") + " - " + TQString::number((*a)->id) ); tqparent->converting = !(*a)->completed; //tqparent->setOpen( true ); last = 0; @@ -150,7 +150,7 @@ void LogViewer::processRemoved( int id ) TQListViewItem* it = lLogs->firstChild(); while( it != 0 ) { - if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) { + if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + TQString::number(item->id) ) { delete it; return; } @@ -167,7 +167,7 @@ void LogViewer::updateProcess( int id ) LogViewerItem *lastItem = 0, *oldItem = 0; while( it != 0 ) { - if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) { + if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + TQString::number(item->id) ) { LogViewerItem *a = it->firstChild(), *b; while( a != 0 ) { b = a->nextSibling(); @@ -192,7 +192,7 @@ void LogViewer::updateProcess( int id ) lastItem = (LogViewerItem*)it; } - tqparent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ); + tqparent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + TQString::number(item->id) ); tqparent->converting = !item->completed; LogViewerItem* last = 0; for( TQStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) { diff --git a/src/metadata/tagengine.cpp b/src/metadata/tagengine.cpp index 6043e99..9f9626c 100755 --- a/src/metadata/tagengine.cpp +++ b/src/metadata/tagengine.cpp @@ -224,7 +224,7 @@ TagData* TagEngine::readTags( const TQString& file ) if( !disc.isEmpty() ) { - int i = disc.tqfind('/'); + int i = disc.find('/'); if( i != -1 ) // disc.right( i ).toInt() is total number of discs, we don't use this at the moment tagData->disc = disc.left( i ).toInt(); @@ -234,7 +234,7 @@ TagData* TagEngine::readTags( const TQString& file ) if( !track_gain.isEmpty() ) { - int i = track_gain.tqfind(' '); + int i = track_gain.find(' '); if( i != -1 ) tagData->track_gain = track_gain.left( i ).toFloat(); else @@ -243,7 +243,7 @@ TagData* TagEngine::readTags( const TQString& file ) if( !album_gain.isEmpty() ) { - int i = album_gain.tqfind(' '); + int i = album_gain.find(' '); if( i != -1 ) tagData->album_gain = album_gain.left( i ).toFloat(); else diff --git a/src/options.cpp b/src/options.cpp index cbecd6f..961dfa7 100755 --- a/src/options.cpp +++ b/src/options.cpp @@ -150,7 +150,7 @@ Options::Options( Config* _config, const TQString &text, TQWidget *tqparent, con ); } */ - if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().tqfindIndex(config->data.general.defaultProfile) != -1 ) { + if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().findIndex(config->data.general.defaultProfile) != -1 ) { setCurrentOptions( config->getProfile(config->data.general.defaultProfile) ); } else { diff --git a/src/optionsdetailed.cpp b/src/optionsdetailed.cpp index cd8163a..7f36a8f 100755 --- a/src/optionsdetailed.cpp +++ b/src/optionsdetailed.cpp @@ -363,14 +363,14 @@ void OptionsDetailed::saveProfile() profiles += i18n("Last used"); profiles += "Last used"; profiles += i18n("User defined"); - if( profiles.tqfindIndex(name) != -1 ) { + if( profiles.findIndex(name) != -1 ) { KMessageBox::error( this, i18n("You cannot overwrite the built-in profiles."), i18n("Profile already exists") ); return; } profiles = config->getAllProfiles(); - if( profiles.tqfindIndex(name) == -1 ) { + if( profiles.findIndex(name) == -1 ) { config->addProfile( name, getCurrentOptions() ); } else { @@ -387,22 +387,22 @@ void OptionsDetailed::saveProfile() int OptionsDetailed::formatIndex( const TQString &string ) { - return sFormat.tqfindIndex( string ); + return sFormat.findIndex( string ); } int OptionsDetailed::qualityModeIndex( const TQString &string ) { - return sQualityMode.tqfindIndex( string ); + return sQualityMode.findIndex( string ); } int OptionsDetailed::bitrateModeIndex( const TQString &string ) { - return sBitrateMode.tqfindIndex( string ); + return sBitrateMode.findIndex( string ); } int OptionsDetailed::channelsIndex( const TQString &string ) { - return sChannels.tqfindIndex( string ); + return sChannels.findIndex( string ); } void OptionsDetailed::refill() @@ -597,7 +597,7 @@ void OptionsDetailed::qualityModeChanged() if( plugin->enc.lossy.quality.help ) { TQString str = plugin->enc.lossy.quality.help; - str.tqreplace("\\n","<br>"); + str.replace("\\n","<br>"); TQWhatsThis::add( iQuality, "<p>"+str+"</p>" ); } } @@ -662,27 +662,27 @@ void OptionsDetailed::qualityChanged() if( plugin->enc.lossy.quality.step < 1 ) { if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min) // t_float = ( (float)item->fileListItem->options.encodingOptions.iQuality * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min; - quality.tqreplace( "%q", TQString::number( ( (float)qualityLevel * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min ) ); + quality.replace( "%q", TQString::number( ( (float)qualityLevel * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min ) ); else // t_float = ( (100.0f - (float)item->fileListItem->options.encodingOptions.iQuality) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max; - quality.tqreplace( "%q", TQString::number( ( (100.0f - qualityLevel) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max ) ); + quality.replace( "%q", TQString::number( ( (100.0f - qualityLevel) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max ) ); } else { if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min) // t_int = ( item->fileListItem->options.encodingOptions.iQuality * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min; - quality.tqreplace( "%q", TQString::number( (qualityLevel * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min ) ); + quality.replace( "%q", TQString::number( (qualityLevel * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min ) ); else // t_int = ( (100 - item->fileListItem->options.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max; - quality.tqreplace( "%q", TQString::number( ( (100 - qualityLevel) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max ) ); + quality.replace( "%q", TQString::number( ( (100 - qualityLevel) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max ) ); } - if( plugin->enc.bin == "oggenc" ) quality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges + if( plugin->enc.bin == "oggenc" ) quality.replace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges else if( plugin->enc.lossy.quality.separator != '.' ) { - quality.tqreplace( TQChar('.'), plugin->enc.lossy.quality.separator ); + quality.replace( TQChar('.'), plugin->enc.lossy.quality.separator ); } } else { TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(qualityLevel*plugin->enc.lossy.quality.range_max/100) ); - quality.tqreplace( "%q", *it ); + quality.replace( "%q", *it ); } } diff --git a/src/optionseditor.cpp b/src/optionseditor.cpp index d3c0661..3975bcf 100755 --- a/src/optionseditor.cpp +++ b/src/optionseditor.cpp @@ -345,7 +345,7 @@ void OptionsEditor::itemsSelected( TQValueList<FileListItem*> items ) pEditTags->hide(); if( items.count() == 1 ) { - setCaption( KURL::decode_string(items.first()->fileName).tqreplace("%2f","/").tqreplace("%%","%") ); + setCaption( KURL::decode_string(items.first()->fileName).replace("%2f","/").replace("%%","%") ); // HACK ...but seems to work... // FIXME directory does get set properly disconnect( options, TQT_SIGNAL(optionsChanged()), 0, 0 ); diff --git a/src/optionsrequester.cpp b/src/optionsrequester.cpp index 4592899..6370749 100755 --- a/src/optionsrequester.cpp +++ b/src/optionsrequester.cpp @@ -32,7 +32,7 @@ OptionsRequester::OptionsRequester( Config* config, TQStringList list, TQWidget while( it != files.end() ) { TQString sFormat = *it; - int i = sFormat.tqfindRev( '.' ); + int i = sFormat.findRev( '.' ); sFormat.remove( 0, i + 1 ); sFormat.lower(); diff --git a/src/optionssimple.cpp b/src/optionssimple.cpp index 48bb131..844db2a 100755 --- a/src/optionssimple.cpp +++ b/src/optionssimple.cpp @@ -140,12 +140,12 @@ int OptionsSimple::profileIndex( const TQString &string ) else if( profile == "Lossless" ) profile = i18n("Lossless"); else if( profile == "Hybrid" ) profile = i18n("Hybrid"); else if( profile == "User defined" ) profile = i18n("User defined"); - return sProfile.tqfindIndex( profile ); + return sProfile.findIndex( profile ); } int OptionsSimple::formatIndex( const TQString &string ) { - return sFormat.tqfindIndex( string ); + return sFormat.findIndex( string ); } void OptionsSimple::profileInfo() @@ -451,7 +451,7 @@ void OptionsSimple::formatChanged() void OptionsSimple::outputDirectoryModeChanged( OutputDirectory::Mode mode ) { optionsDetailed->setOutputDirectoryMode( mode ); - if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().tqfindIndex(cProfile->currentText()) != -1 ) { + if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().findIndex(cProfile->currentText()) != -1 ) { ConversionOptions options = config->getProfile( cProfile->currentText() ); // if( options.encodingOptions.sFormat.isEmpty() ) return; if( outputDirectory->mode() != options.outputOptions.mode || outputDirectory->directory() != options.outputOptions.directory ) { @@ -465,7 +465,7 @@ void OptionsSimple::outputDirectoryModeChanged( OutputDirectory::Mode mode ) void OptionsSimple::outputDirectoryPathChanged( const TQString& path ) { optionsDetailed->setOutputDirectoryPath( path ); - if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().tqfindIndex(cProfile->currentText()) != -1 ) { + if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().findIndex(cProfile->currentText()) != -1 ) { ConversionOptions options = config->getProfile( cProfile->currentText() ); // if( options.encodingOptions.sFormat.isEmpty() ) return; if( outputDirectory->mode() != options.outputOptions.mode || outputDirectory->directory() != options.outputOptions.directory ) { diff --git a/src/outputdirectory.cpp b/src/outputdirectory.cpp index 161c1a5..df92c36 100755 --- a/src/outputdirectory.cpp +++ b/src/outputdirectory.cpp @@ -140,7 +140,7 @@ void OutputDirectory::setDirectory( const TQString& directory ) TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, TQString extension ) { - // TODO tqreplace '//' by '/' ??? + // TODO replace '//' by '/' ??? // FIXME test fvat names TQString path; if( extension.isEmpty() ) extension = fileListItem->options.encodingOptions.sFormat; @@ -170,55 +170,55 @@ TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, else */path = fileListItem->options.outputOptions.directory; if( path.right(1) == "/" ) path += "%f"; - else if( path.tqfindRev(TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.tqfindRev("/") ) path += "/%f"; - - path.tqreplace( "%a", "$replace_by_artist$" ); - path.tqreplace( "%b", "$replace_by_album$" ); - path.tqreplace( "%c", "$replace_by_comment$" ); - path.tqreplace( "%d", "$replace_by_disc$" ); - path.tqreplace( "%g", "$replace_by_genre$" ); - path.tqreplace( "%n", "$replace_by_track$" ); - path.tqreplace( "%p", "$replace_by_composer$" ); - path.tqreplace( "%t", "$replace_by_title$" ); - path.tqreplace( "%y", "$replace_by_year$" ); - path.tqreplace( "%f", "$replace_by_filename$" ); + else if( path.findRev(TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.findRev("/") ) path += "/%f"; + + path.replace( "%a", "$replace_by_artist$" ); + path.replace( "%b", "$replace_by_album$" ); + path.replace( "%c", "$replace_by_comment$" ); + path.replace( "%d", "$replace_by_disc$" ); + path.replace( "%g", "$replace_by_genre$" ); + path.replace( "%n", "$replace_by_track$" ); + path.replace( "%p", "$replace_by_composer$" ); + path.replace( "%t", "$replace_by_title$" ); + path.replace( "%y", "$replace_by_year$" ); + path.replace( "%f", "$replace_by_filename$" ); TQString artist = ( fileListItem->tags == 0 || fileListItem->tags->artist.isEmpty() ) ? i18n("Unknown Artist") : fileListItem->tags->artist; -/// artist.tqreplace("/","\\"); - path.tqreplace( "$replace_by_artist$", KURL::encode_string(artist).tqreplace("/","%2f") ); +/// artist.replace("/","\\"); + path.replace( "$replace_by_artist$", KURL::encode_string(artist).replace("/","%2f") ); TQString album = ( fileListItem->tags == 0 || fileListItem->tags->album.isEmpty() ) ? i18n("Unknown Album") : fileListItem->tags->album; -/// album.tqreplace("/","\\"); - path.tqreplace( "$replace_by_album$", KURL::encode_string(album).tqreplace("/","%2f") ); +/// album.replace("/","\\"); + path.replace( "$replace_by_album$", KURL::encode_string(album).replace("/","%2f") ); TQString comment = ( fileListItem->tags == 0 || fileListItem->tags->comment.isEmpty() ) ? i18n("No Comment") : fileListItem->tags->comment; -/// comment.tqreplace("/","\\"); - path.tqreplace( "$replace_by_comment$", KURL::encode_string(comment).tqreplace("/","%2f") ); +/// comment.replace("/","\\"); + path.replace( "$replace_by_comment$", KURL::encode_string(comment).replace("/","%2f") ); TQString disc = ( fileListItem->tags == 0 ) ? "0" : TQString().sprintf("%i",fileListItem->tags->disc); - path.tqreplace( "$replace_by_disc$", disc ); + path.replace( "$replace_by_disc$", disc ); TQString genre = ( fileListItem->tags == 0 || fileListItem->tags->genre.isEmpty() ) ? i18n("Unknown Genre") : fileListItem->tags->genre; -/// genre.tqreplace("/","\\"); - path.tqreplace( "$replace_by_genre$", KURL::encode_string(genre).tqreplace("/","%2f") ); +/// genre.replace("/","\\"); + path.replace( "$replace_by_genre$", KURL::encode_string(genre).replace("/","%2f") ); TQString track = ( fileListItem->tags == 0 ) ? "00" : TQString().sprintf("%02i",fileListItem->tags->track); - path.tqreplace( "$replace_by_track$", track ); + path.replace( "$replace_by_track$", track ); TQString composer = ( fileListItem->tags == 0 || fileListItem->tags->composer.isEmpty() ) ? i18n("Unknown Composer") : fileListItem->tags->composer; -/// composer.tqreplace("/","\\"); - path.tqreplace( "$replace_by_composer$", KURL::encode_string(composer).tqreplace("/","%2f") ); +/// composer.replace("/","\\"); + path.replace( "$replace_by_composer$", KURL::encode_string(composer).replace("/","%2f") ); TQString title = ( fileListItem->tags == 0 || fileListItem->tags->title.isEmpty() ) ? i18n("Unknown Title") : fileListItem->tags->title; -/// title.tqreplace("/","\\"); - path.tqreplace( "$replace_by_title$", KURL::encode_string(title).tqreplace("/","%2f") ); +/// title.replace("/","\\"); + path.replace( "$replace_by_title$", KURL::encode_string(title).replace("/","%2f") ); TQString year = ( fileListItem->tags == 0 ) ? "0000" : TQString().sprintf("%04i",fileListItem->tags->year); - path.tqreplace( "$replace_by_year$", year ); + path.replace( "$replace_by_year$", year ); - TQString filename = fileName.left( fileName.tqfindRev(".") ); -/// filename.tqreplace("/","\\"); - path.tqreplace( "$replace_by_filename$", filename ); + TQString filename = fileName.left( fileName.findRev(".") ); +/// filename.replace("/","\\"); + path.replace( "$replace_by_filename$", filename ); // path = uniqueFileName( path + "." + extension ); path = path + "." + extension; @@ -230,13 +230,13 @@ TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, TQString originalPath = fileListItem->options.filePathName; TQString cutted; while( basePath.length() > 0 ) { - if( fileListItem->options.filePathName.tqfind(basePath) == 0 ) { - originalPath.tqreplace( basePath, "" ); + if( fileListItem->options.filePathName.find(basePath) == 0 ) { + originalPath.replace( basePath, "" ); return uniqueFileName( changeExtension(basePath+cutted+originalPath,extension) ); } else { - cutted = basePath.right( basePath.length() - basePath.tqfindRev("/") ) + cutted; - basePath = basePath.left( basePath.tqfindRev("/") ); + cutted = basePath.right( basePath.length() - basePath.findRev("/") ) + cutted; + basePath = basePath.left( basePath.findRev("/") ); } } // path = uniqueFileName( changeExtension(fileListItem->options.outputOptions.directory+"/"+fileListItem->options.filePathName,extension) ); @@ -254,7 +254,7 @@ TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, TQString OutputDirectory::changeExtension( const TQString& filename, const TQString& extension ) { - return filename.left( filename.tqfindRev(".") + 1 ) + extension; + return filename.left( filename.findRev(".") + 1 ) + extension; } TQString OutputDirectory::uniqueFileName( const TQString& filename ) @@ -277,7 +277,7 @@ TQString OutputDirectory::uniqueFileName( const TQString& filename ) int length = ( filename.left(6) == "home:/" ) ? 6 : 14; TQString username = filename; username.remove( 0, length ); - username = username.left( username.tqfind("/") ); + username = username.left( username.find("/") ); filePathName = filename; filePathName.remove( 0, length + username.length() ); KUser user( username ); @@ -287,7 +287,7 @@ TQString OutputDirectory::uniqueFileName( const TQString& filename ) int length = ( filename.left(7) == "media:/" ) ? 7 : 14; TQString device = filename; device.remove( 0, length ); - device = "/dev/" + device.left( device.tqfind( "/" ) ); + device = "/dev/" + device.left( device.find( "/" ) ); KMountPoint::List mountPoints = KMountPoint::possibleMountPoints(); @@ -309,10 +309,10 @@ TQString OutputDirectory::uniqueFileName( const TQString& filename ) // generate a unique file name while( fileInfo.exists() ) { - fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().tqfindRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().tqfindRev(".") ) ); + fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().findRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().findRev(".") ) ); } - return KURL::encode_string( fileInfo.filePath() ); // was: .tqreplace( "//", "/" ) + return KURL::encode_string( fileInfo.filePath() ); // was: .replace( "//", "/" ) } TQString OutputDirectory::makePath( const TQString& path ) @@ -323,7 +323,7 @@ TQString OutputDirectory::makePath( const TQString& path ) TQString mkDir; TQDir dir; for( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { - mkDir += "/" + KURL::decode_string(*it).tqreplace("/","%2f"); + mkDir += "/" + KURL::decode_string(*it).replace("/","%2f"); dir.setPath( mkDir ); if( !dir.exists() ) dir.mkdir( mkDir ); } @@ -336,8 +336,8 @@ TQString OutputDirectory::makePath( const TQString& path ) // modified : 2008 Daniel Faust <[email protected]> TQString OutputDirectory::vfatPath( const TQString& path ) { - TQString s = KURL::decode_string(path.right( path.length() - path.tqfindRev("/") - 1 )); - TQString p = KURL::decode_string(path.left( path.tqfindRev("/") + 1 )); + TQString s = KURL::decode_string(path.right( path.length() - path.findRev("/") - 1 )); + TQString p = KURL::decode_string(path.left( path.findRev("/") + 1 )); for( uint i = 0; i < s.length(); i++ ) { @@ -378,25 +378,25 @@ TQString OutputDirectory::vfatPath( const TQString& path ) if( s[len-1] == ' ' ) s[len-1] = '_'; - return TQString( p + s ).tqreplace("%2f","_"); + return TQString( p + s ).replace("%2f","_"); // return p + s; } void OutputDirectory::selectDir() { TQString startDir = lDir->text(); - int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + int i = startDir.find( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 ) { - i = startDir.tqfindRev( "/", i ); + i = startDir.findRev( "/", i ); startDir = startDir.left( i ); } TQString directory = KFileDialog::getExistingDirectory( startDir, this, i18n("Choose an output directory") ); if( !directory.isEmpty() ) { TQString dir = lDir->text(); - i = dir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + i = dir.find( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 && (Mode)cMode->currentItem() == MetaData ) { - i = dir.tqfindRev( "/", i ); + i = dir.findRev( "/", i ); lDir->setText( directory + dir.mid(i) ); } else { @@ -409,9 +409,9 @@ void OutputDirectory::selectDir() void OutputDirectory::gotoDir() { TQString startDir = lDir->originalText(); - int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + int i = startDir.find( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 ) { - i = startDir.tqfindRev( "/", i ); + i = startDir.findRev( "/", i ); startDir = startDir.left( i ); } diff --git a/src/paranoia.cpp b/src/paranoia.cpp index a7d553e..fba3d83 100755 --- a/src/paranoia.cpp +++ b/src/paranoia.cpp @@ -109,13 +109,13 @@ bool Paranoia::findCdrom() TQTextStream t( f ); while ( !t.eof() && !stop ) { s = t.readLine(); - if ( s.tqcontains("drive name:") ) + if ( s.contains("drive name:") ) stop = true; } if ( !stop ) return false; - pos = s.tqfind(":"); + pos = s.find(":"); c = s.right( s.length()-pos-1 ); sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] ); @@ -133,15 +133,15 @@ bool Paranoia::procCdrom( TQString name ) { int pos; - if ( name.tqcontains("sr") ) { - pos = name.tqfind("r"); + if ( name.contains("sr") ) { + pos = name.find("r"); name = name.right( name.length()-pos-1 ); name = "/dev/scd"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) return true; } - else if ( name.tqcontains("hd") ) { + else if ( name.contains("hd") ) { name = "/dev/"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) diff --git a/src/pluginloader/pluginloaderbase.h b/src/pluginloader/pluginloaderbase.h index 4b85563..8ca9dbe 100755 --- a/src/pluginloader/pluginloaderbase.h +++ b/src/pluginloader/pluginloaderbase.h @@ -78,7 +78,7 @@ public slots: /** -Each plugin package tqcontains 3 files: +Each plugin package contains 3 files: - The plugin file ( $KDE_DIR/share/apps/soundkonverter/plugins/'filename' ) - The format info file ( $KDE_DIR/share/apps/soundkonverter/format_infos/'lang'/'plugin'_'filename' ) - The service menu ( $KDE_DIR/share/apps/konqueror/servicemenus/'filename' ) diff --git a/src/replaygain.cpp b/src/replaygain.cpp index 3e6aabd..64ca44d 100755 --- a/src/replaygain.cpp +++ b/src/replaygain.cpp @@ -48,9 +48,9 @@ bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* pr } } -// if( plugin->replaygain.in_files.tqfind("%p") != -1 ) { +// if( plugin->replaygain.in_files.find("%p") != -1 ) { // TQString t_str = plugin->replaygain.in_files; -// t_str.tqreplace( "%p", param ); +// t_str.replace( "%p", param ); // param = plugin->replaygain.bin + " " + t_str; // } // else { @@ -58,7 +58,7 @@ bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* pr // } TQString t_str = plugin->replaygain.in_files; - t_str.tqreplace( "%p", param ); + t_str.replace( "%p", param ); param = config->binaries[plugin->replaygain.bin] + " " + t_str; // cosmetic surgery @@ -84,7 +84,7 @@ bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* pr *it = KURL::decode_string( *it ); } - param.tqreplace( "%i", "\""+files.join("\" \"")+"\"" ); + param.replace( "%i", "\""+files.join("\" \"")+"\"" ); logger->log( logID, " " + i18n("Executing") + ": `" + param + "'" ); proc->setPriority( config->data.general.priority ); diff --git a/src/replaygainfilelist.cpp b/src/replaygainfilelist.cpp index 6f2eff2..51154cf 100755 --- a/src/replaygainfilelist.cpp +++ b/src/replaygainfilelist.cpp @@ -603,7 +603,7 @@ void ReplayGainFileList::addFile( const TQString& file ) int length = ( filename.left(6) == "home:/" ) ? 6 : 14; TQString username = filename; username.remove( 0, length ); - username = username.left( username.tqfind("/") ); + username = username.left( username.find("/") ); filePathName = filename; filePathName.remove( 0, length + username.length() ); KUser user( username ); @@ -613,7 +613,7 @@ void ReplayGainFileList::addFile( const TQString& file ) int length = ( filename.left(7) == "media:/" ) ? 7 : 14; device = filename; device.remove( 0, length ); - device = "/dev/" + device.left( device.tqfind( "/" ) ); + device = "/dev/" + device.left( device.find( "/" ) ); KMountPoint::List mountPoints = KMountPoint::possibleMountPoints(); @@ -634,7 +634,7 @@ void ReplayGainFileList::addFile( const TQString& file ) TagData* tags = tagEngine->readTags( KURL::decode_string(filePathName) ); if( !tags || tags->album.isEmpty() ) { ReplayGainFileListItem* item = new ReplayGainFileListItem( this ); - item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 ); + item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 ); item->mimeType = KMimeType::findByFileContent( filePathName )->name(); item->fileFormat = KMimeType::findByFileContent( filePathName )->patterns().first(); if( item->mimeType.isEmpty() || item->mimeType == "application/octet-stream" || item->mimeType == "text/plain" ) { @@ -658,7 +658,7 @@ void ReplayGainFileList::addFile( const TQString& file ) item->time = 210; } } - item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") ); + item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") ); if( tags && tags->track_gain != 210588 ) { item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) ); } @@ -688,12 +688,12 @@ void ReplayGainFileList::addFile( const TQString& file ) //if( it->text(0) == TQString(tags->artist+" - "+tags->album) ) { if( it->text(columnByName(i18n("File"))) == tags->album && it->type() == ReplayGainFileListItem::Album && it->mimeType == mimeType ) { ReplayGainFileListItem* item = new ReplayGainFileListItem( it ); - item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 ); + item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 ); item->filePathName = filePathName; item->mimeType = mimeType; item->fileFormat = fileFormat; item->time = tags->length; - item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") ); + item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") ); if( tags->track_gain != 210588 ) { item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) ); } @@ -718,12 +718,12 @@ void ReplayGainFileList::addFile( const TQString& file ) tqparent->mimeType = mimeType; tqparent->fileFormat = fileFormat; ReplayGainFileListItem* item = new ReplayGainFileListItem( tqparent ); - item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 ); + item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 ); item->filePathName = filePathName; item->mimeType = mimeType; item->fileFormat = fileFormat; item->time = tags->length; - item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") ); + item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") ); if( tags->track_gain != 210588 ) { item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) ); } @@ -1134,10 +1134,10 @@ void ReplayGainFileList::processOutput( KProcess* proc, char* data, int ) int iPercent = 0, iTime = 0, iPos = 0, iNum = 0; TQString log_data = data; - log_data.tqreplace("\n","\\n"); - log_data.tqreplace("\t","\\t"); - log_data.tqreplace("\r","\\r"); - log_data.tqreplace("\b","\\b"); + log_data.replace("\n","\\n"); + log_data.replace("\t","\\t"); + log_data.replace("\r","\\r"); + log_data.replace("\b","\\b"); logger->log( logID, " " + i18n("Output") + ": " + log_data ); ReplayGainPlugin* plugin = config->replaygainForFormat( currentItem->mimeType ); @@ -1151,27 +1151,27 @@ void ReplayGainFileList::processOutput( KProcess* proc, char* data, int ) } TQString outputPattern = ( files > 1 ) ? plugin->replaygain.output_multiple : plugin->replaygain.output_single; - //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.tqfind("%p") != -1 || outputPattern.tqfind("%a") != -1 ) { - outputPattern.tqreplace( "%p", "%i" ); - //outputPattern.tqreplace( "%a", "%i" ); // for compatibility with old plugins + if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) { + outputPattern.replace( "%p", "%i" ); + //outputPattern.replace( "%a", "%i" ); // for compatibility with old plugins sscanf( data, outputPattern, &iPercent ); } - /*else if( outputPattern.tqfind("%t") != -1 ) { // NOTE a little bit complicated and not necessary - outputPattern.tqreplace( "%t", "%i" ); + /*else if( outputPattern.find("%t") != -1 ) { // NOTE a little bit complicated and not necessary + outputPattern.replace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / currentItem->time; }*/ - else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { - if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { + if( outputPattern.find("%0") < outputPattern.find("%1") ) { + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.tqreplace( "%0", "%i" ); - outputPattern.tqreplace( "%1", "%i" ); + outputPattern.replace( "%0", "%i" ); + outputPattern.replace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; diff --git a/src/soundkonverter.cpp b/src/soundkonverter.cpp index 2a6ff0f..3efcfdc 100755 --- a/src/soundkonverter.cpp +++ b/src/soundkonverter.cpp @@ -575,9 +575,9 @@ void soundKonverter::showCdDialog( bool intern ) // support for media:/ and system:/ urls if( !device.isEmpty() ) { - device.tqreplace( "system:/media", "/dev" ); - device.tqreplace( "media:", "/dev" ); - device.tqreplace( "devices:", "/dev" ); // NOTE obsolete, since soundkonverter 0.3 won't run on KDE < 3.5 + device.replace( "system:/media", "/dev" ); + device.replace( "media:", "/dev" ); + device.replace( "devices:", "/dev" ); // NOTE obsolete, since soundkonverter 0.3 won't run on KDE < 3.5 } if( device.left(5) != "/dev/" || device == "auto" ) { device = ""; @@ -624,7 +624,7 @@ void soundKonverter::showUrlDialog() if( ok ) { // if it isn't a local file and no protocol is given, we assume, it's http - if( url.left(1) != "/" && !url.tqcontains(":/") ) + if( url.left(1) != "/" && !url.contains(":/") ) url.prepend( "http://" ); fileList->addFiles( url ); |