Browse Source

rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 11 years ago
parent
commit
1dbf3ff1cb
  1. 2
      amarok/src/Options1.ui.h
  2. 2
      amarok/src/amarok.h
  3. 10
      amarok/src/amarokcore/crashhandler.cpp
  4. 2
      amarok/src/analyzers/blockanalyzer.cpp
  5. 28
      amarok/src/app.cpp
  6. 58
      amarok/src/collectionbrowser.cpp
  7. 56
      amarok/src/collectiondb.cpp
  8. 8
      amarok/src/collectiondb.h
  9. 10
      amarok/src/collectionscanner/collectionscanner.cpp
  10. 2
      amarok/src/collectionscanner/collectionscanner.h
  11. 146
      amarok/src/contextbrowser.cpp
  12. 2
      amarok/src/coverfetcher.cpp
  13. 4
      amarok/src/covermanager.cpp
  14. 6
      amarok/src/database_refactor/collectiondb.cpp
  15. 4
      amarok/src/database_refactor/dbenginebase.h
  16. 6
      amarok/src/device/massstorage/massstoragedevicehandler.cpp
  17. 4
      amarok/src/device/smb/smbdevicehandler.cpp
  18. 8
      amarok/src/devicemanager.cpp
  19. 6
      amarok/src/directorylist.cpp
  20. 16
      amarok/src/dynamicmode.cpp
  21. 4
      amarok/src/engine/helix/COPYING
  22. 4
      amarok/src/engine/helix/helix-engine.cpp
  23. 2
      amarok/src/engine/helix/helix-sp/hspcontext.cpp
  24. 2
      amarok/src/engine/kdemm/kdemmengine.cpp
  25. 2
      amarok/src/engine/mas/masengine.cpp
  26. 2
      amarok/src/engine/nmm/nmm_engine.cpp
  27. 6
      amarok/src/engine/xine/xine-engine.cpp
  28. 4
      amarok/src/enginecontroller.cpp
  29. 4
      amarok/src/engineobserver.cpp
  30. 2
      amarok/src/equalizerpresetmanager.cpp
  31. 4
      amarok/src/equalizersetup.cpp
  32. 10
      amarok/src/expression.cpp
  33. 4
      amarok/src/filebrowser.cpp
  34. 24
      amarok/src/htmlview.cpp
  35. 8
      amarok/src/iconloader.cpp
  36. 2
      amarok/src/konquisidebar/universalamarok.cpp
  37. 14
      amarok/src/ktrm.cpp
  38. 6
      amarok/src/lastfm.cpp
  39. 4
      amarok/src/loader/loader.cpp
  40. 10
      amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp
  41. 34
      amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp
  42. 18
      amarok/src/mediabrowser.cpp
  43. 2
      amarok/src/mediabrowser.h
  44. 16
      amarok/src/mediadevice/daap/daapclient.cpp
  45. 2
      amarok/src/mediadevice/daap/daapreader/reader.cpp
  46. 12
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/custom_require.rb
  47. 8
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/dependency_list.rb
  48. 6
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/gem_commands.rb
  49. 2
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/open-uri.rb
  50. 4
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/package.rb
  51. 2
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/remote_installer.rb
  52. 2
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/source_index.rb
  53. 4
      amarok/src/mediadevice/daap/mongrel/lib/rubygems/validator.rb
  54. 12
      amarok/src/mediadevice/generic/genericmediadevice.cpp
  55. 8
      amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h
  56. 8
      amarok/src/mediadevice/ifp/ifpmediadevice.cpp
  57. 8
      amarok/src/mediadevice/ipod/ipodmediadevice.cpp
  58. 20
      amarok/src/mediadevice/mtp/mtpmediadevice.cpp
  59. 10
      amarok/src/mediadevice/njb/njbmediadevice.cpp
  60. 6
      amarok/src/mediadevice/njb/playlist.cpp
  61. 6
      amarok/src/mediadevice/njb/track.cpp
  62. 10
      amarok/src/mediadevicemanager.cpp
  63. 2
      amarok/src/medium.cpp
  64. 4
      amarok/src/mediumpluginmanager.cpp
  65. 20
      amarok/src/metabundle.cpp
  66. 4
      amarok/src/metabundle.h
  67. 12
      amarok/src/moodbar.cpp
  68. 18
      amarok/src/mountpointmanager.cpp
  69. 4
      amarok/src/multitabbar.cpp
  70. 10
      amarok/src/organizecollectiondialog.ui.h
  71. 22
      amarok/src/osd.cpp
  72. 4
      amarok/src/playerwindow.cpp
  73. 84
      amarok/src/playlist.cpp
  74. 8
      amarok/src/playlist.h
  75. 26
      amarok/src/playlistbrowser.cpp
  76. 6
      amarok/src/playlistbrowser.h
  77. 40
      amarok/src/playlistbrowseritem.cpp
  78. 2
      amarok/src/playlistbrowseritem.h
  79. 20
      amarok/src/playlistitem.cpp
  80. 26
      amarok/src/playlistloader.cpp
  81. 8
      amarok/src/playlistselection.cpp
  82. 2
      amarok/src/playlistwindow.cpp
  83. 4
      amarok/src/plugin/plugin.cpp
  84. 20
      amarok/src/queuemanager.cpp
  85. 2
      amarok/src/scancontroller.cpp
  86. 12
      amarok/src/scriptmanager.cpp
  87. 4
      amarok/src/scripts/alarm/COPYING
  88. 2
      amarok/src/scripts/alarm/alarm.py
  89. 2
      amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh
  90. 10
      amarok/src/scripts/amarok_live/amarok_live.py
  91. 4
      amarok/src/scripts/common/Zeroconf.py
  92. 4
      amarok/src/scripts/embedcover/COPYING
  93. 2
      amarok/src/scripts/embedcover/addimage2mp3.rb
  94. 6
      amarok/src/scripts/graphequalizer/equalizercanvasview.cpp
  95. 4
      amarok/src/scripts/lyrics_astraweb/COPYING
  96. 4
      amarok/src/scripts/lyrics_lyrc/COPYING
  97. 4
      amarok/src/scripts/mp3fix/COPYING
  98. 2
      amarok/src/scripts/playlist2html/Playlist.py
  99. 4
      amarok/src/scripts/score_default/COPYING
  100. 4
      amarok/src/scripts/score_impulsive/COPYING
  101. 12
      amarok/src/scripts/templates/python_qt_template.py
  102. 4
      amarok/src/scripts/webcontrol/Playlist.py
  103. 8
      amarok/src/scripts/webcontrol/RequestHandler.py
  104. 22
      amarok/src/scripts/webcontrol/WebControl.py
  105. 2
      amarok/src/scripts/webcontrol/main.js
  106. 4
      amarok/src/scrobbler.cpp
  107. 4
      amarok/src/sliderwidget.cpp
  108. 26
      amarok/src/smartplaylisteditor.cpp
  109. 2
      amarok/src/smartplaylisteditor.h
  110. 40
      amarok/src/sqlite/sqlite3.c
  111. 2
      amarok/src/statistics.cpp
  112. 12
      amarok/src/statusbar/statusBarBase.cpp
  113. 2
      amarok/src/statusbar/statusbar.cpp
  114. 50
      amarok/src/tagdialog.cpp
  115. 40
      amarok/src/tagguesser.cpp
  116. 6
      amarok/src/tracktooltip.cpp
  117. 24
      amarok/src/xspfplaylist.cpp

2
amarok/src/Options1.ui.h

@ -47,7 +47,7 @@ void Options1::init()
kComboBox_browser->insertStringList( browsers );
kLineEdit_customBrowser->setText( AmarokConfig::externalBrowser() );
int index = browsers.tqfindIndex( AmarokConfig::externalBrowser() );
int index = browsers.findIndex( AmarokConfig::externalBrowser() );
if( index >= 0 )
kComboBox_browser->setCurrentItem( index );
else if( AmarokConfig::externalBrowser() ==

2
amarok/src/amarok.h

@ -146,7 +146,7 @@ namespace Amarok
*/
inline TQString extension( const TQString &fileName )
{
return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
}
/** Transform url into a file url if possible */

10
amarok/src/amarokcore/crashhandler.cpp

@ -171,21 +171,21 @@ namespace Amarok
/// clean up
bt.remove( "(no debugging symbols found)..." );
bt.remove( "(no debugging symbols found)\n" );
bt.tqreplace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
bt.replace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
bt.stripWhiteSpace();
/// analyze usefulness
bool useful = true;
const TQString fileCommandOutput = runCommand( "file `which amarokapp`" );
if( fileCommandOutput.tqfind( "not stripped", false ) == -1 )
if( fileCommandOutput.find( "not stripped", false ) == -1 )
subject += "[___stripped]"; //same length as below
else
subject += "[NOTstripped]";
if( !bt.isEmpty() ) {
const int invalidFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
const int validFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
const int invalidFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
const int validFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
const int totalFrames = invalidFrames + validFrames;
if( totalFrames > 0 ) {
@ -195,7 +195,7 @@ namespace Amarok
}
subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ );
if( bt.tqfind( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
subject += "[line numbers]";
}
else

2
amarok/src/analyzers/blockanalyzer.cpp

@ -141,7 +141,7 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
// y starts from the top and increases in units of blocks
// m_yscale looks similar to: { 0.7, 0.5, 0.25, 0.15, 0.1, 0 }
// if it tqcontains 6 elements there are 5 rows in the analyzer
// if it contains 6 elements there are 5 rows in the analyzer
Analyzer::interpolate( s, m_scope );

28
amarok/src/app.cpp

@ -1347,24 +1347,24 @@ namespace Amarok
{
TQString result = path;
// german umlauts
result.tqreplace( TQChar(0x00e4), "ae" ).tqreplace( TQChar(0x00c4), "Ae" );
result.tqreplace( TQChar(0x00f6), "oe" ).tqreplace( TQChar(0x00d6), "Oe" );
result.tqreplace( TQChar(0x00fc), "ue" ).tqreplace( TQChar(0x00dc), "Ue" );
result.tqreplace( TQChar(0x00df), "ss" );
result.replace( TQChar(0x00e4), "ae" ).replace( TQChar(0x00c4), "Ae" );
result.replace( TQChar(0x00f6), "oe" ).replace( TQChar(0x00d6), "Oe" );
result.replace( TQChar(0x00fc), "ue" ).replace( TQChar(0x00dc), "Ue" );
result.replace( TQChar(0x00df), "ss" );
// some strange accents
result.tqreplace( TQChar(0x00e7), "c" ).tqreplace( TQChar(0x00c7), "C" );
result.tqreplace( TQChar(0x00fd), "y" ).tqreplace( TQChar(0x00dd), "Y" );
result.tqreplace( TQChar(0x00f1), "n" ).tqreplace( TQChar(0x00d1), "N" );
result.replace( TQChar(0x00e7), "c" ).replace( TQChar(0x00c7), "C" );
result.replace( TQChar(0x00fd), "y" ).replace( TQChar(0x00dd), "Y" );
result.replace( TQChar(0x00f1), "n" ).replace( TQChar(0x00d1), "N" );
// czech letters with carons
result.tqreplace( TQChar(0x0161), "s" ).tqreplace( TQChar(0x0160), "S" );
result.tqreplace( TQChar(0x010d), "c" ).tqreplace( TQChar(0x010c), "C" );
result.tqreplace( TQChar(0x0159), "r" ).tqreplace( TQChar(0x0158), "R" );
result.tqreplace( TQChar(0x017e), "z" ).tqreplace( TQChar(0x017d), "Z" );
result.tqreplace( TQChar(0x0165), "t" ).tqreplace( TQChar(0x0164), "T" );
result.tqreplace( TQChar(0x0148), "n" ).tqreplace( TQChar(0x0147), "N" );
result.tqreplace( TQChar(0x010f), "d" ).tqreplace( TQChar(0x010e), "D" );
result.replace( TQChar(0x0161), "s" ).replace( TQChar(0x0160), "S" );
result.replace( TQChar(0x010d), "c" ).replace( TQChar(0x010c), "C" );
result.replace( TQChar(0x0159), "r" ).replace( TQChar(0x0158), "R" );
result.replace( TQChar(0x017e), "z" ).replace( TQChar(0x017d), "Z" );
result.replace( TQChar(0x0165), "t" ).replace( TQChar(0x0164), "T" );
result.replace( TQChar(0x0148), "n" ).replace( TQChar(0x0147), "N" );
result.replace( TQChar(0x010f), "d" ).replace( TQChar(0x010e), "D" );
// accented vowels
TQChar a[] = { 'a', 0xe0,0xe1,0xe2,0xe3,0xe5, 0 };

58
amarok/src/collectionbrowser.cpp

@ -891,7 +891,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -951,7 +951,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 1 )
{
tmptext = item->tqparent()->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -972,7 +972,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 2 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -1026,7 +1026,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 1 )
{
tmptext = item->tqparent()->tqparent()->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -1049,7 +1049,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 2 )
{
tmptext = item->tqparent()->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -1064,7 +1064,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 3 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@ -1687,9 +1687,9 @@ CollectionView::fetchCover() //SLOT
TQString album = item->text(0);
if( cat == IdVisYearAlbum )
{
// we can't use tqfindRev since an album may have " - " within it.
// we can't use findRev since an album may have " - " within it.
TQString sep = i18n(" - ");
album = album.right( album.length() - sep.length() - album.tqfind( sep ) );
album = album.right( album.length() - sep.length() - album.find( sep ) );
}
// find the first artist's name
@ -1979,7 +1979,7 @@ CollectionView::safeClear()
TQListViewItem *n;
itemCoverMapMutex->lock();
while( c ) {
if( itemCoverMap->tqcontains( c ) )
if( itemCoverMap->contains( c ) )
itemCoverMap->erase( c );
n = c->nextSibling();
delete c;
@ -2177,7 +2177,7 @@ CollectionView::getTrueItemText( int cat, TQListViewItem* item ) const
CollectionItem* collectItem = static_cast<CollectionItem*>( item );
trueItemText = collectItem->getSTQLText( 0 );
if ( cat == IdVisYearAlbum && !collectItem->isUnknown() )
trueItemText = trueItemText.right( trueItemText.length() - trueItemText.tqfind( i18n( " - " ) ) - i18n( " - " ).length() );
trueItemText = trueItemText.right( trueItemText.length() - trueItemText.find( i18n( " - " ) ) - i18n( " - " ).length() );
}
else
{
@ -2399,7 +2399,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -2476,7 +2476,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -2495,7 +2495,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 2 )
{
tmptext = child->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -2580,7 +2580,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -2598,7 +2598,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 2 )
{
tmptext = child->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -2613,7 +2613,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 3 )
{
tmptext = grandChild->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@ -3011,7 +3011,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
if( cat == IdVisYearAlbum )
{
TQString tmptext = item->text( 0 );
TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
if( !item->isUnknown() )
m_ipodFilters[m_currentDepth] << tmptext;
@ -3256,7 +3256,7 @@ CollectionView::selectIpodItems ( void )
TQStringList::iterator it = m_ipodSelected[m_currentDepth].begin();
while( it != m_ipodSelected[m_currentDepth].end() )
{
TQListViewItem *item = tqfindItem( *it, 0 );
TQListViewItem *item = findItem( *it, 0 );
++it;
if( !item )
@ -3281,7 +3281,7 @@ CollectionView::selectIpodItems ( void )
!m_ipodTopItem[m_currentDepth].isNull() )
{
//scroll to previous viewport top item
TQListViewItem* item = tqfindItem( m_ipodTopItem[m_currentDepth], 0 );
TQListViewItem* item = findItem( m_ipodTopItem[m_currentDepth], 0 );
if ( item )
setContentsPos( 0, itemPos( item ) );
}
@ -3289,7 +3289,7 @@ CollectionView::selectIpodItems ( void )
if( !m_ipodCurrent[m_currentDepth].isEmpty() &&
!m_ipodCurrent[m_currentDepth].isNull() )
{
TQListViewItem *item = tqfindItem( m_ipodCurrent[m_currentDepth], 0);
TQListViewItem *item = findItem( m_ipodCurrent[m_currentDepth], 0);
if( item )
setCurrentItem( item );
}
@ -3405,7 +3405,7 @@ CollectionView::restoreView()
if ( m_viewMode == modeTreeView ) {
TQValueList<TQStringList>::const_iterator it;
for ( it = m_cacheOpenItemPaths.begin(); it != m_cacheOpenItemPaths.end(); ++it ) {
TQListViewItem* item = tqfindItem( (*it)[0], 0 );
TQListViewItem* item = findItem( (*it)[0], 0 );
if ( item )
item->setOpen ( true );
@ -3513,7 +3513,7 @@ CollectionView::yearAlbumCalc( TQString &year, TQString &text )
year = "";
text = text.right( text.length() -
text.tqfind( i18n(" - ") ) -
text.find( i18n(" - ") ) -
i18n(" - ").length() );
}
@ -3713,7 +3713,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
if ( translateTimeFilter( timeFilter() ) <= 0
&& (m_filter.length() < 3 || (!m_filter.tqcontains( " " ) && m_filter.endsWith( ":" ) ) ) )
&& (m_filter.length() < 3 || (!m_filter.contains( " " ) && m_filter.endsWith( ":" ) ) ) )
{
// Redraw bubble help
triggerUpdate();
@ -3820,7 +3820,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
//we leftjoin the query so it can return mysql NULL cells, i.e. for score and playcount
//this is an ugly hack - should be integrated in querybuilder itself instead.
TQString leftQuery = qb.query();
leftQuery.tqreplace( "INNER JOIN", "LEFT JOIN" );
leftQuery.replace( "INNER JOIN", "LEFT JOIN" );
values = CollectionDB::instance()->query( leftQuery );
//construct items
@ -4491,8 +4491,8 @@ CollectionItem::compare( TQListViewItem* i, int col, bool ascending ) const
switch( m_cat ) {
case IdVisYearAlbum:
a = a.left( a.tqfind( i18n(" - ") ) );
b = b.left( b.tqfind( i18n(" - ") ) );
a = a.left( a.find( i18n(" - ") ) );
b = b.left( b.find( i18n(" - ") ) );
// "?" are the last ones
if ( a == "?" )
return 1;
@ -4628,7 +4628,7 @@ DividerItem::createGroup(const TQString& src, int cat)
TQString ret;
switch (cat) {
case IdVisYearAlbum: {
ret = src.left( src.tqfind(" - ") );
ret = src.left( src.find(" - ") );
break;
}
case IdYear: {
@ -4675,8 +4675,8 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
switch (cat) {
case IdVisYearAlbum: {
TQString sa = itemStr.left( itemStr.tqfind( i18n(" - ") ) );
TQString sb = divStr.left( divStr.tqfind( i18n(" - ") ) );
TQString sa = itemStr.left( itemStr.find( i18n(" - ") ) );
TQString sb = divStr.left( divStr.find( i18n(" - ") ) );
if (sa == sb) {
inGroup = true;
}

56
amarok/src/collectiondb.cpp

@ -300,7 +300,7 @@ TQString
CollectionDB::likeCondition( const TQString &right, bool anyBegin, bool anyEnd )
{
TQString escaped = right;
escaped.tqreplace( '/', "//" ).tqreplace( '%', "/%" ).tqreplace( '_', "/_" );
escaped.replace( '/', "//" ).replace( '%', "/%" ).replace( '_', "/_" );
escaped = instance()->escapeString( escaped );
TQString ret;
@ -1710,7 +1710,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
if( mb.compilation() == MetaBundle::CompilationYes )
artist = TQString( "Various_AMAROK_Artists" ); // magic key for the albumMap!
if( !albumMap.tqcontains( artist + album ) )
if( !albumMap.contains( artist + album ) )
{
albumMap[ artist + album ] = 1;
TQString coverName = CollectionDB::instance()->albumImage( mb.artist(), album, false, coverW );
@ -1722,7 +1722,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
else
{
MetaBundle mb( *it );
if( !albumMap.tqcontains( mb.artist() + mb.album() ) )
if( !albumMap.contains( mb.artist() + mb.album() ) )
{
albumMap[ mb.artist() + mb.album() ] = 1;
TQString coverName = CollectionDB::instance()->podcastImage( mb, false, coverW );
@ -2189,7 +2189,7 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album,
TQRegExp iTunesArt( "^AlbumArt_.*Large" );
for ( uint i = 0; i < values.count(); i++ )
{
matches = values[i].tqcontains( "front", false ) + values[i].tqcontains( "cover", false ) + values[i].tqcontains( "folder", false ) + values[i].tqcontains( iTunesArt );
matches = values[i].contains( "front", false ) + values[i].contains( "cover", false ) + values[i].contains( "folder", false ) + values[i].contains( iTunesArt );
if ( matches > maxmatches )
{
image = values[i];
@ -2542,10 +2542,10 @@ CollectionDB::artistAlbumList( bool withUnknown, bool withCompilations )
}
bool
CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace )
CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace )
{
TQString command;
if( tqreplace ) {
if( replace ) {
command = "REPLACE INTO podcastchannels "
"( url, title, weblink, image, comment, copyright, tqparent, directory"
", autoscan, fetchtype, autotransfer, haspurge, purgecount ) "
@ -2958,7 +2958,7 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental )
if ( title.isEmpty() )
{
title = bundle->url().fileName();
if ( bundle->url().fileName().tqfind( '-' ) > 0 )
if ( bundle->url().fileName().find( '-' ) > 0 )
{
if ( artist.isEmpty() )
{
@ -2966,7 +2966,7 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental )
bundle->setArtist( artist );
}
title = TQString(bundle->url().fileName().section( '-', 1 )).stripWhiteSpace();
title = title.left( title.tqfindRev( '.' ) ).stripWhiteSpace();
title = title.left( title.findRev( '.' ) ).stripWhiteSpace();
if ( title.isEmpty() ) title = bundle->url().fileName();
}
bundle->setTitle( title );
@ -4795,9 +4795,9 @@ DbConnection * CollectionDB::getMyConnection()
DbConnection *dbConn;
TQThread *currThread = ThreadManager::Thread::getRunning();
if (threadConnections->tqcontains(currThread))
if (threadConnections->contains(currThread))
{
TQMap<TQThread *, DbConnection *>::Iterator it = threadConnections->tqfind(currThread);
TQMap<TQThread *, DbConnection *>::Iterator it = threadConnections->find(currThread);
dbConn = it.data();
connectionMutex->unlock();
return dbConn;
@ -4834,9 +4834,9 @@ CollectionDB::releasePreviousConnection(TQThread *currThread)
//if something already exists, delete the object, and erase knowledge of it from the TQMap.
connectionMutex->lock();
DbConnection *dbConn;
if (threadConnections->tqcontains(currThread))
if (threadConnections->contains(currThread))
{
TQMap<TQThread *, DbConnection *>::Iterator it = threadConnections->tqfind(currThread);
TQMap<TQThread *, DbConnection *>::Iterator it = threadConnections->find(currThread);
dbConn = it.data();
delete dbConn;
threadConnections->erase(currThread);
@ -5202,8 +5202,8 @@ CollectionDB::initialize()
AmarokConfig::setPostgresqlPassword2( passwd );
}
else if( appVersion.startsWith( "1.4" ) &&
( appVersion.tqcontains( "beta", false ) ||
appVersion.tqcontains( "svn", false ) ) )
( appVersion.contains( "beta", false ) ||
appVersion.contains( "svn", false ) ) )
{
passwd = Amarok::config( "Postgresql" )->readEntry( "PostgresqlPassword" );
AmarokConfig::setPostgresqlPassword2( passwd );
@ -5265,7 +5265,7 @@ CollectionDB::initialize()
// We should rmeove this before 1.4.5
if ( m_dbConnType == DbConnection::sqlite ) {
TQStringList indices = query( "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;" );
if (!indices.tqcontains("url_tag")) {
if (!indices.contains("url_tag")) {
createIndices();
}
}
@ -6318,10 +6318,10 @@ void SqliteConnection::sqlite_like_new( sqlite3_context *context, int argc, sqli
pattern = pattern.left( pattern.length() - 1 );
if( argc == 3 ) // The function is given an escape character. In likeCondition() it defaults to '/'
pattern.tqreplace( "/%", "%" ).tqreplace( "/_", "_" ).tqreplace( "//", "/" );
pattern.replace( "/%", "%" ).replace( "/_", "_" ).replace( "//", "/" );
int result = 0;
if ( begin && end ) result = ( text.tqfind( pattern, 0, 0 ) != -1);
if ( begin && end ) result = ( text.find( pattern, 0, 0 ) != -1);
else if ( begin ) result = text.tqendsWith( pattern, 0 );
else if ( end ) result = text.tqstartsWith( pattern, 0 );
else result = ( text.lower() == pattern.lower() );
@ -6591,7 +6591,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab
if (table == NULL) return 0;
TQString _table = table;
if (table.tqfind("_temp") > 0) _table = table.left(table.tqfind("_temp"));
if (table.find("_temp") > 0) _table = table.left(table.find("_temp"));
curvalSql = TQString("SELECT currval('%1_seq');").tqarg(_table);
result = PQexec(m_db, curvalSql.utf8());
@ -7028,7 +7028,7 @@ QueryBuilder::addFilter( int tables, const TQString& filter )
if ( tables & tabLabels )
m_where += "OR labels.name " + CollectionDB::likeCondition( filter, true, true );
if ( i18n( "Unknown" ).tqcontains( filter, false ) )
if ( i18n( "Unknown" ).contains( filter, false ) )
{
if ( tables & tabAlbum )
m_where += "OR album.name = '' ";
@ -7043,7 +7043,7 @@ QueryBuilder::addFilter( int tables, const TQString& filter )
if ( tables & tabSong )
m_where += "OR tags.title = '' ";
}
if ( ( tables & tabArtist ) && i18n( "Various Artists" ).tqcontains( filter, false ) )
if ( ( tables & tabArtist ) && i18n( "Various Artists" ).contains( filter, false ) )
m_where += TQString( "OR tags.sampler = %1 " ).tqarg( CollectionDB::instance()->boolT() );
m_where += " ) ";
}
@ -7084,7 +7084,7 @@ QueryBuilder::addFilter( int tables, TQ_INT64 value, const TQString& filter, int
else
m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) )
if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) )
m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
@ -7118,7 +7118,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter )
if ( tables & tabLabels )
m_where += "OR labels.name " + CollectionDB::likeCondition( filter[i], true, true );
if ( i18n( "Unknown" ).tqcontains( filter[i], false ) )
if ( i18n( "Unknown" ).contains( filter[i], false ) )
{
if ( tables & tabAlbum )
m_where += "OR album.name = '' ";
@ -7133,7 +7133,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter )
if ( tables & tabSong )
m_where += "OR tags.title = '' ";
}
if ( i18n( "Various Artists" ).tqcontains( filter[ i ], false ) && ( tables & tabArtist ) )
if ( i18n( "Various Artists" ).contains( filter[ i ], false ) && ( tables & tabArtist ) )
m_where += "OR tags.sampler = " + CollectionDB::instance()->boolT() + ' ';
m_where += " ) ";
}
@ -7167,7 +7167,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter )
if ( tables & tabLabels )
m_where += "AND labels.name NOT " + CollectionDB::likeCondition( filter, true, true );
if ( i18n( "Unknown" ).tqcontains( filter, false ) )
if ( i18n( "Unknown" ).contains( filter, false ) )
{
if ( tables & tabAlbum )
m_where += "AND album.name <> '' ";
@ -7183,7 +7183,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter )
m_where += "AND tags.title <> '' ";
}
if ( i18n( "Various Artists" ).tqcontains( filter, false ) && ( tables & tabArtist ) )
if ( i18n( "Various Artists" ).contains( filter, false ) && ( tables & tabArtist ) )
m_where += "AND tags.sampler = " + CollectionDB::instance()->boolF() + ' ';
@ -7221,7 +7221,7 @@ QueryBuilder::excludeFilter( int tables, TQ_INT64 value, const TQString& filter,
else
m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) )
if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) )
m_where += TQString( "AND %1.%2 <> '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
@ -7715,7 +7715,7 @@ QueryBuilder::buildQuery( bool withDeviceidPlaceholder )
m_query += CollectionDB::instance()->boolT();
m_query += ' ';
m_query += m_where;
if ( !m_showAll && ( m_linkTables & tabSong || m_tables.tqcontains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll
if ( !m_showAll && ( m_linkTables & tabSong || m_tables.contains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll
{
if ( withDeviceidPlaceholder )
m_query += "(*MountedDeviceSelection*)";
@ -8022,7 +8022,7 @@ QueryBuilder::getValueByName(const TQString &name)
bool
QueryBuilder::getField(const TQString &tableValue, int *table, TQ_INT64 *value)
{
int dotIndex = tableValue.tqfind( '.' ) ;
int dotIndex = tableValue.find( '.' ) ;
if ( dotIndex < 0 ) return false;
int tmpTable = getTableByName( tableValue.left(dotIndex) );
TQ_UINT64 tmpValue = getValueByName( tableValue.mid( dotIndex + 1 ) );

8
amarok/src/collectiondb.h

@ -247,9 +247,9 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
#ifdef USE_MYSQL
// We have to escape "\" for mysql, but can't do so for sqlite
( m_dbConnType == DbConnection::mysql )
? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) :
? string.replace("\\", "\\\\").replace( '\'', "''" ) :
#endif
string.tqreplace( '\'', "''" );
string.replace( '\'', "''" );
}
TQString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "true"; else return "1"; }
@ -341,7 +341,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
//podcast methods
/// Insert a podcast channel into the database. If @param replace is true, replace the row
/// use updatePodcastChannel() always in preference
bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace=false );
bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace=false );
/// Insert a podcast episode into the database. If @param idToUpdate is provided, replace the row
/// use updatePodcastEpisode() always in preference
int addPodcastEpisode( const PodcastEpisodeBundle &episode, const int idToUpdate=0 );
@ -805,7 +805,7 @@ class QueryBuilder
void buildQuery( bool withDeviceidPlaceholder = false );
TQString getQuery();
//use withDeviceidPlaceholder = false if the query isn't run immediately (*CurrentTimeT*)
//and tqreplace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
//and replace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
TQString query( bool withDeviceidPlaceholder = false ) { buildQuery( withDeviceidPlaceholder ); return m_query; };
void clear();

10
amarok/src/collectionscanner/collectionscanner.cpp

@ -125,7 +125,7 @@ CollectionScanner::doJob() //SLOT
entries = TQStringList::split( "\n", folderStream.read() );
}
for( int count = entries.tqfindIndex( lastFile ) + 1; count; --count )
for( int count = entries.findIndex( lastFile ) + 1; count; --count )
entries.pop_front();
}
@ -213,7 +213,7 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries )
f = i; break;
}
#else
f = m_processedDirs.tqfind( de );
f = m_processedDirs.find( de );
#endif
if ( ! S_ISDIR( statBuf.st_mode ) || f != -1 ) {
@ -309,10 +309,10 @@ CollectionScanner::scanFiles( const TQStringList& entries )
}
}
if( validImages.tqcontains( ext ) )
if( validImages.contains( ext ) )
images += path;
else if( m_importPlaylists && validPlaylists.tqcontains( ext ) ) {
else if( m_importPlaylists && validPlaylists.contains( ext ) ) {
AttributeMap attributes;
attributes["path"] = path;
writeElement( "playlist", attributes );
@ -328,7 +328,7 @@ CollectionScanner::scanFiles( const TQStringList& entries )
CoverBundle cover( attributes["artist"], attributes["album"] );
if( !covers.tqcontains( cover ) )
if( !covers.contains( cover ) )
covers += cover;
foreachType( MetaBundle::EmbeddedImageList, images ) {

2
amarok/src/collectionscanner/collectionscanner.h

@ -85,7 +85,7 @@ private:
*/
inline TQString extension( const TQString &fileName )
{
return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
}
/**

146
amarok/src/contextbrowser.cpp

@ -75,18 +75,18 @@ namespace Amarok
{
TQString escapeHTML( const TQString &s )
{
return TQString(s).tqreplace( "&", "&amp;" ).tqreplace( "<", "&lt;" ).tqreplace( ">", "&gt;" );
// .tqreplace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20
return TQString(s).replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" );
// .replace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20
}
TQString escapeHTMLAttr( const TQString &s )
{
return TQString(s).tqreplace( "%", "%25" ).tqreplace( "'", "%27" ).tqreplace( "\"", "%22" ).tqreplace( "#", "%23" ).tqreplace( "?", "%3F" );
return TQString(s).replace( "%", "%25" ).replace( "'", "%27" ).replace( "\"", "%22" ).replace( "#", "%23" ).replace( "?", "%3F" );
}
TQString unescapeHTMLAttr( const TQString &s )
{
return TQString(s).tqreplace( "%3F", "?" ).tqreplace( "%23", "#" ).tqreplace( "%22", "\"" ).tqreplace( "%27", "'" ).tqreplace( "%25", "%" );
return TQString(s).replace( "%3F", "?" ).replace( "%23", "#" ).replace( "%22", "\"" ).replace( "%27", "'" ).replace( "%25", "%" );
}
TQString verboseTimeSince( const TQDateTime &datetime )
@ -146,7 +146,7 @@ namespace Amarok
*/
void albumArtistTrackFromUrl( TQString url, TQString &artist, TQString &album, TQString &detail )
{
if ( !url.tqcontains("@@@") ) return;
if ( !url.contains("@@@") ) return;
//KHTML removes the trailing space!
if ( url.endsWith( " @@@" ) )
url += ' ';
@ -443,9 +443,9 @@ void ContextBrowser::openURLRequest( const KURL &url )
}
else if ( url.protocol() == "show" )
{
if ( url.path().tqcontains( "suggestLyric-" ) )
if ( url.path().contains( "suggestLyric-" ) )
{
TQString _url = url.url().mid( url.url().tqfind( TQString( "-" ) ) +1 );
TQString _url = url.url().mid( url.url().find( TQString( "-" ) ) +1 );
debug() << "Clicked lyrics URL: " << _url << endl;
m_dirtyLyricsPage = true;
showLyrics( _url );
@ -503,7 +503,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
}
else if ( url.protocol() == "externalurl" )
Amarok::invokeBrowser( url.url().tqreplace( TQRegExp( "^externalurl:" ), "http:") );
Amarok::invokeBrowser( url.url().replace( TQRegExp( "^externalurl:" ), "http:") );
else if ( url.protocol() == "lastfm" )
{
@ -547,7 +547,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "ggartist" )
{
const TQString url2 = TQString( "http://www.google.com/musicsearch?q=%1&res=artist" )
.tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).tqreplace( " ", "+" ), 106 /*utf-8*/ ) );
.tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).replace( " ", "+" ), 106 /*utf-8*/ ) );
Amarok::invokeBrowser( url2 );
}
@ -558,7 +558,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "stream" )
{
Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions );
Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions );
}
else if( url.protocol() == "compilationdisc" || url.protocol() == "albumdisc" )
@ -639,10 +639,10 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
if ( MetaBundle( m_currentURL ).artist() != bundle.artist() )
m_dirtyWikiPage = true;
// Prepend stream metadata history item to list
if ( !m_metadataHistory.first().tqcontains( bundle.prettyTitle() ) )
if ( !m_metadataHistory.first().contains( bundle.prettyTitle() ) )
{
newMetaData = true;
const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).tqreplace(" ", "&nbsp;"); // don't break over lines
const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).replace(" ", "&nbsp;"); // don't break over lines
m_metadataHistory.prepend( TQString( "<td valign='top'>" + timeString + "&nbsp;</td><td align='left'>" + escapeHTML( bundle.prettyTitle() ) + "</td>" ) );
}
@ -676,7 +676,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
// look for the cue file that matches the media file played first
TQString path = bundle.url().path();
TQString cueFile = path.left( path.tqfindRev('.') ) + ".cue";
TQString cueFile = path.left( path.findRev('.') ) + ".cue";
m_cuefile->setCueFileName( cueFile );
@ -713,7 +713,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
{
line = line.mid( 5 ).remove( '"' );
if ( line.tqcontains( bundle.filename(), false ) )
if ( line.contains( bundle.filename(), false ) )
{
cueFile = dir.filePath(*it);
foundCueFile = true;
@ -799,7 +799,7 @@ void ContextBrowser::saveHtmlData()
TQTextStream stream( &exportedDocument );
stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << m_HTMLSource // the pure html data..
.tqreplace( "<html>",
.replace( "<html>",
TQString( "<html><head><style type=\"text/css\">"
"%1</style></head>" )
.tqarg( HTMLView::loadStyleSheet() ) ); // and the
@ -931,7 +931,7 @@ void ContextBrowser::slotContextMenu( const TQString& urlString, const TQPoint&
}
else if( url.protocol() == "stream" )
{
url = KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) );
url = KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) );
urls = KURL::List( url );
menu.insertTitle( i18n("Podcast"), TITLE );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE );
@ -1601,13 +1601,13 @@ CurrentTrackJob::showHomeByAlbums()
"<div class='album-body' style='display:%9;' id='IDP%10'>\n" )
.args( TQStringList()
<< TQString::number( i )
<< pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" )
<< pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" )
<< escapeHTMLAttr( imageAttr )
<< escapeHTMLAttr( image )
<< escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) )
<< ( ep.localUrl().isValid()
? ep.localUrl().url()
: ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) )
: ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) )
<< escapeHTML( pcb.title() + ": " + ep.title() )
<< escapeHTML( date )
<< "none"
@ -1772,7 +1772,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle &currentTrack )
newUrls.append( &titleUrl );
for ( TQString* url = newUrls.first(); url; url = newUrls.next() )
url->tqreplace( TQRegExp( "^http:" ), "externalurl:" );
url->replace( TQRegExp( "^http:" ), "externalurl:" );
const TQString skipIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("next"), -KIcon::SizeSmallMedium );
const TQString loveIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("love"), -KIcon::SizeSmallMedium );
@ -1988,7 +1988,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
<< escapeHTML( pcb.title() )
<< escapeHTML( peb.title() )
<< ( pcb.link().isValid()
? pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" )
? pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" )
: "current://track" )
<< image
<< imageAttr
@ -2064,7 +2064,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
<< escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) )
<< ( ep.localUrl().isValid()
? ep.localUrl().url()
: ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) )
: ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) )
<< escapeHTML( ep.title() )
<< escapeHTML( date )
<< (peb.url() == ep.url() ? "block" : "none" )
@ -3256,9 +3256,9 @@ void ContextBrowser::showLyrics( const TQString &url )
TQString title = EngineController::instance()->bundle().title();
TQString artist = EngineController::instance()->bundle().artist();
if( title.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
if( title.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
title = title.remove(" (PREVIEW: buy it at www.magnatune.com)");
if( artist.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
if( artist.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
artist = artist.remove(" (PREVIEW: buy it at www.magnatune.com)");
if ( title.isEmpty() ) {
@ -3266,15 +3266,15 @@ void ContextBrowser::showLyrics( const TQString &url )
The fact that it often (but not always) has artist name together, can be bad,
but at least the user will hopefully get nice suggestions. */
TQString prettyTitle = EngineController::instance()->bundle().prettyTitle();
int h = prettyTitle.tqfind( '-' );
int h = prettyTitle.find( '-' );
if ( h != -1 )
{
title = prettyTitle.mid( h+1 ).stripWhiteSpace();
if( title.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
if( title.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
title = title.remove(" (PREVIEW: buy it at www.magnatune.com)");
if ( artist.isEmpty() ) {
artist = prettyTitle.mid( 0, h ).stripWhiteSpace();
if( artist.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
if( artist.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
artist = artist.remove(" (PREVIEW: buy it at www.magnatune.com)");
}
@ -3399,10 +3399,10 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
if ( el.attribute( "add_url" ).isEmpty() )
{
m_lyricAddUrl = spec.readPathEntry( "add_url" );
m_lyricAddUrl.tqreplace( "MAGIC_ARTIST", KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ) );
m_lyricAddUrl.tqreplace( "MAGIC_TITLE", KURL::encode_string_no_slash( EngineController::instance()->bundle().title() ) );
m_lyricAddUrl.tqreplace( "MAGIC_ALBUM", KURL::encode_string_no_slash( EngineController::instance()->bundle().album() ) );
m_lyricAddUrl.tqreplace( "MAGIC_YEAR", KURL::encode_string_no_slash( TQString::number( EngineController::instance()->bundle().year() ) ) );
m_lyricAddUrl.replace( "MAGIC_ARTIST", KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ) );
m_lyricAddUrl.replace( "MAGIC_TITLE", KURL::encode_string_no_slash( EngineController::instance()->bundle().title() ) );
m_lyricAddUrl.replace( "MAGIC_ALBUM", KURL::encode_string_no_slash( EngineController::instance()->bundle().album() ) );
m_lyricAddUrl.replace( "MAGIC_YEAR", KURL::encode_string_no_slash( TQString::number( EngineController::instance()->bundle().year() ) ) );
}
else
m_lyricAddUrl = el.attribute( "add_url" );
@ -3430,11 +3430,11 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
}
}
lyrics += i18n( "<p>You can <a href=\"%1\">search for the lyrics</a> on the Web.</p>" )
.tqarg( TQString( m_lyricSearchUrl ).tqreplace( TQRegExp( "^http:" ), "externalurl:" ) );
.tqarg( TQString( m_lyricSearchUrl ).replace( TQRegExp( "^http:" ), "externalurl:" ) );
}
else {
lyrics = el.text();
lyrics.tqreplace( "\n", "<br/>\n" ); // Plaintext -> HTML
lyrics.replace( "\n", "<br/>\n" ); // Plaintext -> HTML
const TQString title = el.attribute( "title" );
const TQString artist = el.attribute( "artist" );
@ -3740,7 +3740,7 @@ TQString
ContextBrowser::wikiURL( const TQString &item )
{
// add any special characters to be replaced here
TQString wStr = TQString(item).tqreplace( "/", " " );
TQString wStr = TQString(item).replace( "/", " " );
return TQString( "http://%1.wikipedia.org/wiki/" ).tqarg( wikiLocale() )
+ KURL::encode_string_no_slash( wStr, 106 /*utf-8*/ );
@ -3789,7 +3789,7 @@ ContextBrowser::showLabelsDialog()
foreach( allLabels )
{
TQCheckListItem *item = new TQCheckListItem( m_labelListView, *it, TQCheckListItem::CheckBox );
item->setOn( trackLabels.tqcontains( *it ) );
item->setOn( trackLabels.contains( *it ) );
}
if( dialog->exec() == TQDialog::Accepted )
{
@ -3936,9 +3936,9 @@ void ContextBrowser::showWikipedia( const TQString &url, bool fromHistory, bool
}
//Hack to make wiki searches work with magnatune preview tracks
if (tmpWikiStr.tqcontains( "PREVIEW: buy it at www.magnatune.com" ) >= 1 ) {
if (tmpWikiStr.contains( "PREVIEW: buy it at www.magnatune.com" ) >= 1 ) {
tmpWikiStr = tmpWikiStr.remove(" (PREVIEW: buy it at www.magnatune.com)" );
int index = tmpWikiStr.tqfind( '-' );
int index = tmpWikiStr.find( '-' );
if ( index != -1 ) {
tmpWikiStr = tmpWikiStr.left (index - 1);