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 13 years ago
parent 54e817557b
commit 1dbf3ff1cb

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

@ -146,7 +146,7 @@ namespace Amarok
*/ */
inline TQString extension( const TQString &fileName ) 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 */ /** Transform url into a file url if possible */

@ -171,21 +171,21 @@ namespace Amarok
/// clean up /// clean up
bt.remove( "(no debugging symbols found)..." ); bt.remove( "(no debugging symbols found)..." );
bt.remove( "(no debugging symbols found)\n" ); 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(); bt.stripWhiteSpace();
/// analyze usefulness /// analyze usefulness
bool useful = true; bool useful = true;
const TQString fileCommandOutput = runCommand( "file `which amarokapp`" ); 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 subject += "[___stripped]"; //same length as below
else else
subject += "[NOTstripped]"; subject += "[NOTstripped]";
if( !bt.isEmpty() ) { if( !bt.isEmpty() ) {
const int invalidFrames = 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.tqcontains( 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; const int totalFrames = invalidFrames + validFrames;
if( totalFrames > 0 ) { if( totalFrames > 0 ) {
@ -195,7 +195,7 @@ namespace Amarok
} }
subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ ); 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]"; subject += "[line numbers]";
} }
else else

@ -141,7 +141,7 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
// y starts from the top and increases in units of blocks // 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 } // 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 ); Analyzer::interpolate( s, m_scope );

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

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

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

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

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

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

@ -75,18 +75,18 @@ namespace Amarok
{ {
TQString escapeHTML( const TQString &s ) TQString escapeHTML( const TQString &s )
{ {
return TQString(s).tqreplace( "&", "&amp;" ).tqreplace( "<", "&lt;" ).tqreplace( ">", "&gt;" ); return TQString(s).replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&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 // .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 ) 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 ) 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 ) TQString verboseTimeSince( const TQDateTime &datetime )
@ -146,7 +146,7 @@ namespace Amarok
*/ */
void albumArtistTrackFromUrl( TQString url, TQString &artist, TQString &album, TQString &detail ) void albumArtistTrackFromUrl( TQString url, TQString &artist, TQString &album, TQString &detail )
{ {
if ( !url.tqcontains("@@@") ) return; if ( !url.contains("@@@") ) return;
//KHTML removes the trailing space! //KHTML removes the trailing space!
if ( url.endsWith( " @@@" ) ) if ( url.endsWith( " @@@" ) )
url += ' '; url += ' ';
@ -443,9 +443,9 @@ void ContextBrowser::openURLRequest( const KURL &url )
} }
else if ( url.protocol() == "show" ) 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; debug() << "Clicked lyrics URL: " << _url << endl;
m_dirtyLyricsPage = true; m_dirtyLyricsPage = true;
showLyrics( _url ); showLyrics( _url );
@ -503,7 +503,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
} }
else if ( url.protocol() == "externalurl" ) 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" ) else if ( url.protocol() == "lastfm" )
{ {
@ -547,7 +547,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "ggartist" ) else if( url.protocol() == "ggartist" )
{ {
const TQString url2 = TQString( "http://www.google.com/musicsearch?q=%1&res=artist" ) 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 ); Amarok::invokeBrowser( url2 );
} }
@ -558,7 +558,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "stream" ) 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" ) 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() ) if ( MetaBundle( m_currentURL ).artist() != bundle.artist() )
m_dirtyWikiPage = true; m_dirtyWikiPage = true;
// Prepend stream metadata history item to list // Prepend stream metadata history item to list
if ( !m_metadataHistory.first().tqcontains( bundle.prettyTitle() ) ) if ( !m_metadataHistory.first().contains( bundle.prettyTitle() ) )
{ {
newMetaData = true; 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>" ) ); 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 // look for the cue file that matches the media file played first
TQString path = bundle.url().path(); TQString path = bundle.url().path();
TQString cueFile = path.left( path.tqfindRev('.') ) + ".cue"; TQString cueFile = path.left( path.findRev('.') ) + ".cue";
m_cuefile->setCueFileName( cueFile ); m_cuefile->setCueFileName( cueFile );
@ -713,7 +713,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
{ {
line = line.mid( 5 ).remove( '"' ); line = line.mid( 5 ).remove( '"' );
if ( line.tqcontains( bundle.filename(), false ) ) if ( line.contains( bundle.filename(), false ) )
{ {
cueFile = dir.filePath(*it); cueFile = dir.filePath(*it);
foundCueFile = true; foundCueFile = true;
@ -799,7 +799,7 @@ void ContextBrowser::saveHtmlData()
TQTextStream stream( &exportedDocument ); TQTextStream stream( &exportedDocument );
stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << m_HTMLSource // the pure html data.. stream << m_HTMLSource // the pure html data..
.tqreplace( "<html>", .replace( "<html>",
TQString( "<html><head><style type=\"text/css\">" TQString( "<html><head><style type=\"text/css\">"
"%1</style></head>" ) "%1</style></head>" )
.tqarg( HTMLView::loadStyleSheet() ) ); // and the .tqarg( HTMLView::loadStyleSheet() ) ); // and the
@ -931,7 +931,7 @@ void ContextBrowser::slotContextMenu( const TQString& urlString, const TQPoint&
} }
else if( url.protocol() == "stream" ) 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 ); urls = KURL::List( url );
menu.insertTitle( i18n("Podcast"), TITLE ); menu.insertTitle( i18n("Podcast"), TITLE );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE ); 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" ) "<div class='album-body' style='display:%9;' id='IDP%10'>\n" )
.args( TQStringList() .args( TQStringList()
<< TQString::number( i ) << TQString::number( i )
<< pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" ) << pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" )
<< escapeHTMLAttr( imageAttr ) << escapeHTMLAttr( imageAttr )
<< escapeHTMLAttr( image ) << escapeHTMLAttr( image )
<< escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) ) << escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) )
<< ( ep.localUrl().isValid() << ( ep.localUrl().isValid()
? ep.localUrl().url() ? ep.localUrl().url()
: ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) ) : ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) )
<< escapeHTML( pcb.title() + ": " + ep.title() ) << escapeHTML( pcb.title() + ": " + ep.title() )
<< escapeHTML( date ) << escapeHTML( date )
<< "none" << "none"
@ -1772,7 +1772,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle &currentTrack )
newUrls.append( &titleUrl ); newUrls.append( &titleUrl );
for ( TQString* url = newUrls.first(); url; url = newUrls.next() ) 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 skipIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("next"), -KIcon::SizeSmallMedium );
const TQString loveIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("love"), -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( pcb.title() )
<< escapeHTML( peb.title() ) << escapeHTML( peb.title() )
<< ( pcb.link().isValid() << ( pcb.link().isValid()
? pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" ) ? pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" )
: "current://track" ) : "current://track" )
<< image << image
<< imageAttr << imageAttr
@ -2064,7 +2064,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
<< escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) ) << escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) )
<< ( ep.localUrl().isValid() << ( ep.localUrl().isValid()
? ep.localUrl().url() ? ep.localUrl().url()
: ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) ) : ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) )
<< escapeHTML( ep.title() ) << escapeHTML( ep.title() )
<< escapeHTML( date ) << escapeHTML( date )
<< (peb.url() == ep.url() ? "block" : "none" ) << (peb.url() == ep.url() ? "block" : "none" )
@ -3256,9 +3256,9 @@ void ContextBrowser::showLyrics( const TQString &url )
TQString title = EngineController::instance()->bundle().title(); TQString title = EngineController::instance()->bundle().title();
TQString artist = EngineController::instance()->bundle().artist(); 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)"); 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)"); artist = artist.remove(" (PREVIEW: buy it at www.magnatune.com)");
if ( title.isEmpty() ) { 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, 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. */ but at least the user will hopefully get nice suggestions. */
TQString prettyTitle = EngineController::instance()->bundle().prettyTitle(); TQString prettyTitle = EngineController::instance()->bundle().prettyTitle();
int h = prettyTitle.tqfind( '-' ); int h = prettyTitle.find( '-' );
if ( h != -1 ) if ( h != -1 )
{ {
title = prettyTitle.mid( h+1 ).stripWhiteSpace(); 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)"); title = title.remove(" (PREVIEW: buy it at www.magnatune.com)");
if ( artist.isEmpty() ) { if ( artist.isEmpty() ) {
artist = prettyTitle.mid( 0, h ).stripWhiteSpace(); 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)"); 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() ) if ( el.attribute( "add_url" ).isEmpty() )
{ {
m_lyricAddUrl = spec.readPathEntry( "add_url" ); m_lyricAddUrl = spec.readPathEntry( "add_url" );
m_lyricAddUrl.tqreplace( "MAGIC_ARTIST", KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ) ); m_lyricAddUrl.replace( "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.replace( "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.replace( "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_YEAR", KURL::encode_string_no_slash( TQString::number( EngineController::instance()->bundle().year() ) ) );
} }
else else
m_lyricAddUrl = el.attribute( "add_url" ); 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>" ) 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 { else {
lyrics = el.text(); 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 title = el.attribute( "title" );
const TQString artist = el.attribute( "artist" ); const TQString artist = el.attribute( "artist" );
@ -3740,7 +3740,7 @@ TQString
ContextBrowser::wikiURL( const TQString &item ) ContextBrowser::wikiURL( const TQString &item )
{ {
// add any special characters to be replaced here // 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() ) return TQString( "http://%1.wikipedia.org/wiki/" ).tqarg( wikiLocale() )
+ KURL::encode_string_no_slash( wStr, 106 /*utf-8*/ ); + KURL::encode_string_no_slash( wStr, 106 /*utf-8*/ );
@ -3789,7 +3789,7 @@ ContextBrowser::showLabelsDialog()
foreach( allLabels ) foreach( allLabels )
{ {
TQCheckListItem *item = new TQCheckListItem( m_labelListView, *it, TQCheckListItem::CheckBox ); TQCheckListItem *item = new TQCheckListItem( m_labelListView, *it, TQCheckListItem::CheckBox );
item->setOn( trackLabels.tqcontains( *it ) ); item->setOn( trackLabels.contains( *it ) );
} }
if( dialog->exec() == TQDialog::Accepted ) 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 //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)" ); tmpWikiStr = tmpWikiStr.remove(" (PREVIEW: buy it at www.magnatune.com)" );
int index = tmpWikiStr.tqfind( '-' ); int index = tmpWikiStr.find( '-' );
if ( index != -1 ) { if ( index != -1 ) {
tmpWikiStr = tmpWikiStr.left (index - 1); tmpWikiStr = tmpWikiStr.left (index - 1);
} }
@ -3988,7 +3988,7 @@ void ContextBrowser::showWikipedia( const TQString &url, bool fromHistory, bool
m_wikiToolBar->setItemEnabled( WIKI_BACK, m_wikiBackHistory.size() > 1 ); m_wikiToolBar->setItemEnabled( WIKI_BACK, m_wikiBackHistory.size() > 1 );
m_wikiToolBar->setItemEnabled( WIKI_FORWARD, m_wikiForwardHistory.size() > 0 ); m_wikiToolBar->setItemEnabled( WIKI_FORWARD, m_wikiForwardHistory.size() > 0 );
m_wikiBaseUrl = m_wikiCurrentUrl.mid(0 , m_wikiCurrentUrl.tqfind("wiki/")); m_wikiBaseUrl = m_wikiCurrentUrl.mid(0 , m_wikiCurrentUrl.find("wiki/"));
m_wikiJob = KIO::storedGet( m_wikiCurrentUrl, false, false ); m_wikiJob = KIO::storedGet( m_wikiCurrentUrl, false, false );
Amarok::StatusBar::instance()->newProgressOperation( m_wikiJob ) Amarok::StatusBar::instance()->newProgressOperation( m_wikiJob )
@ -4136,11 +4136,11 @@ ContextBrowser::wikiResult( KIO::Job* job ) //SLOT
m_wikiToolBar->setItemEnabled( WIKI_BROWSER, true ); m_wikiToolBar->setItemEnabled( WIKI_BROWSER, true );
// FIXME: Get a safer Regexp here, to match only inside of <head> </head> at least. // FIXME: Get a safer Regexp here, to match only inside of <head> </head> at least.
if ( m_wiki.tqcontains( "charset=utf-8" ) ) { if ( m_wiki.contains( "charset=utf-8" ) ) {
m_wiki = TQString::fromUtf8( storedJob->data().data(), storedJob->data().size() ); m_wiki = TQString::fromUtf8( storedJob->data().data(), storedJob->data().size() );
} }
if( m_wiki.tqfind( "var wgArticleId = 0" ) != -1 ) if( m_wiki.find( "var wgArticleId = 0" ) != -1 )
{ {
debug() << "Article not found." << endl; debug() << "Article not found." << endl;
@ -4166,65 +4166,65 @@ ContextBrowser::wikiResult( KIO::Job* job ) //SLOT
} }
//remove the new-lines and tabs(replace with spaces IS needed). //remove the new-lines and tabs(replace with spaces IS needed).
m_wiki.tqreplace( "\n", " " ); m_wiki.replace( "\n", " " );
m_wiki.tqreplace( "\t", " " ); m_wiki.replace( "\t", " " );
m_wikiLanguages = TQString(); m_wikiLanguages = TQString();
// Get the available language list // Get the available language list
if ( m_wiki.tqfind("<div id=\"p-lang\" class=\"portlet\">") != -1 ) if ( m_wiki.find("<div id=\"p-lang\" class=\"portlet\">") != -1 )
{ {
m_wikiLanguages = m_wiki.mid( m_wiki.tqfind("<div id=\"p-lang\" class=\"portlet\">") ); m_wikiLanguages = m_wiki.mid( m_wiki.find("<div id=\"p-lang\" class=\"portlet\">") );
m_wikiLanguages = m_wikiLanguages.mid( m_wikiLanguages.tqfind("<ul>") ); m_wikiLanguages = m_wikiLanguages.mid( m_wikiLanguages.find("<ul>") );
m_wikiLanguages = m_wikiLanguages.mid( 0, m_wikiLanguages.tqfind( "</div>" ) ); m_wikiLanguages = m_wikiLanguages.mid( 0, m_wikiLanguages.find( "</div>" ) );
} }
TQString copyright; TQString copyright;
TQString copyrightMark = "<li id=\"f-copyright\">"; TQString copyrightMark = "<li id=\"f-copyright\">";
if ( m_wiki.tqfind( copyrightMark ) != -1 ) if ( m_wiki.find( copyrightMark ) != -1 )
{ {
copyright = m_wiki.mid( m_wiki.tqfind(copyrightMark) + copyrightMark.length() ); copyright = m_wiki.mid( m_wiki.find(copyrightMark) + copyrightMark.length() );
copyright = copyright.mid( 0, copyright.tqfind( "</li>" ) ); copyright = copyright.mid( 0, copyright.find( "</li>" ) );
copyright.tqreplace( "<br />", TQString() ); copyright.replace( "<br />", TQString() );
//only one br at the beginning //only one br at the beginning
copyright.prepend( "<br />" ); copyright.prepend( "<br />" );
} }
// Ok lets remove the top and bottom parts of the page // Ok lets remove the top and bottom parts of the page
m_wiki = m_wiki.mid( m_wiki.tqfind( "<h1 id=\"firstHeading\" class=\"firstHeading\">" ) ); m_wiki = m_wiki.mid( m_wiki.find( "<h1 id=\"firstHeading\" class=\"firstHeading\">" ) );
m_wiki = m_wiki.mid( 0, m_wiki.tqfind( "<div class=\"printfooter\">" ) ); m_wiki = m_wiki.mid( 0, m_wiki.find( "<div class=\"printfooter\">" ) );
// Adding back license information // Adding back license information
m_wiki += copyright; m_wiki += copyright;
m_wiki.append( "</div>" ); m_wiki.append( "</div>" );
m_wiki.tqreplace( TQRegExp("<h3 id=\"siteSub\">[^<]*</h3>"), TQString() ); m_wiki.replace( TQRegExp("<h3 id=\"siteSub\">[^<]*</h3>"), TQString() );
m_wiki.tqreplace( TQRegExp( "<span class=\"editsection\"[^>]*>[^<]*<[^>]*>[^<]*<[^>]*>[^<]*</span>" ), TQString() ); m_wiki.replace( TQRegExp( "<span class=\"editsection\"[^>]*>[^<]*<[^>]*>[^<]*<[^>]*>[^<]*</span>" ), TQString() );
m_wiki.tqreplace( TQRegExp( "<a href=\"[^\"]*\" class=\"new\"[^>]*>([^<]*)</a>" ), "\\1" ); m_wiki.replace( TQRegExp( "<a href=\"[^\"]*\" class=\"new\"[^>]*>([^<]*)</a>" ), "\\1" );
// Remove anything inside of a class called urlexpansion, as it's pointless for us // Remove anything inside of a class called urlexpansion, as it's pointless for us
m_wiki.tqreplace( TQRegExp( "<span class= *'urlexpansion'>[^(]*[(][^)]*[)]</span>" ), TQString() ); m_wiki.replace( TQRegExp( "<span class= *'urlexpansion'>[^(]*[(][^)]*[)]</span>" ), TQString() );
// Remove hidden table rows as well // Remove hidden table rows as well
TQRegExp hidden( "<tr *class= *[\"\']hiddenStructure[\"\']>.*</tr>", false ); TQRegExp hidden( "<tr *class= *[\"\']hiddenStructure[\"\']>.*</tr>", false );
hidden.setMinimal( true ); //greedy behaviour wouldn't be any good! hidden.setMinimal( true ); //greedy behaviour wouldn't be any good!
m_wiki.tqreplace( hidden, TQString() ); m_wiki.replace( hidden, TQString() );
// we want to keep our own style (we need to modify the stylesheet a bit to handle things nicely) // we want to keep our own style (we need to modify the stylesheet a bit to handle things nicely)
m_wiki.tqreplace( TQRegExp( "style= *\"[^\"]*\"" ), TQString() ); m_wiki.replace( TQRegExp( "style= *\"[^\"]*\"" ), TQString() );
m_wiki.tqreplace( TQRegExp( "class= *\"[^\"]*\"" ), TQString() ); m_wiki.replace( TQRegExp( "class= *\"[^\"]*\"" ), TQString() );
// let's remove the form elements, we don't want them. // let's remove the form elements, we don't want them.
m_wiki.tqreplace( TQRegExp( "<input[^>]*>" ), TQString() ); m_wiki.replace( TQRegExp( "<input[^>]*>" ), TQString() );
m_wiki.tqreplace( TQRegExp( "<select[^>]*>" ), TQString() ); m_wiki.replace( TQRegExp( "<select[^>]*>" ), TQString() );
m_wiki.tqreplace( "</select>\n" , TQString() ); m_wiki.replace( "</select>\n" , TQString() );
m_wiki.tqreplace( TQRegExp( "<option[^>]*>" ), TQString() ); m_wiki.replace( TQRegExp( "<option[^>]*>" ), TQString() );
m_wiki.tqreplace( "</option>\n" , TQString() ); m_wiki.replace( "</option>\n" , TQString() );
m_wiki.tqreplace( TQRegExp( "<textarea[^>]*>" ), TQString() ); m_wiki.replace( TQRegExp( "<textarea[^>]*>" ), TQString() );
m_wiki.tqreplace( "</textarea>" , TQString() ); m_wiki.replace( "</textarea>" , TQString() );
//first we convert all the links with protocol to external, as they should all be External Links. //first we convert all the links with protocol to external, as they should all be External Links.
m_wiki.tqreplace( TQRegExp( "href= *\"http:" ), "href=\"externalurl:" ); m_wiki.replace( TQRegExp( "href= *\"http:" ), "href=\"externalurl:" );
m_wiki.tqreplace( TQRegExp( "href= *\"/" ), "href=\"" +m_wikiBaseUrl ); m_wiki.replace( TQRegExp( "href= *\"/" ), "href=\"" +m_wikiBaseUrl );
m_wiki.tqreplace( TQRegExp( "href= *\"#" ), "href=\"" +m_wikiCurrentUrl + '#' ); m_wiki.replace( TQRegExp( "href= *\"#" ), "href=\"" +m_wikiCurrentUrl + '#' );
m_HTMLSource = "<html><body>\n"; m_HTMLSource = "<html><body>\n";
m_HTMLSource.append( m_HTMLSource.append(
@ -4271,7 +4271,7 @@ ContextBrowser::coverFetched( const TQString &artist, const TQString &album ) //
!m_browseArtists ) !m_browseArtists )
{ {
m_dirtyCurrentTrackPage = true; m_dirtyCurrentTrackPage = true;
if( m_shownAlbums.tqcontains( album ) ) if( m_shownAlbums.contains( album ) )
showCurrentTrack(); showCurrentTrack();
return; return;
} }
@ -4297,7 +4297,7 @@ ContextBrowser::coverRemoved( const TQString &artist, const TQString &album ) //
!m_browseArtists ) !m_browseArtists )
{ {
m_dirtyCurrentTrackPage = true; m_dirtyCurrentTrackPage = true;
if( m_shownAlbums.tqcontains( album ) ) if( m_shownAlbums.contains( album ) )
showCurrentTrack(); showCurrentTrack();
return; return;
} }
@ -4363,7 +4363,7 @@ void ContextBrowser::tagsChanged( const MetaBundle &bundle ) //SLOT
{ {
const MetaBundle &currentTrack = EngineController::instance()->bundle(); const MetaBundle &currentTrack = EngineController::instance()->bundle();
if( !m_shownAlbums.tqcontains( bundle.album() ) && m_artist != bundle.artist() ) if( !m_shownAlbums.contains( bundle.album() ) && m_artist != bundle.artist() )
{ {
if( currentTrack.artist().isEmpty() && currentTrack.album().isEmpty() ) if( currentTrack.artist().isEmpty() && currentTrack.album().isEmpty() )
return; return;
@ -4379,7 +4379,7 @@ void ContextBrowser::tagsChanged( const TQString &oldArtist, const TQString &old
{ {
const MetaBundle &currentTrack = EngineController::instance()->bundle(); const MetaBundle &currentTrack = EngineController::instance()->bundle();
if( !m_shownAlbums.tqcontains( oldAlbum ) && m_artist != oldArtist ) if( !m_shownAlbums.contains( oldAlbum ) && m_artist != oldArtist )
{ {
if( currentTrack.artist().isEmpty() && currentTrack.album().isEmpty() ) if( currentTrack.artist().isEmpty() && currentTrack.album().isEmpty() )
return; return;
@ -4492,7 +4492,7 @@ ContextBrowser::expandURL( const KURL &url )
} }
else if( protocol == "stream" ) { else if( protocol == "stream" ) {
urls += KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ); urls += KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) );
} }
return urls; return urls;

@ -58,7 +58,7 @@ Amarok::coverContextMenu( TQWidget *tqparent, TQPoint point, const TQString &art
#ifndef AMAZON_SUPPORT #ifndef AMAZON_SUPPORT
menu.setItemEnabled( FETCH, false ); menu.setItemEnabled( FETCH, false );
#endif #endif
disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).tqcontains( "nocover" ); disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).contains( "nocover" );
menu.setItemEnabled( SHOW, disable ); menu.setItemEnabled( SHOW, disable );
menu.setItemEnabled( DELETE, disable ); menu.setItemEnabled( DELETE, disable );

@ -586,7 +586,7 @@ void CoverManager::slotSetFilter() //SLOT
for( TQIconViewItem *item = m_coverItems.first(); item; item = m_coverItems.next() ) for( TQIconViewItem *item = m_coverItems.first(); item; item = m_coverItems.next() )
{ {
CoverViewItem *coverItem = static_cast<CoverViewItem*>(item); CoverViewItem *coverItem = static_cast<CoverViewItem*>(item);
if( coverItem->album().tqcontains( m_filter, false ) || coverItem->artist().tqcontains( m_filter, false ) ) if( coverItem->album().contains( m_filter, false ) || coverItem->artist().contains( m_filter, false ) )
m_coverView->insertItem( item, m_coverView->lastItem() ); m_coverView->insertItem( item, m_coverView->lastItem() );
} }
m_coverView->setAutoArrange( true ); m_coverView->setAutoArrange( true );
@ -621,7 +621,7 @@ void CoverManager::changeView( int id ) //SLOT
bool show = false; bool show = false;
CoverViewItem *coverItem = static_cast<CoverViewItem*>(item); CoverViewItem *coverItem = static_cast<CoverViewItem*>(item);
if( !m_filter.isEmpty() ) { if( !m_filter.isEmpty() ) {
if( !coverItem->album().tqcontains( m_filter, false ) && !coverItem->artist().tqcontains( m_filter, false ) ) if( !coverItem->album().contains( m_filter, false ) && !coverItem->artist().contains( m_filter, false ) )
continue; continue;
} }

@ -889,7 +889,7 @@ CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, u
uint maxmatches = 0; uint maxmatches = 0;
for ( uint i = 0; i < values.count(); i++ ) for ( uint i = 0; i < values.count(); i++ )
{ {
matches = values[i].tqcontains( "front", false ) + values[i].tqcontains( "cover", false ) + values[i].tqcontains( "folder", false ); matches = values[i].contains( "front", false ) + values[i].contains( "cover", false ) + values[i].contains( "folder", false );
if ( matches > maxmatches ) if ( matches > maxmatches )
{ {
image = values[i]; image = values[i];
@ -1094,11 +1094,11 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental, DbConnection
if ( title.isEmpty() ) if ( title.isEmpty() )
{ {
title = bundle->url().fileName(); title = bundle->url().fileName();
if ( bundle->url().fileName().tqfind( '-' ) > 0 ) if ( bundle->url().fileName().find( '-' ) > 0 )
{ {
if ( artist.isEmpty() ) artist = bundle->url().fileName().section( '-', 0, 0 ).stripWhiteSpace(); if ( artist.isEmpty() ) artist = bundle->url().fileName().section( '-', 0, 0 ).stripWhiteSpace();
title = bundle->url().fileName().section( '-', 1 ).stripWhiteSpace(); title = 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(); if ( title.isEmpty() ) title = bundle->url().fileName();
} }
} }

@ -72,10 +72,10 @@ class QueryBuilder
#ifdef USE_MYSQL #ifdef USE_MYSQL
// We have to escape "\" for mysql, but can't do so for sqlite // We have to escape "\" for mysql, but can't do so for sqlite
(m_dbConnType == DbConnection::mysql) (m_dbConnType == DbConnection::mysql)
? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) ? string.replace("\\", "\\\\").replace( '\'', "''" )
: :
#endif #endif
string.tqreplace( '\'', "''" ); string.replace( '\'', "''" );
} }
void addReturnValue( int table, int value ); void addReturnValue( int table, int value );

@ -154,9 +154,9 @@ bool
MassStorageDeviceHandlerFactory::excludedFilesystem( const TQString &fstype ) const MassStorageDeviceHandlerFactory::excludedFilesystem( const TQString &fstype ) const
{ {
return fstype.isEmpty() || return fstype.isEmpty() ||
fstype.tqfind( "smb" ) != -1 || fstype.find( "smb" ) != -1 ||
fstype.tqfind( "cifs" ) != -1 || fstype.find( "cifs" ) != -1 ||
fstype.tqfind( "nfs" ) != -1 || fstype.find( "nfs" ) != -1 ||
fstype == "udf" || fstype == "udf" ||
fstype == "iso9660" ; fstype == "iso9660" ;
} }

@ -110,8 +110,8 @@ SmbDeviceHandlerFactory::canCreateFromConfig( ) const
bool bool
SmbDeviceHandlerFactory::canHandle( const Medium * m ) const SmbDeviceHandlerFactory::canHandle( const Medium * m ) const
{ {
return m && ( m->fsType().tqfind( "smb" ) != -1 || return m && ( m->fsType().find( "smb" ) != -1 ||
m->fsType().tqfind( "cifs" ) != -1 ) m->fsType().find( "cifs" ) != -1 )
&& m->isMounted(); && m->isMounted();
} }

@ -103,7 +103,7 @@ DeviceManager::mediumRemoved( const TQString name )
if ( !m_valid ) if ( !m_valid )
return; return;
Medium* removedMedium = 0; Medium* removedMedium = 0;
if ( m_mediumMap.tqcontains(name) ) if ( m_mediumMap.contains(name) )
removedMedium = m_mediumMap[name]; removedMedium = m_mediumMap[name];
if ( removedMedium != 0 ) if ( removedMedium != 0 )
debug() << "[DeviceManager::mediumRemoved] Obtained medium name is " << name << ", id is: " << removedMedium->id() << endl; debug() << "[DeviceManager::mediumRemoved] Obtained medium name is " << name << ", id is: " << removedMedium->id() << endl;
@ -114,7 +114,7 @@ DeviceManager::mediumRemoved( const TQString name )
//has been running //has been running
//There is no point in calling getDevice, since it will not be in the list anyways //There is no point in calling getDevice, since it will not be in the list anyways
emit mediumRemoved( removedMedium, name ); emit mediumRemoved( removedMedium, name );
if ( m_mediumMap.tqcontains(name) ) if ( m_mediumMap.contains(name) )
{ {
delete removedMedium; //If we are to remove it from the map, delete it first delete removedMedium; //If we are to remove it from the map, delete it first
m_mediumMap.remove(name); m_mediumMap.remove(name);
@ -215,7 +215,7 @@ DeviceManager::getDevice( const TQString name )
if ( (*it).name() == name ) if ( (*it).name() == name )
{ {
MediumIterator secIt; MediumIterator secIt;
if ( (secIt = m_mediumMap.tqfind( name )) != m_mediumMap.end() ) if ( (secIt = m_mediumMap.find( name )) != m_mediumMap.end() )
{ {
//Refresh the Medium by reconstructing then copying it over. //Refresh the Medium by reconstructing then copying it over.
returnedMedium = *secIt; returnedMedium = *secIt;
@ -246,7 +246,7 @@ DeviceManager::reconcileMediumMap()
for ( it = currMediumList.begin(); it != currMediumList.end(); ++it ) for ( it = currMediumList.begin(); it != currMediumList.end(); ++it )
{ {
MediumIterator locIt; MediumIterator locIt;
if ( (locIt = m_mediumMap.tqfind( (*it).name() )) != m_mediumMap.end() ) if ( (locIt = m_mediumMap.find( (*it).name() )) != m_mediumMap.end() )
{ {
Medium* mediumHolder = (*locIt); Medium* mediumHolder = (*locIt);
*mediumHolder = Medium( *it ); *mediumHolder = Medium( *it );

@ -120,7 +120,7 @@ Item::Item( TQListView *tqparent )
, m_fullyDisabled( false ) , m_fullyDisabled( false )
{ {
//Since we create the "/" checklistitem here, we need to enable it if needed //Since we create the "/" checklistitem here, we need to enable it if needed
if ( CollectionSetup::instance()->m_dirs.tqcontains( "/" ) ) if ( CollectionSetup::instance()->m_dirs.contains( "/" ) )
static_cast<TQCheckListItem*>( this )->setOn(true); static_cast<TQCheckListItem*>( this )->setOn(true);
m_lister.setDirOnlyMode( true ); m_lister.setDirOnlyMode( true );
connect( &m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(newItems( const KFileItemList& )) ); connect( &m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(newItems( const KFileItemList& )) );
@ -191,7 +191,7 @@ Item::stateChange( bool b )
return; return;
// Update folder list // Update folder list
TQStringList::Iterator it = cs_m_dirs.tqfind( m_url.path() ); TQStringList::Iterator it = cs_m_dirs.find( m_url.path() );
if ( isOn() ) { if ( isOn() ) {
if ( it == cs_m_dirs.end() ) if ( it == cs_m_dirs.end() )
cs_m_dirs << m_url.path(); cs_m_dirs << m_url.path();
@ -274,7 +274,7 @@ Item::newItems( const KFileItemList &list ) //SLOT
if ( !item->isFullyDisabled() ) if ( !item->isFullyDisabled() )
{ {
if( CollectionSetup::instance()->recursive() && isOn() || if( CollectionSetup::instance()->recursive() && isOn() ||
CollectionSetup::instance()->m_dirs.tqcontains( item->fullPath() ) ) CollectionSetup::instance()->m_dirs.contains( item->fullPath() ) )
{ {
item->setOn( true ); item->setOn( true );
} }

@ -270,10 +270,10 @@ DEBUG_BLOCK
// FIXME: All this SQL magic out of collectiondb is not a good thing // FIXME: All this SQL magic out of collectiondb is not a good thing
// if there is no ordering, add random ordering // if there is no ordering, add random ordering
if ( sql.tqfind( TQString("ORDER BY"), false ) == -1 ) if ( sql.find( TQString("ORDER BY"), false ) == -1 )
{ {
TQRegExp limit( "(LIMIT.*)?;$" ); TQRegExp limit( "(LIMIT.*)?;$" );
sql.tqreplace( limit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;") sql.replace( limit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;")
.tqarg( CollectionDB::instance()->randomFunc() ) .tqarg( CollectionDB::instance()->randomFunc() )
.tqarg( songCount ) ); .tqarg( songCount ) );
} }
@ -286,9 +286,9 @@ DEBUG_BLOCK
if( findLocation == -1 ) //not found, let's find out the higher limit the hard way if( findLocation == -1 ) //not found, let's find out the higher limit the hard way
{ {
TQString counting( sql ); TQString counting( sql );
counting.tqreplace( TQRegExp( "SELECT.*FROM" ), "SELECT COUNT(*) FROM" ); counting.replace( TQRegExp( "SELECT.*FROM" ), "SELECT COUNT(*) FROM" );
// Postgres' grouping rule doesn't like the following clause // Postgres' grouping rule doesn't like the following clause
counting.tqreplace( TQRegExp( "ORDER BY.*" ), "" ); counting.replace( TQRegExp( "ORDER BY.*" ), "" );
TQStringList countingResult = CollectionDB::instance()->query( counting ); TQStringList countingResult = CollectionDB::instance()->query( counting );
limit = countingResult[0].toInt(); limit = countingResult[0].toInt();
} }
@ -308,7 +308,7 @@ DEBUG_BLOCK
// is meaningless in dynamic mode // is meaningless in dynamic mode
TQRegExp orderLimit( "(ORDER BY.*)?;$" ); TQRegExp orderLimit( "(ORDER BY.*)?;$" );
sql.tqreplace( orderLimit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;") sql.replace( orderLimit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;")
.tqarg( CollectionDB::instance()->randomFunc() ) .tqarg( CollectionDB::instance()->randomFunc() )
.tqarg( songCount ) ); .tqarg( songCount ) );
} }
@ -324,16 +324,16 @@ DEBUG_BLOCK
if( findLocation == -1 ) // there is no limit if( findLocation == -1 ) // there is no limit
{ {
TQRegExp queryEnd( ";$" ); // find the end of the query an add a limit TQRegExp queryEnd( ";$" ); // find the end of the query an add a limit
sql.tqreplace( queryEnd, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount*5 ).tqarg( offset ) ); sql.replace( queryEnd, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount*5 ).tqarg( offset ) );
useDirect = false; useDirect = false;
} }
else // there is a limit, so find it and replace it else // there is a limit, so find it and replace it
sql.tqreplace( limitSearch, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount ).tqarg( offset ) ); sql.replace( limitSearch, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount ).tqarg( offset ) );
} }
} }
// only return the fields that we need // only return the fields that we need
sql.tqreplace( TQRegExp( "SELECT.*FROM" ), "SELECT tags.url, tags.deviceid FROM" ); sql.replace( TQRegExp( "SELECT.*FROM" ), "SELECT tags.url, tags.deviceid FROM" );
TQStringList queryResult = CollectionDB::instance()->query( sql ); TQStringList queryResult = CollectionDB::instance()->query( sql );
TQStringList items; TQStringList items;

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -288,7 +288,7 @@ HelixEngine::load( const KURL &url, bool isStream )
if (!canDecode(url)) if (!canDecode(url))
{ {
const TQString path = url.path(); const TQString path = url.path();
const TQString ext = path.mid( path.tqfindRev( '.' ) + 1 ).lower(); const TQString ext = path.mid( path.findRev( '.' ) + 1 ).lower();
emit statusText( i18n("No plugin found for the %1 format").tqarg(ext) ); emit statusText( i18n("No plugin found for the %1 format").tqarg(ext) );
return false; return false;
} }
@ -550,7 +550,7 @@ HelixEngine::canDecode( const KURL &url ) const
return true; return true;
const TQString path = url.path(); const TQString path = url.path();
const TQString ext = path.mid( path.tqfindRev( '.' ) + 1 ).lower(); const TQString ext = path.mid( path.findRev( '.' ) + 1 ).lower();
if (ext != "txt") if (ext != "txt")
for (int i=0; i<(int)m_mimes.size(); i++) for (int i=0; i<(int)m_mimes.size(); i++)

@ -319,7 +319,7 @@ void HSPClientContext::Init(IUnknown* pUnknown,
if (pszGUID && *pszGUID) if (pszGUID && *pszGUID)
{ {
// Encode GUID // Encode GUID
// TODO: tqfind/implement Cipher // TODO: find/implement Cipher
//pszCipher = Cipher(pszGUID); //pszCipher = Cipher(pszGUID);
//SafeStrCpy(m_pszGUID, pszCipher, 256); //SafeStrCpy(m_pszGUID, pszCipher, 256);
} }

@ -113,7 +113,7 @@ bool KDEMMEngine::canDecode( const KURL &url ) const
KMimeType::Ptr mimetype = fileItem.determineMimeType(); KMimeType::Ptr mimetype = fileItem.determineMimeType();
kdDebug() << "mimetype: " << mimetype->name().latin1() << endl; kdDebug() << "mimetype: " << mimetype->name().latin1() << endl;
return list.tqcontains( mimetype->name().latin1() ); return list.contains( mimetype->name().latin1() );
} // canDecode } // canDecode

@ -127,7 +127,7 @@ bool MasEngine::canDecode( const KURL &url ) const
KMimeType::Ptr mimetype = fileItem.determineMimeType(); KMimeType::Ptr mimetype = fileItem.determineMimeType();
debug() << "mimetype: " << mimetype->name().latin1() << endl; debug() << "mimetype: " << mimetype->name().latin1() << endl;
playable = list.tqcontains( mimetype->name().latin1() ); playable = list.contains( mimetype->name().latin1() );
if ( !playable ) if ( !playable )
warning() << "Mimetype is not playable by MAS (" << url << ")" << endl; warning() << "Mimetype is not playable by MAS (" << url << ")" << endl;

@ -623,7 +623,7 @@ bool NmmEngine::canDecode(const KURL& url) const
KFileItem fileItem( KFileItem::Unknown, KFileItem::Unknown, url, false ); //false = determineMimeType straight away KFileItem fileItem( KFileItem::Unknown, KFileItem::Unknown, url, false ); //false = determineMimeType straight away
KMimeType::Ptr mimetype = fileItem.determineMimeType(); KMimeType::Ptr mimetype = fileItem.determineMimeType();
return types.tqcontains(mimetype->name()); return types.contains(mimetype->name());
} }

@ -654,7 +654,7 @@ XineEngine::canDecode( const KURL &url ) const
list.remove("ssa"); list.remove("ssa");
//HACK we also check for m4a because xine plays them but //HACK we also check for m4a because xine plays them but
//for some reason doesn't return the extension //for some reason doesn't return the extension
if(!list.tqcontains("m4a")) if(!list.contains("m4a"))
list << "m4a"; list << "m4a";
} }
@ -669,9 +669,9 @@ XineEngine::canDecode( const KURL &url ) const
if (path.endsWith( ".part" )) if (path.endsWith( ".part" ))
path = path.left( path.length() - 5 ); path = path.left( path.length() - 5 );
const TQString ext = path.mid( path.tqfindRev( '.' ) + 1 ).lower(); const TQString ext = path.mid( path.findRev( '.' ) + 1 ).lower();
return list.tqcontains( ext ); return list.contains( ext );
} }
const Engine::Scope& const Engine::Scope&

@ -230,7 +230,7 @@ bool EngineController::canDecode( const KURL &url ) //static
if ( !url.isLocalFile() ) return true; if ( !url.isLocalFile() ) return true;
// If extension is already in the cache, return cache result // If extension is already in the cache, return cache result
if ( extensionCache().tqcontains( ext ) ) if ( extensionCache().contains( ext ) )
return s_extensionCache[ext]; return s_extensionCache[ext];
// If file has 0 bytes, ignore it and return false, not to infect the cache with corrupt files. // If file has 0 bytes, ignore it and return false, not to infect the cache with corrupt files.
@ -653,7 +653,7 @@ EngineController::bundle() const
void EngineController::slotStreamMetaData( const MetaBundle &bundle ) //SLOT void EngineController::slotStreamMetaData( const MetaBundle &bundle ) //SLOT
{ {
// Prevent spamming by ignoring repeated identical data (some servers repeat it every 10 seconds) // Prevent spamming by ignoring repeated identical data (some servers repeat it every 10 seconds)
if ( m_lastMetadata.tqcontains( bundle ) ) if ( m_lastMetadata.contains( bundle ) )
return; return;
// We compare the new item with the last two items, because mth.house currently cycles // We compare the new item with the last two items, because mth.house currently cycles

@ -139,7 +139,7 @@ void EngineSubject::trackLengthChangedNotify( long length )
void EngineSubject::attach( EngineObserver *observer ) void EngineSubject::attach( EngineObserver *observer )
{ {
if( !observer || Observers.tqfind( observer ) != -1 ) if( !observer || Observers.find( observer ) != -1 )
return; return;
Observers.append( observer ); Observers.append( observer );
} }
@ -147,5 +147,5 @@ void EngineSubject::attach( EngineObserver *observer )
void EngineSubject::detach( EngineObserver *observer ) void EngineSubject::detach( EngineObserver *observer )
{ {
if( Observers.tqfind( observer ) != -1 ) Observers.remove(); if( Observers.find( observer ) != -1 ) Observers.remove();
} }

@ -102,7 +102,7 @@ EqualizerPresetManager::slotRename()
if ( ok && item->text(0) != title ) { if ( ok && item->text(0) != title ) {
// Check if the new preset title exists // Check if the new preset title exists
if ( m_presets.tqfind( title ) != m_presets.end() ) { if ( m_presets.find( title ) != m_presets.end() ) {
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) ); int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) );
if ( button != KMessageBox::Yes ) if ( button != KMessageBox::Yes )

@ -341,7 +341,7 @@ EqualizerSetup::editPresets()
TQString newTitle = currentTitle; TQString newTitle = currentTitle;
// Check if the selected item was renamed // Check if the selected item was renamed
if ( presets.tqfind( currentTitle ) == presets.end() || currentGains != presets[ currentTitle ] ) { if ( presets.find( currentTitle ) == presets.end() || currentGains != presets[ currentTitle ] ) {
// Find the new name // Find the new name
TQMap< TQString, TQValueList<int> >::Iterator end = presets.end(); TQMap< TQString, TQValueList<int> >::Iterator end = presets.end();
@ -369,7 +369,7 @@ EqualizerSetup::addPreset()
if (ok) { if (ok) {
// Check if the new preset title exists // Check if the new preset title exists
if ( m_presets.tqfind( title ) != m_presets.end() ) { if ( m_presets.find( title ) != m_presets.end() ) {
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) ); int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) );
if ( button != KMessageBox::Yes ) if ( button != KMessageBox::Yes )

@ -45,11 +45,11 @@ ParsedExpression ExpressionParser::parse( const TQString &expression ) //static
bool ExpressionParser::isAdvancedExpression( const TQString &expression ) //static bool ExpressionParser::isAdvancedExpression( const TQString &expression ) //static
{ {
return ( expression.tqcontains( '"' ) || return ( expression.contains( '"' ) ||
expression.tqcontains( ':' ) || expression.contains( ':' ) ||
expression.tqcontains( '-' ) || expression.contains( '-' ) ||
expression.tqcontains( "AND" ) || expression.contains( "AND" ) ||
expression.tqcontains( "OR" ) ); expression.contains( "OR" ) );
} }
/* PRIVATE */ /* PRIVATE */

@ -622,7 +622,7 @@ SearchPane::SearchPane( FileBrowser *tqparent )
connect( m_listView, TQT_SIGNAL(executed( TQListViewItem* )), TQT_SLOT(activate( TQListViewItem* )) ); connect( m_listView, TQT_SIGNAL(executed( TQListViewItem* )), TQT_SLOT(activate( TQListViewItem* )) );
} }
KPushButton *button = new KPushButton( KGuiItem( i18n("&Show Search Panel"), "tqfind" ), this ); KPushButton *button = new KPushButton( KGuiItem( i18n("&Show Search Panel"), "find" ), this );
button->setToggleButton( true ); button->setToggleButton( true );
connect( button, TQT_SIGNAL(toggled( bool )), TQT_SLOT(toggle( bool )) ); connect( button, TQT_SIGNAL(toggled( bool )), TQT_SLOT(toggle( bool )) );
@ -661,7 +661,7 @@ SearchPane::searchTextChanged( const TQString &text )
return; return;
} }
m_filter = TQRegExp( text.tqcontains( "*" ) ? text : '*'+text+'*', false, true ); m_filter = TQRegExp( text.contains( "*" ) ? text : '*'+text+'*', false, true );
m_lister->openURL( searchURL() ); m_lister->openURL( searchURL() );

@ -132,18 +132,18 @@ HTMLView::loadStyleSheet()
TQString tmpCSS = eCSSts.read(); TQString tmpCSS = eCSSts.read();
ExternalCSS.close(); ExternalCSS.close();
tmpCSS.tqreplace( "./", KURL::fromPathOrURL( CSSLocation ).directory( false ) ); tmpCSS.replace( "./", KURL::fromPathOrURL( CSSLocation ).directory( false ) );
tmpCSS.tqreplace( "AMAROK_FONTSIZE-2", pxSize ); tmpCSS.replace( "AMAROK_FONTSIZE-2", pxSize );
tmpCSS.tqreplace( "AMAROK_FONTSIZE", pxSize ); tmpCSS.replace( "AMAROK_FONTSIZE", pxSize );
tmpCSS.tqreplace( "AMAROK_FONTSIZE+2", pxSize ); tmpCSS.replace( "AMAROK_FONTSIZE+2", pxSize );
tmpCSS.tqreplace( "AMAROK_FONTFAMILY", fontFamily ); tmpCSS.replace( "AMAROK_FONTFAMILY", fontFamily );
tmpCSS.tqreplace( "AMAROK_TEXTCOLOR", text ); tmpCSS.replace( "AMAROK_TEXTCOLOR", text );
tmpCSS.tqreplace( "AMAROK_LINKCOLOR", link ); tmpCSS.replace( "AMAROK_LINKCOLOR", link );
tmpCSS.tqreplace( "AMAROK_BGCOLOR", bg ); tmpCSS.replace( "AMAROK_BGCOLOR", bg );
tmpCSS.tqreplace( "AMAROK_FGCOLOR", fg ); tmpCSS.replace( "AMAROK_FGCOLOR", fg );
tmpCSS.tqreplace( "AMAROK_BASECOLOR", base ); tmpCSS.replace( "AMAROK_BASECOLOR", base );
tmpCSS.tqreplace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() ); tmpCSS.replace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() );
tmpCSS.tqreplace( "AMAROK_GRADIENTCOLOR", gradientColor.name() ); tmpCSS.replace( "AMAROK_GRADIENTCOLOR", gradientColor.name() );
styleSheet += tmpCSS; styleSheet += tmpCSS;
} }

@ -87,7 +87,7 @@ Amarok::icon( const TQString& name ) //declared in amarok.h
iconMap["rewind"] = "2leftarrow"; iconMap["rewind"] = "2leftarrow";
iconMap["save"] = "filesave"; iconMap["save"] = "filesave";
iconMap["scripts"] = "pencil"; iconMap["scripts"] = "pencil";
iconMap["search"] = "tqfind"; iconMap["search"] = "find";
iconMap["settings_engine"] = "amarok"; iconMap["settings_engine"] = "amarok";
iconMap["settings_general"] = "misc"; iconMap["settings_general"] = "misc";
iconMap["settings_indicator"] = "tv"; iconMap["settings_indicator"] = "tv";
@ -99,7 +99,7 @@ Amarok::icon( const TQString& name ) //declared in amarok.h
iconMap["track"] = "sound"; iconMap["track"] = "sound";
iconMap["undo"] = "undo"; iconMap["undo"] = "undo";
iconMap["visualizations"] = "visualizations"; iconMap["visualizations"] = "visualizations";
iconMap["zoom"] = "tqfind"; iconMap["zoom"] = "find";
} }
static TQMap<TQString, TQString> amarokMap; static TQMap<TQString, TQString> amarokMap;
@ -108,11 +108,11 @@ Amarok::icon( const TQString& name ) //declared in amarok.h
amarokMap["dequeue_track"] = "rewind"; amarokMap["dequeue_track"] = "rewind";
} }
if( iconMap.tqcontains( name ) ) if( iconMap.contains( name ) )
{ {
if( AmarokConfig::useCustomIconTheme() ) if( AmarokConfig::useCustomIconTheme() )
{ {
if( amarokMap.tqcontains( name ) ) if( amarokMap.contains( name ) )
return TQString( "amarok_" ) + amarokMap[name]; return TQString( "amarok_" ) + amarokMap[name];
return TQString( "amarok_" ) + name; return TQString( "amarok_" ) + name;
} }

@ -198,7 +198,7 @@ void UniversalAmarok::updateBrowser(const TQString& file)
line = stream.readLine(); // line of text excluding '\n' line = stream.readLine(); // line of text excluding '\n'
text += TQString("\n") + line; text += TQString("\n") + line;
} f_file.close(); } f_file.close();
text=text.tqreplace("<img id='current_box-largecover-image' ", "<img id='current_box-largecover-image' width=70 height=70 "); text=text.replace("<img id='current_box-largecover-image' ", "<img id='current_box-largecover-image' width=70 height=70 ");
browser->begin(); browser->begin();
browser->write(text); browser->write(text);
browser->end(); browser->end();

@ -77,7 +77,7 @@ public:
int startLookup(KTRMLookup *lookup) int startLookup(KTRMLookup *lookup)
{ {
int id; int id;
if(!m_fileMap.tqcontains(lookup->file())) { if(!m_fileMap.contains(lookup->file())) {
#if HAVE_TUNEPIMP >= 4 #if HAVE_TUNEPIMP >= 4
id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0); id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0);
#else #else
@ -106,9 +106,9 @@ public:
bool lookupMapContains(int fileId) const bool lookupMapContains(int fileId) const
{ {
m_lookupMapMutex.lock(); m_lookupMapMutex.lock();
bool tqcontains = m_lookupMap.tqcontains(fileId); bool contains = m_lookupMap.contains(fileId);
m_lookupMapMutex.unlock(); m_lookupMapMutex.unlock();
return tqcontains; return contains;
} }
KTRMLookup *lookup(int fileId) const KTRMLookup *lookup(int fileId) const
@ -696,7 +696,7 @@ void KTRMLookup::collision()
2 * stringSimilarity(strList,result.d->artist) + 2 * stringSimilarity(strList,result.d->artist) +
1 * stringSimilarity(strList,result.d->album); 1 * stringSimilarity(strList,result.d->album);
if(!d->results.tqcontains(result)) d->results.append(result); if(!d->results.contains(result)) d->results.append(result);
} }
break; break;
} }
@ -791,7 +791,7 @@ void KTRMLookup::lookupResult( KIO::Job* job )
4 * stringSimilarity(strList,tmpResult.d->title) + 4 * stringSimilarity(strList,tmpResult.d->title) +
2 * stringSimilarity(strList,tmpResult.d->artist) + 2 * stringSimilarity(strList,tmpResult.d->artist) +
1 * stringSimilarity(strList,tmpResult.d->album); 1 * stringSimilarity(strList,tmpResult.d->album);
if( !d->results.tqcontains( tmpResult ) ) if( !d->results.contains( tmpResult ) )
d->results.append( tmpResult ); d->results.append( tmpResult );
} }
} }
@ -872,8 +872,8 @@ double stringSimilarity(TQString s1, TQString s2)
++p1; ++p2; ++p1; ++p2;
} }
else { else {
x1 = s1.tqfind(c2,p1,false); x1 = s1.find(c2,p1,false);
x2 = s2.tqfind(c1,p2,false); x2 = s2.find(c1,p2,false);
if( (x1 == x2 || -1 == x1) || (-1 != x2 && x1 > x2) ) if( (x1 == x2 || -1 == x1) || (-1 != x2 && x1 > x2) )
++p2; ++p2;

@ -328,12 +328,12 @@ Controller::stationDescription( TQString url )
// turn "genesis,pink floyd,queen" into "Genesis, Pink Floyd, Queen" // turn "genesis,pink floyd,queen" into "Genesis, Pink Floyd, Queen"
TQString artists = elements[2]; TQString artists = elements[2];
artists.tqreplace( ",", ", " ); artists.replace( ",", ", " );
const TQStringList words = TQStringList::split( " ", TQString( artists ).remove( "," ) ); const TQStringList words = TQStringList::split( " ", TQString( artists ).remove( "," ) );
foreach( words ) { foreach( words ) {
TQString capitalized = *it; TQString capitalized = *it;
capitalized.tqreplace( 0, 1, (*it)[0].upper() ); capitalized.replace( 0, 1, (*it)[0].upper() );
artists.tqreplace( *it, capitalized ); artists.replace( *it, capitalized );
} }
return i18n( "Custom Station: %1" ).tqarg( artists ); return i18n( "Custom Station: %1" ).tqarg( artists );

@ -226,9 +226,9 @@ isSplashEnabled()
{ {
TQString line; TQString line;
while( file.readLine( line, 2000 ) != -1 ) while( file.readLine( line, 2000 ) != -1 )
if ( line.tqcontains( "Show Splashscreen" ) ) if ( line.contains( "Show Splashscreen" ) )
{ {
if( line.tqcontains( "false" ) ) if( line.contains( "false" ) )
return false; return false;
else else
return true; return true;

@ -115,21 +115,21 @@ MagnatuneArtistInfoBox::extractArtistInfo( TQString artistPage )
TQString trimmedHtml; TQString trimmedHtml;
int sectionStart = artistPage.tqfind( "<!-- ARTISTBODY -->" ); int sectionStart = artistPage.find( "<!-- ARTISTBODY -->" );
int sectionEnd = artistPage.tqfind( "<!-- /ARTISTBODY -->", sectionStart ); int sectionEnd = artistPage.find( "<!-- /ARTISTBODY -->", sectionStart );
trimmedHtml = artistPage.mid( sectionStart, sectionEnd - sectionStart ); trimmedHtml = artistPage.mid( sectionStart, sectionEnd - sectionStart );
int buyStartIndex = trimmedHtml.tqfind( "<!-- PURCHASE -->" ); int buyStartIndex = trimmedHtml.find( "<!-- PURCHASE -->" );
int buyEndIndex; int buyEndIndex;
//we are going to integrate the buying of music (I hope) so remove these links //we are going to integrate the buying of music (I hope) so remove these links
while ( buyStartIndex != -1 ) while ( buyStartIndex != -1 )
{ {
buyEndIndex = trimmedHtml.tqfind( "<!-- /PURCHASE -->", buyStartIndex ) + 18; buyEndIndex = trimmedHtml.find( "<!-- /PURCHASE -->", buyStartIndex ) + 18;
trimmedHtml.remove( buyStartIndex, buyEndIndex - buyStartIndex ); trimmedHtml.remove( buyStartIndex, buyEndIndex - buyStartIndex );
buyStartIndex = trimmedHtml.tqfind( "<!-- PURCHASE -->", buyStartIndex ); buyStartIndex = trimmedHtml.find( "<!-- PURCHASE -->", buyStartIndex );
} }

@ -65,7 +65,7 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
// lets make sure that this is actually a valid result // lets make sure that this is actually a valid result
int testIndex = downloadInfoString.tqfind( "<RESULT>" ); int testIndex = downloadInfoString.find( "<RESULT>" );
if ( testIndex == -1 ) if ( testIndex == -1 )
{ {
return false; return false;
@ -74,10 +74,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
int startIndex; int startIndex;
int endIndex; int endIndex;
startIndex = downloadInfoString.tqfind( "<DL_USERNAME>", 0, false ); startIndex = downloadInfoString.find( "<DL_USERNAME>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</DL_USERNAME>", 0, false ); endIndex = downloadInfoString.find( "</DL_USERNAME>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 13; startIndex += 13;
@ -96,10 +96,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
startIndex = downloadInfoString.tqfind( "<DL_PASSWORD>", 0, false ); startIndex = downloadInfoString.find( "<DL_PASSWORD>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</DL_PASSWORD>", 0, false ); endIndex = downloadInfoString.find( "</DL_PASSWORD>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 13; startIndex += 13;
@ -117,10 +117,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
startIndex = downloadInfoString.tqfind( "<URL_WAVZIP>", 0, false ); startIndex = downloadInfoString.find( "<URL_WAVZIP>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</URL_WAVZIP>", 0, false ); endIndex = downloadInfoString.find( "</URL_WAVZIP>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 12; startIndex += 12;
@ -130,10 +130,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
} }
startIndex = downloadInfoString.tqfind( "<URL_128KMP3ZIP>", 0, false ); startIndex = downloadInfoString.find( "<URL_128KMP3ZIP>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</URL_128KMP3ZIP>", 0, false ); endIndex = downloadInfoString.find( "</URL_128KMP3ZIP>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 16; startIndex += 16;
@ -143,10 +143,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
} }
startIndex = downloadInfoString.tqfind( "<URL_OGGZIP>", 0, false ); startIndex = downloadInfoString.find( "<URL_OGGZIP>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</URL_OGGZIP>", 0, false ); endIndex = downloadInfoString.find( "</URL_OGGZIP>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 12; startIndex += 12;
@ -156,10 +156,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
} }
startIndex = downloadInfoString.tqfind( "<URL_VBRZIP>", 0, false ); startIndex = downloadInfoString.find( "<URL_VBRZIP>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</URL_VBRZIP>", 0, false ); endIndex = downloadInfoString.find( "</URL_VBRZIP>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 12; startIndex += 12;
@ -169,10 +169,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
} }
startIndex = downloadInfoString.tqfind( "<URL_FLACZIP>", 0, false ); startIndex = downloadInfoString.find( "<URL_FLACZIP>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</URL_FLACZIP>", 0, false ); endIndex = downloadInfoString.find( "</URL_FLACZIP>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 13; startIndex += 13;
@ -182,10 +182,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString )
} }
} }
startIndex = downloadInfoString.tqfind( "<DL_MSG>", 0, false ); startIndex = downloadInfoString.find( "<DL_MSG>", 0, false );
if ( startIndex != -1 ) if ( startIndex != -1 )
{ {
endIndex = downloadInfoString.tqfind( "</DL_MSG>", 0, false ); endIndex = downloadInfoString.find( "</DL_MSG>", 0, false );
if ( endIndex != -1 ) if ( endIndex != -1 )
{ {
startIndex += 9; startIndex += 9;

@ -409,7 +409,7 @@ MediaBrowser::tagsChanged( const MetaBundle &bundle )
{ {
m_itemMapMutex.lock(); m_itemMapMutex.lock();
debug() << "tags changed for " << bundle.url().url() << endl; debug() << "tags changed for " << bundle.url().url() << endl;
ItemMap::iterator it = m_itemMap.tqfind( bundle.url().url() ); ItemMap::iterator it = m_itemMap.find( bundle.url().url() );
if( it != m_itemMap.end() ) if( it != m_itemMap.end() )
{ {
MediaItem *item = *it; MediaItem *item = *it;
@ -443,7 +443,7 @@ bool
MediaBrowser::getBundle( const KURL &url, MetaBundle *bundle ) const MediaBrowser::getBundle( const KURL &url, MetaBundle *bundle ) const
{ {
TQMutexLocker locker( &m_itemMapMutex ); TQMutexLocker locker( &m_itemMapMutex );
ItemMap::const_iterator it = m_itemMap.tqfind( url.url() ); ItemMap::const_iterator it = m_itemMap.find( url.url() );
if( it == m_itemMap.end() ) if( it == m_itemMap.end() )
return false; return false;
@ -839,7 +839,7 @@ MediaItem::setBundle( MetaBundle *bundle )
if( m_bundle ) if( m_bundle )
{ {
TQString itemUrl = url().url(); TQString itemUrl = url().url();
MediaBrowser::ItemMap::iterator it = MediaBrowser::instance()->m_itemMap.tqfind( itemUrl ); MediaBrowser::ItemMap::iterator it = MediaBrowser::instance()->m_itemMap.find( itemUrl );
if( it != MediaBrowser::instance()->m_itemMap.end() && *it == this ) if( it != MediaBrowser::instance()->m_itemMap.end() && *it == this )
MediaBrowser::instance()->m_itemMap.remove( itemUrl ); MediaBrowser::instance()->m_itemMap.remove( itemUrl );
} }
@ -849,7 +849,7 @@ MediaItem::setBundle( MetaBundle *bundle )
if( m_bundle ) if( m_bundle )
{ {
TQString itemUrl = url().url(); TQString itemUrl = url().url();
MediaBrowser::ItemMap::iterator it = MediaBrowser::instance()->m_itemMap.tqfind( itemUrl ); MediaBrowser::ItemMap::iterator it = MediaBrowser::instance()->m_itemMap.find( itemUrl );
if( it == MediaBrowser::instance()->m_itemMap.end() ) if( it == MediaBrowser::instance()->m_itemMap.end() )
MediaBrowser::instance()->m_itemMap[itemUrl] = this; MediaBrowser::instance()->m_itemMap[itemUrl] = this;
} }
@ -1915,7 +1915,7 @@ MediaView::setFilter( const TQString &filter, MediaItem *tqparent )
i != list.end(); i != list.end();
++i ) ++i )
{ {
if( !(*it).text(0).tqcontains( *i ) ) if( !(*it).text(0).contains( *i ) )
{ {
match = false; match = false;
break; break;
@ -2248,7 +2248,7 @@ MediaQueue::addURL( const KURL& url2, MetaBundle *bundle, const TQString &playli
if( PlaylistFile::isPlaylistFile( url ) ) if( PlaylistFile::isPlaylistFile( url ) )
{ {
TQString name = TQString(url.path().section( "/", -1 ).section( ".", 0, -2 )).tqreplace( "_", " " ); TQString name = TQString(url.path().section( "/", -1 ).section( ".", 0, -2 )).replace( "_", " " );
PlaylistFile playlist( url.path() ); PlaylistFile playlist( url.path() );
if( playlist.isError() ) if( playlist.isError() )
@ -2415,8 +2415,8 @@ TQString
MediaDevice::replaceVariables( const TQString &cmd ) MediaDevice::replaceVariables( const TQString &cmd )
{ {
TQString result = cmd; TQString result = cmd;
result.tqreplace( "%d", deviceNode() ); result.replace( "%d", deviceNode() );
result.tqreplace( "%m", mountPoint() ); result.replace( "%m", mountPoint() );
return result; return result;
} }
@ -3585,7 +3585,7 @@ MediaDevice::isPlayable( const MetaBundle &bundle )
return true; return true;
TQString type = TQString(bundle.url().path().section( ".", -1 )).lower(); TQString type = TQString(bundle.url().path().section( ".", -1 )).lower();
return supportedFiletypes().tqcontains( type ); return supportedFiletypes().contains( type );
} }
bool bool

@ -532,7 +532,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
int sysCall(const TQString & command); int sysCall(const TQString & command);
int runPreConnectCommand(); int runPreConnectCommand();
int runPostDisconnectCommand(); int runPostDisconnectCommand();
TQString replaceVariables( const TQString &cmd ); // tqreplace %m with mount point and %d with device node TQString replaceVariables( const TQString &cmd ); // replace %m with mount point and %d with device node
/** /**
* Find a particular track * Find a particular track

@ -241,7 +241,7 @@ DaapClient::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
{ {
case MediaItem::DIRECTORY: case MediaItem::DIRECTORY:
menu.insertItem( SmallIconSet( "connect_creating" ), i18n( "&Connect" ), CONNECT ); menu.insertItem( SmallIconSet( "connect_creating" ), i18n( "&Connect" ), CONNECT );
if( sitem && !m_serverItemMap.tqcontains( sitem->key() ) ) if( sitem && !m_serverItemMap.contains( sitem->key() ) )
{ {
menu.insertItem( SmallIconSet( "remove" ), i18n("&Remove Computer"), REMOVE ); menu.insertItem( SmallIconSet( "remove" ), i18n("&Remove Computer"), REMOVE );
} }
@ -328,7 +328,7 @@ DaapClient::serverOffline( DNSSD::RemoteService::Ptr service )
#if DNSSD_SUPPORT #if DNSSD_SUPPORT
DEBUG_BLOCK DEBUG_BLOCK
TQString key = serverKey( service.data() ); TQString key = serverKey( service.data() );
if( m_serverItemMap.tqcontains( key ) ) if( m_serverItemMap.contains( key ) )
{ {
ServerItem* removeMe = m_serverItemMap[ key ]; ServerItem* removeMe = m_serverItemMap[ key ];
if( removeMe ) if( removeMe )
@ -374,7 +374,7 @@ DaapClient::resolvedDaap( bool success )
debug() << service->serviceName() << ' ' << service->hostName() << ' ' << service->domain() << ' ' << service->type() << endl; debug() << service->serviceName() << ' ' << service->hostName() << ' ' << service->domain() << ' ' << service->type() << endl;
TQString ip = resolve( service->hostName() ); TQString ip = resolve( service->hostName() );
if( ip == "0" || m_serverItemMap.tqcontains(serverKey( service )) ) //same server from multiple interfaces if( ip == "0" || m_serverItemMap.contains(serverKey( service )) ) //same server from multiple interfaces
return; return;
m_serverItemMap[ serverKey( service ) ] = newHost( service->serviceName(), service->hostName(), ip, service->port() ); m_serverItemMap[ serverKey( service ) ] = newHost( service->serviceName(), service->hostName(), ip, service->port() );
@ -405,7 +405,7 @@ DaapClient::createTree( const TQString& /*host*/, Daap::SongList bundles )
{ {
MediaItem* parentArtist = new MediaItem( root ); MediaItem* parentArtist = new MediaItem( root );
parentArtist->setType( MediaItem::ARTIST ); parentArtist->setType( MediaItem::ARTIST );
Daap::AlbumList albumMap = *( bundles.tqfind(*it) ); Daap::AlbumList albumMap = *( bundles.find(*it) );
parentArtist->setText( 0, (*albumMap.begin()).getFirst()->artist() ); //map was made case insensitively parentArtist->setText( 0, (*albumMap.begin()).getFirst()->artist() ); //map was made case insensitively
//just get the displayed-case from //just get the displayed-case from
//the first track //the first track
@ -416,7 +416,7 @@ DaapClient::createTree( const TQString& /*host*/, Daap::SongList bundles )
parentAlbum->setType( MediaItem::ALBUM ); parentAlbum->setType( MediaItem::ALBUM );
MetaBundle* track; MetaBundle* track;
Daap::TrackList trackList = *albumMap.tqfind(*itAlbum); Daap::TrackList trackList = *albumMap.find(*itAlbum);
parentAlbum->setText( 0, trackList.getFirst()->album() ); parentAlbum->setText( 0, trackList.getFirst()->album() );
for( track = trackList.first(); track; track = trackList.next() ) for( track = trackList.first(); track; track = trackList.next() )
@ -443,7 +443,7 @@ DaapClient::createTree( const TQString& /*host*/, Daap::SongList bundles )
int int
DaapClient::incRevision( const TQString& host ) DaapClient::incRevision( const TQString& host )
{ {
if( m_servers.tqcontains(host) ) if( m_servers.contains(host) )
{ {
m_servers[host]->revisionID++; m_servers[host]->revisionID++;
return m_servers[host]->revisionID; return m_servers[host]->revisionID;
@ -455,7 +455,7 @@ DaapClient::incRevision( const TQString& host )
int int
DaapClient::getSession( const TQString& host ) DaapClient::getSession( const TQString& host )
{ {
if( m_servers.tqcontains(host) ) if( m_servers.contains(host) )
return m_servers[host]->sessionId; return m_servers[host]->sessionId;
else else
return -1; return -1;
@ -487,7 +487,7 @@ DaapClient::customClicked()
else else
{ {
TQString key = ServerItem::key( dialog.m_base->m_hostName->text(), dialog.m_base->m_portInput->value() ); TQString key = ServerItem::key( dialog.m_base->m_hostName->text(), dialog.m_base->m_portInput->value() );
if( !AmarokConfig::manuallyAddedServers().tqcontains( key ) ) if( !AmarokConfig::manuallyAddedServers().contains( key ) )
{ {
TQStringList mas = AmarokConfig::manuallyAddedServers(); TQStringList mas = AmarokConfig::manuallyAddedServers();
mas.append( key ); mas.append( key );

@ -409,7 +409,7 @@ Reader::parse( TQDataStream &raw, uint containerLength, bool first )
void void
Reader::addElement( Map &parentMap, char* tag, TQVariant element ) Reader::addElement( Map &parentMap, char* tag, TQVariant element )
{ {
if( !parentMap.tqcontains( tag ) ) if( !parentMap.contains( tag ) )
parentMap[tag] = TQVariant( TQValueList<TQVariant>() ); parentMap[tag] = TQVariant( TQValueList<TQVariant>() );
parentMap[tag].asList().append(element); parentMap[tag].asList().append(element);

@ -28,7 +28,7 @@ module Kernel
rescue LoadError => load_error rescue LoadError => load_error
begin begin
@gempath_searcher ||= Gem::GemPathSearcher.new @gempath_searcher ||= Gem::GemPathSearcher.new
if spec = @gempath_searcher.tqfind(path) if spec = @gempath_searcher.find(path)
Gem.activate(spec.name, false, "= #{spec.version}") Gem.activate(spec.name, false, "= #{spec.version}")
gem_original_require path gem_original_require path
else else
@ -72,17 +72,17 @@ module Gem
# #
# For example: # For example:
# #
# tqfind('log4r') # -> (log4r-1.1 spec) # find('log4r') # -> (log4r-1.1 spec)
# tqfind('log4r.rb') # -> (log4r-1.1 spec) # find('log4r.rb') # -> (log4r-1.1 spec)
# tqfind('rake/rdoctask') # -> (rake-0.4.12 spec) # find('rake/rdoctask') # -> (rake-0.4.12 spec)
# tqfind('foobarbaz') # -> nil # find('foobarbaz') # -> nil
# #
# Matching paths can have various suffixes ('.rb', '.so', and # Matching paths can have various suffixes ('.rb', '.so', and
# others), which may or may not already be attached to _file_. # others), which may or may not already be attached to _file_.
# This method doesn't care about the full filename that matches; # This method doesn't care about the full filename that matches;
# only that there is a match. # only that there is a match.
# #
def tqfind(path) def find(path)
@gemspecs.each do |spec| @gemspecs.each do |spec|
return spec if matching_file(spec, path) return spec if matching_file(spec, path)
end end

@ -23,7 +23,7 @@ module Gem
def ok? def ok?
@specs.all? { |spec| @specs.all? { |spec|
spec.dependencies.all? { |dep| spec.dependencies.all? { |dep|
@specs.tqfind { |s| s.satisfies_requirement?(dep) } @specs.find { |s| s.satisfies_requirement?(dep) }
} }
} }
end end
@ -34,7 +34,7 @@ module Gem
end end
def find_name(full_name) def find_name(full_name)
@specs.tqfind { |spec| spec.full_name == full_name } @specs.find { |spec| spec.full_name == full_name }
end end
def remove_by_name(full_name) def remove_by_name(full_name)
@ -82,14 +82,14 @@ module Gem
disabled = {} disabled = {}
predecessors = build_predecessors predecessors = build_predecessors
while disabled.size < @specs.size while disabled.size < @specs.size
candidate = @specs.tqfind { |spec| candidate = @specs.find { |spec|
! disabled[spec.full_name] && ! disabled[spec.full_name] &&
active_count(predecessors[spec.full_name], disabled) == 0 active_count(predecessors[spec.full_name], disabled) == 0
} }
if candidate if candidate
disabled[candidate.full_name] = true disabled[candidate.full_name] = true
result << candidate result << candidate
elsif candidate = @specs.tqfind { |spec| ! disabled[spec.full_name] } elsif candidate = @specs.find { |spec| ! disabled[spec.full_name] }
# This case handles circular dependencies. Just choose a # This case handles circular dependencies. Just choose a
# candidate and move on. # candidate and move on.
disabled[candidate.full_name] = true disabled[candidate.full_name] = true

@ -1219,7 +1219,7 @@ module Gem
specs = SourceIndex.from_installed_gems.search(gemname, version_req) specs = SourceIndex.from_installed_gems.search(gemname, version_req)
selected = specs.sort_by { |s| s.version }.last selected = specs.sort_by { |s| s.version }.last
return nil if selected.nil? return nil if selected.nil?
# We expect to tqfind (basename).gem in the 'cache' directory. # We expect to find (basename).gem in the 'cache' directory.
# Furthermore, the name match must be exact (ignoring case). # Furthermore, the name match must be exact (ignoring case).
if gemname =~ /^#{selected.name}$/i if gemname =~ /^#{selected.name}$/i
filename = selected.full_name + '.gem' filename = selected.full_name + '.gem'
@ -1416,11 +1416,11 @@ module Gem
gem list D gem list D
* List local and remote gems whose name tqcontains 'log': * List local and remote gems whose name contains 'log':
gem search log --both gem search log --both
* List only remote gems whose name tqcontains 'log': * List only remote gems whose name contains 'log':
gem search log --remote gem search log --remote

@ -536,7 +536,7 @@ module OpenURI
# :http_basic_authentication=>[user, password] # :http_basic_authentication=>[user, password]
# #
# If :http_basic_authentication is specified, # If :http_basic_authentication is specified,
# the value should be an array which tqcontains 2 strings: # the value should be an array which contains 2 strings:
# username and password. # username and password.
# It is used for HTTP Basic authentication defined by RFC 2617. # It is used for HTTP Basic authentication defined by RFC 2617.
# #

@ -9,7 +9,7 @@ require 'fileutils'
require 'zlib' require 'zlib'
require 'digest/md5' require 'digest/md5'
require 'fileutils' require 'fileutils'
require 'tqfind' require 'find'
require 'stringio' require 'stringio'
require 'rubygems/specification' require 'rubygems/specification'
@ -810,7 +810,7 @@ module Package
TarOutput.open(destname, signer) do |outp| TarOutput.open(destname, signer) do |outp|
dir_class.chdir(src) do dir_class.chdir(src) do
outp.metadata = (file_class.read("RPA/metadata") rescue nil) outp.metadata = (file_class.read("RPA/metadata") rescue nil)
find_class.tqfind('.') do |entry| find_class.find('.') do |entry|
case case
when file_class.file?(entry) when file_class.file?(entry)
entry.sub!(%r{\./}, "") entry.sub!(%r{\./}, "")

@ -496,7 +496,7 @@ module Gem
end end
if specs_n_sources.empty? then if specs_n_sources.empty? then
raise GemNotFoundException.new("Could not tqfind #{gem_name} (#{version_requirement}) in the repository") raise GemNotFoundException.new("Could not find #{gem_name} (#{version_requirement}) in the repository")
end end
specs_n_sources = specs_n_sources.sort_by { |gs,| gs.version }.reverse specs_n_sources = specs_n_sources.sort_by { |gs,| gs.version }.reverse

@ -172,7 +172,7 @@ module Gem
# [Regex] a pattern to match against the short name # [Regex] a pattern to match against the short name
# version_requirement:: # version_requirement::
# [String | default=Version::Requirement.new(">= 0")] version to # [String | default=Version::Requirement.new(">= 0")] version to
# tqfind # find
# return:: # return::
# [Array] list of Gem::Specification objects in sorted (version) # [Array] list of Gem::Specification objects in sorted (version)
# order. Empty if not found. # order. Empty if not found.

@ -49,7 +49,7 @@ module Gem
private private
def find_files_for_gem(gem_directory) def find_files_for_gem(gem_directory)
installed_files = [] installed_files = []
Find.tqfind(gem_directory) {|file_name| Find.find(gem_directory) {|file_name|
fn = file_name.slice((gem_directory.size)..(file_name.size-1)).sub(/^\//, "") fn = file_name.slice((gem_directory.size)..(file_name.size-1)).sub(/^\//, "")
if(!(fn =~ /CVS/ || File.directory?(fn) || fn == "")) then if(!(fn =~ /CVS/ || File.directory?(fn) || fn == "")) then
installed_files << fn installed_files << fn
@ -74,7 +74,7 @@ module Gem
# returns a hash of ErrorData objects, keyed on the problem gem's name. # returns a hash of ErrorData objects, keyed on the problem gem's name.
def alien def alien
require 'rubygems/installer' require 'rubygems/installer'
require 'tqfind' require 'find'
require 'md5' require 'md5'
errors = {} errors = {}
Gem::SourceIndex.from_installed_gems.each do |gem_name, gem_spec| Gem::SourceIndex.from_installed_gems.each do |gem_name, gem_spec|

@ -568,7 +568,7 @@ GenericMediaDevice::buildDestination( const TQString &format, const MetaBundle &
if( !result.startsWith( "/" ) ) if( !result.startsWith( "/" ) )
result.prepend( "/" ); result.prepend( "/" );
return result.tqreplace( TQRegExp( "/\\.*" ), "/" ); return result.replace( TQRegExp( "/\\.*" ), "/" );
} }
void void
@ -576,8 +576,8 @@ GenericMediaDevice::checkAndBuildLocation( const TQString& location )
{ {
// check for every directory from the mount point to the location // check for every directory from the mount point to the location
// whether they exist or not. // whether they exist or not.
int mountPointDepth = m_medium.mountPoint().tqcontains( '/', false ); int mountPointDepth = m_medium.mountPoint().contains( '/', false );
int locationDepth = location.tqcontains( '/', false ); int locationDepth = location.contains( '/', false );
if( m_medium.mountPoint().endsWith( "/" ) ) if( m_medium.mountPoint().endsWith( "/" ) )
mountPointDepth--; mountPointDepth--;
@ -852,7 +852,7 @@ int
GenericMediaDevice::addTrackToList( int type, KURL url, int /*size*/ ) GenericMediaDevice::addTrackToList( int type, KURL url, int /*size*/ )
{ {
TQString path = url.isLocalFile() ? url.path( -1 ) : url.prettyURL( -1 ); //no trailing slash TQString path = url.isLocalFile() ? url.path( -1 ) : url.prettyURL( -1 ); //no trailing slash
int index = path.tqfindRev( '/', -1 ); int index = path.findRev( '/', -1 );
TQString baseName = path.right( path.length() - index - 1 ); TQString baseName = path.right( path.length() - index - 1 );
TQString parentName = path.left( index ); TQString parentName = path.left( index );
@ -1042,11 +1042,11 @@ TQString GenericMediaDevice::cleanPath( const TQString &component )
result.simplifyWhiteSpace(); result.simplifyWhiteSpace();
if( m_spacesToUnderscores ) if( m_spacesToUnderscores )
result.tqreplace( TQRegExp( "\\s" ), "_" ); result.replace( TQRegExp( "\\s" ), "_" );
if( m_actuallyVfat || m_vfatTextOnly ) if( m_actuallyVfat || m_vfatTextOnly )
result = Amarok::vfatPath( result ); result = Amarok::vfatPath( result );
result.tqreplace( "/", "-" ); result.replace( "/", "-" );
return result; return result;
} }

@ -132,7 +132,7 @@ GenericMediaDeviceConfigDialog::updateConfigDialogLists( const TQStringList & su
for( TQStringList::Iterator it = allTypes.begin(); it != allTypes.end(); it++ ) for( TQStringList::Iterator it = allTypes.begin(); it != allTypes.end(); it++ )
{ {
if( supportedFileTypes.tqcontains( *it ) ) if( supportedFileTypes.contains( *it ) )
{ {
supported->insertItem( *it ); supported->insertItem( *it );
convert->insertItem( *it ); convert->insertItem( *it );
@ -195,7 +195,7 @@ GenericMediaDeviceConfigDialog::buildDestination( const TQString &format, const
if( !tail.startsWith( "/" ) ) if( !tail.startsWith( "/" ) )
tail.prepend( "/" ); tail.prepend( "/" );
return m_device->mountPoint() + tail.tqreplace( TQRegExp( "/\\.*" ), "/" ); return m_device->mountPoint() + tail.replace( TQRegExp( "/\\.*" ), "/" );
} }
TQString GenericMediaDeviceConfigDialog::cleanPath( const TQString &component ) TQString GenericMediaDeviceConfigDialog::cleanPath( const TQString &component )
@ -207,11 +207,11 @@ TQString GenericMediaDeviceConfigDialog::cleanPath( const TQString &component )
result.simplifyWhiteSpace(); result.simplifyWhiteSpace();
if( m_spaceCheck->isChecked() ) if( m_spaceCheck->isChecked() )
result.tqreplace( TQRegExp( "\\s" ), "_" ); result.replace( TQRegExp( "\\s" ), "_" );
if( m_device->m_actuallyVfat || m_vfatCheck->isChecked() ) if( m_device->m_actuallyVfat || m_vfatCheck->isChecked() )
result = Amarok::vfatPath( result ); result = Amarok::vfatPath( result );
result.tqreplace( "/", "-" ); result.replace( "/", "-" );
return result; return result;
} }

@ -406,7 +406,7 @@ IfpMediaDevice::copyTrackToDevice( const MetaBundle& bundle )
TQString newFilename; TQString newFilename;
// we don't put this in cleanPath because of remote directory delimiters // we don't put this in cleanPath because of remote directory delimiters
const TQString title = bundle.title().tqreplace( '\\', '-' ); const TQString title = bundle.title().replace( '\\', '-' );
if( cleverFilename && !title.isEmpty() ) if( cleverFilename && !title.isEmpty() )
{ {
if( bundle.track() > 0 ) if( bundle.track() > 0 )
@ -701,12 +701,12 @@ TQString IfpMediaDevice::cleanPath( const TQString &component )
result.simplifyWhiteSpace(); result.simplifyWhiteSpace();
result.remove( "?" ).tqreplace( "*", " " ).tqreplace( ":", " " ); result.remove( "?" ).replace( "*", " " ).replace( ":", " " );
// if( m_spacesToUnderscores ) // if( m_spacesToUnderscores )
// result.tqreplace( TQRegExp( "\\s" ), "_" ); // result.replace( TQRegExp( "\\s" ), "_" );
result.tqreplace( "/", "-" ); result.replace( "/", "-" );
return result; return result;
} }

@ -565,7 +565,7 @@ IpodMediaDevice::updateTrackInDB( IpodMediaItem *item, const TQString &pathname,
track->flag4 = 0x01; // also show description on iPod track->flag4 = 0x01; // also show description on iPod
TQString plaindesc = podcastInfo->description; TQString plaindesc = podcastInfo->description;
plaindesc.tqreplace( TQRegExp("<[^>]*>"), "" ); plaindesc.replace( TQRegExp("<[^>]*>"), "" );
track->description = g_strdup( plaindesc.utf8() ); track->description = g_strdup( plaindesc.utf8() );
track->subtitle = g_strdup( plaindesc.utf8() ); track->subtitle = g_strdup( plaindesc.utf8() );
track->podcasturl = g_strdup( podcastInfo->url.utf8() ); track->podcasturl = g_strdup( podcastInfo->url.utf8() );
@ -671,7 +671,7 @@ IpodMediaDevice::copyTrackToDevice(const MetaBundle &bundle)
do do
{ {
create.setPath(path); create.setPath(path);
path = path.section("/", 0, path.tqcontains('/')-1); path = path.section("/", 0, path.contains('/')-1);
parentdir.setPath(path); parentdir.setPath(path);
} }
while( !path.isEmpty() && !(path==mountPoint()) && !parentdir.exists() ); while( !path.isEmpty() && !(path==mountPoint()) && !parentdir.exists() );
@ -1827,7 +1827,7 @@ IpodMediaDevice::realPath(const char *ipodPath)
if(m_itdb) if(m_itdb)
{ {
path = TQFile::decodeName(itdb_get_mountpoint(m_itdb)); path = TQFile::decodeName(itdb_get_mountpoint(m_itdb));
path.append(TQString(ipodPath).tqreplace(':', "/")); path.append(TQString(ipodPath).replace(':', "/"));
} }
return path; return path;
@ -1843,7 +1843,7 @@ IpodMediaDevice::ipodPath(const TQString &realPath)
{ {
TQString path = realPath; TQString path = realPath;
path = path.mid(mp.length()); path = path.mid(mp.length());
path = path.tqreplace('/', ":"); path = path.replace('/', ":");
return path; return path;
} }
} }

@ -190,10 +190,10 @@ MediaItem
const TQString extension = TQString(bundle.url().path().section( ".", -1 )).lower(); const TQString extension = TQString(bundle.url().path().section( ".", -1 )).lower();
int libmtp_type = m_supportedFiles.tqfindIndex( extension ); int libmtp_type = m_supportedFiles.findIndex( extension );
if( libmtp_type >= 0 ) if( libmtp_type >= 0 )
{ {
int keyIndex = mtpFileTypes.values().tqfindIndex( extension ); int keyIndex = mtpFileTypes.values().findIndex( extension );
libmtp_type = mtpFileTypes.keys()[keyIndex]; libmtp_type = mtpFileTypes.keys()[keyIndex];
trackmeta->filetype = (LIBMTP_filetype_t) libmtp_type; trackmeta->filetype = (LIBMTP_filetype_t) libmtp_type;
debug() << "set filetype to " << libmtp_type << " based on extension of ." << extension << endl; debug() << "set filetype to " << libmtp_type << " based on extension of ." << extension << endl;
@ -568,9 +568,9 @@ MtpMediaDevice::checkFolderStructure( const MetaBundle &bundle, bool create )
if( (*it).isEmpty() ) if( (*it).isEmpty() )
continue; continue;
// substitute %a , %b , %g // substitute %a , %b , %g
(*it).tqreplace( TQRegExp( "%a" ), artist ) (*it).replace( TQRegExp( "%a" ), artist )
.tqreplace( TQRegExp( "%b" ), album ) .replace( TQRegExp( "%b" ), album )
.tqreplace( TQRegExp( "%g" ), genre ); .replace( TQRegExp( "%g" ), genre );
// check if it exists // check if it exists
uint32_t check_folder = subfolderNameToID( (*it).utf8(), m_folders, parent_id ); uint32_t check_folder = subfolderNameToID( (*it).utf8(), m_folders, parent_id );
// create if not exists (if requested) // create if not exists (if requested)
@ -744,7 +744,7 @@ MtpMediaDevice::synchronizeDevice()
MediaItem MediaItem
*MtpMediaDevice::trackExists( const MetaBundle &bundle ) *MtpMediaDevice::trackExists( const MetaBundle &bundle )
{ {
MediaItem *artist = dynamic_cast<MediaItem *>( m_view->tqfindItem( bundle.artist(), 0 ) ); MediaItem *artist = dynamic_cast<MediaItem *>( m_view->findItem( bundle.artist(), 0 ) );
if( artist ) if( artist )
{ {
MediaItem *album = dynamic_cast<MediaItem *>( artist->findItem( bundle.album() ) ); MediaItem *album = dynamic_cast<MediaItem *>( artist->findItem( bundle.album() ) );
@ -1137,11 +1137,11 @@ MtpMediaDevice::openDevice( bool silent )
m_supportedFiles << mtpFileTypes[ filetypes[ i ] ]; m_supportedFiles << mtpFileTypes[ filetypes[ i ] ];
} }
// find supported image types (for album art). // find supported image types (for album art).
if( m_supportedFiles.tqfindIndex( "jpg" ) ) if( m_supportedFiles.findIndex( "jpg" ) )
m_format = "JPEG"; m_format = "JPEG";
else if( m_supportedFiles.tqfindIndex( "png" ) ) else if( m_supportedFiles.findIndex( "png" ) )
m_format = "PNG"; m_format = "PNG";
else if( m_supportedFiles.tqfindIndex( "gif" ) ) else if( m_supportedFiles.findIndex( "gif" ) )
m_format = "GIF"; m_format = "GIF";
free( filetypes ); free( filetypes );
m_critical_mutex.unlock(); m_critical_mutex.unlock();
@ -1422,7 +1422,7 @@ MtpMediaItem
{ {
TQString artistName = track->bundle()->artist(); TQString artistName = track->bundle()->artist();
MtpMediaItem *artist = dynamic_cast<MtpMediaItem *>( m_view->tqfindItem( artistName, 0 ) ); MtpMediaItem *artist = dynamic_cast<MtpMediaItem *>( m_view->findItem( artistName, 0 ) );
if( !artist ) if( !artist )
{ {
artist = new MtpMediaItem(m_view); artist = new MtpMediaItem(m_view);

@ -614,7 +614,7 @@ NjbMediaDevice::removeConfigElements(TQWidget* arg1)
MediaItem * MediaItem *
NjbMediaDevice::trackExists( const MetaBundle & bundle ) NjbMediaDevice::trackExists( const MetaBundle & bundle )
{ {
MediaItem *artist = dynamic_cast<MediaItem *>( m_view->tqfindItem( bundle.artist(), 0 ) ); MediaItem *artist = dynamic_cast<MediaItem *>( m_view->findItem( bundle.artist(), 0 ) );
if ( artist ) if ( artist )
{ {
MediaItem *album = dynamic_cast<MediaItem *>( artist->findItem( bundle.album() ) ); MediaItem *album = dynamic_cast<MediaItem *>( artist->findItem( bundle.album() ) );
@ -737,7 +737,7 @@ NjbMediaDevice::readJukeboxMusic( void )
for( trackValueList::iterator it = trackList.begin(); it != trackList.end(); it++ ) for( trackValueList::iterator it = trackList.begin(); it != trackList.end(); it++ )
{ {
if( m_view->tqfindItem( ((*it)->bundle()->artist().string()), 0 ) == 0 ) if( m_view->findItem( ((*it)->bundle()->artist().string()), 0 ) == 0 )
{ {
NjbMediaItem *artist = new NjbMediaItem( m_view ); NjbMediaItem *artist = new NjbMediaItem( m_view );
artist->setText( 0, (*it)->bundle()->artist() ); artist->setText( 0, (*it)->bundle()->artist() );
@ -757,7 +757,7 @@ NjbMediaDevice::addTrackToView( NjbTrack *track, NjbMediaItem *item )
{ {
TQString artistName = track->bundle()->artist(); TQString artistName = track->bundle()->artist();
NjbMediaItem *artist = dynamic_cast<NjbMediaItem *>( m_view->tqfindItem( artistName, 0 ) ); NjbMediaItem *artist = dynamic_cast<NjbMediaItem *>( m_view->findItem( artistName, 0 ) );
if(!artist) if(!artist)
{ {
artist = new NjbMediaItem(m_view); artist = new NjbMediaItem(m_view);
@ -869,7 +869,7 @@ NjbMediaDevice::addTracks(const TQString &artist, const TQString &album, NjbMedi
NjbMediaItem* NjbMediaItem*
NjbMediaDevice::addArtist( NjbTrack *track ) NjbMediaDevice::addArtist( NjbTrack *track )
{ {
if( m_view->tqfindItem( track->bundle()->artist().string(), 0 ) == 0 ) if( m_view->findItem( track->bundle()->artist().string(), 0 ) == 0 )
{ {
NjbMediaItem *artist = new NjbMediaItem( m_view ); NjbMediaItem *artist = new NjbMediaItem( m_view );
artist->setText( 0, track->bundle()->artist() ); artist->setText( 0, track->bundle()->artist() );
@ -878,7 +878,7 @@ NjbMediaDevice::addArtist( NjbTrack *track )
artist->setBundle( track->bundle() ); artist->setBundle( track->bundle() );
artist->m_device = this; artist->m_device = this;
} }
return dynamic_cast<NjbMediaItem *>( m_view->tqfindItem( track->bundle()->artist().string(), 0 ) ); return dynamic_cast<NjbMediaItem *>( m_view->findItem( track->bundle()->artist().string(), 0 ) );
} }
void void

@ -117,7 +117,7 @@ NjbPlaylist::unescapefilename( const TQString& _in )
{ {
TQString result = _in; TQString result = _in;
result.tqreplace("%2f","/"); result.replace("%2f","/");
return result; return result;
} }
@ -127,7 +127,7 @@ NjbPlaylist::escapefilename( const TQString& _in )
{ {
TQString result = _in; TQString result = _in;
result.tqreplace("/","%2f"); result.replace("/","%2f");
return result; return result;
} }
@ -183,7 +183,7 @@ NjbPlaylist::addTrack( const TQString& fileName)
trackValueList::const_iterator it_track = theTracks->findTrackByName( fileName ); trackValueList::const_iterator it_track = theTracks->findTrackByName( fileName );
if( it_track == theTracks->end() ) { if( it_track == theTracks->end() ) {
// couldn't find this track, skip it // couldn't find this track, skip it
debug() << "putPlaylist: couldn't tqfind " << fileName << endl; debug() << "putPlaylist: couldn't find " << fileName << endl;
return NJB_FAILURE; return NJB_FAILURE;
} }
njb_playlist_track_t* pl_track = NJB_Playlist_Track_New( (*it_track)->id()); njb_playlist_track_t* pl_track = NJB_Playlist_Track_New( (*it_track)->id());

@ -65,7 +65,7 @@ NjbTrack::NjbTrack( njb_songid_t* song)
if( frame ) if( frame )
{ {
TQString artist = TQString::fromUtf8( frame->data.strval ); TQString artist = TQString::fromUtf8( frame->data.strval );
artist.tqreplace( TQRegExp( "/" ), "-" ); artist.replace( TQRegExp( "/" ), "-" );
bundle->setArtist( artist ); bundle->setArtist( artist );
} }
else else
@ -75,7 +75,7 @@ NjbTrack::NjbTrack( njb_songid_t* song)
if( frame) if( frame)
{ {
TQString album = TQString::fromUtf8( frame->data.strval ); TQString album = TQString::fromUtf8( frame->data.strval );
album.tqreplace( TQRegExp( "/" ), "-" ); album.replace( TQRegExp( "/" ), "-" );
bundle->setAlbum( album ); bundle->setAlbum( album );
} }
else else
@ -85,7 +85,7 @@ NjbTrack::NjbTrack( njb_songid_t* song)
if( frame ) if( frame )
{ {
TQString title = TQString::fromUtf8( frame->data.strval ); TQString title = TQString::fromUtf8( frame->data.strval );
title.tqreplace( TQRegExp( "/"), "-"); title.replace( TQRegExp( "/"), "-");
bundle->setTitle( title ); bundle->setTitle( title );
} }
else else

@ -62,7 +62,7 @@ MediaDeviceManager::MediaDeviceManager()
{ {
curr = qit.key(); curr = qit.key();
curr = curr.remove( "manual|" ); curr = curr.remove( "manual|" );
currName = curr.left( curr.tqfind( '|' ) ); currName = curr.left( curr.find( '|' ) );
currMountPoint = curr.remove( currName + '|' ); currMountPoint = curr.remove( currName + '|' );
manualDevices.append( "false" ); //autodetected manualDevices.append( "false" ); //autodetected
manualDevices.append( qit.key() ); //id manualDevices.append( qit.key() ); //id
@ -105,7 +105,7 @@ void
MediaDeviceManager::removeManualDevice( Medium* removed ) MediaDeviceManager::removeManualDevice( Medium* removed )
{ {
emit mediumRemoved( removed, removed->name() ); emit mediumRemoved( removed, removed->name() );
if( m_mediumMap.tqcontains( removed->name() ) ) if( m_mediumMap.contains( removed->name() ) )
m_mediumMap.remove( removed->name() ); m_mediumMap.remove( removed->name() );
} }
@ -119,7 +119,7 @@ void MediaDeviceManager::slotMediumAdded( const Medium *m, TQString id)
(m->fsType() == "vfat" || m->fsType() == "hfsplus" || m->fsType() == "msdosfs" ) ) ) (m->fsType() == "vfat" || m->fsType() == "hfsplus" || m->fsType() == "msdosfs" ) ) )
// add other fsTypes that should be auto-detected here later // add other fsTypes that should be auto-detected here later
{ {
if ( m_mediumMap.tqcontains( m->name() ) ) if ( m_mediumMap.contains( m->name() ) )
{ {
Medium *tempMedium = m_mediumMap[m->name()]; Medium *tempMedium = m_mediumMap[m->name()];
m_mediumMap.remove( m->name() ); m_mediumMap.remove( m->name() );
@ -141,7 +141,7 @@ void MediaDeviceManager::slotMediumRemoved( const Medium* , TQString id )
{ {
DEBUG_BLOCK DEBUG_BLOCK
Medium* removedMedium = 0; Medium* removedMedium = 0;
if ( m_mediumMap.tqcontains(id) ) if ( m_mediumMap.contains(id) )
removedMedium = m_mediumMap[id]; removedMedium = m_mediumMap[id];
if ( removedMedium ) if ( removedMedium )
debug() << "[MediaDeviceManager::slotMediumRemoved] Obtained medium name is " << id << ", id is: " << removedMedium->id() << endl; debug() << "[MediaDeviceManager::slotMediumRemoved] Obtained medium name is " << id << ", id is: " << removedMedium->id() << endl;
@ -152,7 +152,7 @@ void MediaDeviceManager::slotMediumRemoved( const Medium* , TQString id )
//has been running //has been running
//There is no point in calling getDevice, since it will not be in the list anyways //There is no point in calling getDevice, since it will not be in the list anyways
emit mediumRemoved( removedMedium, id ); emit mediumRemoved( removedMedium, id );
if ( m_mediumMap.tqcontains(id) ) if ( m_mediumMap.contains(id) )
m_mediumMap.remove(id); m_mediumMap.remove(id);
delete removedMedium; delete removedMedium;
} }

@ -126,7 +126,7 @@ Medium::List Medium::createList(const TQStringList &properties)
l.append(m); l.append(m);
TQStringList::iterator first = props.begin(); TQStringList::iterator first = props.begin();
TQStringList::iterator last = props.tqfind(SEPARATOR); TQStringList::iterator last = props.find(SEPARATOR);
++last; ++last;
props.erase(first, last); props.erase(first, last);
} }

@ -140,7 +140,7 @@ MediumPluginManager::detectDevices( const bool redetect, const bool nographics )
} }
} }
if( m_deletedMap.tqcontains( (*it)->id() ) && !(*it)->isAutodetected() ) if( m_deletedMap.contains( (*it)->id() ) && !(*it)->isAutodetected() )
{ {
skipflag = true; skipflag = true;
debug() << "skipping: deleted & not autodetect" << endl; debug() << "skipping: deleted & not autodetect" << endl;
@ -149,7 +149,7 @@ MediumPluginManager::detectDevices( const bool redetect, const bool nographics )
if( skipflag ) if( skipflag )
continue; continue;
if( m_deletedMap.tqcontains( (*it)->id() ) ) if( m_deletedMap.contains( (*it)->id() ) )
m_deletedMap.remove( (*it)->id() ); m_deletedMap.remove( (*it)->id() );
MediaDeviceConfig *dev = new MediaDeviceConfig( *it, this, nographics, m_widget ); MediaDeviceConfig *dev = new MediaDeviceConfig( *it, this, nographics, m_widget );

@ -282,7 +282,7 @@ MetaBundle::MetaBundle( const TQString& title,
, m_isSearchDirty( true ) , m_isSearchDirty( true )
, m_searchColumns( Undetermined ) , m_searchColumns( Undetermined )
{ {
if( title.tqcontains( '-' ) ) if( title.contains( '-' ) )
{ {
m_title = TQString(title.section( '-', 1, 1 )).stripWhiteSpace(); m_title = TQString(title.section( '-', 1, 1 )).stripWhiteSpace();
m_artist = TQString(title.section( '-', 0, 0 )).stripWhiteSpace(); m_artist = TQString(title.section( '-', 0, 0 )).stripWhiteSpace();
@ -613,7 +613,7 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag
if ( !disc.isEmpty() ) if ( !disc.isEmpty() )
{ {
int i = disc.tqfind ('/'); int i = disc.find ('/');
if ( i != -1 ) if ( i != -1 )
// disc.right( i ).toInt() is total number of discs, we don't use this at the moment // disc.right( i ).toInt() is total number of discs, we don't use this at the moment
setDiscNumber( disc.left( i ).toInt() ); setDiscNumber( disc.left( i ).toInt() );
@ -843,7 +843,7 @@ bool MetaBundle::matchesSimpleExpression( const TQString &expression, const TQVa
{ {
uint y = 0, n = columns.count(); uint y = 0, n = columns.count();
for(; y < n; ++y ) for(; y < n; ++y )
if ( prettyText( columns[y] ).lower().tqcontains( terms[x] ) ) if ( prettyText( columns[y] ).lower().contains( terms[x] ) )
break; break;
matches = ( y < n ); matches = ( y < n );
} }
@ -891,7 +891,7 @@ bool MetaBundle::matchesFast(const TQStringList &terms, ColumnMask columnMask) c
// now search // now search
for (uint i = 0; i < terms.count(); i++) { for (uint i = 0; i < terms.count(); i++) {
if (!m_searchStr.tqcontains(terms[i])) return false; if (!m_searchStr.contains(terms[i])) return false;
} }
return true; return true;
@ -974,7 +974,7 @@ bool MetaBundle::matchesParsedExpression( const ParsedExpression &data, const TQ
condition = v.toFloat() > w.toFloat(); condition = v.toFloat() > w.toFloat();
else if( column == Length ) else if( column == Length )
{ {
int g = v.tqfind( ':' ), h = w.tqfind( ':' ); int g = v.find( ':' ), h = w.find( ':' );
condition = v.left( g ).toInt() > w.left( h ).toInt() || condition = v.left( g ).toInt() > w.left( h ).toInt() ||
( v.left( g ).toInt() == w.left( h ).toInt() && ( v.left( g ).toInt() == w.left( h ).toInt() &&
v.mid( g + 1 ).toInt() > w.mid( h + 1 ).toInt() ); v.mid( g + 1 ).toInt() > w.mid( h + 1 ).toInt() );
@ -990,7 +990,7 @@ bool MetaBundle::matchesParsedExpression( const ParsedExpression &data, const TQ
condition = v.toFloat() < w.toFloat(); condition = v.toFloat() < w.toFloat();
else if( column == Length ) else if( column == Length )
{ {
int g = v.tqfind( ':' ), h = w.tqfind( ':' ); int g = v.find( ':' ), h = w.find( ':' );
condition = v.left( g ).toInt() < w.left( h ).toInt() || condition = v.left( g ).toInt() < w.left( h ).toInt() ||
( v.left( g ).toInt() == w.left( h ).toInt() && ( v.left( g ).toInt() == w.left( h ).toInt() &&
v.mid( g + 1 ).toInt() < w.mid( h + 1 ).toInt() ); v.mid( g + 1 ).toInt() < w.mid( h + 1 ).toInt() );
@ -1006,12 +1006,12 @@ bool MetaBundle::matchesParsedExpression( const ParsedExpression &data, const TQ
condition = v.toFloat() == w.toFloat(); condition = v.toFloat() == w.toFloat();
else if( column == Length ) else if( column == Length )
{ {
int g = v.tqfind( ':' ), h = w.tqfind( ':' ); int g = v.find( ':' ), h = w.find( ':' );
condition = v.left( g ).toInt() == w.left( h ).toInt() && condition = v.left( g ).toInt() == w.left( h ).toInt() &&
v.mid( g + 1 ).toInt() == w.mid( h + 1 ).toInt(); v.mid( g + 1 ).toInt() == w.mid( h + 1 ).toInt();
} }
else else
condition = v.tqcontains( q, false ); condition = v.contains( q, false );
} }
if( condition == ( e.negate ? false : true ) ) if( condition == ( e.negate ? false : true ) )
{ {
@ -1023,7 +1023,7 @@ bool MetaBundle::matchesParsedExpression( const ParsedExpression &data, const TQ
{ {
for( int it = 0, end = defaults.size(); it != end; ++it ) for( int it = 0, end = defaults.size(); it != end; ++it )
{ {
b = prettyText( defaults[it] ).tqcontains( e.text, false ) == ( e.negate ? false : true ); b = prettyText( defaults[it] ).contains( e.text, false ) == ( e.negate ? false : true );
if( ( e.negate && !b ) || ( !e.negate && b ) ) if( ( e.negate && !b ) || ( !e.negate && b ) )
break; break;
} }
@ -1088,7 +1088,7 @@ MetaBundle::prettyTitle( const TQString &filename ) //static
s = s.left( s.length() - 5 ); s = s.left( s.length() - 5 );
//remove file extension, s/_/ /g and decode %2f-like sequences //remove file extension, s/_/ /g and decode %2f-like sequences
s = s.left( s.tqfindRev( '.' ) ).tqreplace( '_', ' ' ); s = s.left( s.findRev( '.' ) ).replace( '_', ' ' );
s = KURL::decode_string( s ); s = KURL::decode_string( s );
return s; return s;

@ -410,7 +410,7 @@ protected:
// whether the search text should be rebuilt // whether the search text should be rebuilt
volatile mutable bool m_isSearchDirty; volatile mutable bool m_isSearchDirty;
// which columns the search string tqcontains // which columns the search string contains
mutable ColumnMask m_searchColumns; mutable ColumnMask m_searchColumns;
// the search string: textualized columns separated by space // the search string: textualized columns separated by space
// note that matchFast searches by words, hence a word cannot span // note that matchFast searches by words, hence a word cannot span
@ -514,7 +514,7 @@ inline int MetaBundle::compilation() const
inline TQString MetaBundle::type() const inline TQString MetaBundle::type() const
{ {
return isFile() return isFile()
? filename().mid( filename().tqfindRev( '.' ) + 1 ) ? filename().mid( filename().findRev( '.' ) + 1 )
: i18n( "Stream" ); : i18n( "Stream" );
} }
inline PodcastEpisodeBundle *MetaBundle::podcastBundle() const { return m_podcastBundle; } inline PodcastEpisodeBundle *MetaBundle::podcastBundle() const { return m_podcastBundle; }

@ -526,8 +526,8 @@ MoodServer::slotJobCompleted( KProcess *proc )
if( success ) if( success )
{ {
TQString file = m_currentData.m_outfile; TQString file = m_currentData.m_outfile;
TQString dir = file.left( file.tqfindRev( '/' ) ); TQString dir = file.left( file.findRev( '/' ) );
file = file.right( file.length() - file.tqfindRev( '/' ) - 1 ); file = file.right( file.length() - file.findRev( '/' ) - 1 );
TQDir( dir ).rename( file + ".tmp", file ); TQDir( dir ).rename( file + ".tmp", file );
} }
else else
@ -1318,13 +1318,13 @@ Moodbar::moodFilename( const KURL &url, bool withMusic )
if( withMusic ) if( withMusic )
{ {
path = url.path(); path = url.path();
path.truncate(path.tqfindRev('.')); path.truncate(path.findRev('.'));
if (path.isEmpty()) // Weird... if (path.isEmpty()) // Weird...
return TQString(); return TQString();
path += ".mood"; path += ".mood";
int slash = path.tqfindRev('/') + 1; int slash = path.findRev('/') + 1;
TQString dir = path.left(slash); TQString dir = path.left(slash);
TQString file = path.right(path.length() - slash); TQString file = path.right(path.length() - slash);
path = dir + '.' + file; path = dir + '.' + file;
@ -1338,13 +1338,13 @@ Moodbar::moodFilename( const KURL &url, bool withMusic )
MountPointManager::instance()->getRelativePath( deviceid, MountPointManager::instance()->getRelativePath( deviceid,
url, relativePath ); url, relativePath );
path = relativePath.path(); path = relativePath.path();
path.truncate(path.tqfindRev('.')); path.truncate(path.findRev('.'));
if (path.isEmpty()) // Weird... if (path.isEmpty()) // Weird...
return TQString(); return TQString();
path = TQString::number( deviceid ) + ',' path = TQString::number( deviceid ) + ','
+ path.tqreplace('/', ',') + ".mood"; + path.replace('/', ',') + ".mood";
// Creates the path if necessary // Creates the path if necessary
path = ::locateLocal( "data", "amarok/moods/" + path ); path = ::locateLocal( "data", "amarok/moods/" + path );

@ -166,7 +166,7 @@ MountPointManager::getIdForUrl( const TQString &url )
bool bool
MountPointManager::isMounted ( const int deviceId ) const { MountPointManager::isMounted ( const int deviceId ) const {
m_handlerMapMutex.lock(); m_handlerMapMutex.lock();
bool result = m_handlerMap.tqcontains( deviceId ); bool result = m_handlerMap.contains( deviceId );
m_handlerMapMutex.unlock(); m_handlerMapMutex.unlock();
return result; return result;
} }
@ -200,7 +200,7 @@ MountPointManager::getAbsolutePath( const int deviceId, const KURL& relativePath
return; return;
} }
m_handlerMapMutex.lock(); m_handlerMapMutex.lock();
if ( m_handlerMap.tqcontains( deviceId ) ) if ( m_handlerMap.contains( deviceId ) )
{ {
m_handlerMap[deviceId]->getURL( absolutePath, relativePath ); m_handlerMap[deviceId]->getURL( absolutePath, relativePath );
m_handlerMapMutex.unlock(); m_handlerMapMutex.unlock();
@ -244,7 +244,7 @@ void
MountPointManager::getRelativePath( const int deviceId, const KURL& absolutePath, KURL& relativePath ) const MountPointManager::getRelativePath( const int deviceId, const KURL& absolutePath, KURL& relativePath ) const
{ {
m_handlerMapMutex.lock(); m_handlerMapMutex.lock();
if ( deviceId != -1 && m_handlerMap.tqcontains( deviceId ) ) if ( deviceId != -1 && m_handlerMap.contains( deviceId ) )
{ {
//FIXME max: returns garbage if the absolute path is actually not under the device's mount point //FIXME max: returns garbage if the absolute path is actually not under the device's mount point
TQString rpath = KURL::relativePath( m_handlerMap[deviceId]->getDevicePath(), absolutePath.path() ); TQString rpath = KURL::relativePath( m_handlerMap[deviceId]->getDevicePath(), absolutePath.path() );
@ -288,7 +288,7 @@ MountPointManager::mediumChanged( const Medium *m )
} }
int key = handler->getDeviceID(); int key = handler->getDeviceID();
m_handlerMapMutex.lock(); m_handlerMapMutex.lock();
if ( m_handlerMap.tqcontains( key ) ) if ( m_handlerMap.contains( key ) )
{ {
debug() << "Key " << key << " already exists in handlerMap, replacing" << endl; debug() << "Key " << key << " already exists in handlerMap, replacing" << endl;
delete m_handlerMap[key]; delete m_handlerMap[key];
@ -374,7 +374,7 @@ MountPointManager::mediumAdded( const Medium *m )
} }
int key = handler->getDeviceID(); int key = handler->getDeviceID();
m_handlerMapMutex.lock(); m_handlerMapMutex.lock();
if ( m_handlerMap.tqcontains( key ) ) if ( m_handlerMap.contains( key ) )
{ {
debug() << "Key " << key << " already exists in handlerMap, replacing" << endl; debug() << "Key " << key << " already exists in handlerMap, replacing" << endl;
delete m_handlerMap[key]; delete m_handlerMap[key];
@ -420,7 +420,7 @@ MountPointManager::collectionFolders( )
{ {
absPath = getAbsolutePath( *it, *strIt ); absPath = getAbsolutePath( *it, *strIt );
} }
if ( !result.tqcontains( absPath ) ) if ( !result.contains( absPath ) )
result.append( absPath ); result.append( absPath );
} }
} }
@ -438,8 +438,8 @@ MountPointManager::setCollectionFolders( const TQStringList &folders )
{ {
int id = getIdForUrl( *it ); int id = getIdForUrl( *it );
TQString rpath = getRelativePath( id, *it ); TQString rpath = getRelativePath( id, *it );
if ( folderMap.tqcontains( id ) ) { if ( folderMap.contains( id ) ) {
if ( !folderMap[id].tqcontains( rpath ) ) if ( !folderMap[id].contains( rpath ) )
folderMap[id].append( rpath ); folderMap[id].append( rpath );
} }
else else
@ -449,7 +449,7 @@ MountPointManager::setCollectionFolders( const TQStringList &folders )
IdList ids = getMountedDeviceIds(); IdList ids = getMountedDeviceIds();
foreachType( IdList, ids ) foreachType( IdList, ids )
{ {
if( !folderMap.tqcontains( *it ) ) if( !folderMap.contains( *it ) )
{ {
folderConf->deleteEntry( TQString::number( *it ) ); folderConf->deleteEntry( TQString::number( *it ) );
} }

@ -1079,7 +1079,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint )
TQFont font; TQFont font;
painter.setFont( font ); painter.setFont( font );
TQString text = KStringHandler::rPixelSqueeze( m_text, TQFontMetrics( font ), pixmap.width() - icon.width() - 3 ); TQString text = KStringHandler::rPixelSqueeze( m_text, TQFontMetrics( font ), pixmap.width() - icon.width() - 3 );
text.tqreplace( "...", ".." ); text.replace( "...", ".." );
const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( text ) / 2; const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( text ) / 2;
painter.setPen( textColor ); painter.setPen( textColor );
const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() );
@ -1107,7 +1107,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint )
TQFont font; TQFont font;
painter.setFont( font ); painter.setFont( font );
TQString text = KStringHandler::rPixelSqueeze( m_text, TQFontMetrics( font ), pixmap.width() - icon.width() - 3 ); TQString text = KStringHandler::rPixelSqueeze( m_text, TQFontMetrics( font ), pixmap.width() - icon.width() - 3 );
text.tqreplace( "...", ".." ); text.replace( "...", ".." );
const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( text ) / 2; const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( text ) / 2;
painter.setPen( textColor ); painter.setPen( textColor );
const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() );

@ -50,9 +50,9 @@ TQString OrganizeCollectionDialog::buildDestination( const TQString &format, con
TQString tail = result.mid( folderCombo->currentText().length() ); TQString tail = result.mid( folderCombo->currentText().length() );
if( !tail.startsWith( "/" ) ) if( !tail.startsWith( "/" ) )
tail.prepend( "/" ); tail.prepend( "/" );
return folderCombo->currentText() + tail.tqreplace( TQRegExp( "/\\.*" ), "/" ); return folderCombo->currentText() + tail.replace( TQRegExp( "/\\.*" ), "/" );
} }
return result.tqreplace( TQRegExp( "/\\.*" ), "/" ); return result.replace( TQRegExp( "/\\.*" ), "/" );
} }
TQString OrganizeCollectionDialog::buildFormatTip() TQString OrganizeCollectionDialog::buildFormatTip()
@ -142,15 +142,15 @@ TQString OrganizeCollectionDialog::cleanPath( const TQString &component )
} }
if( !regexpEdit->text().isEmpty() ) if( !regexpEdit->text().isEmpty() )
result.tqreplace( TQRegExp( regexpEdit->text() ), replaceEdit->text() ); result.replace( TQRegExp( regexpEdit->text() ), replaceEdit->text() );
result.simplifyWhiteSpace(); result.simplifyWhiteSpace();
if( spaceCheck->isChecked() ) if( spaceCheck->isChecked() )
result.tqreplace( TQRegExp( "\\s" ), "_" ); result.replace( TQRegExp( "\\s" ), "_" );
if( vfatCheck->isChecked() ) if( vfatCheck->isChecked() )
result = Amarok::vfatPath( result ); result = Amarok::vfatPath( result );
result.tqreplace( "/", "-" ); result.replace( "/", "-" );
return result; return result;
} }

@ -180,9 +180,9 @@ OSDWidget::determineMetrics( const uint M )
const TQSize max = TQApplication::desktop()->screen( m_screen )->size() - margin; const TQSize max = TQApplication::desktop()->screen( m_screen )->size() - margin;
// If we don't do that, the boundingRect() might not be suitable for drawText() (TQt issue N67674) // If we don't do that, the boundingRect() might not be suitable for drawText() (TQt issue N67674)
m_text.tqreplace( TQRegExp(" +\n"), "\n" ); m_text.replace( TQRegExp(" +\n"), "\n" );
// remove consecutive line breaks // remove consecutive line breaks
m_text.tqreplace( TQRegExp("\n+"), "\n" ); m_text.replace( TQRegExp("\n+"), "\n" );
// The osd cannot be larger than the screen // The osd cannot be larger than the screen
TQRect rect = fontMetrics().boundingRect( 0, 0, TQRect rect = fontMetrics().boundingRect( 0, 0,
@ -690,9 +690,9 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
const int column = availableTags.at( i ); const int column = availableTags.at( i );
TQString append = ( i == 0 ) ? "" TQString append = ( i == 0 ) ? ""
: ( n > 1 && i == n / 2 ) ? "\n" : ( n > 1 && i == n / 2 ) ? "\n"
: ( parens.tqcontains( column ) || parens.tqcontains( availableTags.at( i - 1 ) ) ) ? " " : ( parens.contains( column ) || parens.contains( availableTags.at( i - 1 ) ) ) ? " "
: i18n(" - "); : i18n(" - ");
append += ( parens.tqcontains( column ) ? "(%1)" : "%1" ); append += ( parens.contains( column ) ? "(%1)" : "%1" );
text += append.tqarg( tags.at( column + 1 ) ); text += append.tqarg( tags.at( column + 1 ) );
} }
} }
@ -728,21 +728,21 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
QStringx osd = AmarokConfig::osdText(); QStringx osd = AmarokConfig::osdText();
// hacky, but works... // hacky, but works...
if( osd.tqcontains( "%rating" ) ) if( osd.contains( "%rating" ) )
OSDWidget::setRating( AmarokConfig::useRatings() ? bundle.rating() : 0 ); OSDWidget::setRating( AmarokConfig::useRatings() ? bundle.rating() : 0 );
else else
OSDWidget::setRating( 0 ); OSDWidget::setRating( 0 );
osd.tqreplace( "%rating", "" ); osd.replace( "%rating", "" );
if( osd.tqcontains( "%moodbar" ) && AmarokConfig::showMoodbar() ) if( osd.contains( "%moodbar" ) && AmarokConfig::showMoodbar() )
OSDWidget::setMoodbar( bundle ); OSDWidget::setMoodbar( bundle );
osd.tqreplace( "%moodbar", "" ); osd.replace( "%moodbar", "" );
text = osd.namedOptArgs( args ); text = osd.namedOptArgs( args );
// KDE 3.3 rejects \n in the .kcfg file, and KConfig turns \n into \\n, so... // KDE 3.3 rejects \n in the .kcfg file, and KConfig turns \n into \\n, so...
text.tqreplace( "\\n", "\n" ); text.replace( "\\n", "\n" );
} }
if ( AmarokConfig::osdCover() ) { if ( AmarokConfig::osdCover() ) {
@ -755,7 +755,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
else else
location = CollectionDB::instance()->albumImage( bundle, false, 0 ); location = CollectionDB::instance()->albumImage( bundle, false, 0 );
if ( location.tqfind( "nocover" ) != -1 ) if ( location.find( "nocover" ) != -1 )
setImage( Amarok::icon() ); setImage( Amarok::icon() );
else else
setImage( location ); setImage( location );
@ -826,7 +826,7 @@ Amarok::OSD::slotCoverChanged( const TQString &artist, const TQString &album )
{ {
TQString location = CollectionDB::instance()->albumImage( artist, album, false, 0 ); TQString location = CollectionDB::instance()->albumImage( artist, album, false, 0 );
if( location.tqfind( "nocover" ) != -1 ) if( location.find( "nocover" ) != -1 )
setImage( Amarok::icon() ); setImage( Amarok::icon() );
else else
setImage( location ); setImage( location );

@ -764,7 +764,7 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e )
{ {
//Amarok::Menu::instance()->exec( e->globalPos() ); //Amarok::Menu::instance()->exec( e->globalPos() );
} }
else if ( m_pAnalyzer->tqgeometry().tqcontains( e->pos() ) ) else if ( m_pAnalyzer->tqgeometry().contains( e->pos() ) )
{ {
createAnalyzer( e->state() & TQt::ControlButton ? -1 : +1 ); createAnalyzer( e->state() & TQt::ControlButton ? -1 : +1 );
} }
@ -774,7 +774,7 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e )
rect = m_pTimeLabel->tqgeometry(); rect = m_pTimeLabel->tqgeometry();
rect |= m_pTimeSign->tqgeometry(); rect |= m_pTimeSign->tqgeometry();
if ( rect.tqcontains( e->pos() ) ) if ( rect.contains( e->pos() ) )
{ {
AmarokConfig::setLeftTimeDisplayRemaining( !AmarokConfig::leftTimeDisplayRemaining() ); AmarokConfig::setLeftTimeDisplayRemaining( !AmarokConfig::leftTimeDisplayRemaining() );
timeDisplay( EngineController::engine()->position() ); timeDisplay( EngineController::engine()->position() );

@ -812,19 +812,19 @@ void
Playlist::addToUniqueMap( const TQString uniqueid, PlaylistItem* item ) Playlist::addToUniqueMap( const TQString uniqueid, PlaylistItem* item )
{ {
TQPtrList<PlaylistItem> *list; TQPtrList<PlaylistItem> *list;
if( m_uniqueMap.tqcontains( uniqueid ) ) if( m_uniqueMap.contains( uniqueid ) )
list = m_uniqueMap[uniqueid]; list = m_uniqueMap[uniqueid];
else else
list = new TQPtrList<PlaylistItem>(); list = new TQPtrList<PlaylistItem>();
list->append( item ); list->append( item );
if( !m_uniqueMap.tqcontains( uniqueid ) ) if( !m_uniqueMap.contains( uniqueid ) )
m_uniqueMap[uniqueid] = list; m_uniqueMap[uniqueid] = list;
} }
void void
Playlist::removeFromUniqueMap( const TQString uniqueid, PlaylistItem* item ) Playlist::removeFromUniqueMap( const TQString uniqueid, PlaylistItem* item )
{ {
if( !m_uniqueMap.tqcontains( uniqueid ) ) if( !m_uniqueMap.contains( uniqueid ) )
return; return;
TQPtrList<PlaylistItem> *list; TQPtrList<PlaylistItem> *list;
@ -846,7 +846,7 @@ Playlist::updateEntriesUrl( const TQString &oldUrl, const TQString &newUrl, cons
MoodServer::instance()->slotFileMoved( oldUrl, newUrl ); MoodServer::instance()->slotFileMoved( oldUrl, newUrl );
TQPtrList<PlaylistItem> *list; TQPtrList<PlaylistItem> *list;
if( m_uniqueMap.tqcontains( uniqueid ) ) if( m_uniqueMap.contains( uniqueid ) )
{ {
list = m_uniqueMap[uniqueid]; list = m_uniqueMap[uniqueid];
PlaylistItem *item; PlaylistItem *item;
@ -862,7 +862,7 @@ void
Playlist::updateEntriesUniqueId( const TQString &/*url*/, const TQString &oldid, const TQString &newid ) Playlist::updateEntriesUniqueId( const TQString &/*url*/, const TQString &oldid, const TQString &newid )
{ {
TQPtrList<PlaylistItem> *list, *oldlist; TQPtrList<PlaylistItem> *list, *oldlist;
if( m_uniqueMap.tqcontains( oldid ) ) if( m_uniqueMap.contains( oldid ) )
{ {
list = m_uniqueMap[oldid]; list = m_uniqueMap[oldid];
m_uniqueMap.remove( oldid ); m_uniqueMap.remove( oldid );
@ -872,7 +872,7 @@ Playlist::updateEntriesUniqueId( const TQString &/*url*/, const TQString &oldid,
item->setUniqueId( newid ); item->setUniqueId( newid );
item->readTags(); item->readTags();
} }
if( !m_uniqueMap.tqcontains( newid ) ) if( !m_uniqueMap.contains( newid ) )
m_uniqueMap[newid] = list; m_uniqueMap[newid] = list;
else else
{ {
@ -888,7 +888,7 @@ void
Playlist::updateEntriesStatusDeleted( const TQString &/*absPath*/, const TQString &uniqueid ) Playlist::updateEntriesStatusDeleted( const TQString &/*absPath*/, const TQString &uniqueid )
{ {
TQPtrList<PlaylistItem> *list; TQPtrList<PlaylistItem> *list;
if( m_uniqueMap.tqcontains( uniqueid ) ) if( m_uniqueMap.contains( uniqueid ) )
{ {
list = m_uniqueMap[uniqueid]; list = m_uniqueMap[uniqueid];
PlaylistItem *item; PlaylistItem *item;
@ -901,7 +901,7 @@ void
Playlist::updateEntriesStatusAdded( const TQString &absPath, const TQString &uniqueid ) Playlist::updateEntriesStatusAdded( const TQString &absPath, const TQString &uniqueid )
{ {
TQPtrList<PlaylistItem> *list; TQPtrList<PlaylistItem> *list;
if( m_uniqueMap.tqcontains( uniqueid ) ) if( m_uniqueMap.contains( uniqueid ) )
{ {
list = m_uniqueMap[uniqueid]; list = m_uniqueMap[uniqueid];
if( !list ) if( !list )
@ -924,7 +924,7 @@ Playlist::updateEntriesStatusAdded( const TQMap<TQString,TQString> &map )
TQMap<TQString,TQPtrList<PlaylistItem>*>::Iterator it; TQMap<TQString,TQPtrList<PlaylistItem>*>::Iterator it;
for( it = uniquecopy.begin(); it != uniquecopy.end(); ++it ) for( it = uniquecopy.begin(); it != uniquecopy.end(); ++it )
{ {
if( map.tqcontains( it.key() )) if( map.contains( it.key() ))
{ {
updateEntriesStatusAdded( map[it.key()], it.key() ); updateEntriesStatusAdded( map[it.key()], it.key() );
uniquecopy.remove( it ); uniquecopy.remove( it );
@ -995,14 +995,14 @@ Playlist::playNextTrack( bool forceNext )
{ {
for( ArtistAlbumMap::const_iterator it = m_albums.constBegin(), end = m_albums.constEnd(); it != end; ++it ) for( ArtistAlbumMap::const_iterator it = m_albums.constBegin(), end = m_albums.constEnd(); it != end; ++it )
for( AlbumMap::const_iterator it2 = (*it).constBegin(), end2 = (*it).constEnd(); it2 != end2; ++it2 ) for( AlbumMap::const_iterator it2 = (*it).constBegin(), end2 = (*it).constEnd(); it2 != end2; ++it2 )
if( m_prevAlbums.tqfindRef( *it2 ) == -1 ) { if( m_prevAlbums.findRef( *it2 ) == -1 ) {
if ( (*it2)->tracks.getFirst() ) if ( (*it2)->tracks.getFirst() )
tracks.append( (*it2)->tracks.getFirst() ); tracks.append( (*it2)->tracks.getFirst() );
} }
} }
else else
for( MyIt it( this ); *it; ++it ) for( MyIt it( this ); *it; ++it )
if ( !m_prevTracks.tqcontainsRef( *it ) && checkFiletqStatus( *it ) && (*it)->exists() ) if ( !m_prevTracks.containsRef( *it ) && checkFiletqStatus( *it ) && (*it)->exists() )
tracks.push_back( *it ); tracks.push_back( *it );
if( tracks.isEmpty() ) if( tracks.isEmpty() )
{ {
@ -1023,7 +1023,7 @@ Playlist::playNextTrack( bool forceNext )
// would loop infinitely otherwise // would loop infinitely otherwise
TQPtrList<PlaylistAlbum> albums; TQPtrList<PlaylistAlbum> albums;
for( PlaylistIterator it( this, PlaylistIterator::Visible ); *it && albums.count() <= 1; ++it ) for( PlaylistIterator it( this, PlaylistIterator::Visible ); *it && albums.count() <= 1; ++it )
if( albums.tqfindRef( (*it)->m_album ) == -1 ) if( albums.findRef( (*it)->m_album ) == -1 )
albums.append( (*it)->m_album ); albums.append( (*it)->m_album );
if ( albums.count() > 1 ) if ( albums.count() > 1 )
@ -1305,13 +1305,13 @@ Playlist::queueSelected()
// Dequeuing selection with dynamic doesn't work due to the moving of the track after the last queued // Dequeuing selection with dynamic doesn't work due to the moving of the track after the last queued
if( dynamicMode() ) if( dynamicMode() )
{ {
( !m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); ( !m_nextTracks.containsRef( *it ) ? in : out ).append( *it );
dynamicList.append( *it ); dynamicList.append( *it );
} }
else else
{ {
queue( *it, true ); queue( *it, true );
( m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); ( m_nextTracks.containsRef( *it ) ? in : out ).append( *it );
} }
} }
@ -1319,7 +1319,7 @@ Playlist::queueSelected()
if( dynamicMode() ) if( dynamicMode() )
{ {
TQListViewItem *item = dynamicList.first(); TQListViewItem *item = dynamicList.first();
if( m_nextTracks.tqcontainsRef( static_cast<PlaylistItem*>(item) ) ) if( m_nextTracks.containsRef( static_cast<PlaylistItem*>(item) ) )
{ {
for( item = dynamicList.last(); item; item = dynamicList.prev() ) for( item = dynamicList.last(); item; item = dynamicList.prev() )
queue( item, true ); queue( item, true );
@ -1339,7 +1339,7 @@ Playlist::queue( TQListViewItem *item, bool multi, bool invertQueue )
{ {
#define item static_cast<PlaylistItem*>(item) #define item static_cast<PlaylistItem*>(item)
const int queueIndex = m_nextTracks.tqfindRef( item ); const int queueIndex = m_nextTracks.findRef( item );
const bool isQueued = queueIndex != -1; const bool isQueued = queueIndex != -1;
if( isQueued ) if( isQueued )
@ -1752,7 +1752,7 @@ TQPair<TQString, TQRect> Playlist::toolTipText( TQWidget*, const TQPoint &pos )
if( ( col == PlaylistItem::Rating && PlaylistItem::ratingAtPoint( contentsPos.x() ) <= item->rating() + 1 ) || if( ( col == PlaylistItem::Rating && PlaylistItem::ratingAtPoint( contentsPos.x() ) <= item->rating() + 1 ) ||
( col != PlaylistItem::Rating ) ) ( col != PlaylistItem::Rating ) )
{ {
text = text.tqreplace( "&", "&amp;" ).tqreplace( "<", "&lt;" ).tqreplace( ">", "&gt;" ); text = text.replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" );
if( item->isCurrent() ) if( item->isCurrent() )
{ {
text = TQString("<i>%1</i>").tqarg( text ); text = TQString("<i>%1</i>").tqarg( text );
@ -2998,11 +2998,11 @@ Playlist::customEvent( TQCustomEvent *e )
if ( !m_queueList.isEmpty() ) { if ( !m_queueList.isEmpty() ) {
KURL::List::Iterator jt; KURL::List::Iterator jt;
for( MyIt it( this, MyIt::All ); *it; ++it ) { for( MyIt it( this, MyIt::All ); *it; ++it ) {
jt = m_queueList.tqfind( (*it)->url() ); jt = m_queueList.find( (*it)->url() );
if ( jt != m_queueList.end() ) { if ( jt != m_queueList.end() ) {
queue( *it ); queue( *it );
( m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); ( m_nextTracks.containsRef( *it ) ? in : out ).append( *it );
m_queueList.remove( jt ); m_queueList.remove( jt );
} }
} }
@ -3121,9 +3121,9 @@ Playlist::saveXML( const TQString &path )
TQString dynamic; TQString dynamic;
if( dynamicMode() ) if( dynamicMode() )
{ {
const TQString title = ( dynamicMode()->title() ).tqreplace( "&", "&amp;" ) const TQString title = ( dynamicMode()->title() ).replace( "&", "&amp;" )
.tqreplace( "<", "&lt;" ) .replace( "<", "&lt;" )
.tqreplace( ">", "&gt;" ); .replace( ">", "&gt;" );
dynamic = TQString(" dynamicMode=\"%1\"").tqarg( title ); dynamic = TQString(" dynamicMode=\"%1\"").tqarg( title );
} }
stream << TQString( "<playlist product=\"%1\" version=\"%2\"%3>\n" ) stream << TQString( "<playlist product=\"%1\" version=\"%2\"%3>\n" )
@ -3135,7 +3135,7 @@ Playlist::saveXML( const TQString &path )
if( item->isEmpty() ) continue; // Skip marker items and such if( item->isEmpty() ) continue; // Skip marker items and such
TQStringList attributes; TQStringList attributes;
const int queueIndex = m_nextTracks.tqfindRef( item ); const int queueIndex = m_nextTracks.findRef( item );
if ( queueIndex != -1 ) if ( queueIndex != -1 )
attributes << "queue_index" << TQString::number( queueIndex + 1 ); attributes << "queue_index" << TQString::number( queueIndex + 1 );
else if ( item == currentTrack() ) else if ( item == currentTrack() )
@ -3202,7 +3202,7 @@ Playlist::addCustomMenuItem( const TQString &submenu, const TQString &itemTitle
bool bool
Playlist::removeCustomMenuItem( const TQString &submenu, const TQString &itemTitle ) //for dcop Playlist::removeCustomMenuItem( const TQString &submenu, const TQString &itemTitle ) //for dcop
{ {
if( !m_customSubmenuItem.tqcontains(submenu) ) if( !m_customSubmenuItem.contains(submenu) )
return false; return false;
if( m_customSubmenuItem[submenu].remove( itemTitle ) != 0 ) if( m_customSubmenuItem[submenu].remove( itemTitle ) != 0 )
{ {
@ -3323,7 +3323,7 @@ Playlist::repopulate() //SLOT
for( ; *it; ++it ) for( ; *it; ++it )
{ {
PlaylistItem *item = static_cast<PlaylistItem *>(*it); PlaylistItem *item = static_cast<PlaylistItem *>(*it);
int queueIndex = m_nextTracks.tqfindRef( item ); int queueIndex = m_nextTracks.findRef( item );
bool isQueued = queueIndex != -1; bool isQueued = queueIndex != -1;
bool isMarker = item->isEmpty(); bool isMarker = item->isEmpty();
// markers are used by playlistloader, and removing them is not good // markers are used by playlistloader, and removing them is not good
@ -3394,7 +3394,7 @@ Playlist::removeSelectedItems() //SLOT
{ {
if( !(*it)->isDynamicEnabled() ) if( !(*it)->isDynamicEnabled() )
dontReplaceDynamic++; dontReplaceDynamic++;
( m_nextTracks.tqcontains( *it ) ? queued : list ).prepend( *it ); ( m_nextTracks.contains( *it ) ? queued : list ).prepend( *it );
} }
if( (int)list.count() == childCount() ) if( (int)list.count() == childCount() )
@ -3596,10 +3596,10 @@ Playlist::changeFromQueueManager(TQPtrList<PlaylistItem> list)
PLItemList in, out; PLItemList in, out;
// make sure we tqrepaint items no longer queued // make sure we tqrepaint items no longer queued
for( PlaylistItem* item = oldQueue.first(); item; item = oldQueue.next() ) for( PlaylistItem* item = oldQueue.first(); item; item = oldQueue.next() )
if( !m_nextTracks.tqcontainsRef( item ) ) if( !m_nextTracks.containsRef( item ) )
out << item; out << item;
for( PlaylistItem* item = m_nextTracks.first(); item; item = m_nextTracks.next() ) for( PlaylistItem* item = m_nextTracks.first(); item; item = m_nextTracks.next() )
if( !oldQueue.tqcontainsRef( item ) ) if( !oldQueue.containsRef( item ) )
in << item; in << item;
emit queueChanged( in, out ); emit queueChanged( in, out );
@ -3636,7 +3636,7 @@ void
Playlist::setFilter( const TQString &query ) //SLOT Playlist::setFilter( const TQString &query ) //SLOT
{ {
const bool advanced = ExpressionParser::isAdvancedExpression( query ); const bool advanced = ExpressionParser::isAdvancedExpression( query );
MyIt it( this, ( !advanced && query.lower().tqcontains( m_prevfilter.lower() ) ) MyIt it( this, ( !advanced && query.lower().contains( m_prevfilter.lower() ) )
? MyIt::Visible ? MyIt::Visible
: MyIt::All ); : MyIt::All );
@ -3715,7 +3715,7 @@ Playlist::fileMoved( const TQString &srcPath, const TQString &dstPath )
void void
Playlist::appendToPreviousTracks( PlaylistItem *item ) Playlist::appendToPreviousTracks( PlaylistItem *item )
{ {
if( !m_prevTracks.tqcontainsRef( item ) ) if( !m_prevTracks.containsRef( item ) )
{ {
m_total -= item->totalIncrementAmount(); m_total -= item->totalIncrementAmount();
m_prevTracks.append( item ); m_prevTracks.append( item );
@ -3725,7 +3725,7 @@ Playlist::appendToPreviousTracks( PlaylistItem *item )
void void
Playlist::appendToPreviousAlbums( PlaylistAlbum *album ) Playlist::appendToPreviousAlbums( PlaylistAlbum *album )
{ {
if( !m_prevAlbums.tqcontainsRef( album ) ) if( !m_prevAlbums.containsRef( album ) )
{ {
m_total -= album->total; m_total -= album->total;
m_prevAlbums.append( album ); m_prevAlbums.append( album );
@ -3777,7 +3777,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
Amarok::actionCollection()->action("playlist_shuffle")->plug( &popup ); Amarok::actionCollection()->action("playlist_shuffle")->plug( &popup );
m = PlaylistBrowser::instance()->findDynamicModeByTitle( AmarokConfig::lastDynamicMode() ); m = PlaylistBrowser::instance()->findDynamicModeByTitle( AmarokConfig::lastDynamicMode() );
if( m ) if( m )
popup.insertItem( SmallIconSet( Amarok::icon( "dynamic" ) ), i18n("L&oad %1").tqarg( m->title().tqreplace( '&', "&&" ) ), ENABLEDYNAMIC); popup.insertItem( SmallIconSet( Amarok::icon( "dynamic" ) ), i18n("L&oad %1").tqarg( m->title().replace( '&', "&&" ) ), ENABLEDYNAMIC);
} }
switch(popup.exec(p)) switch(popup.exec(p))
{ {
@ -3835,10 +3835,10 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
bool queueToggle = false; bool queueToggle = false;
MyIt it( this, MyIt::Selected ); MyIt it( this, MyIt::Selected );
bool firstQueued = ( m_nextTracks.tqfindRef( *it ) != -1 ); bool firstQueued = ( m_nextTracks.findRef( *it ) != -1 );
for( ++it ; *it; ++it ) { for( ++it ; *it; ++it ) {
if ( ( m_nextTracks.tqfindRef( *it ) != -1 ) != firstQueued ) { if ( ( m_nextTracks.findRef( *it ) != -1 ) != firstQueued ) {
queueToggle = true; queueToggle = true;
break; break;
} }
@ -3915,7 +3915,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
popup.insertItem( trackColumn popup.insertItem( trackColumn
? i18n("Iteratively Assign Track &Numbers") ? i18n("Iteratively Assign Track &Numbers")
: i18n("&Write '%1' for Selected Tracks") : i18n("&Write '%1' for Selected Tracks")
.tqarg( KStringHandler::rsqueeze( tag, 30 ).tqreplace( "&", "&&" ) ), FILL_DOWN ); .tqarg( KStringHandler::rsqueeze( tag, 30 ).replace( "&", "&&" ) ), FILL_DOWN );
popup.insertItem( SmallIconSet( Amarok::icon( "edit" ) ), (itemCount == 1 popup.insertItem( SmallIconSet( Amarok::icon( "edit" ) ), (itemCount == 1
? i18n( "&Edit Tag '%1'" ) ? i18n( "&Edit Tag '%1'" )
@ -4067,7 +4067,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
{ {
//use "in" for the other just because it's there and not used otherwise //use "in" for the other just because it's there and not used otherwise
for( MyIt it( this, MyIt::Unselected | MyIt::Visible ); *it; ++it ) for( MyIt it( this, MyIt::Unselected | MyIt::Visible ); *it; ++it )
( m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); ( m_nextTracks.containsRef( *it ) ? in : out ).append( *it );
if( !in.isEmpty() || !out.isEmpty() ) if( !in.isEmpty() || !out.isEmpty() )
{ {
@ -4226,12 +4226,12 @@ void Playlist::contentsWheelEvent( TQWheelEvent *e )
if( kClamp( dest, 0, int( m_nextTracks.count() ) - 1 ) != dest ) if( kClamp( dest, 0, int( m_nextTracks.count() ) - 1 ) != dest )
break; break;
PlaylistItem* const p = m_nextTracks.at( dest ); PlaylistItem* const p = m_nextTracks.at( dest );
if( changed.tqfindRef( p ) == -1 ) if( changed.findRef( p ) == -1 )
changed << p; changed << p;
if( changed.tqfindRef( m_nextTracks.at( dest - s ) ) == -1 ) if( changed.findRef( m_nextTracks.at( dest - s ) ) == -1 )
changed << m_nextTracks.at( dest - s ); changed << m_nextTracks.at( dest - s );
m_nextTracks.tqreplace( dest, m_nextTracks.at( dest - s ) ); m_nextTracks.replace( dest, m_nextTracks.at( dest - s ) );
m_nextTracks.tqreplace( dest - s, p ); m_nextTracks.replace( dest - s, p );
} }
for( int i = 0, n = changed.count(); i < n; ++i ) for( int i = 0, n = changed.count(); i < n; ++i )
@ -4330,7 +4330,7 @@ Playlist::setColumns( TQValueList<int> order, TQValueList<int> visible )
header()->moveSection( order[i], i ); header()->moveSection( order[i], i );
for( int i = 0; i < PlaylistItem::NUM_COLUMNS; ++i ) for( int i = 0; i < PlaylistItem::NUM_COLUMNS; ++i )
{ {
if( visible.tqcontains( i ) ) if( visible.contains( i ) )
adjustColumn( i ); adjustColumn( i );
else else
hideColumn( i ); hideColumn( i );
@ -4843,7 +4843,7 @@ Playlist::addCustomColumn()
const int index = addColumn( dialog.name(), 100 ); const int index = addColumn( dialog.name(), 100 );
TQStringList args = TQStringList::split( ' ', dialog.command() ); TQStringList args = TQStringList::split( ' ', dialog.command() );
TQStringList::Iterator pcf = args.tqfind( "%f" ); TQStringList::Iterator pcf = args.find( "%f" );
if ( pcf == args.end() ) { if ( pcf == args.end() ) {
//there is no %f, so add one on the end //there is no %f, so add one on the end
//TODO prolly this is confusing, instead ask the user if we should add one //TODO prolly this is confusing, instead ask the user if we should add one

@ -452,21 +452,21 @@ class Playlist : private KListView, public EngineObserver, public Amarok::ToolTi
: fieldString( ( item.*m_refGetter ) () ); : fieldString( ( item.*m_refGetter ) () );
} }
bool tqcontains( const FieldType &key ) { return tqcontains( fieldString( key ) ); } bool contains( const FieldType &key ) { return contains( fieldString( key ) ); }
// Just first match, or NULL // Just first match, or NULL
PlaylistItem *getFirst( const FieldType &field ) { PlaylistItem *getFirst( const FieldType &field ) {
Iterator it = tqfind( fieldString( field ) ); Iterator it = find( fieldString( field ) );
return it == end() || it.data().isEmpty() ? 0 : it.data().getFirst(); return it == end() || it.data().isEmpty() ? 0 : it.data().getFirst();
} }
void add( PlaylistItem *item ) { void add( PlaylistItem *item ) {
TQPtrList<PlaylistItem> &row = operator[]( keyOf( *item ) ); // adds one if needed TQPtrList<PlaylistItem> &row = operator[]( keyOf( *item ) ); // adds one if needed
if ( !row.tqcontainsRef(item) ) row.append( item ); if ( !row.containsRef(item) ) row.append( item );
} }
void remove( PlaylistItem *item ) { void remove( PlaylistItem *item ) {
Iterator it = tqfind( keyOf( *item ) ); Iterator it = find( keyOf( *item ) );
if (it != end()) { if (it != end()) {
while ( it.data().removeRef( item ) ) { }; while ( it.data().removeRef( item ) ) { };
if ( it.data().isEmpty() ) erase( it ); if ( it.data().isEmpty() ) erase( it );

@ -79,7 +79,7 @@ namespace Amarok {
foreach( path ) { foreach( path ) {
item = prox; item = prox;
TQString text( *it ); TQString text( *it );
text.tqreplace( escaped, sep ); text.replace( escaped, sep );
for ( ; item; item = item->nextSibling() ) { for ( ; item; item = item->nextSibling() ) {
if ( text == item->text(0) ) { if ( text == item->text(0) ) {
@ -101,7 +101,7 @@ namespace Amarok {
const static TQChar sep( '/' ); const static TQChar sep( '/' );
int bOffset = 0, sOffset = 0; int bOffset = 0, sOffset = 0;
int pos = path.tqfind( sep, bOffset ); int pos = path.find( sep, bOffset );
while ( pos != -1 ) { while ( pos != -1 ) {
if ( pos > sOffset && pos <= (int)path.length() ) { if ( pos > sOffset && pos <= (int)path.length() ) {
@ -111,7 +111,7 @@ namespace Amarok {
} }
} }
bOffset = pos + 1; bOffset = pos + 1;
pos = path.tqfind( sep, bOffset ); pos = path.find( sep, bOffset );
} }
int length = path.length() - 1; int length = path.length() - 1;
@ -602,13 +602,13 @@ void PlaylistBrowser::addLastFmCustomRadio( TQListViewItem *tqparent )
{ {
TQString token = LastFm::Controller::createCustomStation(); TQString token = LastFm::Controller::createCustomStation();
if( token.isEmpty() ) return; if( token.isEmpty() ) return;
token.tqreplace( "/", "%252" ); token.replace( "/", "%252" );
const TQString text = "lastfm://artistnames/" + token; const TQString text = "lastfm://artistnames/" + token;
const KURL url( text ); const KURL url( text );
TQString name = LastFm::Controller::stationDescription( text ); TQString name = LastFm::Controller::stationDescription( text );
name.tqreplace( "%252", "/" ); name.replace( "%252", "/" );
new LastFmEntry( tqparent, 0, url, name ); new LastFmEntry( tqparent, 0, url, name );
saveLastFm(); saveLastFm();
} }
@ -770,9 +770,9 @@ void PlaylistBrowser::updateSmartPlaylistElement( TQDomElement& query )
TQDomText text = child.toText(); TQDomText text = child.toText();
TQString sql = text.data(); TQString sql = text.data();
if ( selectFromSearch.search( sql ) != -1 ) if ( selectFromSearch.search( sql ) != -1 )
sql.tqreplace( selectFromSearch, "SELECT (*ListOfFields*) FROM" ); sql.replace( selectFromSearch, "SELECT (*ListOfFields*) FROM" );
if ( limitSearch.search( sql ) != -1 ) if ( limitSearch.search( sql ) != -1 )
sql.tqreplace( limitSearch, sql.replace( limitSearch,
TQString( "LIMIT %1 OFFSET %2").tqarg( limitSearch.capturedTexts()[2].toInt() ).tqarg( limitSearch.capturedTexts()[1].toInt() ) ); TQString( "LIMIT %1 OFFSET %2").tqarg( limitSearch.capturedTexts()[2].toInt() ).tqarg( limitSearch.capturedTexts()[1].toInt() ) );
text.setData( sql ); text.setData( sql );
@ -1043,7 +1043,7 @@ PlaylistBrowser::fixDynamicPlaylistPath( TQListViewItem *item )
TQString TQString
PlaylistBrowser::guessPathFromPlaylistName( TQString name ) PlaylistBrowser::guessPathFromPlaylistName( TQString name )
{ {
TQListViewItem *item = m_listview->tqfindItem( name, 0, TQt::ExactMatch ); TQListViewItem *item = m_listview->findItem( name, 0, TQt::ExactMatch );
PlaylistBrowserEntry *entry = dynamic_cast<PlaylistBrowserEntry*>( item ); PlaylistBrowserEntry *entry = dynamic_cast<PlaylistBrowserEntry*>( item );
if ( entry ) if ( entry )
return entry->name(); return entry->name();
@ -1173,7 +1173,7 @@ DEBUG_BLOCK
{ {
PlaylistCategory *tqparent = p; PlaylistCategory *tqparent = p;
const int parentId = (*it).parentId(); const int parentId = (*it).parentId();
if( parentId > 0 && folderMap.tqfind( parentId ) != folderMap.end() ) if( parentId > 0 && folderMap.find( parentId ) != folderMap.end() )
tqparent = folderMap[parentId]; tqparent = folderMap[parentId];
channel = new PodcastChannel( tqparent, channel, *it ); channel = new PodcastChannel( tqparent, channel, *it );
@ -1210,7 +1210,7 @@ DEBUG_BLOCK
const bool isOpen = ( (*++it) == CollectionDB::instance()->boolT() ? true : false ); const bool isOpen = ( (*++it) == CollectionDB::instance()->boolT() ? true : false );
PlaylistCategory *tqparent = p; PlaylistCategory *tqparent = p;
if( parentId > 0 && folderMap.tqfind( parentId ) != folderMap.end() ) if( parentId > 0 && folderMap.find( parentId ) != folderMap.end() )
tqparent = folderMap[parentId]; tqparent = folderMap[parentId];
folder = new PlaylistCategory( tqparent, folder, t, id ); folder = new PlaylistCategory( tqparent, folder, t, id );
@ -1927,7 +1927,7 @@ void PlaylistBrowser::savePlaylist( PlaylistEntry *item )
PlaylistBrowserEntry * PlaylistBrowserEntry *
PlaylistBrowser::findItem( TQString &t, int c ) const PlaylistBrowser::findItem( TQString &t, int c ) const
{ {
return static_cast<PlaylistBrowserEntry *>( m_listview->tqfindItem( t, c, TQt::ExactMatch ) ); return static_cast<PlaylistBrowserEntry *>( m_listview->findItem( t, c, TQt::ExactMatch ) );
} }
bool PlaylistBrowser::createPlaylist( TQListViewItem *tqparent, bool current, TQString title ) bool PlaylistBrowser::createPlaylist( TQListViewItem *tqparent, bool current, TQString title )
@ -2778,7 +2778,7 @@ void PlaylistBrowserView::mousePressed( int button, TQListViewItem *item, const
TQRect itemrect = tqitemRect( item ); TQRect itemrect = tqitemRect( item );
TQRect expandRect = TQRect( 4, itemrect.y() + (item->height()/2) - 5, 15, 15 ); TQRect expandRect = TQRect( 4, itemrect.y() + (item->height()/2) - 5, 15, 15 );
if( expandRect.tqcontains( p ) ) { //expand symbol clicked if( expandRect.contains( p ) ) { //expand symbol clicked
setOpen( item, !item->isOpen() ); setOpen( item, !item->isOpen() );
return; return;
} }
@ -3226,7 +3226,7 @@ InfoPane::setInfo( const TQString &title, const TQString &info )
toggle( !(info.isEmpty() && title.isEmpty()) ); toggle( !(info.isEmpty() && title.isEmpty()) );
TQString info_ = info; TQString info_ = info;
info_.tqreplace( "\n", "<br/>" ); info_.replace( "\n", "<br/>" );
m_infoBrowser->set( m_infoBrowser->set(
m_enable ? m_enable ?

@ -378,14 +378,14 @@ fileBaseName( const TQString &filePath )
{ {
// this function returns the file name without extension // this function returns the file name without extension
// (e.g. if the file path is "/home/user/playlist.m3u", "playlist" is returned // (e.g. if the file path is "/home/user/playlist.m3u", "playlist" is returned
TQString fileName = filePath.right( filePath.length() - filePath.tqfindRev( '/' ) - 1 ); TQString fileName = filePath.right( filePath.length() - filePath.findRev( '/' ) - 1 );
return fileName.mid( 0, fileName.tqfindRev( '.' ) ); return fileName.mid( 0, fileName.findRev( '.' ) );
} }
inline TQString inline TQString
fileDirPath( const TQString &filePath ) fileDirPath( const TQString &filePath )
{ {
return filePath.left( filePath.tqfindRev( '/' )+1 ); return filePath.left( filePath.findRev( '/' )+1 );
} }

@ -600,7 +600,7 @@ PlaylistEntry::PlaylistEntry( TQListViewItem *tqparent, TQListViewItem *after, c
if( title.isEmpty() ) if( title.isEmpty() )
{ {
title = fileBaseName( m_url.path() ); title = fileBaseName( m_url.path() );
title.tqreplace( '_', ' ' ); title.replace( '_', ' ' );
} }
setText( 0, title ); setText( 0, title );
@ -687,7 +687,7 @@ void PlaylistEntry::insertTracks( TQListViewItem *after, TQValueList<MetaBundle>
{ {
int pos = 0; int pos = 0;
if( after ) { if( after ) {
pos = m_trackList.tqfind( static_cast<PlaylistTrackItem*>(after)->trackInfo() ) + 1; pos = m_trackList.find( static_cast<PlaylistTrackItem*>(after)->trackInfo() ) + 1;
if( pos == -1 ) if( pos == -1 )
return; return;
} }
@ -756,7 +756,7 @@ void PlaylistEntry::customEvent( TQCustomEvent *e )
if ( str.isEmpty() ) if ( str.isEmpty() )
str = fileBaseName( m_url.path() ); str = fileBaseName( m_url.path() );
str.tqreplace( '_', ' ' ); str.replace( '_', ' ' );
setText( 0, str ); setText( 0, str );
foreachType( BundleList, playlist->bundles ) foreachType( BundleList, playlist->bundles )
@ -1062,7 +1062,7 @@ PlaylistTrackItem::PlaylistTrackItem( TQListViewItem *tqparent, TQListViewItem *
PlaylistEntry *p = dynamic_cast<PlaylistEntry *>(tqparent); PlaylistEntry *p = dynamic_cast<PlaylistEntry *>(tqparent);
if(!p) if(!p)
debug() << "tqparent: " << tqparent << " is not a PlaylistEntry" << endl; debug() << "tqparent: " << tqparent << " is not a PlaylistEntry" << endl;
if( p && p->text( 0 ).tqcontains( info->artist() ) ) if( p && p->text( 0 ).contains( info->artist() ) )
setText( 0, info->title() ); setText( 0, info->title() );
else else
setText( 0, i18n("%1 - %2").tqarg( info->artist(), info->title() ) ); setText( 0, i18n("%1 - %2").tqarg( info->artist(), info->title() ) );
@ -3045,7 +3045,7 @@ SmartPlaylist::SmartPlaylist( TQListViewItem *tqparent, TQListViewItem *after, c
int SmartPlaylist::length() int SmartPlaylist::length()
{ {
TQString sql = query(); TQString sql = query();
sql.tqreplace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM"); sql.replace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM");
CollectionDB *db = CollectionDB::instance(); CollectionDB *db = CollectionDB::instance();
TQStringList result = db->query( sql ); TQStringList result = db->query( sql );
@ -3087,7 +3087,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
} }
foreach( genres ) { foreach( genres ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
TQString(queryChildren).tqreplace( TQString(queryChildren).replace(
"(*ExpandString*)", *it) ); "(*ExpandString*)", *it) );
} }
} }
@ -3097,7 +3097,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
} }
foreach( artists ) { foreach( artists ) {
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ),
TQString(queryChildren).tqreplace( TQString(queryChildren).replace(
"(*ExpandString*)", *it) ); "(*ExpandString*)", *it) );
} }
} }
@ -3107,7 +3107,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
} }
foreach( composers ) { foreach( composers ) {
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ),
TQString(queryChildren).tqreplace( TQString(queryChildren).replace(
"(*ExpandString*)", *it) ); "(*ExpandString*)", *it) );
} }
} }
@ -3117,7 +3117,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
} }
foreach( albums ) { foreach( albums ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
TQString(queryChildren).tqreplace( TQString(queryChildren).replace(
"(*ExpandString*)", *it) ); "(*ExpandString*)", *it) );
} }
} }
@ -3127,7 +3127,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
} }
foreach( years ) { foreach( years ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
TQString(queryChildren).tqreplace( TQString(queryChildren).replace(
"(*ExpandString*)", *it) ); "(*ExpandString*)", *it) );
} }
} }
@ -3136,7 +3136,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
labels = CollectionDB::instance()->labelList(); labels = CollectionDB::instance()->labelList();
} }
foreach( labels ) { foreach( labels ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), TQString(queryChildren).tqreplace("(*ExpandString*)", *it) ); m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), TQString(queryChildren).replace("(*ExpandString*)", *it) );
} }
} }
} }
@ -3148,10 +3148,10 @@ TQString SmartPlaylist::query()
if ( m_sqlForTags.isEmpty() ) m_sqlForTags = xmlToQuery( m_xml ); if ( m_sqlForTags.isEmpty() ) m_sqlForTags = xmlToQuery( m_xml );
// duplicate string, thread-safely (TQDeepCopy is not thread-safe) // duplicate string, thread-safely (TQDeepCopy is not thread-safe)
return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() ) return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() )
.tqreplace( "(*CurrentTimeT*)" , .replace( "(*CurrentTimeT*)" ,
TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) ) TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) )
.tqreplace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() ) .replace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() )
.tqreplace( "(*MountedDeviceSelection*)" , .replace( "(*MountedDeviceSelection*)" ,
CollectionDB::instance()->deviceidSelection() ); CollectionDB::instance()->deviceidSelection() );
} }
@ -3246,7 +3246,7 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */)
} }
if ( condition == i18n( "tqcontains" ) ) if ( condition == i18n( "contains" ) )
qb.addFilter( table, value, filters[0] ); qb.addFilter( table, value, filters[0] );
else if ( condition == i18n( "does not contain" ) ) else if ( condition == i18n( "does not contain" ) )
qb.excludeFilter( table, value, filters[0]) ; qb.excludeFilter( table, value, filters[0]) ;
@ -3377,8 +3377,8 @@ bool SmartPlaylist::isTimeOrdered()
const TQString sql = query(); const TQString sql = query();
return ! ( ( sql.tqfind( createDate, false ) == -1 ) /*not create ordered*/ && return ! ( ( sql.find( createDate, false ) == -1 ) /*not create ordered*/ &&
( sql.tqfind( accessDate, false ) == -1 ) /*not access ordered*/ ); ( sql.find( accessDate, false ) == -1 ) /*not access ordered*/ );
} }
void SmartPlaylist::slotDoubleClicked() void SmartPlaylist::slotDoubleClicked()
@ -3581,7 +3581,7 @@ void ShoutcastBrowser::doneGenreDownload( KIO::Job *job, const KURL &from, const
{ {
TQDomElement e = n.toElement(); // try to convert the node to an element. TQDomElement e = n.toElement(); // try to convert the node to an element.
const TQString name = e.attribute( "name" ); const TQString name = e.attribute( "name" );
if( !name.isNull() && !bannedGenres.tqcontains( name.lower() ) && !genreMapping.tqcontains( name ) ) if( !name.isNull() && !bannedGenres.contains( name.lower() ) && !genreMapping.contains( name ) )
{ {
last = new ShoutcastGenre( this, last, name ); last = new ShoutcastGenre( this, last, name );
genreCache[ name ] = last; // so we can append genres later if needed genreCache[ name ] = last; // so we can append genres later if needed
@ -3620,7 +3620,7 @@ ShoutcastGenre::ShoutcastGenre( ShoutcastBrowser *browser, TQListViewItem *after
{ {
setExpandable( true ); setExpandable( true );
setKept( false ); setKept( false );
m_genre = genre.tqreplace( "&", "%26" ); //fix & m_genre = genre.replace( "&", "%26" ); //fix &
} }
void ShoutcastGenre::slotDoubleClicked() void ShoutcastGenre::slotDoubleClicked()
@ -3712,7 +3712,7 @@ void ShoutcastGenre::doneListDownload( KIO::Job *job, const KURL &from, const KU
TQDomElement e = n.toElement(); // try to convert the node to an element. TQDomElement e = n.toElement(); // try to convert the node to an element.
if( e.hasAttribute( "name" ) ) if( e.hasAttribute( "name" ) )
{ {
if( !e.attribute( "name" ).isNull() && ! m_stations.tqcontains( e.attribute( "name" ) ) ) if( !e.attribute( "name" ).isNull() && ! m_stations.contains( e.attribute( "name" ) ) )
{ {
m_stations << e.attribute( "name" ); m_stations << e.attribute( "name" );
StreamEntry* entry = new StreamEntry( this, this, StreamEntry* entry = new StreamEntry( this, this,

@ -508,7 +508,7 @@ class StreamEditor : public KDialogBase
StreamEditor( TQWidget *tqparent, const TQString &title, const TQString &url, bool readonly = false ); StreamEditor( TQWidget *tqparent, const TQString &title, const TQString &url, bool readonly = false );
KURL url() const { return KURL( m_urlLineEdit->text() ); } KURL url() const { return KURL( m_urlLineEdit->text() ); }
TQString name() const { return m_nameLineEdit->text().tqreplace( "\n", " " ); } TQString name() const { return m_nameLineEdit->text().replace( "\n", " " ); }
private: private:
KLineEdit *m_urlLineEdit; KLineEdit *m_urlLineEdit;

@ -213,7 +213,7 @@ bool PlaylistItem::isQueued() const
int PlaylistItem::queuePosition() const int PlaylistItem::queuePosition() const
{ {
return listView()->m_nextTracks.tqfindRef( this ); return listView()->m_nextTracks.findRef( this );
} }
void PlaylistItem::setEnabled() void PlaylistItem::setEnabled()
@ -410,7 +410,7 @@ PlaylistItem::nextInAlbum() const
{ {
if( !m_album ) if( !m_album )
return 0; return 0;
const int index = m_album->tracks.tqfindRef( this ); const int index = m_album->tracks.findRef( this );
if( index == int(m_album->tracks.count() - 1) ) if( index == int(m_album->tracks.count() - 1) )
return 0; return 0;
if( index != -1 ) if( index != -1 )
@ -434,7 +434,7 @@ PlaylistItem::prevInAlbum() const
{ {
if( !m_album ) if( !m_album )
return 0; return 0;
const int index = m_album->tracks.tqfindRef( this ); const int index = m_album->tracks.findRef( this );
if( index == 0 ) if( index == 0 )
return 0; return 0;
if( index != -1 ) if( index != -1 )
@ -576,7 +576,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
} }
// Determine if we need to tqrepaint the pixmap, or paint from cache // Determine if we need to tqrepaint the pixmap, or paint from cache
if ( paintCache[column].map.tqfind( colorKey ) == paintCache[column].map.end() ) if ( paintCache[column].map.find( colorKey ) == paintCache[column].map.end() )
{ {
// Update painting cache // Update painting cache
paintCache[column].width = width; paintCache[column].width = width;
@ -762,7 +762,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
} }
} }
/// Track action symbols /// Track action symbols
const int queue = listView()->m_nextTracks.tqfindRef( this ) + 1; const int queue = listView()->m_nextTracks.findRef( this ) + 1;
const bool stop = ( this == listView()->m_stopAfterTrack ); const bool stop = ( this == listView()->m_stopAfterTrack );
const bool repeat = Amarok::repeatTrack() && isCurrent; const bool repeat = Amarok::repeatTrack() && isCurrent;
@ -1001,7 +1001,7 @@ void PlaylistItem::refAlbum()
{ {
if( Amarok::entireAlbums() ) if( Amarok::entireAlbums() )
{ {
if( listView()->m_albums[artist_album()].tqfind( album() ) == listView()->m_albums[artist_album()].end() ) if( listView()->m_albums[artist_album()].find( album() ) == listView()->m_albums[artist_album()].end() )
listView()->m_albums[artist_album()][album()] = new PlaylistAlbum; listView()->m_albums[artist_album()][album()] = new PlaylistAlbum;
m_album = listView()->m_albums[artist_album()][album()]; m_album = listView()->m_albums[artist_album()][album()];
m_album->refcount++; m_album->refcount++;
@ -1053,10 +1053,10 @@ void PlaylistItem::incrementTotals()
TQ_INT64 total = m_album->total * prevCount; TQ_INT64 total = m_album->total * prevCount;
total += totalIncrementAmount(); total += totalIncrementAmount();
m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() ); m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() );
if( listView()->m_prevAlbums.tqfindRef( m_album ) == -1 ) if( listView()->m_prevAlbums.findRef( m_album ) == -1 )
listView()->m_total = listView()->m_total - prevTotal + m_album->total; listView()->m_total = listView()->m_total - prevTotal + m_album->total;
} }
else if( listView()->m_prevTracks.tqfindRef( this ) == -1 ) else if( listView()->m_prevTracks.findRef( this ) == -1 )
listView()->m_total += totalIncrementAmount(); listView()->m_total += totalIncrementAmount();
} }
@ -1070,10 +1070,10 @@ void PlaylistItem::decrementTotals()
warning() << "Unable to remove myself from m_album" << endl; warning() << "Unable to remove myself from m_album" << endl;
total -= totalIncrementAmount(); total -= totalIncrementAmount();
m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() ); m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() );
if( listView()->m_prevAlbums.tqfindRef( m_album ) == -1 ) if( listView()->m_prevAlbums.findRef( m_album ) == -1 )
listView()->m_total = listView()->m_total - prevTotal + m_album->total; listView()->m_total = listView()->m_total - prevTotal + m_album->total;
} }
else if( listView()->m_prevTracks.tqfindRef( this ) == -1 ) else if( listView()->m_prevTracks.findRef( this ) == -1 )
listView()->m_total -= totalIncrementAmount(); listView()->m_total -= totalIncrementAmount();
} }

@ -135,7 +135,7 @@ UrlLoader::UrlLoader( const KURL::List &urls, TQListViewItem *after, int options
// url looks like media:/device/path // url looks like media:/device/path
DCOPRef mediamanager( "kded", "mediamanager" ); DCOPRef mediamanager( "kded", "mediamanager" );
TQString device = path.mid( 1 ); // remove first slash TQString device = path.mid( 1 ); // remove first slash
const int slash = device.tqfind( '/' ); const int slash = device.find( '/' );
const TQString filePath = device.mid( slash ); // extract relative path const TQString filePath = device.mid( slash ); // extract relative path
device = device.left( slash ); // extract device device = device.left( slash ); // extract device
DCOPReply reply = mediamanager.call( "properties(TQString)", device ); DCOPReply reply = mediamanager.call( "properties(TQString)", device );
@ -285,7 +285,7 @@ UrlLoader::customEvent( TQCustomEvent *e)
// Append foo values and replace with correct values later. // Append foo values and replace with correct values later.
m_nextTracks.append( item ); m_nextTracks.append( item );
m_nextTracks.tqreplace( (*it).queue - 1, item ); m_nextTracks.replace( (*it).queue - 1, item );
} }
} }
if( (*it).stopafter ) if( (*it).stopafter )
@ -312,7 +312,7 @@ UrlLoader::completeJob()
TQPtrListIterator<PlaylistItem> it( newQueue ); TQPtrListIterator<PlaylistItem> it( newQueue );
PLItemList added; PLItemList added;
for( it.toFirst(); *it; ++it ) for( it.toFirst(); *it; ++it )
if( !m_oldQueue.tqcontainsRef( *it ) ) if( !m_oldQueue.containsRef( *it ) )
added << (*it); added << (*it);
if( !added.isEmpty() ) if( !added.isEmpty() )
@ -558,7 +558,7 @@ PlaylistFile::PlaylistFile( const TQString &path )
bool bool
PlaylistFile::loadM3u( TQTextStream &stream ) PlaylistFile::loadM3u( TQTextStream &stream )
{ {
const TQString directory = m_path.left( m_path.tqfindRev( '/' ) + 1 ); const TQString directory = m_path.left( m_path.findRev( '/' ) + 1 );
MetaBundle b; MetaBundle b;
for( TQString line; !stream.atEnd(); ) for( TQString line; !stream.atEnd(); )
@ -630,7 +630,7 @@ PlaylistFile::loadPls( TQTextStream &stream )
continue; continue;
lines.append(tmp); lines.append(tmp);
if (tmp.tqcontains(regExp_File)) { if (tmp.contains(regExp_File)) {
entryCnt++; entryCnt++;
continue; continue;
} }
@ -638,7 +638,7 @@ PlaylistFile::loadPls( TQTextStream &stream )
havePlaylistSection = true; havePlaylistSection = true;
continue; continue;
} }
if (tmp.tqcontains(regExp_NumberOfEntries)) { if (tmp.contains(regExp_NumberOfEntries)) {
numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt(); numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt();
continue; continue;
} }
@ -675,7 +675,7 @@ PlaylistFile::loadPls( TQTextStream &stream )
inPlaylistSection = true; inPlaylistSection = true;
continue; continue;
} }
if ((*i).tqcontains(regExp_File)) { if ((*i).contains(regExp_File)) {
// Have a "File#=XYZ" line. // Have a "File#=XYZ" line.
index = loadPls_extractIndex(*i); index = loadPls_extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -686,7 +686,7 @@ PlaylistFile::loadPls( TQTextStream &stream )
m_bundles[index - 1].setTitle(tmp); m_bundles[index - 1].setTitle(tmp);
continue; continue;
} }
if ((*i).tqcontains(regExp_Title)) { if ((*i).contains(regExp_Title)) {
// Have a "Title#=XYZ" line. // Have a "Title#=XYZ" line.
index = loadPls_extractIndex(*i); index = loadPls_extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -695,7 +695,7 @@ PlaylistFile::loadPls( TQTextStream &stream )
m_bundles[index - 1].setTitle(tmp); m_bundles[index - 1].setTitle(tmp);
continue; continue;
} }
if ((*i).tqcontains(regExp_Length)) { if ((*i).contains(regExp_Length)) {
// Have a "Length#=XYZ" line. // Have a "Length#=XYZ" line.
index = loadPls_extractIndex(*i); index = loadPls_extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -705,11 +705,11 @@ PlaylistFile::loadPls( TQTextStream &stream )
Q_ASSERT(ok); Q_ASSERT(ok);
continue; continue;
} }
if ((*i).tqcontains(regExp_NumberOfEntries)) { if ((*i).contains(regExp_NumberOfEntries)) {
// Have the "NumberOfEntries=#" line. // Have the "NumberOfEntries=#" line.
continue; continue;
} }
if ((*i).tqcontains(regExp_Version)) { if ((*i).contains(regExp_Version)) {
// Have the "Version=#" line. // Have the "Version=#" line.
tmp = TQString((*i).section('=', 1)).stripWhiteSpace(); tmp = TQString((*i).section('=', 1)).stripWhiteSpace();
// We only support Version=2 // We only support Version=2
@ -829,7 +829,7 @@ PlaylistFile::loadASX( TQTextStream &stream )
TQRegExp ex("(<[/]?[^>]*[A-Z]+[^>]*>)"); TQRegExp ex("(<[/]?[^>]*[A-Z]+[^>]*>)");
ex.setCaseSensitive(true); ex.setCaseSensitive(true);
while ( (ex.search(content)) != -1 ) while ( (ex.search(content)) != -1 )
content.tqreplace(ex.cap( 1 ), TQString(ex.cap( 1 )).lower()); content.replace(ex.cap( 1 ), TQString(ex.cap( 1 )).lower());
if (!doc.setContent(content, &errorMsg, &errorLine, &errorColumn)) if (!doc.setContent(content, &errorMsg, &errorLine, &errorColumn))
@ -982,7 +982,7 @@ RemotePlaylistFetcher::RemotePlaylistFetcher( const KURL &source, TQListViewItem
{ {
//We keep the extension so the UrlLoader knows what file type it is //We keep the extension so the UrlLoader knows what file type it is
const TQString path = source.path(); const TQString path = source.path();
m_temp = new KTempFile( TQString() /*use default prefix*/, path.mid( path.tqfindRev( '.' ) ) ); m_temp = new KTempFile( TQString() /*use default prefix*/, path.mid( path.findRev( '.' ) ) );
m_temp->setAutoDelete( true ); m_temp->setAutoDelete( true );
m_destination.setPath( m_temp->name() ); m_destination.setPath( m_temp->name() );

@ -151,7 +151,7 @@ namespace ConfigDynamic
void loadDynamicMode( DynamicMode* saveMe, NewDynamic* dialog ) void loadDynamicMode( DynamicMode* saveMe, NewDynamic* dialog )
{ {
saveMe->setTitle( dialog->m_name->text().tqreplace( "\n", " " ) ); saveMe->setTitle( dialog->m_name->text().replace( "\n", " " ) );
saveMe->setCycleTracks( dialog->m_cycleTracks->isChecked() ); saveMe->setCycleTracks( dialog->m_cycleTracks->isChecked() );
saveMe->setUpcomingCount( dialog->m_upcomingIntSpinBox->value() ); saveMe->setUpcomingCount( dialog->m_upcomingIntSpinBox->value() );
saveMe->setPreviousCount( dialog->m_previousIntSpinBox->value() ); saveMe->setPreviousCount( dialog->m_previousIntSpinBox->value() );
@ -172,7 +172,7 @@ namespace ConfigDynamic
void addDynamic( NewDynamic* dialog ) void addDynamic( NewDynamic* dialog )
{ {
TQListViewItem *tqparent = PlaylistBrowser::instance()->getDynamicCategory(); TQListViewItem *tqparent = PlaylistBrowser::instance()->getDynamicCategory();
DynamicEntry *saveMe = new DynamicEntry( tqparent, 0, dialog->m_name->text().tqreplace( "\n", " " ) ); DynamicEntry *saveMe = new DynamicEntry( tqparent, 0, dialog->m_name->text().replace( "\n", " " ) );
saveMe->setAppendType( DynamicMode::CUSTOM ); saveMe->setAppendType( DynamicMode::CUSTOM );
loadDynamicMode( saveMe, dialog ); loadDynamicMode( saveMe, dialog );
@ -210,10 +210,10 @@ void SelectionListItem::stateChange( bool b )
TQString TQString
SelectionListItem::name() const SelectionListItem::name() const
{ {
TQString fullName = text(0).tqreplace('/', "\\/"); TQString fullName = text(0).replace('/', "\\/");
TQListViewItem *p = tqparent(); TQListViewItem *p = tqparent();
while ( p ) { while ( p ) {
fullName.prepend( p->text(0).tqreplace('/', "\\/") + "/" ); fullName.prepend( p->text(0).replace('/', "\\/") + "/" );
p = p->tqparent(); p = p->tqparent();
} }
return fullName; return fullName;

@ -707,7 +707,7 @@ bool PlaylistWindow::eventFilter( TQObject *o, TQEvent *e )
for( It it( pl, It::Visible ); PlaylistItem *x = static_cast<PlaylistItem*>( *it ); ++it ) for( It it( pl, It::Visible ); PlaylistItem *x = static_cast<PlaylistItem*>( *it ); ++it )
{ {
pl->queue( x, true ); pl->queue( x, true );
( pl->m_nextTracks.tqcontains( x ) ? in : out ).append( x ); ( pl->m_nextTracks.contains( x ) ? in : out ).append( x );
} }
else else
{ {

@ -25,7 +25,7 @@ Plugin::addPluginProperty( const TQString& key, const TQString& value )
TQString TQString
Plugin::pluginProperty( const TQString& key ) Plugin::pluginProperty( const TQString& key )
{ {
if ( m_properties.tqfind( key.lower() ) == m_properties.end() ) if ( m_properties.find( key.lower() ) == m_properties.end() )
return "false"; return "false";
return m_properties[key.lower()]; return m_properties[key.lower()];
@ -35,7 +35,7 @@ Plugin::pluginProperty( const TQString& key )
bool bool
Plugin::hasPluginProperty( const TQString& key ) Plugin::hasPluginProperty( const TQString& key )
{ {
return m_properties.tqfind( key.lower() ) != m_properties.end(); return m_properties.find( key.lower() ) != m_properties.end();
} }
} }

@ -371,7 +371,7 @@ QueueManager::addItems( TQListViewItem *after )
#define item static_cast<PlaylistItem*>(item) #define item static_cast<PlaylistItem*>(item)
TQValueList<PlaylistItem*> current = m_map.values(); TQValueList<PlaylistItem*> current = m_map.values();
if( current.tqfind( item ) == current.end() ) //avoid duplication if( current.find( item ) == current.end() ) //avoid duplication
{ {
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() ); TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
@ -401,20 +401,20 @@ QueueManager::addQueuedItem( PlaylistItem *item )
Playlist *pl = Playlist::instance(); Playlist *pl = Playlist::instance();
if( !pl ) return; //should never happen if( !pl ) return; //should never happen
const int index = pl->m_nextTracks.tqfindRef( item ); const int index = pl->m_nextTracks.findRef( item );
TQListViewItem *after; TQListViewItem *after;
if( !index ) after = 0; if( !index ) after = 0;
else else
{ {
int tqfind = m_listview->childCount(); int find = m_listview->childCount();
if( index - 1 <= tqfind ) if( index - 1 <= find )
tqfind = index - 1; find = index - 1;
after = m_listview->itemAtIndex( tqfind ); after = m_listview->itemAtIndex( find );
} }
TQValueList<PlaylistItem*> current = m_map.values(); TQValueList<PlaylistItem*> current = m_map.values();
TQValueListIterator<PlaylistItem*> newItem = current.tqfind( item ); TQValueListIterator<PlaylistItem*> newItem = current.find( item );
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() ); TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
@ -432,11 +432,11 @@ QueueManager::removeQueuedItem( PlaylistItem *item )
if( !pl ) return; //should never happen if( !pl ) return; //should never happen
TQValueList<PlaylistItem*> current = m_map.values(); TQValueList<PlaylistItem*> current = m_map.values();
TQValueListIterator<PlaylistItem*> newItem = current.tqfind( item ); TQValueListIterator<PlaylistItem*> newItem = current.find( item );
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() ); TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
TQListViewItem *removableItem = m_listview->tqfindItem( title, 0 ); TQListViewItem *removableItem = m_listview->findItem( title, 0 );
if( removableItem ) if( removableItem )
{ {
@ -504,7 +504,7 @@ QueueManager::removeSelected() //SLOT
for( TQListViewItem *item = selected.first(); item; item = selected.next() ) for( TQListViewItem *item = selected.first(); item; item = selected.next() )
{ {
//Remove the key from the map, so we can re-queue the item //Remove the key from the map, so we can re-queue the item
TQMapIterator<TQListViewItem*, PlaylistItem*> it = m_map.tqfind( item ); TQMapIterator<TQListViewItem*, PlaylistItem*> it = m_map.find( item );
m_map.remove( it ); m_map.remove( it );

@ -141,7 +141,7 @@ ScanController::completeJob( void )
{ {
for( it = m_filesAdded.begin(); it != m_filesAdded.end(); ++it ) for( it = m_filesAdded.begin(); it != m_filesAdded.end(); ++it )
{ {
if( m_filesDeleted.tqcontains( it.key() ) ) if( m_filesDeleted.contains( it.key() ) )
m_filesDeleted.remove( it.key() ); m_filesDeleted.remove( it.key() );
} }
for( it = m_filesAdded.begin(); it != m_filesAdded.end(); ++it ) for( it = m_filesAdded.begin(); it != m_filesAdded.end(); ++it )

@ -245,7 +245,7 @@ ScriptManager::~ScriptManager()
bool bool
ScriptManager::runScript( const TQString& name, bool silent ) ScriptManager::runScript( const TQString& name, bool silent )
{ {
if( !m_scripts.tqcontains( name ) ) if( !m_scripts.contains( name ) )
return false; return false;
m_gui->listView->setCurrentItem( m_scripts[name].li ); m_gui->listView->setCurrentItem( m_scripts[name].li );
@ -256,7 +256,7 @@ ScriptManager::runScript( const TQString& name, bool silent )
bool bool
ScriptManager::stopScript( const TQString& name ) ScriptManager::stopScript( const TQString& name )
{ {
if( !m_scripts.tqcontains( name ) ) if( !m_scripts.contains( name ) )
return false; return false;
m_gui->listView->setCurrentItem( m_scripts[name].li ); m_gui->listView->setCurrentItem( m_scripts[name].li );
@ -288,7 +288,7 @@ ScriptManager::customMenuClicked( const TQString& message )
TQString TQString
ScriptManager::specForScript( const TQString& name ) ScriptManager::specForScript( const TQString& name )
{ {
if( !m_scripts.tqcontains( name ) ) if( !m_scripts.contains( name ) )
return TQString(); return TQString();
TQFileInfo info( m_scripts[name].url.path() ); TQFileInfo info( m_scripts[name].url.path() );
const TQString specPath = info.dirPath() + '/' + info.baseName( true ) + ".spec"; const TQString specPath = info.dirPath() + '/' + info.baseName( true ) + ".spec";
@ -370,7 +370,7 @@ ScriptManager::findScripts() //SLOT
{ {
foreach( runningScripts ) foreach( runningScripts )
if( m_scripts.tqcontains( *it ) ) { if( m_scripts.contains( *it ) ) {
debug() << "Auto-running script: " << *it << endl; debug() << "Auto-running script: " << *it << endl;
m_gui->listView->setCurrentItem( m_scripts[*it].li ); m_gui->listView->setCurrentItem( m_scripts[*it].li );
slotRunScript(); slotRunScript();
@ -515,7 +515,7 @@ ScriptManager::slotUninstallScript()
if( KMessageBox::warningContinueCancel( 0, i18n( "Are you sure you want to uninstall the script '%1'?" ).tqarg( name ), i18n("Uninstall Script"), i18n("Uninstall") ) == KMessageBox::Cancel ) if( KMessageBox::warningContinueCancel( 0, i18n( "Are you sure you want to uninstall the script '%1'?" ).tqarg( name ), i18n("Uninstall Script"), i18n("Uninstall") ) == KMessageBox::Cancel )
return; return;
if( m_scripts.tqfind( name ) == m_scripts.end() ) if( m_scripts.find( name ) == m_scripts.end() )
return; return;
KURL scriptDirURL( m_scripts[name].url.upURL() ); KURL scriptDirURL( m_scripts[name].url.upURL() );
@ -634,7 +634,7 @@ ScriptManager::slotStopScript()
const TQString name = li->text( 0 ); const TQString name = li->text( 0 );
// Just a sanity check // Just a sanity check
if( m_scripts.tqfind( name ) == m_scripts.end() ) if( m_scripts.find( name ) == m_scripts.end() )
return; return;
terminateProcess( &m_scripts[name].process ); terminateProcess( &m_scripts[name].process );

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -140,7 +140,7 @@ class Alarm( QApplication ):
string = QString( self.queue.get_nowait() ) string = QString( self.queue.get_nowait() )
print "[Alarm Script] Received notification: " + str( string ) print "[Alarm Script] Received notification: " + str( string )
if string.tqcontains( "configure" ): if string.contains( "configure" ):
self.configure() self.configure()
def configure( self ): def configure( self ):

@ -137,7 +137,7 @@ rmdir $WORK/amarok.livecd
mkdir $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists mkdir $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
chown 500:500 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists chown 500:500 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
tqfind $WORK/amarok.live/home/amarok/.kde/share/apps/ -type d -print0 | xargs -0 chmod +x find $WORK/amarok.live/home/amarok/.kde/share/apps/ -type d -print0 | xargs -0 chmod +x
chmod -R 777 $WORK/amarok.live/music/ chmod -R 777 $WORK/amarok.live/music/
chmod -R 777 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok chmod -R 777 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok
#chmod -R 777 $WORK/mklivecd/ #chmod -R 777 $WORK/mklivecd/

@ -237,12 +237,12 @@ class Remasterer( QApplication ):
string = QString(notification.string) string = QString(notification.string)
debug( "Received notification: " + str( string ) ) debug( "Received notification: " + str( string ) )
if string.tqcontains( "configure" ): if string.contains( "configure" ):
self.configure() self.configure()
if string.tqcontains( "stop"): if string.contains( "stop"):
self.stop() self.stop()
elif string.tqcontains( "customMenuClicked" ): elif string.contains( "customMenuClicked" ):
if "selected" in string: if "selected" in string:
self.copyTrack( string ) self.copyTrack( string )
elif "playlist" in string: elif "playlist" in string:
@ -353,10 +353,10 @@ class Remasterer( QApplication ):
# get the list of files. yes, its ugly. it works though. # get the list of files. yes, its ugly. it works though.
#files = event.split(":")[-1][2:-1].split()[2:] #files = event.split(":")[-1][2:-1].split()[2:]
#trying out a new one #trying out a new one
#files = event.split(":")[-1][3:-2].tqreplace("\"Amarok live!\" \"add to livecd\" ", "").split("\" \"") #files = event.split(":")[-1][3:-2].replace("\"Amarok live!\" \"add to livecd\" ", "").split("\" \"")
#and another #and another
files = event.tqreplace("customMenuClicked: Amarok live Add selected to livecd", "").split() files = event.replace("customMenuClicked: Amarok live Add selected to livecd", "").split()
allfiles = "" allfiles = ""
for file in files: for file in files:

@ -1092,7 +1092,7 @@ class ServiceInfo(object):
index += length index += length
for s in strs: for s in strs:
eindex = s.tqfind('=') eindex = s.find('=')
if eindex == -1: if eindex == -1:
# No equals sign at all # No equals sign at all
key = s key = s
@ -1417,7 +1417,7 @@ class Zeroconf(object):
while i < 3: while i < 3:
for record in self.cache.entriesWithName(info.type): for record in self.cache.entriesWithName(info.type):
if record.type == _TYPE_PTR and not record.isExpired(now) and record.alias == info.name: if record.type == _TYPE_PTR and not record.isExpired(now) and record.alias == info.name:
if (info.name.tqfind('.') < 0): if (info.name.find('.') < 0):
info.name = info.name + ".[" + info.address + ":" + info.port + "]." + info.type info.name = info.name + ".[" + info.address + ":" + info.port + "]." + info.type
self.checkService(info) self.checkService(info)
return return

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -28,7 +28,7 @@ def setId3v2Size( data, size )
end end
# #
# Unsynchronize the entire ID3-V2 tag, frame by frame (tqreplace 0xfff* with 0xff00f*) # Unsynchronize the entire ID3-V2 tag, frame by frame (replace 0xfff* with 0xff00f*)
# #
def unsynchronize( data ) def unsynchronize( data )
data[5] |= 0b10000000 # Set Unsychronization global tag flag data[5] |= 0b10000000 # Set Unsychronization global tag flag

@ -192,7 +192,7 @@ TQPtrList<EqualizerCircle>* circleList )
{ {
if(it->x() > x) if(it->x() > x)
{ {
index = m_circleList->tqfind(it); index = m_circleList->find(it);
//if(index != 0) //if(index != 0)
//{ //{
m_circleList->insert(index,this); m_circleList->insert(index,this);
@ -205,7 +205,7 @@ TQPtrList<EqualizerCircle>* circleList )
m_circleList->append(this); m_circleList->append(this);
//clean up the loose pointer for the line that was split //clean up the loose pointer for the line that was split
unsigned int circleIndex = m_circleList->tqfind(this); unsigned int circleIndex = m_circleList->find(this);
if(circleIndex > 0) if(circleIndex > 0)
m_circleList->at(circleIndex-1)->setLine(RIGHT,m_line1); m_circleList->at(circleIndex-1)->setLine(RIGHT,m_line1);
if(circleIndex < m_circleList->count()-1) if(circleIndex < m_circleList->count()-1)
@ -214,7 +214,7 @@ TQPtrList<EqualizerCircle>* circleList )
void EqualizerCircle::setLocation(const TQPoint &newLocation) void EqualizerCircle::setLocation(const TQPoint &newLocation)
{ {
unsigned int circleIndex = m_circleList->tqfind(this); unsigned int circleIndex = m_circleList->find(this);
double xMin, xMax; double xMin, xMax;
TQPoint correctedLoc(newLocation); TQPoint correctedLoc(newLocation);
if(m_line1 == 0 || m_line2 == 0) if(m_line1 == 0 || m_line2 == 0)

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -95,7 +95,7 @@ class Playlist:
def _setFullPage(self): def _setFullPage(self):
self.fullPage = self.code%(os.environ['LOGNAME'],(self._createTable()).encode(self.encoding,'tqreplace')) self.fullPage = self.code%(os.environ['LOGNAME'],(self._createTable()).encode(self.encoding,'replace'))
def _getMtime(self): def _getMtime(self):

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which tqcontains 0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program" refers to any such program or work, and a "work based on the Program"
@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include special exception, the source code distributed need not include

@ -120,22 +120,22 @@ class Test( QApplication ):
string = QString(notification.string) string = QString(notification.string)
debug( "Received notification: " + str( string ) ) debug( "Received notification: " + str( string ) )
if string.tqcontains( "configure" ): if string.contains( "configure" ):
self.configure() self.configure()
if string.tqcontains( "engineStateChange: play" ): if string.contains( "engineStateChange: play" ):
self.engineStatePlay() self.engineStatePlay()
if string.tqcontains( "engineStateChange: idle" ): if string.contains( "engineStateChange: idle" ):
self.engineStateIdle() self.engineStateIdle()
if string.tqcontains( "engineStateChange: pause" ): if string.contains( "engineStateChange: pause" ):
self.engineStatePause() self.engineStatePause()
if string.tqcontains( "engineStateChange: empty" ): if string.contains( "engineStateChange: empty" ):
self.engineStatePause() self.engineStatePause()
if string.tqcontains( "trackChange" ): if string.contains( "trackChange" ):
self.trackChange() self.trackChange()
# Notification callbacks. Implement these functions to react to specific notification # Notification callbacks. Implement these functions to react to specific notification

@ -237,9 +237,9 @@ class Playlist:
counter = "countdown(" + str(status.timeLeft()) + ");" counter = "countdown(" + str(status.timeLeft()) + ");"
self.fullPage = code % ( counter, self.fullPage = code % ( counter,
self._createActions(status).encode(self.encoding,'tqreplace'), self._createActions(status).encode(self.encoding,'replace'),
os.environ['LOGNAME'], os.environ['LOGNAME'],
self._createTable(status).encode(self.encoding,'tqreplace') ) self._createTable(status).encode(self.encoding,'replace') )
def _getMtime(self): def _getMtime(self):
"""gets the mtime from the current.xml file, to check if the current.xml """gets the mtime from the current.xml file, to check if the current.xml

@ -63,7 +63,7 @@ class AmaroktqStatus:
if self.playState != -1: if self.playState != -1:
res = self.playState == self.EnginePlay res = self.playState == self.EnginePlay
else: else:
res = string.tqfind(self.dcop_isplaying.result(), "true") >= 0 res = string.find(self.dcop_isplaying.result(), "true") >= 0
if res: if res:
self.playState = self.EnginePlay self.playState = self.EnginePlay
else: else:
@ -229,15 +229,15 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
# Surely there must be a better way that this:) # Surely there must be a better way that this:)
# #
self.send_response(200) self.send_response(200)
if string.tqfind(self.path, ".png") >= 0: if string.find(self.path, ".png") >= 0:
self.send_header("content-type","image/png") self.send_header("content-type","image/png")
self.end_headers() self.end_headers()
self._sendFile(self.path) self._sendFile(self.path)
elif string.tqfind(self.path, ".js") >= 0: elif string.find(self.path, ".js") >= 0:
self.send_header("content-type","text/plain") self.send_header("content-type","text/plain")
self.end_headers() self.end_headers()
self._sendFile(self.path) self._sendFile(self.path)
elif string.tqfind(self.path, ".css") >= 0: elif string.find(self.path, ".css") >= 0:
self.send_header("content-type","text/css") self.send_header("content-type","text/css")
self.end_headers() self.end_headers()
self._sendFile(self.path) self._sendFile(self.path)

@ -65,8 +65,8 @@ class ConfigDialog( QDialog ):
try: try:
config = ConfigParser.ConfigParser() config = ConfigParser.ConfigParser()
config.read( "webcontrolrc" ) config.read( "webcontrolrc" )
allowControl = string.tqfind(config.get( "General", "allowcontrol" ), "True") >= 0 allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0
publish = string.tqfind(config.get( "General", "publish" ), "True") >= 0 publish = string.find(config.get( "General", "publish" ), "True") >= 0
except: except:
pass pass
@ -159,8 +159,8 @@ class WebControl( QApplication ):
config.read( "webcontrolrc" ) config.read( "webcontrolrc" )
try: try:
RequestHandler.AmaroktqStatus.allowControl = string.tqfind(config.get( "General", "allowcontrol" ), "True") >= 0 RequestHandler.AmaroktqStatus.allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0
RequestHandler.AmaroktqStatus.publish = string.tqfind(config.get( "General", "publish" ), "True") >= 0 RequestHandler.AmaroktqStatus.publish = string.find(config.get( "General", "publish" ), "True") >= 0
except: except:
debug( "No config file found, using defaults." ) debug( "No config file found, using defaults." )
@ -198,25 +198,25 @@ class WebControl( QApplication ):
string = QString(notification.string) string = QString(notification.string)
debug( "Received notification: " + str( string ) ) debug( "Received notification: " + str( string ) )
if string.tqcontains( "configure" ): if string.contains( "configure" ):
self.configure() self.configure()
elif string.tqcontains( "exit" ): elif string.contains( "exit" ):
cleanup(None,None) cleanup(None,None)
elif string.tqcontains( "engineStateChange: play" ): elif string.contains( "engineStateChange: play" ):
self.engineStatePlay() self.engineStatePlay()
elif string.tqcontains( "engineStateChange: idle" ): elif string.contains( "engineStateChange: idle" ):
self.engineStateIdle() self.engineStateIdle()
elif string.tqcontains( "engineStateChange: pause" ): elif string.contains( "engineStateChange: pause" ):
self.engineStatePause() self.engineStatePause()
elif string.tqcontains( "engineStateChange: empty" ): elif string.contains( "engineStateChange: empty" ):
self.engineStatePause() self.engineStatePause()
elif string.tqcontains( "trackChange" ): elif string.contains( "trackChange" ):
self.trackChange() self.trackChange()
else: else:

@ -205,7 +205,7 @@ function setScrollInUrl(newUrl)
{ {
if (newUrl.match(/scroll=\d*/)) { if (newUrl.match(/scroll=\d*/)) {
return newUrl.tqreplace(/scroll=\d*/g, "scroll=" + getPageScroll()); return newUrl.replace(/scroll=\d*/g, "scroll=" + getPageScroll());
} else { } else {
if (newUrl.match(/\?/)) { if (newUrl.match(/\?/)) {
return newUrl + "&scroll=" + getPageScroll(); return newUrl + "&scroll=" + getPageScroll();

@ -712,7 +712,7 @@ void ScrobblerSubmitter::audioScrobblerHandshakeResult( KIO::Job* job ) //SLOT
// INTERVAL n (protocol 1.1) // INTERVAL n (protocol 1.1)
else if ( m_submitResultBuffer.startsWith( "FAILED" ) ) else if ( m_submitResultBuffer.startsWith( "FAILED" ) )
{ {
TQString reason = m_submitResultBuffer.mid( 0, m_submitResultBuffer.tqfind( "\n" ) ); TQString reason = m_submitResultBuffer.mid( 0, m_submitResultBuffer.find( "\n" ) );
if ( reason.length() > 6 ) if ( reason.length() > 6 )
reason = reason.mid( 7 ).stripWhiteSpace(); reason = reason.mid( 7 ).stripWhiteSpace();
@ -773,7 +773,7 @@ void ScrobblerSubmitter::audioScrobblerSubmitResult( KIO::Job* job ) //SLOT
// INTERVAL n (protocol 1.1) // INTERVAL n (protocol 1.1)
else if ( m_submitResultBuffer.startsWith( "FAILED" ) ) else if ( m_submitResultBuffer.startsWith( "FAILED" ) )
{ {
TQString reason = m_submitResultBuffer.mid( 0, m_submitResultBuffer.tqfind( "\n" ) ); TQString reason = m_submitResultBuffer.mid( 0, m_submitResultBuffer.find( "\n" ) );
if ( reason.length() > 6 ) if ( reason.length() > 6 )
reason = reason.mid( 7 ).stripWhiteSpace(); reason = reason.mid( 7 ).stripWhiteSpace();

@ -78,7 +78,7 @@ Amarok::Slider::mouseMoveEvent( TQMouseEvent *e )
//feels better, but using set value of 20 is bad of course //feels better, but using set value of 20 is bad of course
TQRect rect( -20, -20, width()+40, height()+40 ); TQRect rect( -20, -20, width()+40, height()+40 );
if ( orientation() == Qt::Horizontal && !rect.tqcontains( e->pos() ) ) { if ( orientation() == Qt::Horizontal && !rect.contains( e->pos() ) ) {
if ( !m_outside ) if ( !m_outside )
TQSlider::setValue( m_prevValue ); TQSlider::setValue( m_prevValue );
m_outside = true; m_outside = true;
@ -107,7 +107,7 @@ Amarok::Slider::mousePressEvent( TQMouseEvent *e )
m_sliding = true; m_sliding = true;
m_prevValue = TQSlider::value(); m_prevValue = TQSlider::value();
if ( !sliderRect().tqcontains( e->pos() ) ) if ( !sliderRect().contains( e->pos() ) )
mouseMoveEvent( e ); mouseMoveEvent( e );
} }

@ -123,7 +123,7 @@ SmartPlaylistEditor::SmartPlaylistEditor( TQWidget *tqparent, TQDomElement xml,
TQDomElement orderby = orderbyList.item(0).toElement(); // we only allow one orderby node TQDomElement orderby = orderbyList.item(0).toElement(); // we only allow one orderby node
//random is always the last one. //random is always the last one.
int dbfield = orderby.attribute( "field" ) == "random" ? m_dbFields.count() : m_dbFields.tqfindIndex( orderby.attribute( "field" ) ); int dbfield = orderby.attribute( "field" ) == "random" ? m_dbFields.count() : m_dbFields.findIndex( orderby.attribute( "field" ) );
m_orderCombo->setCurrentItem( dbfield ); m_orderCombo->setCurrentItem( dbfield );
updateOrderTypes( dbfield ); updateOrderTypes( dbfield );
@ -146,7 +146,7 @@ SmartPlaylistEditor::SmartPlaylistEditor( TQWidget *tqparent, TQDomElement xml,
m_expandCheck->setChecked( true ); m_expandCheck->setChecked( true );
TQDomElement expandby = expandbyList.item(0).toElement(); // we only allow one orderby node TQDomElement expandby = expandbyList.item(0).toElement(); // we only allow one orderby node
int dbfield = m_expandableFields.tqfindIndex( expandby.attribute( "field" ) ); int dbfield = m_expandableFields.findIndex( expandby.attribute( "field" ) );
m_expandCombo->setCurrentItem( dbfield ); m_expandCombo->setCurrentItem( dbfield );
} }
} }
@ -438,7 +438,7 @@ CriteriaEditor::CriteriaEditor( SmartPlaylistEditor *editor, TQWidget *tqparent,
} }
if ( !criteria.isNull() ) { if ( !criteria.isNull() ) {
int field = m_dbFields.tqfindIndex( criteria.attribute( "field" ) ); int field = m_dbFields.findIndex( criteria.attribute( "field" ) );
TQString condition = criteria.attribute("condition"); TQString condition = criteria.attribute("condition");
@ -683,7 +683,7 @@ TQString CriteriaEditor::getSearchCriteria()
}; };
if( criteria == i18n("tqcontains") ) if( criteria == i18n("contains") )
searchCriteria += CollectionDB::likeCondition( value, true, true ); searchCriteria += CollectionDB::likeCondition( value, true, true );
else if( criteria == i18n("does not contain") ) else if( criteria == i18n("does not contain") )
searchCriteria += " NOT " + CollectionDB::likeCondition( value, true, true ); searchCriteria += " NOT " + CollectionDB::likeCondition( value, true, true );
@ -816,20 +816,20 @@ void CriteriaEditor::slotFieldSelected( int field )
&& fs != "fdescfs" && fs != "fdescfs"
&& fs != "kernfs" && fs != "kernfs"
&& fs != "usbfs" && fs != "usbfs"
&& !fs.tqcontains( "proc" ) && !fs.contains( "proc" )
&& fs != "unknown" && fs != "unknown"
&& fs != "none" && fs != "none"
&& fs != "sunrpc" && fs != "sunrpc"
&& fs != "none" && fs != "none"
&& device != "tmpfs" && device != "tmpfs"
&& device.tqfind("shm") == -1 && device.find("shm") == -1
&& mountpoint != "/dev/swap" && mountpoint != "/dev/swap"
&& mountpoint != "/dev/pts" && mountpoint != "/dev/pts"
&& mountpoint.tqfind("/proc") != 0 && mountpoint.find("/proc") != 0
&& mountpoint.tqfind("/sys") != 0 && mountpoint.find("/sys") != 0
|| fs.tqfind( "smb" ) != -1 || fs.find( "smb" ) != -1
|| fs.tqfind( "cifs" ) != -1 || fs.find( "cifs" ) != -1
|| fs.tqfind( "nfs" ) != -1 || fs.find( "nfs" ) != -1
) )
items << mountpoint; items << mountpoint;
} }
@ -1003,7 +1003,7 @@ void CriteriaEditor::loadCriteriaList( int valueType, TQString condition )
switch( valueType ) { switch( valueType ) {
case String: case String:
case AutoCompletionString: case AutoCompletionString:
items << i18n( "tqcontains" ) << i18n( "does not contain" ) << i18n( "is" ) << i18n( "is not" ) items << i18n( "contains" ) << i18n( "does not contain" ) << i18n( "is" ) << i18n( "is not" )
<< i18n( "starts with" ) << i18n( "does not start with" ) << i18n( "starts with" ) << i18n( "does not start with" )
<< i18n( "ends with" ) << i18n( "does not end with" ); << i18n( "ends with" ) << i18n( "does not end with" );
break; break;
@ -1027,7 +1027,7 @@ void CriteriaEditor::loadCriteriaList( int valueType, TQString condition )
m_criteriaCombo->insertStringList( items ); m_criteriaCombo->insertStringList( items );
if ( !condition.isEmpty() ) { if ( !condition.isEmpty() ) {
int index = items.tqfindIndex( condition ); int index = items.findIndex( condition );
if (index!=-1) if (index!=-1)
m_criteriaCombo->setCurrentItem( index ); m_criteriaCombo->setCurrentItem( index );
} }

@ -35,7 +35,7 @@ Q_OBJECT
TQDomElement result(); TQDomElement result();
TQString name() const { return m_nameLineEdit->text().tqreplace( "\n", " " ); } TQString name() const { return m_nameLineEdit->text().replace( "\n", " " ); }
enum CriteriaType { criteriaAll = 0, criteriaAny = 1 }; enum CriteriaType { criteriaAll = 0, criteriaAny = 1 };

@ -3516,7 +3516,7 @@ typedef struct VdbeOpList VdbeOpList;
#define P3_KEYINFO_HANDOFF (-9) #define P3_KEYINFO_HANDOFF (-9)
/* /*
** The Vdbe.aColName array tqcontains 5n Mem structures, where n is the ** The Vdbe.aColName array contains 5n Mem structures, where n is the
** number of columns of data returned by the statement. ** number of columns of data returned by the statement.
*/ */
#define COLNAME_NAME 0 #define COLNAME_NAME 0
@ -4371,7 +4371,7 @@ typedef struct WhereLevel WhereLevel;
/* /*
** If using an alternative OS interface, then we must have an "os_other.h" ** If using an alternative OS interface, then we must have an "os_other.h"
** header file available for that interface. Presumably the "os_other.h" ** header file available for that interface. Presumably the "os_other.h"
** header file tqcontains #defines similar to those above. ** header file contains #defines similar to those above.
*/ */
#if OS_OTHER #if OS_OTHER
# include "os_other.h" # include "os_other.h"
@ -4410,7 +4410,7 @@ struct IoMethod {
/* /*
** The OsFile object describes an open disk file in an OS-dependent way. ** The OsFile object describes an open disk file in an OS-dependent way.
** The version of OsFile defined here is a generic version. Each OS ** The version of OsFile defined here is a generic version. Each OS
** implementation defines its own subclass of this structure that tqcontains ** implementation defines its own subclass of this structure that contains
** additional information needed to handle file I/O. But the pMethod ** additional information needed to handle file I/O. But the pMethod
** entry (pointing to the virtual function table) always occurs first ** entry (pointing to the virtual function table) always occurs first
** so that we can always find the appropriate methods. ** so that we can always find the appropriate methods.
@ -9499,7 +9499,7 @@ typedef struct Mem Mem;
#endif #endif
/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that tqcontains /* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
** additional information about auxiliary information bound to arguments ** additional information about auxiliary information bound to arguments
** of the function. This is used to implement the sqlite3_get_auxdata() ** of the function. This is used to implement the sqlite3_get_auxdata()
** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data ** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data
@ -13215,7 +13215,7 @@ STQLITE_PRIVATE int sqlite3GenericAllocationSize(void *p){ return 0; }
** **
** If you close a file descriptor that points to a file that has locks, ** If you close a file descriptor that points to a file that has locks,
** all locks on that file that are owned by the current process are ** all locks on that file that are owned by the current process are
** released. To work around this problem, each OsFile structure tqcontains ** released. To work around this problem, each OsFile structure contains
** a pointer to an openCnt structure. There is one openCnt structure ** a pointer to an openCnt structure. There is one openCnt structure
** per open inode, which means that multiple OsFiles can point to a single ** per open inode, which means that multiple OsFiles can point to a single
** openCnt. When an attempt is made to close an OsFile, if there are ** openCnt. When an attempt is made to close an OsFile, if there are
@ -22837,7 +22837,7 @@ struct BtLock {
/* /*
** The pointer map is a lookup table that identifies the tqparent page for ** The pointer map is a lookup table that identifies the tqparent page for
** each child page in the database file. The tqparent page is the page that ** each child page in the database file. The tqparent page is the page that
** contains a pointer to the child. Every page in the database tqcontains ** contains a pointer to the child. Every page in the database contains
** 0 or 1 tqparent pages. (In this context 'database page' refers ** 0 or 1 tqparent pages. (In this context 'database page' refers
** to any page that is not part of the pointer map itself.) Each pointer map ** to any page that is not part of the pointer map itself.) Each pointer map
** entry consists of a single byte 'type' and a 4 byte tqparent page number. ** entry consists of a single byte 'type' and a 4 byte tqparent page number.
@ -26464,7 +26464,7 @@ static int allocateBtreePage(
memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
} }
}else{ }else{
/* The trunk page is required by the caller but it tqcontains /* The trunk page is required by the caller but it contains
** pointers to free-list leaves. The first leaf becomes a trunk ** pointers to free-list leaves. The first leaf becomes a trunk
** page in this case. ** page in this case.
*/ */
@ -30627,7 +30627,7 @@ static int opcodeNoPush(u8 op){
** to grow the stack when it is executed. Otherwise, it may grow the ** to grow the stack when it is executed. Otherwise, it may grow the
** stack by at most one entry. ** stack by at most one entry.
** **
** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 tqcontains ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 contains
** one bit for opcodes 16 to 31, and so on. ** one bit for opcodes 16 to 31, and so on.
** **
** 16-bit bitmasks (rather than 32-bit) are specified in opcodes.h ** 16-bit bitmasks (rather than 32-bit) are specified in opcodes.h
@ -33655,7 +33655,7 @@ int sqlite3_max_blobsize = 0;
#define GetVarint(A,B) ((B = *(A))<=0x7f ? 1 : sqlite3GetVarint32(A, &B)) #define GetVarint(A,B) ((B = *(A))<=0x7f ? 1 : sqlite3GetVarint32(A, &B))
/* /*
** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains ** An ephemeral string value (signified by the MEM_Ephem flag) contains
** a pointer to a dynamically allocated string where some other entity ** a pointer to a dynamically allocated string where some other entity
** is responsible for deallocating that string. Because the stack entry ** is responsible for deallocating that string. Because the stack entry
** does not control the string, it might be deleted without the stack ** does not control the string, it might be deleted without the stack
@ -34114,7 +34114,7 @@ STQLITE_PRIVATE int sqlite3VdbeExec(
** case statement is followed by a comment of the form "/# same as ... #/" ** case statement is followed by a comment of the form "/# same as ... #/"
** that comment is used to determine the particular value of the opcode. ** that comment is used to determine the particular value of the opcode.
** **
** If a comment on the same line as the "case OP_" construction tqcontains ** If a comment on the same line as the "case OP_" construction contains
** the word "no-push", then the opcode is guarenteed not to grow the ** the word "no-push", then the opcode is guarenteed not to grow the
** vdbe stack when it is executed. See function opcode() in ** vdbe stack when it is executed. See function opcode() in
** vdbeaux.c for details. ** vdbeaux.c for details.
@ -38939,7 +38939,7 @@ int sqlite3_blob_open(
if( rc==STQLITE_ROW ){ if( rc==STQLITE_ROW ){
/* The row-record has been opened successfully. Check that the /* The row-record has been opened successfully. Check that the
** column in question contains text or a blob. If it tqcontains ** column in question contains text or a blob. If it contains
** text, it is up to the caller to get the encoding right. ** text, it is up to the caller to get the encoding right.
*/ */
Incrblob *pBlob; Incrblob *pBlob;
@ -44378,7 +44378,7 @@ STQLITE_PRIVATE void sqlite3AddNotNull(Parse *pParse, int onError){
** **
** This routine does a case-independent search of zType for the ** This routine does a case-independent search of zType for the
** substrings in the following table. If one of the substrings is ** substrings in the following table. If one of the substrings is
** found, the corresponding affinity is returned. If zType tqcontains ** found, the corresponding affinity is returned. If zType contains
** more than one of the substrings, entries toward the top of ** more than one of the substrings, entries toward the top of
** the table take priority. For example, if zType is 'BLOBINT', ** the table take priority. For example, if zType is 'BLOBINT',
** STQLITE_AFF_INTEGER is returned. ** STQLITE_AFF_INTEGER is returned.
@ -48647,7 +48647,7 @@ static void zeroblobFunc(
} }
/* /*
** The tqreplace() function. Three arguments are all strings: call ** The replace() function. Three arguments are all strings: call
** them A, B, and C. The result is also a string which is derived ** them A, B, and C. The result is also a string which is derived
** from A by replacing every occurance of B with C. The match ** from A by replacing every occurance of B with C. The match
** must be exact. Collating sequences are not used. ** must be exact. Collating sequences are not used.
@ -49212,7 +49212,7 @@ STQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
{ "last_insert_rowid", 0, 0xff, STQLITE_UTF8, 0, last_insert_rowid }, { "last_insert_rowid", 0, 0xff, STQLITE_UTF8, 0, last_insert_rowid },
{ "changes", 0, 0xff, STQLITE_UTF8, 0, changes }, { "changes", 0, 0xff, STQLITE_UTF8, 0, changes },
{ "total_changes", 0, 0xff, STQLITE_UTF8, 0, total_changes }, { "total_changes", 0, 0xff, STQLITE_UTF8, 0, total_changes },
{ "tqreplace", 3, 0, STQLITE_UTF8, 0, replaceFunc }, { "replace", 3, 0, STQLITE_UTF8, 0, replaceFunc },
{ "ltrim", 1, 1, STQLITE_UTF8, 0, trimFunc }, { "ltrim", 1, 1, STQLITE_UTF8, 0, trimFunc },
{ "ltrim", 2, 1, STQLITE_UTF8, 0, trimFunc }, { "ltrim", 2, 1, STQLITE_UTF8, 0, trimFunc },
{ "rtrim", 1, 2, STQLITE_UTF8, 0, trimFunc }, { "rtrim", 1, 2, STQLITE_UTF8, 0, trimFunc },
@ -49502,7 +49502,7 @@ static int selectReadsTable(Select *p, Schema *pSchema, int iTab){
** rowid value. Code generated by autoIncEnd() will write the new ** rowid value. Code generated by autoIncEnd() will write the new
** largest value of the counter back into the sqlite_sequence table. ** largest value of the counter back into the sqlite_sequence table.
** **
** This routine returns the index of the mem[] cell that tqcontains ** This routine returns the index of the mem[] cell that contains
** the maximum rowid counter. ** the maximum rowid counter.
** **
** Two memory cells are allocated. The next memory cell after the ** Two memory cells are allocated. The next memory cell after the
@ -50243,7 +50243,7 @@ insert_cleanup:
/* /*
** Generate code to do a constraint check prior to an INSERT or an UPDATE. ** Generate code to do a constraint check prior to an INSERT or an UPDATE.
** **
** When this routine is called, the stack tqcontains (from bottom to top) ** When this routine is called, the stack contains (from bottom to top)
** the following values: ** the following values:
** **
** 1. The rowid of the row to be updated before the update. This ** 1. The rowid of the row to be updated before the update. This
@ -56007,7 +56007,7 @@ static int flattenSubquery(
** the FROM clause of the outer query. Before doing this, remember ** the FROM clause of the outer query. Before doing this, remember
** the cursor number for the original outer query FROM element in ** the cursor number for the original outer query FROM element in
** iParent. The iParent cursor will never be used. Subsequent code ** iParent. The iParent cursor will never be used. Subsequent code
** will scan expressions looking for iParent references and tqreplace ** will scan expressions looking for iParent references and replace
** those references with expressions that resolve to the subquery FROM ** those references with expressions that resolve to the subquery FROM
** elements we are now copying in. ** elements we are now copying in.
*/ */
@ -58801,7 +58801,7 @@ update_cleanup:
/* /*
** Generate code for an UPDATE of a virtual table. ** Generate code for an UPDATE of a virtual table.
** **
** The strategy is that we create an ephemerial table that tqcontains ** The strategy is that we create an ephemerial table that contains
** for each row to be changed: ** for each row to be changed:
** **
** (A) The original rowid of that row. ** (A) The original rowid of that row.
@ -61192,7 +61192,7 @@ static double bestVirtualIndex(
} }
*ppIdxInfo = pIdxInfo; *ppIdxInfo = pIdxInfo;
/* Initialize the structure. The sqlite3_index_info structure tqcontains /* Initialize the structure. The sqlite3_index_info structure contains
** many fields that are declared "const" to prevent xBestIndex from ** many fields that are declared "const" to prevent xBestIndex from
** changing them. We have to do some funky casting in order to ** changing them. We have to do some funky casting in order to
** initialize those fields. ** initialize those fields.
@ -61791,7 +61791,7 @@ static void whereInfoFree(WhereInfo *pWInfo){
/* /*
** Generate the beginning of the loop used for WHERE clause processing. ** Generate the beginning of the loop used for WHERE clause processing.
** The return value is a pointer to an opaque structure that tqcontains ** The return value is a pointer to an opaque structure that contains
** information needed to terminate the loop. Later, the calling routine ** information needed to terminate the loop. Later, the calling routine
** should invoke sqlite3WhereEnd() with the return value of this function ** should invoke sqlite3WhereEnd() with the return value of this function
** in order to complete the WHERE clause processing. ** in order to complete the WHERE clause processing.

@ -701,7 +701,7 @@ void
StatisticsItem::setIcon( const TQString &icon ) StatisticsItem::setIcon( const TQString &icon )
{ {
TQString path = kapp->iconLoader()->iconPath( icon, -KIcon::SizeHuge ); TQString path = kapp->iconLoader()->iconPath( icon, -KIcon::SizeHuge );
path.tqreplace( "32x32", "48x48" ); //HACK fucking KIconLoader only returns 32x32 max. Why? path.replace( "32x32", "48x48" ); //HACK fucking KIconLoader only returns 32x32 max. Why?
// debug() << "ICONPATH: " << path << endl; // debug() << "ICONPATH: " << path << endl;

@ -371,7 +371,7 @@ StatusBar::newProgressOperation( TQObject *owner )
{ {
SHOULD_BE_GUI SHOULD_BE_GUI
if ( m_progressMap.tqcontains( owner ) ) if ( m_progressMap.contains( owner ) )
return *m_progressMap[owner]; return *m_progressMap[owner];
if( allDone() ) if( allDone() )
@ -437,7 +437,7 @@ StatusBar::endProgressOperation( TQObject *owner )
//NOTE we don't delete it yet, as this upsets some //NOTE we don't delete it yet, as this upsets some
//things, we just call setDone(). //things, we just call setDone().
if ( !m_progressMap.tqcontains( owner ) ) if ( !m_progressMap.contains( owner ) )
{ {
SingleShotPool::startTimer( 2000, TQT_TQOBJECT(this), TQT_SLOT(hideMainProgressBar()) ); SingleShotPool::startTimer( 2000, TQT_TQOBJECT(this), TQT_SLOT(hideMainProgressBar()) );
return ; return ;
@ -521,7 +521,7 @@ StatusBar::setProgress( KIO::Job *job, unsigned long percent )
void void
StatusBar::setProgress( const TQObject *owner, int steps ) StatusBar::setProgress( const TQObject *owner, int steps )
{ {
if ( !m_progressMap.tqcontains( owner ) ) if ( !m_progressMap.contains( owner ) )
return ; return ;
m_progressMap[ owner ] ->setProgress( steps ); m_progressMap[ owner ] ->setProgress( steps );
@ -532,7 +532,7 @@ StatusBar::setProgress( const TQObject *owner, int steps )
void void
StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc ) StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc )
{ {
if ( !m_progressMap.tqcontains( owner ) ) if ( !m_progressMap.contains( owner ) )
return ; return ;
m_progressMap[ owner ] ->setTotalSteps( m_progressMap[ owner ] ->totalSteps() + inc ); m_progressMap[ owner ] ->setTotalSteps( m_progressMap[ owner ] ->totalSteps() + inc );
@ -543,7 +543,7 @@ StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc )
void void
StatusBar::setProgresstqStatus( const TQObject *owner, const TQString &text ) StatusBar::setProgresstqStatus( const TQObject *owner, const TQString &text )
{ {
if ( !m_progressMap.tqcontains( owner ) ) if ( !m_progressMap.contains( owner ) )
return ; return ;
m_progressMap[owner]->settqStatus( text ); m_progressMap[owner]->settqStatus( text );
@ -557,7 +557,7 @@ void StatusBar::incrementProgress()
void void
StatusBar::incrementProgress( const TQObject *owner ) StatusBar::incrementProgress( const TQObject *owner )
{ {
if ( !m_progressMap.tqcontains( owner ) ) if ( !m_progressMap.contains( owner ) )
return; return;
m_progressMap[owner]->setProgress( m_progressMap[ owner ] ->progress() + 1 ); m_progressMap[owner]->setProgress( m_progressMap[ owner ] ->progress() + 1 );

@ -164,7 +164,7 @@ StatusBar::engineStateChanged( Engine::State state, Engine::State /*oldState*/ )
void void
StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ ) StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
{ {
#define escapeHTML(s) TQString(s).tqreplace( "&", "&amp;" ).tqreplace( "<", "&lt;" ).tqreplace( ">", "&gt;" ) #define escapeHTML(s) TQString(s).replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" )
TQString title = escapeHTML( bundle.title() ); TQString title = escapeHTML( bundle.title() );
TQString prettyTitle = escapeHTML( bundle.prettyTitle() ); TQString prettyTitle = escapeHTML( bundle.prettyTitle() );
TQString artist = escapeHTML( bundle.artist() ); TQString artist = escapeHTML( bundle.artist() );

@ -355,7 +355,7 @@ TagDialog::fillSelected( KTRMResult selected ) //SLOT
if ( selected.track() != 0 ) mb.setTrack( selected.track() ); if ( selected.track() != 0 ) mb.setTrack( selected.track() );
if ( selected.year() != 0 ) mb.setYear( selected.year() ); if ( selected.year() != 0 ) mb.setYear( selected.year() );
storedTags.tqreplace( m_mbTrack.path(), mb ); storedTags.replace( m_mbTrack.path(), mb );
} }
#else #else
Q_UNUSED(selected); Q_UNUSED(selected);
@ -959,7 +959,7 @@ TagDialog::getCommonLabels()
TQStringList labels = labelsForURL( *iter ); TQStringList labels = labelsForURL( *iter );
foreach( labels ) foreach( labels )
{ {
if ( counterMap.tqcontains( *it ) ) if ( counterMap.contains( *it ) )
counterMap[ *it ] = counterMap[ *it ] +1; counterMap[ *it ] = counterMap[ *it ] +1;
else else
counterMap[ *it ] = 1; counterMap[ *it ] = 1;
@ -1051,15 +1051,15 @@ TagDialog::storeTags( const KURL &kurl )
mb.setLength( m_bundle.length() ); mb.setLength( m_bundle.length() );
mb.setBitrate( m_bundle.bitrate() ); mb.setBitrate( m_bundle.bitrate() );
mb.setSampleRate( m_bundle.sampleRate() ); mb.setSampleRate( m_bundle.sampleRate() );
storedTags.tqreplace( url, mb ); storedTags.replace( url, mb );
} }
if( result & TagDialog::SCORECHANGED ) if( result & TagDialog::SCORECHANGED )
storedScores.tqreplace( url, kIntSpinBox_score->value() ); storedScores.replace( url, kIntSpinBox_score->value() );
if( result & TagDialog::RATINGCHANGED ) if( result & TagDialog::RATINGCHANGED )
storedRatings.tqreplace( url, kComboBox_rating->currentItem() ); storedRatings.replace( url, kComboBox_rating->currentItem() );
if( result & TagDialog::LYRICSCHANGED ) { if( result & TagDialog::LYRICSCHANGED ) {
if ( kTextEdit_lyrics->text().isEmpty() ) if ( kTextEdit_lyrics->text().isEmpty() )
storedLyrics.tqreplace( url, TQString() ); storedLyrics.replace( url, TQString() );
else { else {
TQDomDocument doc; TQDomDocument doc;
TQDomElement e = doc.createElement( "lyrics" ); TQDomElement e = doc.createElement( "lyrics" );
@ -1068,13 +1068,13 @@ TagDialog::storeTags( const KURL &kurl )
TQDomText t = doc.createTextNode( kTextEdit_lyrics->text() ); TQDomText t = doc.createTextNode( kTextEdit_lyrics->text() );
e.appendChild( t ); e.appendChild( t );
doc.appendChild( e ); doc.appendChild( e );
storedLyrics.tqreplace( url, doc.toString() ); storedLyrics.replace( url, doc.toString() );
} }
} }
if( result & TagDialog::LABELSCHANGED ) { if( result & TagDialog::LABELSCHANGED ) {
generateDeltaForLabelList( labelListFromText( kTextEdit_selectedLabels->text() ) ); generateDeltaForLabelList( labelListFromText( kTextEdit_selectedLabels->text() ) );
TQStringList tmpLabels; TQStringList tmpLabels;
if ( newLabels.tqfind( url ) != newLabels.end() ) if ( newLabels.find( url ) != newLabels.end() )
tmpLabels = newLabels[ url ]; tmpLabels = newLabels[ url ];
else else
tmpLabels = originalLabels[ url ]; tmpLabels = originalLabels[ url ];
@ -1085,10 +1085,10 @@ TagDialog::storeTags( const KURL &kurl )
} }
foreach( m_addedLabels ) foreach( m_addedLabels )
{ {
if( tmpLabels.tqfind( *it ) == tmpLabels.end() ) if( tmpLabels.find( *it ) == tmpLabels.end() )
tmpLabels.append( *it ); tmpLabels.append( *it );
} }
newLabels.tqreplace( url, tmpLabels ); newLabels.replace( url, tmpLabels );
} }
} }
@ -1096,17 +1096,17 @@ void
TagDialog::storeTags( const KURL &url, int changes, const MetaBundle &mb ) TagDialog::storeTags( const KURL &url, int changes, const MetaBundle &mb )
{ {
if ( changes & TagDialog::TAGSCHANGED ) if ( changes & TagDialog::TAGSCHANGED )
storedTags.tqreplace( url.path(), mb ); storedTags.replace( url.path(), mb );
if ( changes & TagDialog::SCORECHANGED ) if ( changes & TagDialog::SCORECHANGED )
storedScores.tqreplace( url.path(), mb.score() ); storedScores.replace( url.path(), mb.score() );
if ( changes & TagDialog::RATINGCHANGED ) if ( changes & TagDialog::RATINGCHANGED )
storedRatings.tqreplace( url.path(), mb.rating() ); storedRatings.replace( url.path(), mb.rating() );
} }
void void
TagDialog::storeLabels( const KURL &url, const TQStringList &labels ) TagDialog::storeLabels( const KURL &url, const TQStringList &labels )
{ {
newLabels.tqreplace( url.path(), labels ); newLabels.replace( url.path(), labels );
} }
@ -1150,7 +1150,7 @@ TagDialog::loadLabels( const KURL &url )
MetaBundle MetaBundle
TagDialog::bundleForURL( const KURL &url ) TagDialog::bundleForURL( const KURL &url )
{ {
if( storedTags.tqfind( url.path() ) != storedTags.end() ) if( storedTags.find( url.path() ) != storedTags.end() )
return storedTags[ url.path() ]; return storedTags[ url.path() ];
return MetaBundle( url, url.isLocalFile() ); return MetaBundle( url, url.isLocalFile() );
@ -1159,7 +1159,7 @@ TagDialog::bundleForURL( const KURL &url )
float float
TagDialog::scoreForURL( const KURL &url ) TagDialog::scoreForURL( const KURL &url )
{ {
if( storedScores.tqfind( url.path() ) != storedScores.end() ) if( storedScores.find( url.path() ) != storedScores.end() )
return storedScores[ url.path() ]; return storedScores[ url.path() ];
return CollectionDB::instance()->getSongPercentage( url.path() ); return CollectionDB::instance()->getSongPercentage( url.path() );
@ -1168,7 +1168,7 @@ TagDialog::scoreForURL( const KURL &url )
int int
TagDialog::ratingForURL( const KURL &url ) TagDialog::ratingForURL( const KURL &url )
{ {
if( storedRatings.tqfind( url.path() ) != storedRatings.end() ) if( storedRatings.find( url.path() ) != storedRatings.end() )
return storedRatings[ url.path() ]; return storedRatings[ url.path() ];
return CollectionDB::instance()->getSongRating( url.path() ); return CollectionDB::instance()->getSongRating( url.path() );
@ -1177,7 +1177,7 @@ TagDialog::ratingForURL( const KURL &url )
TQString TQString
TagDialog::lyricsForURL( const KURL &url ) TagDialog::lyricsForURL( const KURL &url )
{ {
if( storedLyrics.tqfind( url.path() ) != storedLyrics.end() ) if( storedLyrics.find( url.path() ) != storedLyrics.end() )
return storedLyrics[ url.path() ]; return storedLyrics[ url.path() ];
return CollectionDB::instance()->getLyrics( url.path() ); return CollectionDB::instance()->getLyrics( url.path() );
@ -1186,9 +1186,9 @@ TagDialog::lyricsForURL( const KURL &url )
TQStringList TQStringList
TagDialog::labelsForURL( const KURL &url ) TagDialog::labelsForURL( const KURL &url )
{ {
if( newLabels.tqfind( url.path() ) != newLabels.end() ) if( newLabels.find( url.path() ) != newLabels.end() )
return newLabels[ url.path() ]; return newLabels[ url.path() ];
if( originalLabels.tqfind( url.path() ) != originalLabels.end() ) if( originalLabels.find( url.path() ) != originalLabels.end() )
return originalLabels[ url.path() ]; return originalLabels[ url.path() ];
TQStringList tmp = CollectionDB::instance()->getLabels( url.path(), CollectionDB::typeUser ); TQStringList tmp = CollectionDB::instance()->getLabels( url.path(), CollectionDB::typeUser );
originalLabels[ url.path() ] = tmp; originalLabels[ url.path() ] = tmp;
@ -1315,7 +1315,7 @@ TagDialog::applyToAllTracks()
} }
for( TQStringList::Iterator iter = m_addedLabels.begin(); iter != m_addedLabels.end(); ++iter ) for( TQStringList::Iterator iter = m_addedLabels.begin(); iter != m_addedLabels.end(); ++iter )
{ {
if( tmpLabels.tqfind( *iter ) == tmpLabels.end() ) if( tmpLabels.find( *iter ) == tmpLabels.end() )
tmpLabels.append( *iter ); tmpLabels.append( *iter );
} }
storeLabels( *it, tmpLabels ); storeLabels( *it, tmpLabels );
@ -1332,7 +1332,7 @@ TagDialog::labelListFromText( const TQString &text )
{ {
TQString tmpString = (*it).stripWhiteSpace(); TQString tmpString = (*it).stripWhiteSpace();
if ( !tmpString.isEmpty() ) if ( !tmpString.isEmpty() )
map.tqreplace( tmpString, 0 ); map.replace( tmpString, 0 );
} }
TQStringList result; TQStringList result;
TQMap<TQString, int>::ConstIterator endMap( map.end() ); TQMap<TQString, int>::ConstIterator endMap( map.end() );
@ -1349,12 +1349,12 @@ TagDialog::generateDeltaForLabelList( const TQStringList &list )
m_removedLabels.clear(); m_removedLabels.clear();
foreach( list ) foreach( list )
{ {
if ( !m_labels.tqcontains( *it ) ) if ( !m_labels.contains( *it ) )
m_addedLabels.append( *it ); m_addedLabels.append( *it );
} }
foreach( m_labels ) foreach( m_labels )
{ {
if ( !list.tqcontains( *it ) ) if ( !list.contains( *it ) )
m_removedLabels.append( *it ); m_removedLabels.append( *it );
} }
m_labels = list; m_labels = list;
@ -1403,7 +1403,7 @@ TagDialog::openURLRequest(const KURL &url ) //SLOT
{ {
TQString text = kTextEdit_selectedLabels->text(); TQString text = kTextEdit_selectedLabels->text();
TQStringList currentLabels = labelListFromText( text ); TQStringList currentLabels = labelListFromText( text );
if ( currentLabels.tqcontains( url.path() ) ) if ( currentLabels.contains( url.path() ) )
return; return;
if ( !text.isEmpty() ) if ( !text.isEmpty() )
text.append( ", " ); text.append( ", " );

@ -30,17 +30,17 @@ FileNameScheme::FileNameScheme( const TQString &s )
, m_composerField( -1 ) , m_composerField( -1 )
, m_genreField( -1 ) , m_genreField( -1 )
{ {
int artist = s.tqfind( "%artist" ); int artist = s.find( "%artist" );
int title = s.tqfind( "%title" ); int title = s.find( "%title" );
int track = s.tqfind( "%track" ); int track = s.find( "%track" );
int album = s.tqfind( "%album" ); int album = s.find( "%album" );
int comment = s.tqfind( "%comment" ); int comment = s.find( "%comment" );
int year = s.tqfind( "%year" ); int year = s.find( "%year" );
int composer = s.tqfind( "%composer" ); int composer = s.find( "%composer" );
int genre = s.tqfind( "%genre" ); int genre = s.find( "%genre" );
int fieldNumber = 1; int fieldNumber = 1;
int i = s.tqfind( '%' ); int i = s.find( '%' );
while ( i > -1 ) { while ( i > -1 ) {
if ( title == i ) if ( title == i )
m_titleField = fieldNumber++; m_titleField = fieldNumber++;
@ -59,7 +59,7 @@ FileNameScheme::FileNameScheme( const TQString &s )
if ( genre == i ) if ( genre == i )
m_genreField = fieldNumber++; m_genreField = fieldNumber++;
i = s.tqfind('%', i + 1); i = s.find('%', i + 1);
} }
m_regExp.setPattern( composeRegExp( s ) ); m_regExp.setPattern( composeRegExp( s ) );
} }
@ -70,7 +70,7 @@ bool FileNameScheme::matches( const TQString &fileName ) const
* does not work as a separator. * does not work as a separator.
*/ */
TQString stripped = fileName; TQString stripped = fileName;
stripped.truncate( stripped.tqfindRev( '.' ) ); stripped.truncate( stripped.findRev( '.' ) );
return m_regExp.exactMatch( stripped ); return m_regExp.exactMatch( stripped );
} }
@ -148,7 +148,7 @@ TQString FileNameScheme::composeRegExp( const TQString &s ) const
TQString regExp = TQRegExp::escape( s.simplifyWhiteSpace() ); TQString regExp = TQRegExp::escape( s.simplifyWhiteSpace() );
regExp = ".*" + regExp; regExp = ".*" + regExp;
regExp.tqreplace( ' ', "\\s+" ); regExp.replace( ' ', "\\s+" );
regExp = KMacroExpander::expandMacros( regExp, substitutions ); regExp = KMacroExpander::expandMacros( regExp, substitutions );
regExp += "[^/]*$"; regExp += "[^/]*$";
return regExp; return regExp;
@ -233,14 +233,14 @@ void TagGuesser::guess( const TQString &absFileName )
const FileNameScheme schema( *it ); const FileNameScheme schema( *it );
if( schema.matches( absFileName ) ) { if( schema.matches( absFileName ) ) {
debug() <<"Schema used: " << " " << schema.pattern() <<endl; debug() <<"Schema used: " << " " << schema.pattern() <<endl;
m_title = capitalizeWords( schema.title().tqreplace( '_', " " ) ).stripWhiteSpace(); m_title = capitalizeWords( schema.title().replace( '_', " " ) ).stripWhiteSpace();
m_artist = capitalizeWords( schema.artist().tqreplace( '_', " " ) ).stripWhiteSpace(); m_artist = capitalizeWords( schema.artist().replace( '_', " " ) ).stripWhiteSpace();
m_album = capitalizeWords( schema.album().tqreplace( '_', " " ) ).stripWhiteSpace(); m_album = capitalizeWords( schema.album().replace( '_', " " ) ).stripWhiteSpace();
m_track = schema.track().stripWhiteSpace(); m_track = schema.track().stripWhiteSpace();
m_comment = schema.comment().tqreplace( '_', " " ).stripWhiteSpace(); m_comment = schema.comment().replace( '_', " " ).stripWhiteSpace();
m_year = schema.year().stripWhiteSpace(); m_year = schema.year().stripWhiteSpace();
m_composer = capitalizeWords( schema.composer().tqreplace( '_', " " ) ).stripWhiteSpace(); m_composer = capitalizeWords( schema.composer().replace( '_', " " ) ).stripWhiteSpace();
m_genre = capitalizeWords( schema.genre().tqreplace( '_', " " ) ).stripWhiteSpace(); m_genre = capitalizeWords( schema.genre().replace( '_', " " ) ).stripWhiteSpace();
break; break;
} }
} }
@ -255,10 +255,10 @@ TQString TagGuesser::capitalizeWords( const TQString &s )
result[ 0 ] = result[ 0 ].upper(); result[ 0 ] = result[ 0 ].upper();
const TQRegExp wordRegExp( "\\s\\w" ); const TQRegExp wordRegExp( "\\s\\w" );
int i = result.tqfind( wordRegExp ); int i = result.find( wordRegExp );
while ( i > -1 ) { while ( i > -1 ) {
result[ i + 1 ] = result[ i + 1 ].upper(); result[ i + 1 ] = result[ i + 1 ].upper();
i = result.tqfind( wordRegExp, ++i ); i = result.find( wordRegExp, ++i );
} }
return result; return result;

@ -60,7 +60,7 @@ TrackToolTip::TrackToolTip(): m_haspos( false )
void TrackToolTip::addToWidget( TQWidget *widget ) void TrackToolTip::addToWidget( TQWidget *widget )
{ {
if( widget && !m_widgets.tqcontainsRef( widget ) ) if( widget && !m_widgets.containsRef( widget ) )
{ {
m_widgets.append( widget ); m_widgets.append( widget );
Amarok::ToolTip::add( this, widget ); Amarok::ToolTip::add( this, widget );
@ -69,7 +69,7 @@ void TrackToolTip::addToWidget( TQWidget *widget )
void TrackToolTip::removeFromWidget( TQWidget *widget ) void TrackToolTip::removeFromWidget( TQWidget *widget )
{ {
if( widget && m_widgets.tqcontainsRef( widget ) ) if( widget && m_widgets.containsRef( widget ) )
{ {
Amarok::ToolTip::remove( widget ); Amarok::ToolTip::remove( widget );
m_widgets.removeRef( widget ); m_widgets.removeRef( widget );
@ -225,7 +225,7 @@ void TrackToolTip::setTrack( const MetaBundle &tags, bool force )
m_tooltip += "%1"; //the cover gets substituted in, in tooltip() m_tooltip += "%1"; //the cover gets substituted in, in tooltip()
m_cover = CollectionDB::instance()->podcastImage( tags, true ); m_cover = CollectionDB::instance()->podcastImage( tags, true );
if( m_cover.isEmpty() || m_cover.tqcontains( "nocover" ) != -1 ) if( m_cover.isEmpty() || m_cover.contains( "nocover" ) != -1 )
{ {
m_cover = CollectionDB::instance()->albumImage( tags, true, 150 ); m_cover = CollectionDB::instance()->albumImage( tags, true, 150 );
if ( m_cover == CollectionDB::instance()->notAvailCover() ) if ( m_cover == CollectionDB::instance()->notAvailCover() )

@ -129,7 +129,7 @@ XSPFPlaylist::setTitle( TQString title )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "title" ).tqreplaceChild( createTextNode( title ), documentElement().namedItem( "title" ).firstChild() ); documentElement().namedItem( "title" ).replaceChild( createTextNode( title ), documentElement().namedItem( "title" ).firstChild() );
} }
void void
@ -143,7 +143,7 @@ XSPFPlaylist::setCreator( TQString creator )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "creator" ).tqreplaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() ); documentElement().namedItem( "creator" ).replaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() );
} }
void void
@ -157,7 +157,7 @@ XSPFPlaylist::setAnnotation( TQString annotation )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "annotation" ).tqreplaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() ); documentElement().namedItem( "annotation" ).replaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() );
} }
void void
@ -171,7 +171,7 @@ XSPFPlaylist::setInfo( KURL info )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "info" ).tqreplaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() ); documentElement().namedItem( "info" ).replaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() );
} }
void void
@ -185,7 +185,7 @@ XSPFPlaylist::setLocation( KURL location )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "location" ).tqreplaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() ); documentElement().namedItem( "location" ).replaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() );
} }
void void
@ -199,7 +199,7 @@ XSPFPlaylist::setIdentifier( TQString identifier )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "identifier" ).tqreplaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() ); documentElement().namedItem( "identifier" ).replaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() );
} }
void void
@ -213,7 +213,7 @@ XSPFPlaylist::setImage( KURL image )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "image" ).tqreplaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() ); documentElement().namedItem( "image" ).replaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() );
} }
void void
@ -230,7 +230,7 @@ XSPFPlaylist::setDate( TQDateTime date )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "date" ).tqreplaceChild( createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ), documentElement().namedItem( "date" ).firstChild() ); documentElement().namedItem( "date" ).replaceChild( createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ), documentElement().namedItem( "date" ).firstChild() );
} }
void void
@ -244,7 +244,7 @@ XSPFPlaylist::setLicense( KURL license )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "license" ).tqreplaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() ); documentElement().namedItem( "license" ).replaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() );
} }
void void
@ -267,7 +267,7 @@ XSPFPlaylist::setAttribution( KURL attribution, bool append )
TQDomNode subSubNode = createTextNode( attribution.url() ); TQDomNode subSubNode = createTextNode( attribution.url() );
subNode.appendChild( subSubNode ); subNode.appendChild( subSubNode );
node.appendChild( subNode ); node.appendChild( subNode );
documentElement().tqreplaceChild( node, documentElement().namedItem( "attribution" ) ); documentElement().replaceChild( node, documentElement().namedItem( "attribution" ) );
} }
} }
@ -282,7 +282,7 @@ XSPFPlaylist::setLink( KURL link )
documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
} }
else else
documentElement().namedItem( "link" ).tqreplaceChild( createTextNode( link.url() ), documentElement().namedItem( "link" ).firstChild() ); documentElement().namedItem( "link" ).replaceChild( createTextNode( link.url() ), documentElement().namedItem( "link" ).firstChild() );
} }
@ -425,7 +425,7 @@ XSPFPlaylist::setTrackList( XSPFtrackList trackList, bool append )
} }
} }
else else
documentElement().tqreplaceChild( node, documentElement().namedItem( "trackList" ) ); documentElement().replaceChild( node, documentElement().namedItem( "trackList" ) );
} }

Loading…
Cancel
Save