From 1dbf3ff1cbb6d82a451bc319301bf38816c2c232 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: [PATCH] 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 --- amarok/src/Options1.ui.h | 2 +- amarok/src/amarok.h | 2 +- amarok/src/amarokcore/crashhandler.cpp | 10 +- amarok/src/analyzers/blockanalyzer.cpp | 2 +- amarok/src/app.cpp | 28 ++-- amarok/src/collectionbrowser.cpp | 58 +++---- amarok/src/collectiondb.cpp | 56 +++---- amarok/src/collectiondb.h | 8 +- .../collectionscanner/collectionscanner.cpp | 10 +- .../src/collectionscanner/collectionscanner.h | 2 +- amarok/src/contextbrowser.cpp | 146 +++++++++--------- amarok/src/coverfetcher.cpp | 2 +- amarok/src/covermanager.cpp | 4 +- amarok/src/database_refactor/collectiondb.cpp | 6 +- amarok/src/database_refactor/dbenginebase.h | 4 +- .../massstorage/massstoragedevicehandler.cpp | 6 +- amarok/src/device/smb/smbdevicehandler.cpp | 4 +- amarok/src/devicemanager.cpp | 8 +- amarok/src/directorylist.cpp | 6 +- amarok/src/dynamicmode.cpp | 16 +- amarok/src/engine/helix/COPYING | 4 +- amarok/src/engine/helix/helix-engine.cpp | 4 +- .../src/engine/helix/helix-sp/hspcontext.cpp | 2 +- amarok/src/engine/kdemm/kdemmengine.cpp | 2 +- amarok/src/engine/mas/masengine.cpp | 2 +- amarok/src/engine/nmm/nmm_engine.cpp | 2 +- amarok/src/engine/xine/xine-engine.cpp | 6 +- amarok/src/enginecontroller.cpp | 4 +- amarok/src/engineobserver.cpp | 4 +- amarok/src/equalizerpresetmanager.cpp | 2 +- amarok/src/equalizersetup.cpp | 4 +- amarok/src/expression.cpp | 10 +- amarok/src/filebrowser.cpp | 4 +- amarok/src/htmlview.cpp | 24 +-- amarok/src/iconloader.cpp | 8 +- amarok/src/konquisidebar/universalamarok.cpp | 2 +- amarok/src/ktrm.cpp | 14 +- amarok/src/lastfm.cpp | 6 +- amarok/src/loader/loader.cpp | 4 +- .../magnatuneartistinfobox.cpp | 10 +- .../magnatunedownloadinfo.cpp | 34 ++-- amarok/src/mediabrowser.cpp | 18 +-- amarok/src/mediabrowser.h | 2 +- amarok/src/mediadevice/daap/daapclient.cpp | 16 +- .../mediadevice/daap/daapreader/reader.cpp | 2 +- .../mongrel/lib/rubygems/custom_require.rb | 12 +- .../mongrel/lib/rubygems/dependency_list.rb | 8 +- .../daap/mongrel/lib/rubygems/gem_commands.rb | 6 +- .../daap/mongrel/lib/rubygems/open-uri.rb | 2 +- .../daap/mongrel/lib/rubygems/package.rb | 4 +- .../mongrel/lib/rubygems/remote_installer.rb | 2 +- .../daap/mongrel/lib/rubygems/source_index.rb | 2 +- .../daap/mongrel/lib/rubygems/validator.rb | 4 +- .../generic/genericmediadevice.cpp | 12 +- .../genericmediadeviceconfigdialog.ui.h | 8 +- amarok/src/mediadevice/ifp/ifpmediadevice.cpp | 8 +- .../src/mediadevice/ipod/ipodmediadevice.cpp | 8 +- amarok/src/mediadevice/mtp/mtpmediadevice.cpp | 20 +-- amarok/src/mediadevice/njb/njbmediadevice.cpp | 10 +- amarok/src/mediadevice/njb/playlist.cpp | 6 +- amarok/src/mediadevice/njb/track.cpp | 6 +- amarok/src/mediadevicemanager.cpp | 10 +- amarok/src/medium.cpp | 2 +- amarok/src/mediumpluginmanager.cpp | 4 +- amarok/src/metabundle.cpp | 20 +-- amarok/src/metabundle.h | 4 +- amarok/src/moodbar.cpp | 12 +- amarok/src/mountpointmanager.cpp | 18 +-- amarok/src/multitabbar.cpp | 4 +- amarok/src/organizecollectiondialog.ui.h | 10 +- amarok/src/osd.cpp | 22 +-- amarok/src/playerwindow.cpp | 4 +- amarok/src/playlist.cpp | 84 +++++----- amarok/src/playlist.h | 8 +- amarok/src/playlistbrowser.cpp | 26 ++-- amarok/src/playlistbrowser.h | 6 +- amarok/src/playlistbrowseritem.cpp | 40 ++--- amarok/src/playlistbrowseritem.h | 2 +- amarok/src/playlistitem.cpp | 20 +-- amarok/src/playlistloader.cpp | 26 ++-- amarok/src/playlistselection.cpp | 8 +- amarok/src/playlistwindow.cpp | 2 +- amarok/src/plugin/plugin.cpp | 4 +- amarok/src/queuemanager.cpp | 20 +-- amarok/src/scancontroller.cpp | 2 +- amarok/src/scriptmanager.cpp | 12 +- amarok/src/scripts/alarm/COPYING | 4 +- amarok/src/scripts/alarm/alarm.py | 2 +- .../amarok_live/amarok.live.remaster.part1.sh | 2 +- amarok/src/scripts/amarok_live/amarok_live.py | 10 +- amarok/src/scripts/common/Zeroconf.py | 4 +- amarok/src/scripts/embedcover/COPYING | 4 +- amarok/src/scripts/embedcover/addimage2mp3.rb | 2 +- .../graphequalizer/equalizercanvasview.cpp | 6 +- amarok/src/scripts/lyrics_astraweb/COPYING | 4 +- amarok/src/scripts/lyrics_lyrc/COPYING | 4 +- amarok/src/scripts/mp3fix/COPYING | 4 +- amarok/src/scripts/playlist2html/Playlist.py | 2 +- amarok/src/scripts/score_default/COPYING | 4 +- amarok/src/scripts/score_impulsive/COPYING | 4 +- .../scripts/templates/python_qt_template.py | 12 +- amarok/src/scripts/webcontrol/Playlist.py | 4 +- .../src/scripts/webcontrol/RequestHandler.py | 8 +- amarok/src/scripts/webcontrol/WebControl.py | 22 +-- amarok/src/scripts/webcontrol/main.js | 2 +- amarok/src/scrobbler.cpp | 4 +- amarok/src/sliderwidget.cpp | 4 +- amarok/src/smartplaylisteditor.cpp | 26 ++-- amarok/src/smartplaylisteditor.h | 2 +- amarok/src/sqlite/sqlite3.c | 40 ++--- amarok/src/statistics.cpp | 2 +- amarok/src/statusbar/statusBarBase.cpp | 12 +- amarok/src/statusbar/statusbar.cpp | 2 +- amarok/src/tagdialog.cpp | 50 +++--- amarok/src/tagguesser.cpp | 40 ++--- amarok/src/tracktooltip.cpp | 6 +- amarok/src/xspfplaylist.cpp | 24 +-- 117 files changed, 687 insertions(+), 687 deletions(-) diff --git a/amarok/src/Options1.ui.h b/amarok/src/Options1.ui.h index 72f2a30b..e4f8e723 100644 --- a/amarok/src/Options1.ui.h +++ b/amarok/src/Options1.ui.h @@ -47,7 +47,7 @@ void Options1::init() kComboBox_browser->insertStringList( browsers ); kLineEdit_customBrowser->setText( AmarokConfig::externalBrowser() ); - int index = browsers.tqfindIndex( AmarokConfig::externalBrowser() ); + int index = browsers.findIndex( AmarokConfig::externalBrowser() ); if( index >= 0 ) kComboBox_browser->setCurrentItem( index ); else if( AmarokConfig::externalBrowser() == diff --git a/amarok/src/amarok.h b/amarok/src/amarok.h index 535c6fa1..45ed1aba 100644 --- a/amarok/src/amarok.h +++ b/amarok/src/amarok.h @@ -146,7 +146,7 @@ namespace Amarok */ inline TQString extension( const TQString &fileName ) { - return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : ""; + return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : ""; } /** Transform url into a file url if possible */ diff --git a/amarok/src/amarokcore/crashhandler.cpp b/amarok/src/amarokcore/crashhandler.cpp index e2258d9d..122c080e 100644 --- a/amarok/src/amarokcore/crashhandler.cpp +++ b/amarok/src/amarokcore/crashhandler.cpp @@ -171,21 +171,21 @@ namespace Amarok /// clean up bt.remove( "(no debugging symbols found)..." ); bt.remove( "(no debugging symbols found)\n" ); - bt.tqreplace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters + bt.replace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters bt.stripWhiteSpace(); /// analyze usefulness bool useful = true; const TQString fileCommandOutput = runCommand( "file `which amarokapp`" ); - if( fileCommandOutput.tqfind( "not stripped", false ) == -1 ) + if( fileCommandOutput.find( "not stripped", false ) == -1 ) subject += "[___stripped]"; //same length as below else subject += "[NOTstripped]"; if( !bt.isEmpty() ) { - const int invalidFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") ); - const int validFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") ); + const int invalidFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") ); + const int validFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") ); const int totalFrames = invalidFrames + validFrames; if( totalFrames > 0 ) { @@ -195,7 +195,7 @@ namespace Amarok } subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ ); - if( bt.tqfind( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 ) + if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 ) subject += "[line numbers]"; } else diff --git a/amarok/src/analyzers/blockanalyzer.cpp b/amarok/src/analyzers/blockanalyzer.cpp index ed61161a..68538ae7 100644 --- a/amarok/src/analyzers/blockanalyzer.cpp +++ b/amarok/src/analyzers/blockanalyzer.cpp @@ -141,7 +141,7 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s ) // y starts from the top and increases in units of blocks // m_yscale looks similar to: { 0.7, 0.5, 0.25, 0.15, 0.1, 0 } - // if it tqcontains 6 elements there are 5 rows in the analyzer + // if it contains 6 elements there are 5 rows in the analyzer Analyzer::interpolate( s, m_scope ); diff --git a/amarok/src/app.cpp b/amarok/src/app.cpp index edd041c7..a0b2a34a 100644 --- a/amarok/src/app.cpp +++ b/amarok/src/app.cpp @@ -1347,24 +1347,24 @@ namespace Amarok { TQString result = path; // german umlauts - result.tqreplace( TQChar(0x00e4), "ae" ).tqreplace( TQChar(0x00c4), "Ae" ); - result.tqreplace( TQChar(0x00f6), "oe" ).tqreplace( TQChar(0x00d6), "Oe" ); - result.tqreplace( TQChar(0x00fc), "ue" ).tqreplace( TQChar(0x00dc), "Ue" ); - result.tqreplace( TQChar(0x00df), "ss" ); + result.replace( TQChar(0x00e4), "ae" ).replace( TQChar(0x00c4), "Ae" ); + result.replace( TQChar(0x00f6), "oe" ).replace( TQChar(0x00d6), "Oe" ); + result.replace( TQChar(0x00fc), "ue" ).replace( TQChar(0x00dc), "Ue" ); + result.replace( TQChar(0x00df), "ss" ); // some strange accents - result.tqreplace( TQChar(0x00e7), "c" ).tqreplace( TQChar(0x00c7), "C" ); - result.tqreplace( TQChar(0x00fd), "y" ).tqreplace( TQChar(0x00dd), "Y" ); - result.tqreplace( TQChar(0x00f1), "n" ).tqreplace( TQChar(0x00d1), "N" ); + result.replace( TQChar(0x00e7), "c" ).replace( TQChar(0x00c7), "C" ); + result.replace( TQChar(0x00fd), "y" ).replace( TQChar(0x00dd), "Y" ); + result.replace( TQChar(0x00f1), "n" ).replace( TQChar(0x00d1), "N" ); // czech letters with carons - result.tqreplace( TQChar(0x0161), "s" ).tqreplace( TQChar(0x0160), "S" ); - result.tqreplace( TQChar(0x010d), "c" ).tqreplace( TQChar(0x010c), "C" ); - result.tqreplace( TQChar(0x0159), "r" ).tqreplace( TQChar(0x0158), "R" ); - result.tqreplace( TQChar(0x017e), "z" ).tqreplace( TQChar(0x017d), "Z" ); - result.tqreplace( TQChar(0x0165), "t" ).tqreplace( TQChar(0x0164), "T" ); - result.tqreplace( TQChar(0x0148), "n" ).tqreplace( TQChar(0x0147), "N" ); - result.tqreplace( TQChar(0x010f), "d" ).tqreplace( TQChar(0x010e), "D" ); + result.replace( TQChar(0x0161), "s" ).replace( TQChar(0x0160), "S" ); + result.replace( TQChar(0x010d), "c" ).replace( TQChar(0x010c), "C" ); + result.replace( TQChar(0x0159), "r" ).replace( TQChar(0x0158), "R" ); + result.replace( TQChar(0x017e), "z" ).replace( TQChar(0x017d), "Z" ); + result.replace( TQChar(0x0165), "t" ).replace( TQChar(0x0164), "T" ); + result.replace( TQChar(0x0148), "n" ).replace( TQChar(0x0147), "N" ); + result.replace( TQChar(0x010f), "d" ).replace( TQChar(0x010e), "D" ); // accented vowels TQChar a[] = { 'a', 0xe0,0xe1,0xe2,0xe3,0xe5, 0 }; diff --git a/amarok/src/collectionbrowser.cpp b/amarok/src/collectionbrowser.cpp index efcbf523..7d3df15f 100644 --- a/amarok/src/collectionbrowser.cpp +++ b/amarok/src/collectionbrowser.cpp @@ -891,7 +891,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 1 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -951,7 +951,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 1 ) { tmptext = item->tqparent()->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -972,7 +972,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 2 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -1026,7 +1026,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 1 ) { tmptext = item->tqparent()->tqparent()->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -1049,7 +1049,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 2 ) { tmptext = item->tqparent()->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -1064,7 +1064,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT if( VisYearAlbum == 3 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( isUnknown ) @@ -1687,9 +1687,9 @@ CollectionView::fetchCover() //SLOT TQString album = item->text(0); if( cat == IdVisYearAlbum ) { - // we can't use tqfindRev since an album may have " - " within it. + // we can't use findRev since an album may have " - " within it. TQString sep = i18n(" - "); - album = album.right( album.length() - sep.length() - album.tqfind( sep ) ); + album = album.right( album.length() - sep.length() - album.find( sep ) ); } // find the first artist's name @@ -1979,7 +1979,7 @@ CollectionView::safeClear() TQListViewItem *n; itemCoverMapMutex->lock(); while( c ) { - if( itemCoverMap->tqcontains( c ) ) + if( itemCoverMap->contains( c ) ) itemCoverMap->erase( c ); n = c->nextSibling(); delete c; @@ -2177,7 +2177,7 @@ CollectionView::getTrueItemText( int cat, TQListViewItem* item ) const CollectionItem* collectItem = static_cast( item ); trueItemText = collectItem->getSTQLText( 0 ); if ( cat == IdVisYearAlbum && !collectItem->isUnknown() ) - trueItemText = trueItemText.right( trueItemText.length() - trueItemText.tqfind( i18n( " - " ) ) - i18n( " - " ).length() ); + trueItemText = trueItemText.right( trueItemText.length() - trueItemText.find( i18n( " - " ) ) - i18n( " - " ).length() ); } else { @@ -2399,7 +2399,7 @@ CollectionView::listSelected() if( VisYearAlbum == 1 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -2476,7 +2476,7 @@ CollectionView::listSelected() if( VisYearAlbum == 1 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -2495,7 +2495,7 @@ CollectionView::listSelected() if( VisYearAlbum == 2 ) { tmptext = child->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -2580,7 +2580,7 @@ CollectionView::listSelected() if( VisYearAlbum == 1 ) { tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -2598,7 +2598,7 @@ CollectionView::listSelected() if( VisYearAlbum == 2 ) { tmptext = child->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -2613,7 +2613,7 @@ CollectionView::listSelected() if( VisYearAlbum == 3 ) { tmptext = grandChild->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); qb.addMatch( QueryBuilder::tabYear, year, false, true ); if ( unknownText ) @@ -3011,7 +3011,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ ) if( cat == IdVisYearAlbum ) { TQString tmptext = item->text( 0 ); - TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) ); + TQString year = tmptext.left( tmptext.find( i18n(" - ") ) ); yearAlbumCalc( year, tmptext ); if( !item->isUnknown() ) m_ipodFilters[m_currentDepth] << tmptext; @@ -3256,7 +3256,7 @@ CollectionView::selectIpodItems ( void ) TQStringList::iterator it = m_ipodSelected[m_currentDepth].begin(); while( it != m_ipodSelected[m_currentDepth].end() ) { - TQListViewItem *item = tqfindItem( *it, 0 ); + TQListViewItem *item = findItem( *it, 0 ); ++it; if( !item ) @@ -3281,7 +3281,7 @@ CollectionView::selectIpodItems ( void ) !m_ipodTopItem[m_currentDepth].isNull() ) { //scroll to previous viewport top item - TQListViewItem* item = tqfindItem( m_ipodTopItem[m_currentDepth], 0 ); + TQListViewItem* item = findItem( m_ipodTopItem[m_currentDepth], 0 ); if ( item ) setContentsPos( 0, itemPos( item ) ); } @@ -3289,7 +3289,7 @@ CollectionView::selectIpodItems ( void ) if( !m_ipodCurrent[m_currentDepth].isEmpty() && !m_ipodCurrent[m_currentDepth].isNull() ) { - TQListViewItem *item = tqfindItem( m_ipodCurrent[m_currentDepth], 0); + TQListViewItem *item = findItem( m_ipodCurrent[m_currentDepth], 0); if( item ) setCurrentItem( item ); } @@ -3405,7 +3405,7 @@ CollectionView::restoreView() if ( m_viewMode == modeTreeView ) { TQValueList::const_iterator it; for ( it = m_cacheOpenItemPaths.begin(); it != m_cacheOpenItemPaths.end(); ++it ) { - TQListViewItem* item = tqfindItem( (*it)[0], 0 ); + TQListViewItem* item = findItem( (*it)[0], 0 ); if ( item ) item->setOpen ( true ); @@ -3513,7 +3513,7 @@ CollectionView::yearAlbumCalc( TQString &year, TQString &text ) year = ""; text = text.right( text.length() - - text.tqfind( i18n(" - ") ) - + text.find( i18n(" - ") ) - i18n(" - ").length() ); } @@ -3713,7 +3713,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ ) qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater ); if ( translateTimeFilter( timeFilter() ) <= 0 - && (m_filter.length() < 3 || (!m_filter.tqcontains( " " ) && m_filter.endsWith( ":" ) ) ) ) + && (m_filter.length() < 3 || (!m_filter.contains( " " ) && m_filter.endsWith( ":" ) ) ) ) { // Redraw bubble help triggerUpdate(); @@ -3820,7 +3820,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ ) //we leftjoin the query so it can return mysql NULL cells, i.e. for score and playcount //this is an ugly hack - should be integrated in querybuilder itself instead. TQString leftQuery = qb.query(); - leftQuery.tqreplace( "INNER JOIN", "LEFT JOIN" ); + leftQuery.replace( "INNER JOIN", "LEFT JOIN" ); values = CollectionDB::instance()->query( leftQuery ); //construct items @@ -4491,8 +4491,8 @@ CollectionItem::compare( TQListViewItem* i, int col, bool ascending ) const switch( m_cat ) { case IdVisYearAlbum: - a = a.left( a.tqfind( i18n(" - ") ) ); - b = b.left( b.tqfind( i18n(" - ") ) ); + a = a.left( a.find( i18n(" - ") ) ); + b = b.left( b.find( i18n(" - ") ) ); // "?" are the last ones if ( a == "?" ) return 1; @@ -4628,7 +4628,7 @@ DividerItem::createGroup(const TQString& src, int cat) TQString ret; switch (cat) { case IdVisYearAlbum: { - ret = src.left( src.tqfind(" - ") ); + ret = src.left( src.find(" - ") ); break; } case IdYear: { @@ -4675,8 +4675,8 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr, switch (cat) { case IdVisYearAlbum: { - TQString sa = itemStr.left( itemStr.tqfind( i18n(" - ") ) ); - TQString sb = divStr.left( divStr.tqfind( i18n(" - ") ) ); + TQString sa = itemStr.left( itemStr.find( i18n(" - ") ) ); + TQString sb = divStr.left( divStr.find( i18n(" - ") ) ); if (sa == sb) { inGroup = true; } diff --git a/amarok/src/collectiondb.cpp b/amarok/src/collectiondb.cpp index c2a7ab0f..63a1bdff 100644 --- a/amarok/src/collectiondb.cpp +++ b/amarok/src/collectiondb.cpp @@ -300,7 +300,7 @@ TQString CollectionDB::likeCondition( const TQString &right, bool anyBegin, bool anyEnd ) { TQString escaped = right; - escaped.tqreplace( '/', "//" ).tqreplace( '%', "/%" ).tqreplace( '_', "/_" ); + escaped.replace( '/', "//" ).replace( '%', "/%" ).replace( '_', "/_" ); escaped = instance()->escapeString( escaped ); TQString ret; @@ -1710,7 +1710,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide ) if( mb.compilation() == MetaBundle::CompilationYes ) artist = TQString( "Various_AMAROK_Artists" ); // magic key for the albumMap! - if( !albumMap.tqcontains( artist + album ) ) + if( !albumMap.contains( artist + album ) ) { albumMap[ artist + album ] = 1; TQString coverName = CollectionDB::instance()->albumImage( mb.artist(), album, false, coverW ); @@ -1722,7 +1722,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide ) else { MetaBundle mb( *it ); - if( !albumMap.tqcontains( mb.artist() + mb.album() ) ) + if( !albumMap.contains( mb.artist() + mb.album() ) ) { albumMap[ mb.artist() + mb.album() ] = 1; TQString coverName = CollectionDB::instance()->podcastImage( mb, false, coverW ); @@ -2189,7 +2189,7 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album, TQRegExp iTunesArt( "^AlbumArt_.*Large" ); for ( uint i = 0; i < values.count(); i++ ) { - matches = values[i].tqcontains( "front", false ) + values[i].tqcontains( "cover", false ) + values[i].tqcontains( "folder", false ) + values[i].tqcontains( iTunesArt ); + matches = values[i].contains( "front", false ) + values[i].contains( "cover", false ) + values[i].contains( "folder", false ) + values[i].contains( iTunesArt ); if ( matches > maxmatches ) { image = values[i]; @@ -2542,10 +2542,10 @@ CollectionDB::artistAlbumList( bool withUnknown, bool withCompilations ) } bool -CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace ) +CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace ) { TQString command; - if( tqreplace ) { + if( replace ) { command = "REPLACE INTO podcastchannels " "( url, title, weblink, image, comment, copyright, tqparent, directory" ", autoscan, fetchtype, autotransfer, haspurge, purgecount ) " @@ -2958,7 +2958,7 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental ) if ( title.isEmpty() ) { title = bundle->url().fileName(); - if ( bundle->url().fileName().tqfind( '-' ) > 0 ) + if ( bundle->url().fileName().find( '-' ) > 0 ) { if ( artist.isEmpty() ) { @@ -2966,7 +2966,7 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental ) bundle->setArtist( artist ); } title = TQString(bundle->url().fileName().section( '-', 1 )).stripWhiteSpace(); - title = title.left( title.tqfindRev( '.' ) ).stripWhiteSpace(); + title = title.left( title.findRev( '.' ) ).stripWhiteSpace(); if ( title.isEmpty() ) title = bundle->url().fileName(); } bundle->setTitle( title ); @@ -4795,9 +4795,9 @@ DbConnection * CollectionDB::getMyConnection() DbConnection *dbConn; TQThread *currThread = ThreadManager::Thread::getRunning(); - if (threadConnections->tqcontains(currThread)) + if (threadConnections->contains(currThread)) { - TQMap::Iterator it = threadConnections->tqfind(currThread); + TQMap::Iterator it = threadConnections->find(currThread); dbConn = it.data(); connectionMutex->unlock(); return dbConn; @@ -4834,9 +4834,9 @@ CollectionDB::releasePreviousConnection(TQThread *currThread) //if something already exists, delete the object, and erase knowledge of it from the TQMap. connectionMutex->lock(); DbConnection *dbConn; - if (threadConnections->tqcontains(currThread)) + if (threadConnections->contains(currThread)) { - TQMap::Iterator it = threadConnections->tqfind(currThread); + TQMap::Iterator it = threadConnections->find(currThread); dbConn = it.data(); delete dbConn; threadConnections->erase(currThread); @@ -5202,8 +5202,8 @@ CollectionDB::initialize() AmarokConfig::setPostgresqlPassword2( passwd ); } else if( appVersion.startsWith( "1.4" ) && - ( appVersion.tqcontains( "beta", false ) || - appVersion.tqcontains( "svn", false ) ) ) + ( appVersion.contains( "beta", false ) || + appVersion.contains( "svn", false ) ) ) { passwd = Amarok::config( "Postgresql" )->readEntry( "PostgresqlPassword" ); AmarokConfig::setPostgresqlPassword2( passwd ); @@ -5265,7 +5265,7 @@ CollectionDB::initialize() // We should rmeove this before 1.4.5 if ( m_dbConnType == DbConnection::sqlite ) { TQStringList indices = query( "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;" ); - if (!indices.tqcontains("url_tag")) { + if (!indices.contains("url_tag")) { createIndices(); } } @@ -6318,10 +6318,10 @@ void SqliteConnection::sqlite_like_new( sqlite3_context *context, int argc, sqli pattern = pattern.left( pattern.length() - 1 ); if( argc == 3 ) // The function is given an escape character. In likeCondition() it defaults to '/' - pattern.tqreplace( "/%", "%" ).tqreplace( "/_", "_" ).tqreplace( "//", "/" ); + pattern.replace( "/%", "%" ).replace( "/_", "_" ).replace( "//", "/" ); int result = 0; - if ( begin && end ) result = ( text.tqfind( pattern, 0, 0 ) != -1); + if ( begin && end ) result = ( text.find( pattern, 0, 0 ) != -1); else if ( begin ) result = text.tqendsWith( pattern, 0 ); else if ( end ) result = text.tqstartsWith( pattern, 0 ); else result = ( text.lower() == pattern.lower() ); @@ -6591,7 +6591,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab if (table == NULL) return 0; TQString _table = table; - if (table.tqfind("_temp") > 0) _table = table.left(table.tqfind("_temp")); + if (table.find("_temp") > 0) _table = table.left(table.find("_temp")); curvalSql = TQString("SELECT currval('%1_seq');").tqarg(_table); result = PQexec(m_db, curvalSql.utf8()); @@ -7028,7 +7028,7 @@ QueryBuilder::addFilter( int tables, const TQString& filter ) if ( tables & tabLabels ) m_where += "OR labels.name " + CollectionDB::likeCondition( filter, true, true ); - if ( i18n( "Unknown" ).tqcontains( filter, false ) ) + if ( i18n( "Unknown" ).contains( filter, false ) ) { if ( tables & tabAlbum ) m_where += "OR album.name = '' "; @@ -7043,7 +7043,7 @@ QueryBuilder::addFilter( int tables, const TQString& filter ) if ( tables & tabSong ) m_where += "OR tags.title = '' "; } - if ( ( tables & tabArtist ) && i18n( "Various Artists" ).tqcontains( filter, false ) ) + if ( ( tables & tabArtist ) && i18n( "Various Artists" ).contains( filter, false ) ) m_where += TQString( "OR tags.sampler = %1 " ).tqarg( CollectionDB::instance()->boolT() ); m_where += " ) "; } @@ -7084,7 +7084,7 @@ QueryBuilder::addFilter( int tables, TQ_INT64 value, const TQString& filter, int else m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s; - if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) ) + if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) ) m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ); m_where += " ) "; @@ -7118,7 +7118,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter ) if ( tables & tabLabels ) m_where += "OR labels.name " + CollectionDB::likeCondition( filter[i], true, true ); - if ( i18n( "Unknown" ).tqcontains( filter[i], false ) ) + if ( i18n( "Unknown" ).contains( filter[i], false ) ) { if ( tables & tabAlbum ) m_where += "OR album.name = '' "; @@ -7133,7 +7133,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter ) if ( tables & tabSong ) m_where += "OR tags.title = '' "; } - if ( i18n( "Various Artists" ).tqcontains( filter[ i ], false ) && ( tables & tabArtist ) ) + if ( i18n( "Various Artists" ).contains( filter[ i ], false ) && ( tables & tabArtist ) ) m_where += "OR tags.sampler = " + CollectionDB::instance()->boolT() + ' '; m_where += " ) "; } @@ -7167,7 +7167,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter ) if ( tables & tabLabels ) m_where += "AND labels.name NOT " + CollectionDB::likeCondition( filter, true, true ); - if ( i18n( "Unknown" ).tqcontains( filter, false ) ) + if ( i18n( "Unknown" ).contains( filter, false ) ) { if ( tables & tabAlbum ) m_where += "AND album.name <> '' "; @@ -7183,7 +7183,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter ) m_where += "AND tags.title <> '' "; } - if ( i18n( "Various Artists" ).tqcontains( filter, false ) && ( tables & tabArtist ) ) + if ( i18n( "Various Artists" ).contains( filter, false ) && ( tables & tabArtist ) ) m_where += "AND tags.sampler = " + CollectionDB::instance()->boolF() + ' '; @@ -7221,7 +7221,7 @@ QueryBuilder::excludeFilter( int tables, TQ_INT64 value, const TQString& filter, else m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s; - if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) ) + if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) ) m_where += TQString( "AND %1.%2 <> '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ); m_where += " ) "; @@ -7715,7 +7715,7 @@ QueryBuilder::buildQuery( bool withDeviceidPlaceholder ) m_query += CollectionDB::instance()->boolT(); m_query += ' '; m_query += m_where; - if ( !m_showAll && ( m_linkTables & tabSong || m_tables.tqcontains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll + if ( !m_showAll && ( m_linkTables & tabSong || m_tables.contains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll { if ( withDeviceidPlaceholder ) m_query += "(*MountedDeviceSelection*)"; @@ -8022,7 +8022,7 @@ QueryBuilder::getValueByName(const TQString &name) bool QueryBuilder::getField(const TQString &tableValue, int *table, TQ_INT64 *value) { - int dotIndex = tableValue.tqfind( '.' ) ; + int dotIndex = tableValue.find( '.' ) ; if ( dotIndex < 0 ) return false; int tmpTable = getTableByName( tableValue.left(dotIndex) ); TQ_UINT64 tmpValue = getValueByName( tableValue.mid( dotIndex + 1 ) ); diff --git a/amarok/src/collectiondb.h b/amarok/src/collectiondb.h index d3034020..383ba088 100644 --- a/amarok/src/collectiondb.h +++ b/amarok/src/collectiondb.h @@ -247,9 +247,9 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver #ifdef USE_MYSQL // We have to escape "\" for mysql, but can't do so for sqlite ( m_dbConnType == DbConnection::mysql ) - ? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) : + ? string.replace("\\", "\\\\").replace( '\'', "''" ) : #endif - string.tqreplace( '\'', "''" ); + string.replace( '\'', "''" ); } TQString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "true"; else return "1"; } @@ -341,7 +341,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver //podcast methods /// Insert a podcast channel into the database. If @param replace is true, replace the row /// use updatePodcastChannel() always in preference - bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace=false ); + bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace=false ); /// Insert a podcast episode into the database. If @param idToUpdate is provided, replace the row /// use updatePodcastEpisode() always in preference int addPodcastEpisode( const PodcastEpisodeBundle &episode, const int idToUpdate=0 ); @@ -805,7 +805,7 @@ class QueryBuilder void buildQuery( bool withDeviceidPlaceholder = false ); TQString getQuery(); //use withDeviceidPlaceholder = false if the query isn't run immediately (*CurrentTimeT*) - //and tqreplace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection() + //and replace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection() TQString query( bool withDeviceidPlaceholder = false ) { buildQuery( withDeviceidPlaceholder ); return m_query; }; void clear(); diff --git a/amarok/src/collectionscanner/collectionscanner.cpp b/amarok/src/collectionscanner/collectionscanner.cpp index 81fcf194..ad869a4a 100644 --- a/amarok/src/collectionscanner/collectionscanner.cpp +++ b/amarok/src/collectionscanner/collectionscanner.cpp @@ -125,7 +125,7 @@ CollectionScanner::doJob() //SLOT entries = TQStringList::split( "\n", folderStream.read() ); } - for( int count = entries.tqfindIndex( lastFile ) + 1; count; --count ) + for( int count = entries.findIndex( lastFile ) + 1; count; --count ) entries.pop_front(); } @@ -213,7 +213,7 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries ) f = i; break; } #else - f = m_processedDirs.tqfind( de ); + f = m_processedDirs.find( de ); #endif if ( ! S_ISDIR( statBuf.st_mode ) || f != -1 ) { @@ -309,10 +309,10 @@ CollectionScanner::scanFiles( const TQStringList& entries ) } } - if( validImages.tqcontains( ext ) ) + if( validImages.contains( ext ) ) images += path; - else if( m_importPlaylists && validPlaylists.tqcontains( ext ) ) { + else if( m_importPlaylists && validPlaylists.contains( ext ) ) { AttributeMap attributes; attributes["path"] = path; writeElement( "playlist", attributes ); @@ -328,7 +328,7 @@ CollectionScanner::scanFiles( const TQStringList& entries ) CoverBundle cover( attributes["artist"], attributes["album"] ); - if( !covers.tqcontains( cover ) ) + if( !covers.contains( cover ) ) covers += cover; foreachType( MetaBundle::EmbeddedImageList, images ) { diff --git a/amarok/src/collectionscanner/collectionscanner.h b/amarok/src/collectionscanner/collectionscanner.h index 2130a1c8..2e02136d 100644 --- a/amarok/src/collectionscanner/collectionscanner.h +++ b/amarok/src/collectionscanner/collectionscanner.h @@ -85,7 +85,7 @@ private: */ inline TQString extension( const TQString &fileName ) { - return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : ""; + return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : ""; } /** diff --git a/amarok/src/contextbrowser.cpp b/amarok/src/contextbrowser.cpp index f44bee6e..045e4fc3 100644 --- a/amarok/src/contextbrowser.cpp +++ b/amarok/src/contextbrowser.cpp @@ -75,18 +75,18 @@ namespace Amarok { TQString escapeHTML( const TQString &s ) { - return TQString(s).tqreplace( "&", "&" ).tqreplace( "<", "<" ).tqreplace( ">", ">" ); - // .tqreplace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20 + return TQString(s).replace( "&", "&" ).replace( "<", "<" ).replace( ">", ">" ); + // .replace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20 } TQString escapeHTMLAttr( const TQString &s ) { - return TQString(s).tqreplace( "%", "%25" ).tqreplace( "'", "%27" ).tqreplace( "\"", "%22" ).tqreplace( "#", "%23" ).tqreplace( "?", "%3F" ); + return TQString(s).replace( "%", "%25" ).replace( "'", "%27" ).replace( "\"", "%22" ).replace( "#", "%23" ).replace( "?", "%3F" ); } TQString unescapeHTMLAttr( const TQString &s ) { - return TQString(s).tqreplace( "%3F", "?" ).tqreplace( "%23", "#" ).tqreplace( "%22", "\"" ).tqreplace( "%27", "'" ).tqreplace( "%25", "%" ); + return TQString(s).replace( "%3F", "?" ).replace( "%23", "#" ).replace( "%22", "\"" ).replace( "%27", "'" ).replace( "%25", "%" ); } TQString verboseTimeSince( const TQDateTime &datetime ) @@ -146,7 +146,7 @@ namespace Amarok */ void albumArtistTrackFromUrl( TQString url, TQString &artist, TQString &album, TQString &detail ) { - if ( !url.tqcontains("@@@") ) return; + if ( !url.contains("@@@") ) return; //KHTML removes the trailing space! if ( url.endsWith( " @@@" ) ) url += ' '; @@ -443,9 +443,9 @@ void ContextBrowser::openURLRequest( const KURL &url ) } else if ( url.protocol() == "show" ) { - if ( url.path().tqcontains( "suggestLyric-" ) ) + if ( url.path().contains( "suggestLyric-" ) ) { - TQString _url = url.url().mid( url.url().tqfind( TQString( "-" ) ) +1 ); + TQString _url = url.url().mid( url.url().find( TQString( "-" ) ) +1 ); debug() << "Clicked lyrics URL: " << _url << endl; m_dirtyLyricsPage = true; showLyrics( _url ); @@ -503,7 +503,7 @@ void ContextBrowser::openURLRequest( const KURL &url ) } else if ( url.protocol() == "externalurl" ) - Amarok::invokeBrowser( url.url().tqreplace( TQRegExp( "^externalurl:" ), "http:") ); + Amarok::invokeBrowser( url.url().replace( TQRegExp( "^externalurl:" ), "http:") ); else if ( url.protocol() == "lastfm" ) { @@ -547,7 +547,7 @@ void ContextBrowser::openURLRequest( const KURL &url ) else if( url.protocol() == "ggartist" ) { const TQString url2 = TQString( "http://www.google.com/musicsearch?q=%1&res=artist" ) - .tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).tqreplace( " ", "+" ), 106 /*utf-8*/ ) ); + .tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).replace( " ", "+" ), 106 /*utf-8*/ ) ); Amarok::invokeBrowser( url2 ); } @@ -558,7 +558,7 @@ void ContextBrowser::openURLRequest( const KURL &url ) else if( url.protocol() == "stream" ) { - Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions ); + Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions ); } else if( url.protocol() == "compilationdisc" || url.protocol() == "albumdisc" ) @@ -639,10 +639,10 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan if ( MetaBundle( m_currentURL ).artist() != bundle.artist() ) m_dirtyWikiPage = true; // Prepend stream metadata history item to list - if ( !m_metadataHistory.first().tqcontains( bundle.prettyTitle() ) ) + if ( !m_metadataHistory.first().contains( bundle.prettyTitle() ) ) { newMetaData = true; - const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).tqreplace(" ", " "); // don't break over lines + const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).replace(" ", " "); // don't break over lines m_metadataHistory.prepend( TQString( "" + timeString + " " + escapeHTML( bundle.prettyTitle() ) + "" ) ); } @@ -676,7 +676,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan // look for the cue file that matches the media file played first TQString path = bundle.url().path(); - TQString cueFile = path.left( path.tqfindRev('.') ) + ".cue"; + TQString cueFile = path.left( path.findRev('.') ) + ".cue"; m_cuefile->setCueFileName( cueFile ); @@ -713,7 +713,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan { line = line.mid( 5 ).remove( '"' ); - if ( line.tqcontains( bundle.filename(), false ) ) + if ( line.contains( bundle.filename(), false ) ) { cueFile = dir.filePath(*it); foundCueFile = true; @@ -799,7 +799,7 @@ void ContextBrowser::saveHtmlData() TQTextStream stream( &exportedDocument ); stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << m_HTMLSource // the pure html data.. - .tqreplace( "", + .replace( "", TQString( "" ) .tqarg( HTMLView::loadStyleSheet() ) ); // and the @@ -931,7 +931,7 @@ void ContextBrowser::slotContextMenu( const TQString& urlString, const TQPoint& } else if( url.protocol() == "stream" ) { - url = KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ); + url = KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) ); urls = KURL::List( url ); menu.insertTitle( i18n("Podcast"), TITLE ); menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE ); @@ -1601,13 +1601,13 @@ CurrentTrackJob::showHomeByAlbums() "
\n" ) .args( TQStringList() << TQString::number( i ) - << pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" ) + << pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" ) << escapeHTMLAttr( imageAttr ) << escapeHTMLAttr( image ) << escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) ) << ( ep.localUrl().isValid() ? ep.localUrl().url() - : ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) ) + : ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) ) << escapeHTML( pcb.title() + ": " + ep.title() ) << escapeHTML( date ) << "none" @@ -1772,7 +1772,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle ¤tTrack ) newUrls.append( &titleUrl ); for ( TQString* url = newUrls.first(); url; url = newUrls.next() ) - url->tqreplace( TQRegExp( "^http:" ), "externalurl:" ); + url->replace( TQRegExp( "^http:" ), "externalurl:" ); const TQString skipIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("next"), -KIcon::SizeSmallMedium ); const TQString loveIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("love"), -KIcon::SizeSmallMedium ); @@ -1988,7 +1988,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack ) << escapeHTML( pcb.title() ) << escapeHTML( peb.title() ) << ( pcb.link().isValid() - ? pcb.link().url().tqreplace( TQRegExp( "^http:" ), "externalurl:" ) + ? pcb.link().url().replace( TQRegExp( "^http:" ), "externalurl:" ) : "current://track" ) << image << imageAttr @@ -2064,7 +2064,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack ) << escapeHTML( ep.duration() ? MetaBundle::prettyTime( ep.duration() ) : TQString( "" ) ) << ( ep.localUrl().isValid() ? ep.localUrl().url() - : ep.url().url().tqreplace( TQRegExp( "^http:" ), "stream:" ) ) + : ep.url().url().replace( TQRegExp( "^http:" ), "stream:" ) ) << escapeHTML( ep.title() ) << escapeHTML( date ) << (peb.url() == ep.url() ? "block" : "none" ) @@ -3256,9 +3256,9 @@ void ContextBrowser::showLyrics( const TQString &url ) TQString title = EngineController::instance()->bundle().title(); TQString artist = EngineController::instance()->bundle().artist(); - if( title.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) + if( title.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) title = title.remove(" (PREVIEW: buy it at www.magnatune.com)"); - if( artist.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) + if( artist.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) artist = artist.remove(" (PREVIEW: buy it at www.magnatune.com)"); if ( title.isEmpty() ) { @@ -3266,15 +3266,15 @@ void ContextBrowser::showLyrics( const TQString &url ) The fact that it often (but not always) has artist name together, can be bad, but at least the user will hopefully get nice suggestions. */ TQString prettyTitle = EngineController::instance()->bundle().prettyTitle(); - int h = prettyTitle.tqfind( '-' ); + int h = prettyTitle.find( '-' ); if ( h != -1 ) { title = prettyTitle.mid( h+1 ).stripWhiteSpace(); - if( title.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) + if( title.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) title = title.remove(" (PREVIEW: buy it at www.magnatune.com)"); if ( artist.isEmpty() ) { artist = prettyTitle.mid( 0, h ).stripWhiteSpace(); - if( artist.tqcontains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) + if( artist.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 ) artist = artist.remove(" (PREVIEW: buy it at www.magnatune.com)"); } @@ -3399,10 +3399,10 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT if ( el.attribute( "add_url" ).isEmpty() ) { m_lyricAddUrl = spec.readPathEntry( "add_url" ); - m_lyricAddUrl.tqreplace( "MAGIC_ARTIST", KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ) ); - m_lyricAddUrl.tqreplace( "MAGIC_TITLE", KURL::encode_string_no_slash( EngineController::instance()->bundle().title() ) ); - m_lyricAddUrl.tqreplace( "MAGIC_ALBUM", KURL::encode_string_no_slash( EngineController::instance()->bundle().album() ) ); - m_lyricAddUrl.tqreplace( "MAGIC_YEAR", KURL::encode_string_no_slash( TQString::number( EngineController::instance()->bundle().year() ) ) ); + m_lyricAddUrl.replace( "MAGIC_ARTIST", KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ) ); + m_lyricAddUrl.replace( "MAGIC_TITLE", KURL::encode_string_no_slash( EngineController::instance()->bundle().title() ) ); + m_lyricAddUrl.replace( "MAGIC_ALBUM", KURL::encode_string_no_slash( EngineController::instance()->bundle().album() ) ); + m_lyricAddUrl.replace( "MAGIC_YEAR", KURL::encode_string_no_slash( TQString::number( EngineController::instance()->bundle().year() ) ) ); } else m_lyricAddUrl = el.attribute( "add_url" ); @@ -3430,11 +3430,11 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT } } lyrics += i18n( "

You can search for the lyrics on the Web.

" ) - .tqarg( TQString( m_lyricSearchUrl ).tqreplace( TQRegExp( "^http:" ), "externalurl:" ) ); + .tqarg( TQString( m_lyricSearchUrl ).replace( TQRegExp( "^http:" ), "externalurl:" ) ); } else { lyrics = el.text(); - lyrics.tqreplace( "\n", "
\n" ); // Plaintext -> HTML + lyrics.replace( "\n", "
\n" ); // Plaintext -> HTML const TQString title = el.attribute( "title" ); const TQString artist = el.attribute( "artist" ); @@ -3740,7 +3740,7 @@ TQString ContextBrowser::wikiURL( const TQString &item ) { // add any special characters to be replaced here - TQString wStr = TQString(item).tqreplace( "/", " " ); + TQString wStr = TQString(item).replace( "/", " " ); return TQString( "http://%1.wikipedia.org/wiki/" ).tqarg( wikiLocale() ) + KURL::encode_string_no_slash( wStr, 106 /*utf-8*/ ); @@ -3789,7 +3789,7 @@ ContextBrowser::showLabelsDialog() foreach( allLabels ) { TQCheckListItem *item = new TQCheckListItem( m_labelListView, *it, TQCheckListItem::CheckBox ); - item->setOn( trackLabels.tqcontains( *it ) ); + item->setOn( trackLabels.contains( *it ) ); } if( dialog->exec() == TQDialog::Accepted ) { @@ -3936,9 +3936,9 @@ void ContextBrowser::showWikipedia( const TQString &url, bool fromHistory, bool } //Hack to make wiki searches work with magnatune preview tracks - if (tmpWikiStr.tqcontains( "PREVIEW: buy it at www.magnatune.com" ) >= 1 ) { + if (tmpWikiStr.contains( "PREVIEW: buy it at www.magnatune.com" ) >= 1 ) { tmpWikiStr = tmpWikiStr.remove(" (PREVIEW: buy it at www.magnatune.com)" ); - int index = tmpWikiStr.tqfind( '-' ); + int index = tmpWikiStr.find( '-' ); if ( index != -1 ) { tmpWikiStr = tmpWikiStr.left (index - 1); } @@ -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_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 ); Amarok::StatusBar::instance()->newProgressOperation( m_wikiJob ) @@ -4136,11 +4136,11 @@ ContextBrowser::wikiResult( KIO::Job* job ) //SLOT m_wikiToolBar->setItemEnabled( WIKI_BROWSER, true ); // FIXME: Get a safer Regexp here, to match only inside of 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() ); } - if( m_wiki.tqfind( "var wgArticleId = 0" ) != -1 ) + if( m_wiki.find( "var wgArticleId = 0" ) != -1 ) { 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). - m_wiki.tqreplace( "\n", " " ); - m_wiki.tqreplace( "\t", " " ); + m_wiki.replace( "\n", " " ); + m_wiki.replace( "\t", " " ); m_wikiLanguages = TQString(); // Get the available language list - if ( m_wiki.tqfind("
") != -1 ) + if ( m_wiki.find("
") != -1 ) { - m_wikiLanguages = m_wiki.mid( m_wiki.tqfind("
") ); - m_wikiLanguages = m_wikiLanguages.mid( m_wikiLanguages.tqfind("
    ") ); - m_wikiLanguages = m_wikiLanguages.mid( 0, m_wikiLanguages.tqfind( "
" ) ); + m_wikiLanguages = m_wiki.mid( m_wiki.find("
") ); + m_wikiLanguages = m_wikiLanguages.mid( m_wikiLanguages.find("
    ") ); + m_wikiLanguages = m_wikiLanguages.mid( 0, m_wikiLanguages.find( "
" ) ); } TQString copyright; TQString copyrightMark = "
  • "; - if ( m_wiki.tqfind( copyrightMark ) != -1 ) + if ( m_wiki.find( copyrightMark ) != -1 ) { - copyright = m_wiki.mid( m_wiki.tqfind(copyrightMark) + copyrightMark.length() ); - copyright = copyright.mid( 0, copyright.tqfind( "
  • " ) ); - copyright.tqreplace( "
    ", TQString() ); + copyright = m_wiki.mid( m_wiki.find(copyrightMark) + copyrightMark.length() ); + copyright = copyright.mid( 0, copyright.find( "" ) ); + copyright.replace( "
    ", TQString() ); //only one br at the beginning copyright.prepend( "
    " ); } // Ok lets remove the top and bottom parts of the page - m_wiki = m_wiki.mid( m_wiki.tqfind( "

    " ) ); - m_wiki = m_wiki.mid( 0, m_wiki.tqfind( "
    " ) ); + m_wiki = m_wiki.mid( m_wiki.find( "

    " ) ); + m_wiki = m_wiki.mid( 0, m_wiki.find( "
    " ) ); // Adding back license information m_wiki += copyright; m_wiki.append( "
    " ); - m_wiki.tqreplace( TQRegExp("

    [^<]*

    "), TQString() ); + m_wiki.replace( TQRegExp("

    [^<]*

    "), TQString() ); - m_wiki.tqreplace( TQRegExp( "]*>[^<]*<[^>]*>[^<]*<[^>]*>[^<]*" ), TQString() ); + m_wiki.replace( TQRegExp( "]*>[^<]*<[^>]*>[^<]*<[^>]*>[^<]*" ), TQString() ); - m_wiki.tqreplace( TQRegExp( "]*>([^<]*)" ), "\\1" ); + m_wiki.replace( TQRegExp( "]*>([^<]*)" ), "\\1" ); // Remove anything inside of a class called urlexpansion, as it's pointless for us - m_wiki.tqreplace( TQRegExp( "[^(]*[(][^)]*[)]" ), TQString() ); + m_wiki.replace( TQRegExp( "[^(]*[(][^)]*[)]" ), TQString() ); // Remove hidden table rows as well TQRegExp hidden( ".*", false ); 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) - m_wiki.tqreplace( TQRegExp( "style= *\"[^\"]*\"" ), TQString() ); - m_wiki.tqreplace( TQRegExp( "class= *\"[^\"]*\"" ), TQString() ); + m_wiki.replace( TQRegExp( "style= *\"[^\"]*\"" ), TQString() ); + m_wiki.replace( TQRegExp( "class= *\"[^\"]*\"" ), TQString() ); // let's remove the form elements, we don't want them. - m_wiki.tqreplace( TQRegExp( "]*>" ), TQString() ); - m_wiki.tqreplace( TQRegExp( "]*>" ), TQString() ); - m_wiki.tqreplace( "\n" , TQString() ); - m_wiki.tqreplace( TQRegExp( "]*>" ), TQString() ); - m_wiki.tqreplace( "\n" , TQString() ); - m_wiki.tqreplace( TQRegExp( "]*>" ), TQString() ); - m_wiki.tqreplace( "" , TQString() ); + m_wiki.replace( TQRegExp( "]*>" ), TQString() ); + m_wiki.replace( TQRegExp( "]*>" ), TQString() ); + m_wiki.replace( "\n" , TQString() ); + m_wiki.replace( TQRegExp( "]*>" ), TQString() ); + m_wiki.replace( "\n" , TQString() ); + m_wiki.replace( TQRegExp( "]*>" ), TQString() ); + m_wiki.replace( "" , TQString() ); //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.tqreplace( TQRegExp( "href= *\"/" ), "href=\"" +m_wikiBaseUrl ); - m_wiki.tqreplace( TQRegExp( "href= *\"#" ), "href=\"" +m_wikiCurrentUrl + '#' ); + m_wiki.replace( TQRegExp( "href= *\"http:" ), "href=\"externalurl:" ); + m_wiki.replace( TQRegExp( "href= *\"/" ), "href=\"" +m_wikiBaseUrl ); + m_wiki.replace( TQRegExp( "href= *\"#" ), "href=\"" +m_wikiCurrentUrl + '#' ); m_HTMLSource = "\n"; m_HTMLSource.append( @@ -4271,7 +4271,7 @@ ContextBrowser::coverFetched( const TQString &artist, const TQString &album ) // !m_browseArtists ) { m_dirtyCurrentTrackPage = true; - if( m_shownAlbums.tqcontains( album ) ) + if( m_shownAlbums.contains( album ) ) showCurrentTrack(); return; } @@ -4297,7 +4297,7 @@ ContextBrowser::coverRemoved( const TQString &artist, const TQString &album ) // !m_browseArtists ) { m_dirtyCurrentTrackPage = true; - if( m_shownAlbums.tqcontains( album ) ) + if( m_shownAlbums.contains( album ) ) showCurrentTrack(); return; } @@ -4363,7 +4363,7 @@ void ContextBrowser::tagsChanged( const MetaBundle &bundle ) //SLOT { const MetaBundle ¤tTrack = 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() ) return; @@ -4379,7 +4379,7 @@ void ContextBrowser::tagsChanged( const TQString &oldArtist, const TQString &old { const MetaBundle ¤tTrack = 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() ) return; @@ -4492,7 +4492,7 @@ ContextBrowser::expandURL( const KURL &url ) } else if( protocol == "stream" ) { - urls += KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ); + urls += KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) ); } return urls; diff --git a/amarok/src/coverfetcher.cpp b/amarok/src/coverfetcher.cpp index 0aa7992a..6751b850 100644 --- a/amarok/src/coverfetcher.cpp +++ b/amarok/src/coverfetcher.cpp @@ -58,7 +58,7 @@ Amarok::coverContextMenu( TQWidget *tqparent, TQPoint point, const TQString &art #ifndef AMAZON_SUPPORT menu.setItemEnabled( FETCH, false ); #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( DELETE, disable ); diff --git a/amarok/src/covermanager.cpp b/amarok/src/covermanager.cpp index bf1c60ef..7ef53c29 100644 --- a/amarok/src/covermanager.cpp +++ b/amarok/src/covermanager.cpp @@ -586,7 +586,7 @@ void CoverManager::slotSetFilter() //SLOT for( TQIconViewItem *item = m_coverItems.first(); item; item = m_coverItems.next() ) { CoverViewItem *coverItem = static_cast(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->setAutoArrange( true ); @@ -621,7 +621,7 @@ void CoverManager::changeView( int id ) //SLOT bool show = false; CoverViewItem *coverItem = static_cast(item); 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; } diff --git a/amarok/src/database_refactor/collectiondb.cpp b/amarok/src/database_refactor/collectiondb.cpp index 341783da..82fcbb77 100644 --- a/amarok/src/database_refactor/collectiondb.cpp +++ b/amarok/src/database_refactor/collectiondb.cpp @@ -889,7 +889,7 @@ CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, u uint maxmatches = 0; 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 ) { image = values[i]; @@ -1094,11 +1094,11 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental, DbConnection if ( title.isEmpty() ) { 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(); 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(); } } diff --git a/amarok/src/database_refactor/dbenginebase.h b/amarok/src/database_refactor/dbenginebase.h index 9e459faa..b4600849 100644 --- a/amarok/src/database_refactor/dbenginebase.h +++ b/amarok/src/database_refactor/dbenginebase.h @@ -72,10 +72,10 @@ class QueryBuilder #ifdef USE_MYSQL // We have to escape "\" for mysql, but can't do so for sqlite (m_dbConnType == DbConnection::mysql) - ? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) + ? string.replace("\\", "\\\\").replace( '\'', "''" ) : #endif - string.tqreplace( '\'', "''" ); + string.replace( '\'', "''" ); } void addReturnValue( int table, int value ); diff --git a/amarok/src/device/massstorage/massstoragedevicehandler.cpp b/amarok/src/device/massstorage/massstoragedevicehandler.cpp index 63965e06..a8475796 100644 --- a/amarok/src/device/massstorage/massstoragedevicehandler.cpp +++ b/amarok/src/device/massstorage/massstoragedevicehandler.cpp @@ -154,9 +154,9 @@ bool MassStorageDeviceHandlerFactory::excludedFilesystem( const TQString &fstype ) const { return fstype.isEmpty() || - fstype.tqfind( "smb" ) != -1 || - fstype.tqfind( "cifs" ) != -1 || - fstype.tqfind( "nfs" ) != -1 || + fstype.find( "smb" ) != -1 || + fstype.find( "cifs" ) != -1 || + fstype.find( "nfs" ) != -1 || fstype == "udf" || fstype == "iso9660" ; } diff --git a/amarok/src/device/smb/smbdevicehandler.cpp b/amarok/src/device/smb/smbdevicehandler.cpp index 80d159d0..072c36a8 100644 --- a/amarok/src/device/smb/smbdevicehandler.cpp +++ b/amarok/src/device/smb/smbdevicehandler.cpp @@ -110,8 +110,8 @@ SmbDeviceHandlerFactory::canCreateFromConfig( ) const bool SmbDeviceHandlerFactory::canHandle( const Medium * m ) const { - return m && ( m->fsType().tqfind( "smb" ) != -1 || - m->fsType().tqfind( "cifs" ) != -1 ) + return m && ( m->fsType().find( "smb" ) != -1 || + m->fsType().find( "cifs" ) != -1 ) && m->isMounted(); } diff --git a/amarok/src/devicemanager.cpp b/amarok/src/devicemanager.cpp index e5144791..797688be 100644 --- a/amarok/src/devicemanager.cpp +++ b/amarok/src/devicemanager.cpp @@ -103,7 +103,7 @@ DeviceManager::mediumRemoved( const TQString name ) if ( !m_valid ) return; Medium* removedMedium = 0; - if ( m_mediumMap.tqcontains(name) ) + if ( m_mediumMap.contains(name) ) removedMedium = m_mediumMap[name]; if ( removedMedium != 0 ) 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 //There is no point in calling getDevice, since it will not be in the list anyways 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 m_mediumMap.remove(name); @@ -215,7 +215,7 @@ DeviceManager::getDevice( const TQString name ) if ( (*it).name() == name ) { 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. returnedMedium = *secIt; @@ -246,7 +246,7 @@ DeviceManager::reconcileMediumMap() for ( it = currMediumList.begin(); it != currMediumList.end(); ++it ) { 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); *mediumHolder = Medium( *it ); diff --git a/amarok/src/directorylist.cpp b/amarok/src/directorylist.cpp index b13ce216..b1f1c86a 100644 --- a/amarok/src/directorylist.cpp +++ b/amarok/src/directorylist.cpp @@ -120,7 +120,7 @@ Item::Item( TQListView *tqparent ) , m_fullyDisabled( false ) { //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( this )->setOn(true); m_lister.setDirOnlyMode( true ); connect( &m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(newItems( const KFileItemList& )) ); @@ -191,7 +191,7 @@ Item::stateChange( bool b ) return; // 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 ( it == cs_m_dirs.end() ) cs_m_dirs << m_url.path(); @@ -274,7 +274,7 @@ Item::newItems( const KFileItemList &list ) //SLOT if ( !item->isFullyDisabled() ) { if( CollectionSetup::instance()->recursive() && isOn() || - CollectionSetup::instance()->m_dirs.tqcontains( item->fullPath() ) ) + CollectionSetup::instance()->m_dirs.contains( item->fullPath() ) ) { item->setOn( true ); } diff --git a/amarok/src/dynamicmode.cpp b/amarok/src/dynamicmode.cpp index cc5471a5..6695a273 100644 --- a/amarok/src/dynamicmode.cpp +++ b/amarok/src/dynamicmode.cpp @@ -270,10 +270,10 @@ DEBUG_BLOCK // FIXME: All this SQL magic out of collectiondb is not a good thing // 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.*)?;$" ); - 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( songCount ) ); } @@ -286,9 +286,9 @@ DEBUG_BLOCK if( findLocation == -1 ) //not found, let's find out the higher limit the hard way { 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 - counting.tqreplace( TQRegExp( "ORDER BY.*" ), "" ); + counting.replace( TQRegExp( "ORDER BY.*" ), "" ); TQStringList countingResult = CollectionDB::instance()->query( counting ); limit = countingResult[0].toInt(); } @@ -308,7 +308,7 @@ DEBUG_BLOCK // is meaningless in dynamic mode 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( songCount ) ); } @@ -324,16 +324,16 @@ DEBUG_BLOCK if( findLocation == -1 ) // there is no 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; } 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 - 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 items; diff --git a/amarok/src/engine/helix/COPYING b/amarok/src/engine/helix/COPYING index 449a9762..0fc8a215 100644 --- a/amarok/src/engine/helix/COPYING +++ b/amarok/src/engine/helix/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/engine/helix/helix-engine.cpp b/amarok/src/engine/helix/helix-engine.cpp index 3c2355b6..7d778741 100644 --- a/amarok/src/engine/helix/helix-engine.cpp +++ b/amarok/src/engine/helix/helix-engine.cpp @@ -288,7 +288,7 @@ HelixEngine::load( const KURL &url, bool isStream ) if (!canDecode(url)) { 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) ); return false; } @@ -550,7 +550,7 @@ HelixEngine::canDecode( const KURL &url ) const return true; 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") for (int i=0; i<(int)m_mimes.size(); i++) diff --git a/amarok/src/engine/helix/helix-sp/hspcontext.cpp b/amarok/src/engine/helix/helix-sp/hspcontext.cpp index ef45937d..f87a9141 100644 --- a/amarok/src/engine/helix/helix-sp/hspcontext.cpp +++ b/amarok/src/engine/helix/helix-sp/hspcontext.cpp @@ -319,7 +319,7 @@ void HSPClientContext::Init(IUnknown* pUnknown, if (pszGUID && *pszGUID) { // Encode GUID - // TODO: tqfind/implement Cipher + // TODO: find/implement Cipher //pszCipher = Cipher(pszGUID); //SafeStrCpy(m_pszGUID, pszCipher, 256); } diff --git a/amarok/src/engine/kdemm/kdemmengine.cpp b/amarok/src/engine/kdemm/kdemmengine.cpp index 3addcc69..b39033e0 100644 --- a/amarok/src/engine/kdemm/kdemmengine.cpp +++ b/amarok/src/engine/kdemm/kdemmengine.cpp @@ -113,7 +113,7 @@ bool KDEMMEngine::canDecode( const KURL &url ) const KMimeType::Ptr mimetype = fileItem.determineMimeType(); kdDebug() << "mimetype: " << mimetype->name().latin1() << endl; - return list.tqcontains( mimetype->name().latin1() ); + return list.contains( mimetype->name().latin1() ); } // canDecode diff --git a/amarok/src/engine/mas/masengine.cpp b/amarok/src/engine/mas/masengine.cpp index 52807f38..f06c1a03 100644 --- a/amarok/src/engine/mas/masengine.cpp +++ b/amarok/src/engine/mas/masengine.cpp @@ -127,7 +127,7 @@ bool MasEngine::canDecode( const KURL &url ) const KMimeType::Ptr mimetype = fileItem.determineMimeType(); debug() << "mimetype: " << mimetype->name().latin1() << endl; - playable = list.tqcontains( mimetype->name().latin1() ); + playable = list.contains( mimetype->name().latin1() ); if ( !playable ) warning() << "Mimetype is not playable by MAS (" << url << ")" << endl; diff --git a/amarok/src/engine/nmm/nmm_engine.cpp b/amarok/src/engine/nmm/nmm_engine.cpp index 96d3d9fe..43b065de 100644 --- a/amarok/src/engine/nmm/nmm_engine.cpp +++ b/amarok/src/engine/nmm/nmm_engine.cpp @@ -623,7 +623,7 @@ bool NmmEngine::canDecode(const KURL& url) const KFileItem fileItem( KFileItem::Unknown, KFileItem::Unknown, url, false ); //false = determineMimeType straight away KMimeType::Ptr mimetype = fileItem.determineMimeType(); - return types.tqcontains(mimetype->name()); + return types.contains(mimetype->name()); } diff --git a/amarok/src/engine/xine/xine-engine.cpp b/amarok/src/engine/xine/xine-engine.cpp index 341835c2..815f6370 100644 --- a/amarok/src/engine/xine/xine-engine.cpp +++ b/amarok/src/engine/xine/xine-engine.cpp @@ -654,7 +654,7 @@ XineEngine::canDecode( const KURL &url ) const list.remove("ssa"); //HACK we also check for m4a because xine plays them but //for some reason doesn't return the extension - if(!list.tqcontains("m4a")) + if(!list.contains("m4a")) list << "m4a"; } @@ -669,9 +669,9 @@ XineEngine::canDecode( const KURL &url ) const if (path.endsWith( ".part" )) 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& diff --git a/amarok/src/enginecontroller.cpp b/amarok/src/enginecontroller.cpp index a87dfe32..d41f5c75 100644 --- a/amarok/src/enginecontroller.cpp +++ b/amarok/src/enginecontroller.cpp @@ -230,7 +230,7 @@ bool EngineController::canDecode( const KURL &url ) //static if ( !url.isLocalFile() ) return true; // If extension is already in the cache, return cache result - if ( extensionCache().tqcontains( ext ) ) + if ( extensionCache().contains( ext ) ) return s_extensionCache[ext]; // 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 { // 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; // We compare the new item with the last two items, because mth.house currently cycles diff --git a/amarok/src/engineobserver.cpp b/amarok/src/engineobserver.cpp index 2d687d81..68e6fce4 100644 --- a/amarok/src/engineobserver.cpp +++ b/amarok/src/engineobserver.cpp @@ -139,7 +139,7 @@ void EngineSubject::trackLengthChangedNotify( long length ) void EngineSubject::attach( EngineObserver *observer ) { - if( !observer || Observers.tqfind( observer ) != -1 ) + if( !observer || Observers.find( observer ) != -1 ) return; Observers.append( observer ); } @@ -147,5 +147,5 @@ void EngineSubject::attach( EngineObserver *observer ) void EngineSubject::detach( EngineObserver *observer ) { - if( Observers.tqfind( observer ) != -1 ) Observers.remove(); + if( Observers.find( observer ) != -1 ) Observers.remove(); } diff --git a/amarok/src/equalizerpresetmanager.cpp b/amarok/src/equalizerpresetmanager.cpp index 5da5f862..80179c66 100644 --- a/amarok/src/equalizerpresetmanager.cpp +++ b/amarok/src/equalizerpresetmanager.cpp @@ -102,7 +102,7 @@ EqualizerPresetManager::slotRename() if ( ok && item->text(0) != title ) { // 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 ) ); if ( button != KMessageBox::Yes ) diff --git a/amarok/src/equalizersetup.cpp b/amarok/src/equalizersetup.cpp index 199cb389..56a4bd62 100644 --- a/amarok/src/equalizersetup.cpp +++ b/amarok/src/equalizersetup.cpp @@ -341,7 +341,7 @@ EqualizerSetup::editPresets() TQString newTitle = currentTitle; // 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 TQMap< TQString, TQValueList >::Iterator end = presets.end(); @@ -369,7 +369,7 @@ EqualizerSetup::addPreset() if (ok) { // 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 ) ); if ( button != KMessageBox::Yes ) diff --git a/amarok/src/expression.cpp b/amarok/src/expression.cpp index ddf47848..09721b6a 100644 --- a/amarok/src/expression.cpp +++ b/amarok/src/expression.cpp @@ -45,11 +45,11 @@ ParsedExpression ExpressionParser::parse( const TQString &expression ) //static bool ExpressionParser::isAdvancedExpression( const TQString &expression ) //static { - return ( expression.tqcontains( '"' ) || - expression.tqcontains( ':' ) || - expression.tqcontains( '-' ) || - expression.tqcontains( "AND" ) || - expression.tqcontains( "OR" ) ); + return ( expression.contains( '"' ) || + expression.contains( ':' ) || + expression.contains( '-' ) || + expression.contains( "AND" ) || + expression.contains( "OR" ) ); } /* PRIVATE */ diff --git a/amarok/src/filebrowser.cpp b/amarok/src/filebrowser.cpp index 366bed5c..9db38420 100644 --- a/amarok/src/filebrowser.cpp +++ b/amarok/src/filebrowser.cpp @@ -622,7 +622,7 @@ SearchPane::SearchPane( FileBrowser *tqparent ) 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 ); connect( button, TQT_SIGNAL(toggled( bool )), TQT_SLOT(toggle( bool )) ); @@ -661,7 +661,7 @@ SearchPane::searchTextChanged( const TQString &text ) return; } - m_filter = TQRegExp( text.tqcontains( "*" ) ? text : '*'+text+'*', false, true ); + m_filter = TQRegExp( text.contains( "*" ) ? text : '*'+text+'*', false, true ); m_lister->openURL( searchURL() ); diff --git a/amarok/src/htmlview.cpp b/amarok/src/htmlview.cpp index 993da6c6..a9c6db44 100644 --- a/amarok/src/htmlview.cpp +++ b/amarok/src/htmlview.cpp @@ -132,18 +132,18 @@ HTMLView::loadStyleSheet() TQString tmpCSS = eCSSts.read(); ExternalCSS.close(); - tmpCSS.tqreplace( "./", KURL::fromPathOrURL( CSSLocation ).directory( false ) ); - tmpCSS.tqreplace( "AMAROK_FONTSIZE-2", pxSize ); - tmpCSS.tqreplace( "AMAROK_FONTSIZE", pxSize ); - tmpCSS.tqreplace( "AMAROK_FONTSIZE+2", pxSize ); - tmpCSS.tqreplace( "AMAROK_FONTFAMILY", fontFamily ); - tmpCSS.tqreplace( "AMAROK_TEXTCOLOR", text ); - tmpCSS.tqreplace( "AMAROK_LINKCOLOR", link ); - tmpCSS.tqreplace( "AMAROK_BGCOLOR", bg ); - tmpCSS.tqreplace( "AMAROK_FGCOLOR", fg ); - tmpCSS.tqreplace( "AMAROK_BASECOLOR", base ); - tmpCSS.tqreplace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() ); - tmpCSS.tqreplace( "AMAROK_GRADIENTCOLOR", gradientColor.name() ); + tmpCSS.replace( "./", KURL::fromPathOrURL( CSSLocation ).directory( false ) ); + tmpCSS.replace( "AMAROK_FONTSIZE-2", pxSize ); + tmpCSS.replace( "AMAROK_FONTSIZE", pxSize ); + tmpCSS.replace( "AMAROK_FONTSIZE+2", pxSize ); + tmpCSS.replace( "AMAROK_FONTFAMILY", fontFamily ); + tmpCSS.replace( "AMAROK_TEXTCOLOR", text ); + tmpCSS.replace( "AMAROK_LINKCOLOR", link ); + tmpCSS.replace( "AMAROK_BGCOLOR", bg ); + tmpCSS.replace( "AMAROK_FGCOLOR", fg ); + tmpCSS.replace( "AMAROK_BASECOLOR", base ); + tmpCSS.replace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() ); + tmpCSS.replace( "AMAROK_GRADIENTCOLOR", gradientColor.name() ); styleSheet += tmpCSS; } diff --git a/amarok/src/iconloader.cpp b/amarok/src/iconloader.cpp index e20b605f..4a8a1e46 100644 --- a/amarok/src/iconloader.cpp +++ b/amarok/src/iconloader.cpp @@ -87,7 +87,7 @@ Amarok::icon( const TQString& name ) //declared in amarok.h iconMap["rewind"] = "2leftarrow"; iconMap["save"] = "filesave"; iconMap["scripts"] = "pencil"; - iconMap["search"] = "tqfind"; + iconMap["search"] = "find"; iconMap["settings_engine"] = "amarok"; iconMap["settings_general"] = "misc"; iconMap["settings_indicator"] = "tv"; @@ -99,7 +99,7 @@ Amarok::icon( const TQString& name ) //declared in amarok.h iconMap["track"] = "sound"; iconMap["undo"] = "undo"; iconMap["visualizations"] = "visualizations"; - iconMap["zoom"] = "tqfind"; + iconMap["zoom"] = "find"; } static TQMap amarokMap; @@ -108,11 +108,11 @@ Amarok::icon( const TQString& name ) //declared in amarok.h amarokMap["dequeue_track"] = "rewind"; } - if( iconMap.tqcontains( name ) ) + if( iconMap.contains( name ) ) { if( AmarokConfig::useCustomIconTheme() ) { - if( amarokMap.tqcontains( name ) ) + if( amarokMap.contains( name ) ) return TQString( "amarok_" ) + amarokMap[name]; return TQString( "amarok_" ) + name; } diff --git a/amarok/src/konquisidebar/universalamarok.cpp b/amarok/src/konquisidebar/universalamarok.cpp index d3d54650..aa5b775f 100644 --- a/amarok/src/konquisidebar/universalamarok.cpp +++ b/amarok/src/konquisidebar/universalamarok.cpp @@ -198,7 +198,7 @@ void UniversalAmarok::updateBrowser(const TQString& file) line = stream.readLine(); // line of text excluding '\n' text += TQString("\n") + line; } f_file.close(); - text=text.tqreplace("begin(); browser->write(text); browser->end(); diff --git a/amarok/src/ktrm.cpp b/amarok/src/ktrm.cpp index 6ee3c1b4..d9aa9873 100644 --- a/amarok/src/ktrm.cpp +++ b/amarok/src/ktrm.cpp @@ -77,7 +77,7 @@ public: int startLookup(KTRMLookup *lookup) { int id; - if(!m_fileMap.tqcontains(lookup->file())) { + if(!m_fileMap.contains(lookup->file())) { #if HAVE_TUNEPIMP >= 4 id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0); #else @@ -106,9 +106,9 @@ public: bool lookupMapContains(int fileId) const { m_lookupMapMutex.lock(); - bool tqcontains = m_lookupMap.tqcontains(fileId); + bool contains = m_lookupMap.contains(fileId); m_lookupMapMutex.unlock(); - return tqcontains; + return contains; } KTRMLookup *lookup(int fileId) const @@ -696,7 +696,7 @@ void KTRMLookup::collision() 2 * stringSimilarity(strList,result.d->artist) + 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; } @@ -791,7 +791,7 @@ void KTRMLookup::lookupResult( KIO::Job* job ) 4 * stringSimilarity(strList,tmpResult.d->title) + 2 * stringSimilarity(strList,tmpResult.d->artist) + 1 * stringSimilarity(strList,tmpResult.d->album); - if( !d->results.tqcontains( tmpResult ) ) + if( !d->results.contains( tmpResult ) ) d->results.append( tmpResult ); } } @@ -872,8 +872,8 @@ double stringSimilarity(TQString s1, TQString s2) ++p1; ++p2; } else { - x1 = s1.tqfind(c2,p1,false); - x2 = s2.tqfind(c1,p2,false); + x1 = s1.find(c2,p1,false); + x2 = s2.find(c1,p2,false); if( (x1 == x2 || -1 == x1) || (-1 != x2 && x1 > x2) ) ++p2; diff --git a/amarok/src/lastfm.cpp b/amarok/src/lastfm.cpp index fa9964d8..27d46f6d 100644 --- a/amarok/src/lastfm.cpp +++ b/amarok/src/lastfm.cpp @@ -328,12 +328,12 @@ Controller::stationDescription( TQString url ) // turn "genesis,pink floyd,queen" into "Genesis, Pink Floyd, Queen" TQString artists = elements[2]; - artists.tqreplace( ",", ", " ); + artists.replace( ",", ", " ); const TQStringList words = TQStringList::split( " ", TQString( artists ).remove( "," ) ); foreach( words ) { TQString capitalized = *it; - capitalized.tqreplace( 0, 1, (*it)[0].upper() ); - artists.tqreplace( *it, capitalized ); + capitalized.replace( 0, 1, (*it)[0].upper() ); + artists.replace( *it, capitalized ); } return i18n( "Custom Station: %1" ).tqarg( artists ); diff --git a/amarok/src/loader/loader.cpp b/amarok/src/loader/loader.cpp index abb9d2eb..92cf78b1 100644 --- a/amarok/src/loader/loader.cpp +++ b/amarok/src/loader/loader.cpp @@ -226,9 +226,9 @@ isSplashEnabled() { TQString line; 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; else return true; diff --git a/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp b/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp index 4c6bf43d..b9774718 100644 --- a/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp +++ b/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp @@ -115,21 +115,21 @@ MagnatuneArtistInfoBox::extractArtistInfo( TQString artistPage ) TQString trimmedHtml; - int sectionStart = artistPage.tqfind( "" ); - int sectionEnd = artistPage.tqfind( "", sectionStart ); + int sectionStart = artistPage.find( "" ); + int sectionEnd = artistPage.find( "", sectionStart ); trimmedHtml = artistPage.mid( sectionStart, sectionEnd - sectionStart ); - int buyStartIndex = trimmedHtml.tqfind( "" ); + int buyStartIndex = trimmedHtml.find( "" ); int buyEndIndex; //we are going to integrate the buying of music (I hope) so remove these links while ( buyStartIndex != -1 ) { - buyEndIndex = trimmedHtml.tqfind( "", buyStartIndex ) + 18; + buyEndIndex = trimmedHtml.find( "", buyStartIndex ) + 18; trimmedHtml.remove( buyStartIndex, buyEndIndex - buyStartIndex ); - buyStartIndex = trimmedHtml.tqfind( "", buyStartIndex ); + buyStartIndex = trimmedHtml.find( "", buyStartIndex ); } diff --git a/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp b/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp index 6d064922..e8ab95d8 100644 --- a/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp +++ b/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp @@ -65,7 +65,7 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) // lets make sure that this is actually a valid result - int testIndex = downloadInfoString.tqfind( "" ); + int testIndex = downloadInfoString.find( "" ); if ( testIndex == -1 ) { return false; @@ -74,10 +74,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) int startIndex; int endIndex; - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 13; @@ -96,10 +96,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 13; @@ -117,10 +117,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 12; @@ -130,10 +130,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 16; @@ -143,10 +143,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 12; @@ -156,10 +156,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 12; @@ -169,10 +169,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 13; @@ -182,10 +182,10 @@ bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) } } - startIndex = downloadInfoString.tqfind( "", 0, false ); + startIndex = downloadInfoString.find( "", 0, false ); if ( startIndex != -1 ) { - endIndex = downloadInfoString.tqfind( "", 0, false ); + endIndex = downloadInfoString.find( "", 0, false ); if ( endIndex != -1 ) { startIndex += 9; diff --git a/amarok/src/mediabrowser.cpp b/amarok/src/mediabrowser.cpp index 46e5f0ac..ced592d1 100644 --- a/amarok/src/mediabrowser.cpp +++ b/amarok/src/mediabrowser.cpp @@ -409,7 +409,7 @@ MediaBrowser::tagsChanged( const MetaBundle &bundle ) { m_itemMapMutex.lock(); 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() ) { MediaItem *item = *it; @@ -443,7 +443,7 @@ bool MediaBrowser::getBundle( const KURL &url, MetaBundle *bundle ) const { 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() ) return false; @@ -839,7 +839,7 @@ MediaItem::setBundle( MetaBundle *bundle ) if( m_bundle ) { 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 ) MediaBrowser::instance()->m_itemMap.remove( itemUrl ); } @@ -849,7 +849,7 @@ MediaItem::setBundle( MetaBundle *bundle ) if( m_bundle ) { 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() ) MediaBrowser::instance()->m_itemMap[itemUrl] = this; } @@ -1915,7 +1915,7 @@ MediaView::setFilter( const TQString &filter, MediaItem *tqparent ) i != list.end(); ++i ) { - if( !(*it).text(0).tqcontains( *i ) ) + if( !(*it).text(0).contains( *i ) ) { match = false; break; @@ -2248,7 +2248,7 @@ MediaQueue::addURL( const KURL& url2, MetaBundle *bundle, const TQString &playli 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() ); if( playlist.isError() ) @@ -2415,8 +2415,8 @@ TQString MediaDevice::replaceVariables( const TQString &cmd ) { TQString result = cmd; - result.tqreplace( "%d", deviceNode() ); - result.tqreplace( "%m", mountPoint() ); + result.replace( "%d", deviceNode() ); + result.replace( "%m", mountPoint() ); return result; } @@ -3585,7 +3585,7 @@ MediaDevice::isPlayable( const MetaBundle &bundle ) return true; TQString type = TQString(bundle.url().path().section( ".", -1 )).lower(); - return supportedFiletypes().tqcontains( type ); + return supportedFiletypes().contains( type ); } bool diff --git a/amarok/src/mediabrowser.h b/amarok/src/mediabrowser.h index bffb7616..88eab485 100644 --- a/amarok/src/mediabrowser.h +++ b/amarok/src/mediabrowser.h @@ -532,7 +532,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin int sysCall(const TQString & command); int runPreConnectCommand(); 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 diff --git a/amarok/src/mediadevice/daap/daapclient.cpp b/amarok/src/mediadevice/daap/daapclient.cpp index 9dea6685..7fbffac4 100644 --- a/amarok/src/mediadevice/daap/daapclient.cpp +++ b/amarok/src/mediadevice/daap/daapclient.cpp @@ -241,7 +241,7 @@ DaapClient::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int ) { case MediaItem::DIRECTORY: 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 ); } @@ -328,7 +328,7 @@ DaapClient::serverOffline( DNSSD::RemoteService::Ptr service ) #if DNSSD_SUPPORT DEBUG_BLOCK TQString key = serverKey( service.data() ); - if( m_serverItemMap.tqcontains( key ) ) + if( m_serverItemMap.contains( key ) ) { ServerItem* removeMe = m_serverItemMap[ key ]; if( removeMe ) @@ -374,7 +374,7 @@ DaapClient::resolvedDaap( bool success ) debug() << service->serviceName() << ' ' << service->hostName() << ' ' << service->domain() << ' ' << service->type() << endl; 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; 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 ); 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 //just get the displayed-case from //the first track @@ -416,7 +416,7 @@ DaapClient::createTree( const TQString& /*host*/, Daap::SongList bundles ) parentAlbum->setType( MediaItem::ALBUM ); MetaBundle* track; - Daap::TrackList trackList = *albumMap.tqfind(*itAlbum); + Daap::TrackList trackList = *albumMap.find(*itAlbum); parentAlbum->setText( 0, trackList.getFirst()->album() ); for( track = trackList.first(); track; track = trackList.next() ) @@ -443,7 +443,7 @@ DaapClient::createTree( const TQString& /*host*/, Daap::SongList bundles ) int DaapClient::incRevision( const TQString& host ) { - if( m_servers.tqcontains(host) ) + if( m_servers.contains(host) ) { m_servers[host]->revisionID++; return m_servers[host]->revisionID; @@ -455,7 +455,7 @@ DaapClient::incRevision( const TQString& host ) int DaapClient::getSession( const TQString& host ) { - if( m_servers.tqcontains(host) ) + if( m_servers.contains(host) ) return m_servers[host]->sessionId; else return -1; @@ -487,7 +487,7 @@ DaapClient::customClicked() else { 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(); mas.append( key ); diff --git a/amarok/src/mediadevice/daap/daapreader/reader.cpp b/amarok/src/mediadevice/daap/daapreader/reader.cpp index 17e40386..61ec5404 100644 --- a/amarok/src/mediadevice/daap/daapreader/reader.cpp +++ b/amarok/src/mediadevice/daap/daapreader/reader.cpp @@ -409,7 +409,7 @@ Reader::parse( TQDataStream &raw, uint containerLength, bool first ) void Reader::addElement( Map &parentMap, char* tag, TQVariant element ) { - if( !parentMap.tqcontains( tag ) ) + if( !parentMap.contains( tag ) ) parentMap[tag] = TQVariant( TQValueList() ); parentMap[tag].asList().append(element); diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/custom_require.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/custom_require.rb index 6a3edf6e..c68a7dda 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/custom_require.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/custom_require.rb @@ -28,7 +28,7 @@ module Kernel rescue LoadError => load_error begin @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_original_require path else @@ -72,17 +72,17 @@ module Gem # # For example: # - # tqfind('log4r') # -> (log4r-1.1 spec) - # tqfind('log4r.rb') # -> (log4r-1.1 spec) - # tqfind('rake/rdoctask') # -> (rake-0.4.12 spec) - # tqfind('foobarbaz') # -> nil + # find('log4r') # -> (log4r-1.1 spec) + # find('log4r.rb') # -> (log4r-1.1 spec) + # find('rake/rdoctask') # -> (rake-0.4.12 spec) + # find('foobarbaz') # -> nil # # Matching paths can have various suffixes ('.rb', '.so', and # others), which may or may not already be attached to _file_. # This method doesn't care about the full filename that matches; # only that there is a match. # - def tqfind(path) + def find(path) @gemspecs.each do |spec| return spec if matching_file(spec, path) end diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/dependency_list.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/dependency_list.rb index 6a1553b6..8c2cd903 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/dependency_list.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/dependency_list.rb @@ -23,7 +23,7 @@ module Gem def ok? @specs.all? { |spec| spec.dependencies.all? { |dep| - @specs.tqfind { |s| s.satisfies_requirement?(dep) } + @specs.find { |s| s.satisfies_requirement?(dep) } } } end @@ -34,7 +34,7 @@ module Gem end def find_name(full_name) - @specs.tqfind { |spec| spec.full_name == full_name } + @specs.find { |spec| spec.full_name == full_name } end def remove_by_name(full_name) @@ -82,14 +82,14 @@ module Gem disabled = {} predecessors = build_predecessors while disabled.size < @specs.size - candidate = @specs.tqfind { |spec| + candidate = @specs.find { |spec| ! disabled[spec.full_name] && active_count(predecessors[spec.full_name], disabled) == 0 } if candidate disabled[candidate.full_name] = true 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 # candidate and move on. disabled[candidate.full_name] = true diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/gem_commands.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/gem_commands.rb index b4a972f7..ec1d33c0 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/gem_commands.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/gem_commands.rb @@ -1219,7 +1219,7 @@ module Gem specs = SourceIndex.from_installed_gems.search(gemname, version_req) selected = specs.sort_by { |s| s.version }.last 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). if gemname =~ /^#{selected.name}$/i filename = selected.full_name + '.gem' @@ -1416,11 +1416,11 @@ module Gem 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 - * List only remote gems whose name tqcontains 'log': + * List only remote gems whose name contains 'log': gem search log --remote diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/open-uri.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/open-uri.rb index 54079a35..93927ca3 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/open-uri.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/open-uri.rb @@ -536,7 +536,7 @@ module OpenURI # :http_basic_authentication=>[user, password] # # 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. # It is used for HTTP Basic authentication defined by RFC 2617. # diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/package.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/package.rb index 9e807070..2778fc77 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/package.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/package.rb @@ -9,7 +9,7 @@ require 'fileutils' require 'zlib' require 'digest/md5' require 'fileutils' -require 'tqfind' +require 'find' require 'stringio' require 'rubygems/specification' @@ -810,7 +810,7 @@ module Package TarOutput.open(destname, signer) do |outp| dir_class.chdir(src) do outp.metadata = (file_class.read("RPA/metadata") rescue nil) - find_class.tqfind('.') do |entry| + find_class.find('.') do |entry| case when file_class.file?(entry) entry.sub!(%r{\./}, "") diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/remote_installer.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/remote_installer.rb index 33476a42..4027d65d 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/remote_installer.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/remote_installer.rb @@ -496,7 +496,7 @@ module Gem end 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 specs_n_sources = specs_n_sources.sort_by { |gs,| gs.version }.reverse diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/source_index.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/source_index.rb index 03eb1902..8d638c21 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/source_index.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/source_index.rb @@ -172,7 +172,7 @@ module Gem # [Regex] a pattern to match against the short name # version_requirement:: # [String | default=Version::Requirement.new(">= 0")] version to - # tqfind + # find # return:: # [Array] list of Gem::Specification objects in sorted (version) # order. Empty if not found. diff --git a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/validator.rb b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/validator.rb index ad3d4a40..b1df1244 100644 --- a/amarok/src/mediadevice/daap/mongrel/lib/rubygems/validator.rb +++ b/amarok/src/mediadevice/daap/mongrel/lib/rubygems/validator.rb @@ -49,7 +49,7 @@ module Gem private def find_files_for_gem(gem_directory) 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(/^\//, "") if(!(fn =~ /CVS/ || File.directory?(fn) || fn == "")) then installed_files << fn @@ -74,7 +74,7 @@ module Gem # returns a hash of ErrorData objects, keyed on the problem gem's name. def alien require 'rubygems/installer' - require 'tqfind' + require 'find' require 'md5' errors = {} Gem::SourceIndex.from_installed_gems.each do |gem_name, gem_spec| diff --git a/amarok/src/mediadevice/generic/genericmediadevice.cpp b/amarok/src/mediadevice/generic/genericmediadevice.cpp index 06544bf3..f0f32159 100644 --- a/amarok/src/mediadevice/generic/genericmediadevice.cpp +++ b/amarok/src/mediadevice/generic/genericmediadevice.cpp @@ -568,7 +568,7 @@ GenericMediaDevice::buildDestination( const TQString &format, const MetaBundle & if( !result.startsWith( "/" ) ) result.prepend( "/" ); - return result.tqreplace( TQRegExp( "/\\.*" ), "/" ); + return result.replace( TQRegExp( "/\\.*" ), "/" ); } void @@ -576,8 +576,8 @@ GenericMediaDevice::checkAndBuildLocation( const TQString& location ) { // check for every directory from the mount point to the location // whether they exist or not. - int mountPointDepth = m_medium.mountPoint().tqcontains( '/', false ); - int locationDepth = location.tqcontains( '/', false ); + int mountPointDepth = m_medium.mountPoint().contains( '/', false ); + int locationDepth = location.contains( '/', false ); if( m_medium.mountPoint().endsWith( "/" ) ) mountPointDepth--; @@ -852,7 +852,7 @@ int GenericMediaDevice::addTrackToList( int type, KURL url, int /*size*/ ) { 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 parentName = path.left( index ); @@ -1042,11 +1042,11 @@ TQString GenericMediaDevice::cleanPath( const TQString &component ) result.simplifyWhiteSpace(); if( m_spacesToUnderscores ) - result.tqreplace( TQRegExp( "\\s" ), "_" ); + result.replace( TQRegExp( "\\s" ), "_" ); if( m_actuallyVfat || m_vfatTextOnly ) result = Amarok::vfatPath( result ); - result.tqreplace( "/", "-" ); + result.replace( "/", "-" ); return result; } diff --git a/amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h b/amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h index 3882ef9a..43a06603 100644 --- a/amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h +++ b/amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h @@ -132,7 +132,7 @@ GenericMediaDeviceConfigDialog::updateConfigDialogLists( const TQStringList & su for( TQStringList::Iterator it = allTypes.begin(); it != allTypes.end(); it++ ) { - if( supportedFileTypes.tqcontains( *it ) ) + if( supportedFileTypes.contains( *it ) ) { supported->insertItem( *it ); convert->insertItem( *it ); @@ -195,7 +195,7 @@ GenericMediaDeviceConfigDialog::buildDestination( const TQString &format, const if( !tail.startsWith( "/" ) ) tail.prepend( "/" ); - return m_device->mountPoint() + tail.tqreplace( TQRegExp( "/\\.*" ), "/" ); + return m_device->mountPoint() + tail.replace( TQRegExp( "/\\.*" ), "/" ); } TQString GenericMediaDeviceConfigDialog::cleanPath( const TQString &component ) @@ -207,11 +207,11 @@ TQString GenericMediaDeviceConfigDialog::cleanPath( const TQString &component ) result.simplifyWhiteSpace(); if( m_spaceCheck->isChecked() ) - result.tqreplace( TQRegExp( "\\s" ), "_" ); + result.replace( TQRegExp( "\\s" ), "_" ); if( m_device->m_actuallyVfat || m_vfatCheck->isChecked() ) result = Amarok::vfatPath( result ); - result.tqreplace( "/", "-" ); + result.replace( "/", "-" ); return result; } diff --git a/amarok/src/mediadevice/ifp/ifpmediadevice.cpp b/amarok/src/mediadevice/ifp/ifpmediadevice.cpp index 4f9e153e..b8b3571e 100644 --- a/amarok/src/mediadevice/ifp/ifpmediadevice.cpp +++ b/amarok/src/mediadevice/ifp/ifpmediadevice.cpp @@ -406,7 +406,7 @@ IfpMediaDevice::copyTrackToDevice( const MetaBundle& bundle ) TQString newFilename; // 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( bundle.track() > 0 ) @@ -701,12 +701,12 @@ TQString IfpMediaDevice::cleanPath( const TQString &component ) result.simplifyWhiteSpace(); - result.remove( "?" ).tqreplace( "*", " " ).tqreplace( ":", " " ); + result.remove( "?" ).replace( "*", " " ).replace( ":", " " ); // if( m_spacesToUnderscores ) -// result.tqreplace( TQRegExp( "\\s" ), "_" ); +// result.replace( TQRegExp( "\\s" ), "_" ); - result.tqreplace( "/", "-" ); + result.replace( "/", "-" ); return result; } diff --git a/amarok/src/mediadevice/ipod/ipodmediadevice.cpp b/amarok/src/mediadevice/ipod/ipodmediadevice.cpp index a6c04176..c0830531 100644 --- a/amarok/src/mediadevice/ipod/ipodmediadevice.cpp +++ b/amarok/src/mediadevice/ipod/ipodmediadevice.cpp @@ -565,7 +565,7 @@ IpodMediaDevice::updateTrackInDB( IpodMediaItem *item, const TQString &pathname, track->flag4 = 0x01; // also show description on iPod TQString plaindesc = podcastInfo->description; - plaindesc.tqreplace( TQRegExp("<[^>]*>"), "" ); + plaindesc.replace( TQRegExp("<[^>]*>"), "" ); track->description = g_strdup( plaindesc.utf8() ); track->subtitle = g_strdup( plaindesc.utf8() ); track->podcasturl = g_strdup( podcastInfo->url.utf8() ); @@ -671,7 +671,7 @@ IpodMediaDevice::copyTrackToDevice(const MetaBundle &bundle) do { create.setPath(path); - path = path.section("/", 0, path.tqcontains('/')-1); + path = path.section("/", 0, path.contains('/')-1); parentdir.setPath(path); } while( !path.isEmpty() && !(path==mountPoint()) && !parentdir.exists() ); @@ -1827,7 +1827,7 @@ IpodMediaDevice::realPath(const char *ipodPath) if(m_itdb) { path = TQFile::decodeName(itdb_get_mountpoint(m_itdb)); - path.append(TQString(ipodPath).tqreplace(':', "/")); + path.append(TQString(ipodPath).replace(':', "/")); } return path; @@ -1843,7 +1843,7 @@ IpodMediaDevice::ipodPath(const TQString &realPath) { TQString path = realPath; path = path.mid(mp.length()); - path = path.tqreplace('/', ":"); + path = path.replace('/', ":"); return path; } } diff --git a/amarok/src/mediadevice/mtp/mtpmediadevice.cpp b/amarok/src/mediadevice/mtp/mtpmediadevice.cpp index da29ba97..cd0f68b8 100644 --- a/amarok/src/mediadevice/mtp/mtpmediadevice.cpp +++ b/amarok/src/mediadevice/mtp/mtpmediadevice.cpp @@ -190,10 +190,10 @@ MediaItem 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 ) { - int keyIndex = mtpFileTypes.values().tqfindIndex( extension ); + int keyIndex = mtpFileTypes.values().findIndex( extension ); libmtp_type = mtpFileTypes.keys()[keyIndex]; trackmeta->filetype = (LIBMTP_filetype_t) libmtp_type; 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() ) continue; // substitute %a , %b , %g - (*it).tqreplace( TQRegExp( "%a" ), artist ) - .tqreplace( TQRegExp( "%b" ), album ) - .tqreplace( TQRegExp( "%g" ), genre ); + (*it).replace( TQRegExp( "%a" ), artist ) + .replace( TQRegExp( "%b" ), album ) + .replace( TQRegExp( "%g" ), genre ); // check if it exists uint32_t check_folder = subfolderNameToID( (*it).utf8(), m_folders, parent_id ); // create if not exists (if requested) @@ -744,7 +744,7 @@ MtpMediaDevice::synchronizeDevice() MediaItem *MtpMediaDevice::trackExists( const MetaBundle &bundle ) { - MediaItem *artist = dynamic_cast( m_view->tqfindItem( bundle.artist(), 0 ) ); + MediaItem *artist = dynamic_cast( m_view->findItem( bundle.artist(), 0 ) ); if( artist ) { MediaItem *album = dynamic_cast( artist->findItem( bundle.album() ) ); @@ -1137,11 +1137,11 @@ MtpMediaDevice::openDevice( bool silent ) m_supportedFiles << mtpFileTypes[ filetypes[ i ] ]; } // find supported image types (for album art). - if( m_supportedFiles.tqfindIndex( "jpg" ) ) + if( m_supportedFiles.findIndex( "jpg" ) ) m_format = "JPEG"; - else if( m_supportedFiles.tqfindIndex( "png" ) ) + else if( m_supportedFiles.findIndex( "png" ) ) m_format = "PNG"; - else if( m_supportedFiles.tqfindIndex( "gif" ) ) + else if( m_supportedFiles.findIndex( "gif" ) ) m_format = "GIF"; free( filetypes ); m_critical_mutex.unlock(); @@ -1422,7 +1422,7 @@ MtpMediaItem { TQString artistName = track->bundle()->artist(); - MtpMediaItem *artist = dynamic_cast( m_view->tqfindItem( artistName, 0 ) ); + MtpMediaItem *artist = dynamic_cast( m_view->findItem( artistName, 0 ) ); if( !artist ) { artist = new MtpMediaItem(m_view); diff --git a/amarok/src/mediadevice/njb/njbmediadevice.cpp b/amarok/src/mediadevice/njb/njbmediadevice.cpp index 23445e66..542e2313 100644 --- a/amarok/src/mediadevice/njb/njbmediadevice.cpp +++ b/amarok/src/mediadevice/njb/njbmediadevice.cpp @@ -614,7 +614,7 @@ NjbMediaDevice::removeConfigElements(TQWidget* arg1) MediaItem * NjbMediaDevice::trackExists( const MetaBundle & bundle ) { - MediaItem *artist = dynamic_cast( m_view->tqfindItem( bundle.artist(), 0 ) ); + MediaItem *artist = dynamic_cast( m_view->findItem( bundle.artist(), 0 ) ); if ( artist ) { MediaItem *album = dynamic_cast( artist->findItem( bundle.album() ) ); @@ -737,7 +737,7 @@ NjbMediaDevice::readJukeboxMusic( void ) 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 ); artist->setText( 0, (*it)->bundle()->artist() ); @@ -757,7 +757,7 @@ NjbMediaDevice::addTrackToView( NjbTrack *track, NjbMediaItem *item ) { TQString artistName = track->bundle()->artist(); - NjbMediaItem *artist = dynamic_cast( m_view->tqfindItem( artistName, 0 ) ); + NjbMediaItem *artist = dynamic_cast( m_view->findItem( artistName, 0 ) ); if(!artist) { artist = new NjbMediaItem(m_view); @@ -869,7 +869,7 @@ NjbMediaDevice::addTracks(const TQString &artist, const TQString &album, NjbMedi NjbMediaItem* 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 ); artist->setText( 0, track->bundle()->artist() ); @@ -878,7 +878,7 @@ NjbMediaDevice::addArtist( NjbTrack *track ) artist->setBundle( track->bundle() ); artist->m_device = this; } - return dynamic_cast( m_view->tqfindItem( track->bundle()->artist().string(), 0 ) ); + return dynamic_cast( m_view->findItem( track->bundle()->artist().string(), 0 ) ); } void diff --git a/amarok/src/mediadevice/njb/playlist.cpp b/amarok/src/mediadevice/njb/playlist.cpp index ef4e6afa..7afeffd6 100644 --- a/amarok/src/mediadevice/njb/playlist.cpp +++ b/amarok/src/mediadevice/njb/playlist.cpp @@ -117,7 +117,7 @@ NjbPlaylist::unescapefilename( const TQString& _in ) { TQString result = _in; - result.tqreplace("%2f","/"); + result.replace("%2f","/"); return result; } @@ -127,7 +127,7 @@ NjbPlaylist::escapefilename( const TQString& _in ) { TQString result = _in; - result.tqreplace("/","%2f"); + result.replace("/","%2f"); return result; } @@ -183,7 +183,7 @@ NjbPlaylist::addTrack( const TQString& fileName) trackValueList::const_iterator it_track = theTracks->findTrackByName( fileName ); if( it_track == theTracks->end() ) { // couldn't find this track, skip it - debug() << "putPlaylist: couldn't tqfind " << fileName << endl; + debug() << "putPlaylist: couldn't find " << fileName << endl; return NJB_FAILURE; } njb_playlist_track_t* pl_track = NJB_Playlist_Track_New( (*it_track)->id()); diff --git a/amarok/src/mediadevice/njb/track.cpp b/amarok/src/mediadevice/njb/track.cpp index 803a814f..24a24534 100644 --- a/amarok/src/mediadevice/njb/track.cpp +++ b/amarok/src/mediadevice/njb/track.cpp @@ -65,7 +65,7 @@ NjbTrack::NjbTrack( njb_songid_t* song) if( frame ) { TQString artist = TQString::fromUtf8( frame->data.strval ); - artist.tqreplace( TQRegExp( "/" ), "-" ); + artist.replace( TQRegExp( "/" ), "-" ); bundle->setArtist( artist ); } else @@ -75,7 +75,7 @@ NjbTrack::NjbTrack( njb_songid_t* song) if( frame) { TQString album = TQString::fromUtf8( frame->data.strval ); - album.tqreplace( TQRegExp( "/" ), "-" ); + album.replace( TQRegExp( "/" ), "-" ); bundle->setAlbum( album ); } else @@ -85,7 +85,7 @@ NjbTrack::NjbTrack( njb_songid_t* song) if( frame ) { TQString title = TQString::fromUtf8( frame->data.strval ); - title.tqreplace( TQRegExp( "/"), "-"); + title.replace( TQRegExp( "/"), "-"); bundle->setTitle( title ); } else diff --git a/amarok/src/mediadevicemanager.cpp b/amarok/src/mediadevicemanager.cpp index eacb12b7..bc030c18 100644 --- a/amarok/src/mediadevicemanager.cpp +++ b/amarok/src/mediadevicemanager.cpp @@ -62,7 +62,7 @@ MediaDeviceManager::MediaDeviceManager() { curr = qit.key(); curr = curr.remove( "manual|" ); - currName = curr.left( curr.tqfind( '|' ) ); + currName = curr.left( curr.find( '|' ) ); currMountPoint = curr.remove( currName + '|' ); manualDevices.append( "false" ); //autodetected manualDevices.append( qit.key() ); //id @@ -105,7 +105,7 @@ void MediaDeviceManager::removeManualDevice( Medium* removed ) { emit mediumRemoved( removed, removed->name() ); - if( m_mediumMap.tqcontains( removed->name() ) ) + if( m_mediumMap.contains( 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" ) ) ) // 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()]; m_mediumMap.remove( m->name() ); @@ -141,7 +141,7 @@ void MediaDeviceManager::slotMediumRemoved( const Medium* , TQString id ) { DEBUG_BLOCK Medium* removedMedium = 0; - if ( m_mediumMap.tqcontains(id) ) + if ( m_mediumMap.contains(id) ) removedMedium = m_mediumMap[id]; if ( removedMedium ) 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 //There is no point in calling getDevice, since it will not be in the list anyways emit mediumRemoved( removedMedium, id ); - if ( m_mediumMap.tqcontains(id) ) + if ( m_mediumMap.contains(id) ) m_mediumMap.remove(id); delete removedMedium; } diff --git a/amarok/src/medium.cpp b/amarok/src/medium.cpp index e597058e..9df1d040 100644 --- a/amarok/src/medium.cpp +++ b/amarok/src/medium.cpp @@ -126,7 +126,7 @@ Medium::List Medium::createList(const TQStringList &properties) l.append(m); TQStringList::iterator first = props.begin(); - TQStringList::iterator last = props.tqfind(SEPARATOR); + TQStringList::iterator last = props.find(SEPARATOR); ++last; props.erase(first, last); } diff --git a/amarok/src/mediumpluginmanager.cpp b/amarok/src/mediumpluginmanager.cpp index d4ddb5d8..efd00d12 100644 --- a/amarok/src/mediumpluginmanager.cpp +++ b/amarok/src/mediumpluginmanager.cpp @@ -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; debug() << "skipping: deleted & not autodetect" << endl; @@ -149,7 +149,7 @@ MediumPluginManager::detectDevices( const bool redetect, const bool nographics ) if( skipflag ) continue; - if( m_deletedMap.tqcontains( (*it)->id() ) ) + if( m_deletedMap.contains( (*it)->id() ) ) m_deletedMap.remove( (*it)->id() ); MediaDeviceConfig *dev = new MediaDeviceConfig( *it, this, nographics, m_widget ); diff --git a/amarok/src/metabundle.cpp b/amarok/src/metabundle.cpp index 3f9085de..59b9fde4 100644 --- a/amarok/src/metabundle.cpp +++ b/amarok/src/metabundle.cpp @@ -282,7 +282,7 @@ MetaBundle::MetaBundle( const TQString& title, , m_isSearchDirty( true ) , m_searchColumns( Undetermined ) { - if( title.tqcontains( '-' ) ) + if( title.contains( '-' ) ) { m_title = TQString(title.section( '-', 1, 1 )).stripWhiteSpace(); m_artist = TQString(title.section( '-', 0, 0 )).stripWhiteSpace(); @@ -613,7 +613,7 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag if ( !disc.isEmpty() ) { - int i = disc.tqfind ('/'); + int i = disc.find ('/'); if ( i != -1 ) // disc.right( i ).toInt() is total number of discs, we don't use this at the moment setDiscNumber( disc.left( i ).toInt() ); @@ -843,7 +843,7 @@ bool MetaBundle::matchesSimpleExpression( const TQString &expression, const TQVa { uint y = 0, n = columns.count(); for(; y < n; ++y ) - if ( prettyText( columns[y] ).lower().tqcontains( terms[x] ) ) + if ( prettyText( columns[y] ).lower().contains( terms[x] ) ) break; matches = ( y < n ); } @@ -891,7 +891,7 @@ bool MetaBundle::matchesFast(const TQStringList &terms, ColumnMask columnMask) c // now search 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; @@ -974,7 +974,7 @@ bool MetaBundle::matchesParsedExpression( const ParsedExpression &data, const TQ condition = v.toFloat() > w.toFloat(); 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() || ( v.left( g ).toInt() == w.left( h ).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(); 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() || ( v.left( g ).toInt() == w.left( h ).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(); 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() && v.mid( g + 1 ).toInt() == w.mid( h + 1 ).toInt(); } else - condition = v.tqcontains( q, false ); + condition = v.contains( q, false ); } 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 ) { - 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 ) ) break; } @@ -1088,7 +1088,7 @@ MetaBundle::prettyTitle( const TQString &filename ) //static s = s.left( s.length() - 5 ); //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 ); return s; diff --git a/amarok/src/metabundle.h b/amarok/src/metabundle.h index d621c688..5a8a9dbc 100644 --- a/amarok/src/metabundle.h +++ b/amarok/src/metabundle.h @@ -410,7 +410,7 @@ protected: // whether the search text should be rebuilt volatile mutable bool m_isSearchDirty; - // which columns the search string tqcontains + // which columns the search string contains mutable ColumnMask m_searchColumns; // the search string: textualized columns separated by space // 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 { return isFile() - ? filename().mid( filename().tqfindRev( '.' ) + 1 ) + ? filename().mid( filename().findRev( '.' ) + 1 ) : i18n( "Stream" ); } inline PodcastEpisodeBundle *MetaBundle::podcastBundle() const { return m_podcastBundle; } diff --git a/amarok/src/moodbar.cpp b/amarok/src/moodbar.cpp index 239e7622..2cbdce5f 100644 --- a/amarok/src/moodbar.cpp +++ b/amarok/src/moodbar.cpp @@ -526,8 +526,8 @@ MoodServer::slotJobCompleted( KProcess *proc ) if( success ) { TQString file = m_currentData.m_outfile; - TQString dir = file.left( file.tqfindRev( '/' ) ); - file = file.right( file.length() - file.tqfindRev( '/' ) - 1 ); + TQString dir = file.left( file.findRev( '/' ) ); + file = file.right( file.length() - file.findRev( '/' ) - 1 ); TQDir( dir ).rename( file + ".tmp", file ); } else @@ -1318,13 +1318,13 @@ Moodbar::moodFilename( const KURL &url, bool withMusic ) if( withMusic ) { path = url.path(); - path.truncate(path.tqfindRev('.')); + path.truncate(path.findRev('.')); if (path.isEmpty()) // Weird... return TQString(); path += ".mood"; - int slash = path.tqfindRev('/') + 1; + int slash = path.findRev('/') + 1; TQString dir = path.left(slash); TQString file = path.right(path.length() - slash); path = dir + '.' + file; @@ -1338,13 +1338,13 @@ Moodbar::moodFilename( const KURL &url, bool withMusic ) MountPointManager::instance()->getRelativePath( deviceid, url, relativePath ); path = relativePath.path(); - path.truncate(path.tqfindRev('.')); + path.truncate(path.findRev('.')); if (path.isEmpty()) // Weird... return TQString(); path = TQString::number( deviceid ) + ',' - + path.tqreplace('/', ',') + ".mood"; + + path.replace('/', ',') + ".mood"; // Creates the path if necessary path = ::locateLocal( "data", "amarok/moods/" + path ); diff --git a/amarok/src/mountpointmanager.cpp b/amarok/src/mountpointmanager.cpp index f8dd748b..00a6e4d0 100644 --- a/amarok/src/mountpointmanager.cpp +++ b/amarok/src/mountpointmanager.cpp @@ -166,7 +166,7 @@ MountPointManager::getIdForUrl( const TQString &url ) bool MountPointManager::isMounted ( const int deviceId ) const { m_handlerMapMutex.lock(); - bool result = m_handlerMap.tqcontains( deviceId ); + bool result = m_handlerMap.contains( deviceId ); m_handlerMapMutex.unlock(); return result; } @@ -200,7 +200,7 @@ MountPointManager::getAbsolutePath( const int deviceId, const KURL& relativePath return; } m_handlerMapMutex.lock(); - if ( m_handlerMap.tqcontains( deviceId ) ) + if ( m_handlerMap.contains( deviceId ) ) { m_handlerMap[deviceId]->getURL( absolutePath, relativePath ); m_handlerMapMutex.unlock(); @@ -244,7 +244,7 @@ void MountPointManager::getRelativePath( const int deviceId, const KURL& absolutePath, KURL& relativePath ) const { 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 TQString rpath = KURL::relativePath( m_handlerMap[deviceId]->getDevicePath(), absolutePath.path() ); @@ -288,7 +288,7 @@ MountPointManager::mediumChanged( const Medium *m ) } int key = handler->getDeviceID(); m_handlerMapMutex.lock(); - if ( m_handlerMap.tqcontains( key ) ) + if ( m_handlerMap.contains( key ) ) { debug() << "Key " << key << " already exists in handlerMap, replacing" << endl; delete m_handlerMap[key]; @@ -374,7 +374,7 @@ MountPointManager::mediumAdded( const Medium *m ) } int key = handler->getDeviceID(); m_handlerMapMutex.lock(); - if ( m_handlerMap.tqcontains( key ) ) + if ( m_handlerMap.contains( key ) ) { debug() << "Key " << key << " already exists in handlerMap, replacing" << endl; delete m_handlerMap[key]; @@ -420,7 +420,7 @@ MountPointManager::collectionFolders( ) { absPath = getAbsolutePath( *it, *strIt ); } - if ( !result.tqcontains( absPath ) ) + if ( !result.contains( absPath ) ) result.append( absPath ); } } @@ -438,8 +438,8 @@ MountPointManager::setCollectionFolders( const TQStringList &folders ) { int id = getIdForUrl( *it ); TQString rpath = getRelativePath( id, *it ); - if ( folderMap.tqcontains( id ) ) { - if ( !folderMap[id].tqcontains( rpath ) ) + if ( folderMap.contains( id ) ) { + if ( !folderMap[id].contains( rpath ) ) folderMap[id].append( rpath ); } else @@ -449,7 +449,7 @@ MountPointManager::setCollectionFolders( const TQStringList &folders ) IdList ids = getMountedDeviceIds(); foreachType( IdList, ids ) { - if( !folderMap.tqcontains( *it ) ) + if( !folderMap.contains( *it ) ) { folderConf->deleteEntry( TQString::number( *it ) ); } diff --git a/amarok/src/multitabbar.cpp b/amarok/src/multitabbar.cpp index 0e256114..fb450f33 100644 --- a/amarok/src/multitabbar.cpp +++ b/amarok/src/multitabbar.cpp @@ -1079,7 +1079,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint ) TQFont font; painter.setFont( font ); 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; painter.setPen( textColor ); const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); @@ -1107,7 +1107,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint ) TQFont font; painter.setFont( font ); 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; painter.setPen( textColor ); const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); diff --git a/amarok/src/organizecollectiondialog.ui.h b/amarok/src/organizecollectiondialog.ui.h index 7cc46f2d..bc1c7754 100644 --- a/amarok/src/organizecollectiondialog.ui.h +++ b/amarok/src/organizecollectiondialog.ui.h @@ -50,9 +50,9 @@ TQString OrganizeCollectionDialog::buildDestination( const TQString &format, con TQString tail = result.mid( folderCombo->currentText().length() ); if( !tail.startsWith( "/" ) ) 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() @@ -142,15 +142,15 @@ TQString OrganizeCollectionDialog::cleanPath( const TQString &component ) } if( !regexpEdit->text().isEmpty() ) - result.tqreplace( TQRegExp( regexpEdit->text() ), replaceEdit->text() ); + result.replace( TQRegExp( regexpEdit->text() ), replaceEdit->text() ); result.simplifyWhiteSpace(); if( spaceCheck->isChecked() ) - result.tqreplace( TQRegExp( "\\s" ), "_" ); + result.replace( TQRegExp( "\\s" ), "_" ); if( vfatCheck->isChecked() ) result = Amarok::vfatPath( result ); - result.tqreplace( "/", "-" ); + result.replace( "/", "-" ); return result; } diff --git a/amarok/src/osd.cpp b/amarok/src/osd.cpp index 70f9a61b..187340ea 100644 --- a/amarok/src/osd.cpp +++ b/amarok/src/osd.cpp @@ -180,9 +180,9 @@ OSDWidget::determineMetrics( const uint M ) 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) - m_text.tqreplace( TQRegExp(" +\n"), "\n" ); + m_text.replace( TQRegExp(" +\n"), "\n" ); // remove consecutive line breaks - m_text.tqreplace( TQRegExp("\n+"), "\n" ); + m_text.replace( TQRegExp("\n+"), "\n" ); // The osd cannot be larger than the screen TQRect rect = fontMetrics().boundingRect( 0, 0, @@ -690,9 +690,9 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot const int column = availableTags.at( i ); TQString append = ( i == 0 ) ? "" : ( 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(" - "); - append += ( parens.tqcontains( column ) ? "(%1)" : "%1" ); + append += ( parens.contains( column ) ? "(%1)" : "%1" ); text += append.tqarg( tags.at( column + 1 ) ); } } @@ -728,21 +728,21 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot QStringx osd = AmarokConfig::osdText(); // hacky, but works... - if( osd.tqcontains( "%rating" ) ) + if( osd.contains( "%rating" ) ) OSDWidget::setRating( AmarokConfig::useRatings() ? bundle.rating() : 0 ); else OSDWidget::setRating( 0 ); - osd.tqreplace( "%rating", "" ); + osd.replace( "%rating", "" ); - if( osd.tqcontains( "%moodbar" ) && AmarokConfig::showMoodbar() ) + if( osd.contains( "%moodbar" ) && AmarokConfig::showMoodbar() ) OSDWidget::setMoodbar( bundle ); - osd.tqreplace( "%moodbar", "" ); + osd.replace( "%moodbar", "" ); text = osd.namedOptArgs( args ); // 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() ) { @@ -755,7 +755,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot else location = CollectionDB::instance()->albumImage( bundle, false, 0 ); - if ( location.tqfind( "nocover" ) != -1 ) + if ( location.find( "nocover" ) != -1 ) setImage( Amarok::icon() ); else setImage( location ); @@ -826,7 +826,7 @@ Amarok::OSD::slotCoverChanged( const TQString &artist, const TQString &album ) { TQString location = CollectionDB::instance()->albumImage( artist, album, false, 0 ); - if( location.tqfind( "nocover" ) != -1 ) + if( location.find( "nocover" ) != -1 ) setImage( Amarok::icon() ); else setImage( location ); diff --git a/amarok/src/playerwindow.cpp b/amarok/src/playerwindow.cpp index 70ac5029..3e501d3d 100644 --- a/amarok/src/playerwindow.cpp +++ b/amarok/src/playerwindow.cpp @@ -764,7 +764,7 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e ) { //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 ); } @@ -774,7 +774,7 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e ) rect = m_pTimeLabel->tqgeometry(); rect |= m_pTimeSign->tqgeometry(); - if ( rect.tqcontains( e->pos() ) ) + if ( rect.contains( e->pos() ) ) { AmarokConfig::setLeftTimeDisplayRemaining( !AmarokConfig::leftTimeDisplayRemaining() ); timeDisplay( EngineController::engine()->position() ); diff --git a/amarok/src/playlist.cpp b/amarok/src/playlist.cpp index 813ce594..f881c0e8 100644 --- a/amarok/src/playlist.cpp +++ b/amarok/src/playlist.cpp @@ -812,19 +812,19 @@ void Playlist::addToUniqueMap( const TQString uniqueid, PlaylistItem* item ) { TQPtrList *list; - if( m_uniqueMap.tqcontains( uniqueid ) ) + if( m_uniqueMap.contains( uniqueid ) ) list = m_uniqueMap[uniqueid]; else list = new TQPtrList(); list->append( item ); - if( !m_uniqueMap.tqcontains( uniqueid ) ) + if( !m_uniqueMap.contains( uniqueid ) ) m_uniqueMap[uniqueid] = list; } void Playlist::removeFromUniqueMap( const TQString uniqueid, PlaylistItem* item ) { - if( !m_uniqueMap.tqcontains( uniqueid ) ) + if( !m_uniqueMap.contains( uniqueid ) ) return; TQPtrList *list; @@ -846,7 +846,7 @@ Playlist::updateEntriesUrl( const TQString &oldUrl, const TQString &newUrl, cons MoodServer::instance()->slotFileMoved( oldUrl, newUrl ); TQPtrList *list; - if( m_uniqueMap.tqcontains( uniqueid ) ) + if( m_uniqueMap.contains( uniqueid ) ) { list = m_uniqueMap[uniqueid]; PlaylistItem *item; @@ -862,7 +862,7 @@ void Playlist::updateEntriesUniqueId( const TQString &/*url*/, const TQString &oldid, const TQString &newid ) { TQPtrList *list, *oldlist; - if( m_uniqueMap.tqcontains( oldid ) ) + if( m_uniqueMap.contains( oldid ) ) { list = m_uniqueMap[oldid]; m_uniqueMap.remove( oldid ); @@ -872,7 +872,7 @@ Playlist::updateEntriesUniqueId( const TQString &/*url*/, const TQString &oldid, item->setUniqueId( newid ); item->readTags(); } - if( !m_uniqueMap.tqcontains( newid ) ) + if( !m_uniqueMap.contains( newid ) ) m_uniqueMap[newid] = list; else { @@ -888,7 +888,7 @@ void Playlist::updateEntriesStatusDeleted( const TQString &/*absPath*/, const TQString &uniqueid ) { TQPtrList *list; - if( m_uniqueMap.tqcontains( uniqueid ) ) + if( m_uniqueMap.contains( uniqueid ) ) { list = m_uniqueMap[uniqueid]; PlaylistItem *item; @@ -901,7 +901,7 @@ void Playlist::updateEntriesStatusAdded( const TQString &absPath, const TQString &uniqueid ) { TQPtrList *list; - if( m_uniqueMap.tqcontains( uniqueid ) ) + if( m_uniqueMap.contains( uniqueid ) ) { list = m_uniqueMap[uniqueid]; if( !list ) @@ -924,7 +924,7 @@ Playlist::updateEntriesStatusAdded( const TQMap &map ) TQMap*>::Iterator 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() ); 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( 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() ) tracks.append( (*it2)->tracks.getFirst() ); } } else 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 ); if( tracks.isEmpty() ) { @@ -1023,7 +1023,7 @@ Playlist::playNextTrack( bool forceNext ) // would loop infinitely otherwise TQPtrList albums; 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 ); 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 if( dynamicMode() ) { - ( !m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); + ( !m_nextTracks.containsRef( *it ) ? in : out ).append( *it ); dynamicList.append( *it ); } else { 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() ) { TQListViewItem *item = dynamicList.first(); - if( m_nextTracks.tqcontainsRef( static_cast(item) ) ) + if( m_nextTracks.containsRef( static_cast(item) ) ) { for( item = dynamicList.last(); item; item = dynamicList.prev() ) queue( item, true ); @@ -1339,7 +1339,7 @@ Playlist::queue( TQListViewItem *item, bool multi, bool invertQueue ) { #define item static_cast(item) - const int queueIndex = m_nextTracks.tqfindRef( item ); + const int queueIndex = m_nextTracks.findRef( item ); const bool isQueued = queueIndex != -1; if( isQueued ) @@ -1752,7 +1752,7 @@ TQPair Playlist::toolTipText( TQWidget*, const TQPoint &pos ) if( ( col == PlaylistItem::Rating && PlaylistItem::ratingAtPoint( contentsPos.x() ) <= item->rating() + 1 ) || ( col != PlaylistItem::Rating ) ) { - text = text.tqreplace( "&", "&" ).tqreplace( "<", "<" ).tqreplace( ">", ">" ); + text = text.replace( "&", "&" ).replace( "<", "<" ).replace( ">", ">" ); if( item->isCurrent() ) { text = TQString("%1").tqarg( text ); @@ -2998,11 +2998,11 @@ Playlist::customEvent( TQCustomEvent *e ) if ( !m_queueList.isEmpty() ) { KURL::List::Iterator jt; 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() ) { queue( *it ); - ( m_nextTracks.tqcontainsRef( *it ) ? in : out ).append( *it ); + ( m_nextTracks.containsRef( *it ) ? in : out ).append( *it ); m_queueList.remove( jt ); } } @@ -3121,9 +3121,9 @@ Playlist::saveXML( const TQString &path ) TQString dynamic; if( dynamicMode() ) { - const TQString title = ( dynamicMode()->title() ).tqreplace( "&", "&" ) - .tqreplace( "<", "<" ) - .tqreplace( ">", ">" ); + const TQString title = ( dynamicMode()->title() ).replace( "&", "&" ) + .replace( "<", "<" ) + .replace( ">", ">" ); dynamic = TQString(" dynamicMode=\"%1\"").tqarg( title ); } stream << TQString( "\n" ) @@ -3135,7 +3135,7 @@ Playlist::saveXML( const TQString &path ) if( item->isEmpty() ) continue; // Skip marker items and such TQStringList attributes; - const int queueIndex = m_nextTracks.tqfindRef( item ); + const int queueIndex = m_nextTracks.findRef( item ); if ( queueIndex != -1 ) attributes << "queue_index" << TQString::number( queueIndex + 1 ); else if ( item == currentTrack() ) @@ -3202,7 +3202,7 @@ Playlist::addCustomMenuItem( const TQString &submenu, const TQString &itemTitle bool Playlist::removeCustomMenuItem( const TQString &submenu, const TQString &itemTitle ) //for dcop { - if( !m_customSubmenuItem.tqcontains(submenu) ) + if( !m_customSubmenuItem.contains(submenu) ) return false; if( m_customSubmenuItem[submenu].remove( itemTitle ) != 0 ) { @@ -3323,7 +3323,7 @@ Playlist::repopulate() //SLOT for( ; *it; ++it ) { PlaylistItem *item = static_cast(*it); - int queueIndex = m_nextTracks.tqfindRef( item ); + int queueIndex = m_nextTracks.findRef( item ); bool isQueued = queueIndex != -1; bool isMarker = item->isEmpty(); // markers are used by playlistloader, and removing them is not good @@ -3394,7 +3394,7 @@ Playlist::removeSelectedItems() //SLOT { if( !(*it)->isDynamicEnabled() ) dontReplaceDynamic++; - ( m_nextTracks.tqcontains( *it ) ? queued : list ).prepend( *it ); + ( m_nextTracks.contains( *it ) ? queued : list ).prepend( *it ); } if( (int)list.count() == childCount() ) @@ -3596,10 +3596,10 @@ Playlist::changeFromQueueManager(TQPtrList list) PLItemList in, out; // make sure we tqrepaint items no longer queued for( PlaylistItem* item = oldQueue.first(); item; item = oldQueue.next() ) - if( !m_nextTracks.tqcontainsRef( item ) ) + if( !m_nextTracks.containsRef( item ) ) out << item; for( PlaylistItem* item = m_nextTracks.first(); item; item = m_nextTracks.next() ) - if( !oldQueue.tqcontainsRef( item ) ) + if( !oldQueue.containsRef( item ) ) in << item; emit queueChanged( in, out ); @@ -3636,7 +3636,7 @@ void Playlist::setFilter( const TQString &query ) //SLOT { 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::All ); @@ -3715,7 +3715,7 @@ Playlist::fileMoved( const TQString &srcPath, const TQString &dstPath ) void Playlist::appendToPreviousTracks( PlaylistItem *item ) { - if( !m_prevTracks.tqcontainsRef( item ) ) + if( !m_prevTracks.containsRef( item ) ) { m_total -= item->totalIncrementAmount(); m_prevTracks.append( item ); @@ -3725,7 +3725,7 @@ Playlist::appendToPreviousTracks( PlaylistItem *item ) void Playlist::appendToPreviousAlbums( PlaylistAlbum *album ) { - if( !m_prevAlbums.tqcontainsRef( album ) ) + if( !m_prevAlbums.containsRef( album ) ) { m_total -= album->total; 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 ); m = PlaylistBrowser::instance()->findDynamicModeByTitle( AmarokConfig::lastDynamicMode() ); 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)) { @@ -3835,10 +3835,10 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S bool queueToggle = false; MyIt it( this, MyIt::Selected ); - bool firstQueued = ( m_nextTracks.tqfindRef( *it ) != -1 ); + bool firstQueued = ( m_nextTracks.findRef( *it ) != -1 ); for( ++it ; *it; ++it ) { - if ( ( m_nextTracks.tqfindRef( *it ) != -1 ) != firstQueued ) { + if ( ( m_nextTracks.findRef( *it ) != -1 ) != firstQueued ) { queueToggle = true; break; } @@ -3915,7 +3915,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S popup.insertItem( trackColumn ? i18n("Iteratively Assign Track &Numbers") : 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 ? 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 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() ) { @@ -4226,12 +4226,12 @@ void Playlist::contentsWheelEvent( TQWheelEvent *e ) if( kClamp( dest, 0, int( m_nextTracks.count() ) - 1 ) != dest ) break; PlaylistItem* const p = m_nextTracks.at( dest ); - if( changed.tqfindRef( p ) == -1 ) + if( changed.findRef( p ) == -1 ) 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 ); - m_nextTracks.tqreplace( dest, m_nextTracks.at( dest - s ) ); - m_nextTracks.tqreplace( dest - s, p ); + m_nextTracks.replace( dest, m_nextTracks.at( dest - s ) ); + m_nextTracks.replace( dest - s, p ); } for( int i = 0, n = changed.count(); i < n; ++i ) @@ -4330,7 +4330,7 @@ Playlist::setColumns( TQValueList order, TQValueList visible ) header()->moveSection( order[i], i ); for( int i = 0; i < PlaylistItem::NUM_COLUMNS; ++i ) { - if( visible.tqcontains( i ) ) + if( visible.contains( i ) ) adjustColumn( i ); else hideColumn( i ); @@ -4843,7 +4843,7 @@ Playlist::addCustomColumn() const int index = addColumn( dialog.name(), 100 ); TQStringList args = TQStringList::split( ' ', dialog.command() ); - TQStringList::Iterator pcf = args.tqfind( "%f" ); + TQStringList::Iterator pcf = args.find( "%f" ); if ( pcf == args.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 diff --git a/amarok/src/playlist.h b/amarok/src/playlist.h index f742dfe2..6e39f05c 100644 --- a/amarok/src/playlist.h +++ b/amarok/src/playlist.h @@ -452,21 +452,21 @@ class Playlist : private KListView, public EngineObserver, public Amarok::ToolTi : 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 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(); } void add( PlaylistItem *item ) { TQPtrList &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 ) { - Iterator it = tqfind( keyOf( *item ) ); + Iterator it = find( keyOf( *item ) ); if (it != end()) { while ( it.data().removeRef( item ) ) { }; if ( it.data().isEmpty() ) erase( it ); diff --git a/amarok/src/playlistbrowser.cpp b/amarok/src/playlistbrowser.cpp index 36b2a7db..8f424f18 100644 --- a/amarok/src/playlistbrowser.cpp +++ b/amarok/src/playlistbrowser.cpp @@ -79,7 +79,7 @@ namespace Amarok { foreach( path ) { item = prox; TQString text( *it ); - text.tqreplace( escaped, sep ); + text.replace( escaped, sep ); for ( ; item; item = item->nextSibling() ) { if ( text == item->text(0) ) { @@ -101,7 +101,7 @@ namespace Amarok { const static TQChar sep( '/' ); int bOffset = 0, sOffset = 0; - int pos = path.tqfind( sep, bOffset ); + int pos = path.find( sep, bOffset ); while ( pos != -1 ) { if ( pos > sOffset && pos <= (int)path.length() ) { @@ -111,7 +111,7 @@ namespace Amarok { } } bOffset = pos + 1; - pos = path.tqfind( sep, bOffset ); + pos = path.find( sep, bOffset ); } int length = path.length() - 1; @@ -602,13 +602,13 @@ void PlaylistBrowser::addLastFmCustomRadio( TQListViewItem *tqparent ) { TQString token = LastFm::Controller::createCustomStation(); if( token.isEmpty() ) return; - token.tqreplace( "/", "%252" ); + token.replace( "/", "%252" ); const TQString text = "lastfm://artistnames/" + token; const KURL url( text ); TQString name = LastFm::Controller::stationDescription( text ); - name.tqreplace( "%252", "/" ); + name.replace( "%252", "/" ); new LastFmEntry( tqparent, 0, url, name ); saveLastFm(); } @@ -770,9 +770,9 @@ void PlaylistBrowser::updateSmartPlaylistElement( TQDomElement& query ) TQDomText text = child.toText(); TQString sql = text.data(); if ( selectFromSearch.search( sql ) != -1 ) - sql.tqreplace( selectFromSearch, "SELECT (*ListOfFields*) FROM" ); + sql.replace( selectFromSearch, "SELECT (*ListOfFields*) FROM" ); 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() ) ); text.setData( sql ); @@ -1043,7 +1043,7 @@ PlaylistBrowser::fixDynamicPlaylistPath( TQListViewItem *item ) TQString 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( item ); if ( entry ) return entry->name(); @@ -1173,7 +1173,7 @@ DEBUG_BLOCK { PlaylistCategory *tqparent = p; const int parentId = (*it).parentId(); - if( parentId > 0 && folderMap.tqfind( parentId ) != folderMap.end() ) + if( parentId > 0 && folderMap.find( parentId ) != folderMap.end() ) tqparent = folderMap[parentId]; channel = new PodcastChannel( tqparent, channel, *it ); @@ -1210,7 +1210,7 @@ DEBUG_BLOCK const bool isOpen = ( (*++it) == CollectionDB::instance()->boolT() ? true : false ); PlaylistCategory *tqparent = p; - if( parentId > 0 && folderMap.tqfind( parentId ) != folderMap.end() ) + if( parentId > 0 && folderMap.find( parentId ) != folderMap.end() ) tqparent = folderMap[parentId]; folder = new PlaylistCategory( tqparent, folder, t, id ); @@ -1927,7 +1927,7 @@ void PlaylistBrowser::savePlaylist( PlaylistEntry *item ) PlaylistBrowserEntry * PlaylistBrowser::findItem( TQString &t, int c ) const { - return static_cast( m_listview->tqfindItem( t, c, TQt::ExactMatch ) ); + return static_cast( m_listview->findItem( t, c, TQt::ExactMatch ) ); } 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 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() ); return; } @@ -3226,7 +3226,7 @@ InfoPane::setInfo( const TQString &title, const TQString &info ) toggle( !(info.isEmpty() && title.isEmpty()) ); TQString info_ = info; - info_.tqreplace( "\n", "
    " ); + info_.replace( "\n", "
    " ); m_infoBrowser->set( m_enable ? diff --git a/amarok/src/playlistbrowser.h b/amarok/src/playlistbrowser.h index 7576ecf3..aac06bab 100644 --- a/amarok/src/playlistbrowser.h +++ b/amarok/src/playlistbrowser.h @@ -378,14 +378,14 @@ fileBaseName( const TQString &filePath ) { // this function returns the file name without extension // (e.g. if the file path is "/home/user/playlist.m3u", "playlist" is returned - TQString fileName = filePath.right( filePath.length() - filePath.tqfindRev( '/' ) - 1 ); - return fileName.mid( 0, fileName.tqfindRev( '.' ) ); + TQString fileName = filePath.right( filePath.length() - filePath.findRev( '/' ) - 1 ); + return fileName.mid( 0, fileName.findRev( '.' ) ); } inline TQString fileDirPath( const TQString &filePath ) { - return filePath.left( filePath.tqfindRev( '/' )+1 ); + return filePath.left( filePath.findRev( '/' )+1 ); } diff --git a/amarok/src/playlistbrowseritem.cpp b/amarok/src/playlistbrowseritem.cpp index 96a00f5a..f0c476db 100644 --- a/amarok/src/playlistbrowseritem.cpp +++ b/amarok/src/playlistbrowseritem.cpp @@ -600,7 +600,7 @@ PlaylistEntry::PlaylistEntry( TQListViewItem *tqparent, TQListViewItem *after, c if( title.isEmpty() ) { title = fileBaseName( m_url.path() ); - title.tqreplace( '_', ' ' ); + title.replace( '_', ' ' ); } setText( 0, title ); @@ -687,7 +687,7 @@ void PlaylistEntry::insertTracks( TQListViewItem *after, TQValueList { int pos = 0; if( after ) { - pos = m_trackList.tqfind( static_cast(after)->trackInfo() ) + 1; + pos = m_trackList.find( static_cast(after)->trackInfo() ) + 1; if( pos == -1 ) return; } @@ -756,7 +756,7 @@ void PlaylistEntry::customEvent( TQCustomEvent *e ) if ( str.isEmpty() ) str = fileBaseName( m_url.path() ); - str.tqreplace( '_', ' ' ); + str.replace( '_', ' ' ); setText( 0, str ); foreachType( BundleList, playlist->bundles ) @@ -1062,7 +1062,7 @@ PlaylistTrackItem::PlaylistTrackItem( TQListViewItem *tqparent, TQListViewItem * PlaylistEntry *p = dynamic_cast(tqparent); if(!p) 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() ); else setText( 0, i18n("%1 - %2").tqarg( info->artist(), info->title() ) ); @@ -3045,7 +3045,7 @@ SmartPlaylist::SmartPlaylist( TQListViewItem *tqparent, TQListViewItem *after, c int SmartPlaylist::length() { TQString sql = query(); - sql.tqreplace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM"); + sql.replace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM"); CollectionDB *db = CollectionDB::instance(); TQStringList result = db->query( sql ); @@ -3087,7 +3087,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) } foreach( genres ) { m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), - TQString(queryChildren).tqreplace( + TQString(queryChildren).replace( "(*ExpandString*)", *it) ); } } @@ -3097,7 +3097,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) } foreach( artists ) { m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), - TQString(queryChildren).tqreplace( + TQString(queryChildren).replace( "(*ExpandString*)", *it) ); } } @@ -3107,7 +3107,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) } foreach( composers ) { m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), - TQString(queryChildren).tqreplace( + TQString(queryChildren).replace( "(*ExpandString*)", *it) ); } } @@ -3117,7 +3117,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) } foreach( albums ) { m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), - TQString(queryChildren).tqreplace( + TQString(queryChildren).replace( "(*ExpandString*)", *it) ); } } @@ -3127,7 +3127,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) } foreach( years ) { m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), - TQString(queryChildren).tqreplace( + TQString(queryChildren).replace( "(*ExpandString*)", *it) ); } } @@ -3136,7 +3136,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) labels = CollectionDB::instance()->labelList(); } 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 ); // duplicate string, thread-safely (TQDeepCopy is not thread-safe) return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() ) - .tqreplace( "(*CurrentTimeT*)" , + .replace( "(*CurrentTimeT*)" , TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) ) - .tqreplace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() ) - .tqreplace( "(*MountedDeviceSelection*)" , + .replace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() ) + .replace( "(*MountedDeviceSelection*)" , 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] ); else if ( condition == i18n( "does not contain" ) ) qb.excludeFilter( table, value, filters[0]) ; @@ -3377,8 +3377,8 @@ bool SmartPlaylist::isTimeOrdered() const TQString sql = query(); - return ! ( ( sql.tqfind( createDate, false ) == -1 ) /*not create ordered*/ && - ( sql.tqfind( accessDate, false ) == -1 ) /*not access ordered*/ ); + return ! ( ( sql.find( createDate, false ) == -1 ) /*not create ordered*/ && + ( sql.find( accessDate, false ) == -1 ) /*not access ordered*/ ); } 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. 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 ); genreCache[ name ] = last; // so we can append genres later if needed @@ -3620,7 +3620,7 @@ ShoutcastGenre::ShoutcastGenre( ShoutcastBrowser *browser, TQListViewItem *after { setExpandable( true ); setKept( false ); - m_genre = genre.tqreplace( "&", "%26" ); //fix & + m_genre = genre.replace( "&", "%26" ); //fix & } 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. 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" ); StreamEntry* entry = new StreamEntry( this, this, diff --git a/amarok/src/playlistbrowseritem.h b/amarok/src/playlistbrowseritem.h index f4b5a984..62a2ed6b 100644 --- a/amarok/src/playlistbrowseritem.h +++ b/amarok/src/playlistbrowseritem.h @@ -508,7 +508,7 @@ class StreamEditor : public KDialogBase StreamEditor( TQWidget *tqparent, const TQString &title, const TQString &url, bool readonly = false ); 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: KLineEdit *m_urlLineEdit; diff --git a/amarok/src/playlistitem.cpp b/amarok/src/playlistitem.cpp index e8b4329a..def2f6e6 100644 --- a/amarok/src/playlistitem.cpp +++ b/amarok/src/playlistitem.cpp @@ -213,7 +213,7 @@ bool PlaylistItem::isQueued() const int PlaylistItem::queuePosition() const { - return listView()->m_nextTracks.tqfindRef( this ); + return listView()->m_nextTracks.findRef( this ); } void PlaylistItem::setEnabled() @@ -410,7 +410,7 @@ PlaylistItem::nextInAlbum() const { if( !m_album ) 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) ) return 0; if( index != -1 ) @@ -434,7 +434,7 @@ PlaylistItem::prevInAlbum() const { if( !m_album ) return 0; - const int index = m_album->tracks.tqfindRef( this ); + const int index = m_album->tracks.findRef( this ); if( index == 0 ) return 0; 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 - if ( paintCache[column].map.tqfind( colorKey ) == paintCache[column].map.end() ) + if ( paintCache[column].map.find( colorKey ) == paintCache[column].map.end() ) { // Update painting cache paintCache[column].width = width; @@ -762,7 +762,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co } } /// 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 repeat = Amarok::repeatTrack() && isCurrent; @@ -1001,7 +1001,7 @@ void PlaylistItem::refAlbum() { 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; m_album = listView()->m_albums[artist_album()][album()]; m_album->refcount++; @@ -1053,10 +1053,10 @@ void PlaylistItem::incrementTotals() TQ_INT64 total = m_album->total * prevCount; total += totalIncrementAmount(); 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; } - else if( listView()->m_prevTracks.tqfindRef( this ) == -1 ) + else if( listView()->m_prevTracks.findRef( this ) == -1 ) listView()->m_total += totalIncrementAmount(); } @@ -1070,10 +1070,10 @@ void PlaylistItem::decrementTotals() warning() << "Unable to remove myself from m_album" << endl; total -= totalIncrementAmount(); 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; } - else if( listView()->m_prevTracks.tqfindRef( this ) == -1 ) + else if( listView()->m_prevTracks.findRef( this ) == -1 ) listView()->m_total -= totalIncrementAmount(); } diff --git a/amarok/src/playlistloader.cpp b/amarok/src/playlistloader.cpp index e4d30469..c9e5d00d 100644 --- a/amarok/src/playlistloader.cpp +++ b/amarok/src/playlistloader.cpp @@ -135,7 +135,7 @@ UrlLoader::UrlLoader( const KURL::List &urls, TQListViewItem *after, int options // url looks like media:/device/path DCOPRef mediamanager( "kded", "mediamanager" ); 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 device = device.left( slash ); // extract 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. m_nextTracks.append( item ); - m_nextTracks.tqreplace( (*it).queue - 1, item ); + m_nextTracks.replace( (*it).queue - 1, item ); } } if( (*it).stopafter ) @@ -312,7 +312,7 @@ UrlLoader::completeJob() TQPtrListIterator it( newQueue ); PLItemList added; for( it.toFirst(); *it; ++it ) - if( !m_oldQueue.tqcontainsRef( *it ) ) + if( !m_oldQueue.containsRef( *it ) ) added << (*it); if( !added.isEmpty() ) @@ -558,7 +558,7 @@ PlaylistFile::PlaylistFile( const TQString &path ) bool 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; for( TQString line; !stream.atEnd(); ) @@ -630,7 +630,7 @@ PlaylistFile::loadPls( TQTextStream &stream ) continue; lines.append(tmp); - if (tmp.tqcontains(regExp_File)) { + if (tmp.contains(regExp_File)) { entryCnt++; continue; } @@ -638,7 +638,7 @@ PlaylistFile::loadPls( TQTextStream &stream ) havePlaylistSection = true; continue; } - if (tmp.tqcontains(regExp_NumberOfEntries)) { + if (tmp.contains(regExp_NumberOfEntries)) { numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt(); continue; } @@ -675,7 +675,7 @@ PlaylistFile::loadPls( TQTextStream &stream ) inPlaylistSection = true; continue; } - if ((*i).tqcontains(regExp_File)) { + if ((*i).contains(regExp_File)) { // Have a "File#=XYZ" line. index = loadPls_extractIndex(*i); if (index > numberOfEntries || index == 0) @@ -686,7 +686,7 @@ PlaylistFile::loadPls( TQTextStream &stream ) m_bundles[index - 1].setTitle(tmp); continue; } - if ((*i).tqcontains(regExp_Title)) { + if ((*i).contains(regExp_Title)) { // Have a "Title#=XYZ" line. index = loadPls_extractIndex(*i); if (index > numberOfEntries || index == 0) @@ -695,7 +695,7 @@ PlaylistFile::loadPls( TQTextStream &stream ) m_bundles[index - 1].setTitle(tmp); continue; } - if ((*i).tqcontains(regExp_Length)) { + if ((*i).contains(regExp_Length)) { // Have a "Length#=XYZ" line. index = loadPls_extractIndex(*i); if (index > numberOfEntries || index == 0) @@ -705,11 +705,11 @@ PlaylistFile::loadPls( TQTextStream &stream ) Q_ASSERT(ok); continue; } - if ((*i).tqcontains(regExp_NumberOfEntries)) { + if ((*i).contains(regExp_NumberOfEntries)) { // Have the "NumberOfEntries=#" line. continue; } - if ((*i).tqcontains(regExp_Version)) { + if ((*i).contains(regExp_Version)) { // Have the "Version=#" line. tmp = TQString((*i).section('=', 1)).stripWhiteSpace(); // We only support Version=2 @@ -829,7 +829,7 @@ PlaylistFile::loadASX( TQTextStream &stream ) TQRegExp ex("(<[/]?[^>]*[A-Z]+[^>]*>)"); ex.setCaseSensitive(true); 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)) @@ -982,7 +982,7 @@ RemotePlaylistFetcher::RemotePlaylistFetcher( const KURL &source, TQListViewItem { //We keep the extension so the UrlLoader knows what file type it is 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_destination.setPath( m_temp->name() ); diff --git a/amarok/src/playlistselection.cpp b/amarok/src/playlistselection.cpp index c0e3b690..e5c69391 100644 --- a/amarok/src/playlistselection.cpp +++ b/amarok/src/playlistselection.cpp @@ -151,7 +151,7 @@ namespace ConfigDynamic 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->setUpcomingCount( dialog->m_upcomingIntSpinBox->value() ); saveMe->setPreviousCount( dialog->m_previousIntSpinBox->value() ); @@ -172,7 +172,7 @@ namespace ConfigDynamic void addDynamic( NewDynamic* dialog ) { 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 ); loadDynamicMode( saveMe, dialog ); @@ -210,10 +210,10 @@ void SelectionListItem::stateChange( bool b ) TQString SelectionListItem::name() const { - TQString fullName = text(0).tqreplace('/', "\\/"); + TQString fullName = text(0).replace('/', "\\/"); TQListViewItem *p = tqparent(); while ( p ) { - fullName.prepend( p->text(0).tqreplace('/', "\\/") + "/" ); + fullName.prepend( p->text(0).replace('/', "\\/") + "/" ); p = p->tqparent(); } return fullName; diff --git a/amarok/src/playlistwindow.cpp b/amarok/src/playlistwindow.cpp index ce6f7dbe..a44a36af 100644 --- a/amarok/src/playlistwindow.cpp +++ b/amarok/src/playlistwindow.cpp @@ -707,7 +707,7 @@ bool PlaylistWindow::eventFilter( TQObject *o, TQEvent *e ) for( It it( pl, It::Visible ); PlaylistItem *x = static_cast( *it ); ++it ) { pl->queue( x, true ); - ( pl->m_nextTracks.tqcontains( x ) ? in : out ).append( x ); + ( pl->m_nextTracks.contains( x ) ? in : out ).append( x ); } else { diff --git a/amarok/src/plugin/plugin.cpp b/amarok/src/plugin/plugin.cpp index 0cfca13f..99de139c 100644 --- a/amarok/src/plugin/plugin.cpp +++ b/amarok/src/plugin/plugin.cpp @@ -25,7 +25,7 @@ Plugin::addPluginProperty( const TQString& key, const TQString& value ) TQString 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 m_properties[key.lower()]; @@ -35,7 +35,7 @@ Plugin::pluginProperty( const TQString& key ) bool Plugin::hasPluginProperty( const TQString& key ) { - return m_properties.tqfind( key.lower() ) != m_properties.end(); + return m_properties.find( key.lower() ) != m_properties.end(); } } diff --git a/amarok/src/queuemanager.cpp b/amarok/src/queuemanager.cpp index 8082cc91..d99596fa 100644 --- a/amarok/src/queuemanager.cpp +++ b/amarok/src/queuemanager.cpp @@ -371,7 +371,7 @@ QueueManager::addItems( TQListViewItem *after ) #define item static_cast(item) TQValueList 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() ); @@ -401,20 +401,20 @@ QueueManager::addQueuedItem( PlaylistItem *item ) Playlist *pl = Playlist::instance(); if( !pl ) return; //should never happen - const int index = pl->m_nextTracks.tqfindRef( item ); + const int index = pl->m_nextTracks.findRef( item ); TQListViewItem *after; if( !index ) after = 0; else { - int tqfind = m_listview->childCount(); - if( index - 1 <= tqfind ) - tqfind = index - 1; - after = m_listview->itemAtIndex( tqfind ); + int find = m_listview->childCount(); + if( index - 1 <= find ) + find = index - 1; + after = m_listview->itemAtIndex( find ); } TQValueList current = m_map.values(); - TQValueListIterator newItem = current.tqfind( item ); + TQValueListIterator newItem = current.find( item ); TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() ); @@ -432,11 +432,11 @@ QueueManager::removeQueuedItem( PlaylistItem *item ) if( !pl ) return; //should never happen TQValueList current = m_map.values(); - TQValueListIterator newItem = current.tqfind( item ); + TQValueListIterator newItem = current.find( item ); 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 ) { @@ -504,7 +504,7 @@ QueueManager::removeSelected() //SLOT for( TQListViewItem *item = selected.first(); item; item = selected.next() ) { //Remove the key from the map, so we can re-queue the item - TQMapIterator it = m_map.tqfind( item ); + TQMapIterator it = m_map.find( item ); m_map.remove( it ); diff --git a/amarok/src/scancontroller.cpp b/amarok/src/scancontroller.cpp index 6f44206b..c147333a 100644 --- a/amarok/src/scancontroller.cpp +++ b/amarok/src/scancontroller.cpp @@ -141,7 +141,7 @@ ScanController::completeJob( void ) { 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() ); } for( it = m_filesAdded.begin(); it != m_filesAdded.end(); ++it ) diff --git a/amarok/src/scriptmanager.cpp b/amarok/src/scriptmanager.cpp index 407d14a2..a173a843 100644 --- a/amarok/src/scriptmanager.cpp +++ b/amarok/src/scriptmanager.cpp @@ -245,7 +245,7 @@ ScriptManager::~ScriptManager() bool ScriptManager::runScript( const TQString& name, bool silent ) { - if( !m_scripts.tqcontains( name ) ) + if( !m_scripts.contains( name ) ) return false; m_gui->listView->setCurrentItem( m_scripts[name].li ); @@ -256,7 +256,7 @@ ScriptManager::runScript( const TQString& name, bool silent ) bool ScriptManager::stopScript( const TQString& name ) { - if( !m_scripts.tqcontains( name ) ) + if( !m_scripts.contains( name ) ) return false; m_gui->listView->setCurrentItem( m_scripts[name].li ); @@ -288,7 +288,7 @@ ScriptManager::customMenuClicked( const TQString& message ) TQString ScriptManager::specForScript( const TQString& name ) { - if( !m_scripts.tqcontains( name ) ) + if( !m_scripts.contains( name ) ) return TQString(); TQFileInfo info( m_scripts[name].url.path() ); const TQString specPath = info.dirPath() + '/' + info.baseName( true ) + ".spec"; @@ -370,7 +370,7 @@ ScriptManager::findScripts() //SLOT { foreach( runningScripts ) - if( m_scripts.tqcontains( *it ) ) { + if( m_scripts.contains( *it ) ) { debug() << "Auto-running script: " << *it << endl; m_gui->listView->setCurrentItem( m_scripts[*it].li ); 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 ) return; - if( m_scripts.tqfind( name ) == m_scripts.end() ) + if( m_scripts.find( name ) == m_scripts.end() ) return; KURL scriptDirURL( m_scripts[name].url.upURL() ); @@ -634,7 +634,7 @@ ScriptManager::slotStopScript() const TQString name = li->text( 0 ); // Just a sanity check - if( m_scripts.tqfind( name ) == m_scripts.end() ) + if( m_scripts.find( name ) == m_scripts.end() ) return; terminateProcess( &m_scripts[name].process ); diff --git a/amarok/src/scripts/alarm/COPYING b/amarok/src/scripts/alarm/COPYING index 449a9762..0fc8a215 100644 --- a/amarok/src/scripts/alarm/COPYING +++ b/amarok/src/scripts/alarm/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/alarm/alarm.py b/amarok/src/scripts/alarm/alarm.py index e9bafa1c..97152c73 100755 --- a/amarok/src/scripts/alarm/alarm.py +++ b/amarok/src/scripts/alarm/alarm.py @@ -140,7 +140,7 @@ class Alarm( QApplication ): string = QString( self.queue.get_nowait() ) print "[Alarm Script] Received notification: " + str( string ) - if string.tqcontains( "configure" ): + if string.contains( "configure" ): self.configure() def configure( self ): diff --git a/amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh b/amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh index cdfde00d..2ae79905 100644 --- a/amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh +++ b/amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh @@ -137,7 +137,7 @@ rmdir $WORK/amarok.livecd mkdir $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/home/amarok/.kde/share/apps/amarok #chmod -R 777 $WORK/mklivecd/ diff --git a/amarok/src/scripts/amarok_live/amarok_live.py b/amarok/src/scripts/amarok_live/amarok_live.py index ab51d907..cd2047f8 100755 --- a/amarok/src/scripts/amarok_live/amarok_live.py +++ b/amarok/src/scripts/amarok_live/amarok_live.py @@ -237,12 +237,12 @@ class Remasterer( QApplication ): string = QString(notification.string) debug( "Received notification: " + str( string ) ) - if string.tqcontains( "configure" ): + if string.contains( "configure" ): self.configure() - if string.tqcontains( "stop"): + if string.contains( "stop"): self.stop() - elif string.tqcontains( "customMenuClicked" ): + elif string.contains( "customMenuClicked" ): if "selected" in string: self.copyTrack( string ) elif "playlist" in string: @@ -353,10 +353,10 @@ class Remasterer( QApplication ): # get the list of files. yes, its ugly. it works though. #files = event.split(":")[-1][2:-1].split()[2:] #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 - files = event.tqreplace("customMenuClicked: Amarok live Add selected to livecd", "").split() + files = event.replace("customMenuClicked: Amarok live Add selected to livecd", "").split() allfiles = "" for file in files: diff --git a/amarok/src/scripts/common/Zeroconf.py b/amarok/src/scripts/common/Zeroconf.py index 2a1f678e..14f4668f 100644 --- a/amarok/src/scripts/common/Zeroconf.py +++ b/amarok/src/scripts/common/Zeroconf.py @@ -1092,7 +1092,7 @@ class ServiceInfo(object): index += length for s in strs: - eindex = s.tqfind('=') + eindex = s.find('=') if eindex == -1: # No equals sign at all key = s @@ -1417,7 +1417,7 @@ class Zeroconf(object): while i < 3: for record in self.cache.entriesWithName(info.type): 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 self.checkService(info) return diff --git a/amarok/src/scripts/embedcover/COPYING b/amarok/src/scripts/embedcover/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/embedcover/COPYING +++ b/amarok/src/scripts/embedcover/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/embedcover/addimage2mp3.rb b/amarok/src/scripts/embedcover/addimage2mp3.rb index afccacea..f5fd46d3 100644 --- a/amarok/src/scripts/embedcover/addimage2mp3.rb +++ b/amarok/src/scripts/embedcover/addimage2mp3.rb @@ -28,7 +28,7 @@ def setId3v2Size( data, size ) 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 ) data[5] |= 0b10000000 # Set Unsychronization global tag flag diff --git a/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp b/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp index aaea599a..2ff6d27c 100644 --- a/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp +++ b/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp @@ -192,7 +192,7 @@ TQPtrList* circleList ) { if(it->x() > x) { - index = m_circleList->tqfind(it); + index = m_circleList->find(it); //if(index != 0) //{ m_circleList->insert(index,this); @@ -205,7 +205,7 @@ TQPtrList* circleList ) m_circleList->append(this); //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) m_circleList->at(circleIndex-1)->setLine(RIGHT,m_line1); if(circleIndex < m_circleList->count()-1) @@ -214,7 +214,7 @@ TQPtrList* circleList ) void EqualizerCircle::setLocation(const TQPoint &newLocation) { - unsigned int circleIndex = m_circleList->tqfind(this); + unsigned int circleIndex = m_circleList->find(this); double xMin, xMax; TQPoint correctedLoc(newLocation); if(m_line1 == 0 || m_line2 == 0) diff --git a/amarok/src/scripts/lyrics_astraweb/COPYING b/amarok/src/scripts/lyrics_astraweb/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/lyrics_astraweb/COPYING +++ b/amarok/src/scripts/lyrics_astraweb/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/lyrics_lyrc/COPYING b/amarok/src/scripts/lyrics_lyrc/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/lyrics_lyrc/COPYING +++ b/amarok/src/scripts/lyrics_lyrc/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/mp3fix/COPYING b/amarok/src/scripts/mp3fix/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/mp3fix/COPYING +++ b/amarok/src/scripts/mp3fix/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/playlist2html/Playlist.py b/amarok/src/scripts/playlist2html/Playlist.py index f1785f1c..cd0e747c 100644 --- a/amarok/src/scripts/playlist2html/Playlist.py +++ b/amarok/src/scripts/playlist2html/Playlist.py @@ -95,7 +95,7 @@ class Playlist: 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): diff --git a/amarok/src/scripts/score_default/COPYING b/amarok/src/scripts/score_default/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/score_default/COPYING +++ b/amarok/src/scripts/score_default/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/score_impulsive/COPYING b/amarok/src/scripts/score_impulsive/COPYING index de684ac0..6822c1a4 100644 --- a/amarok/src/scripts/score_impulsive/COPYING +++ b/amarok/src/scripts/score_impulsive/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE 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 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" @@ -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 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 control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/amarok/src/scripts/templates/python_qt_template.py b/amarok/src/scripts/templates/python_qt_template.py index 51a692ac..e5639e8b 100755 --- a/amarok/src/scripts/templates/python_qt_template.py +++ b/amarok/src/scripts/templates/python_qt_template.py @@ -120,22 +120,22 @@ class Test( QApplication ): string = QString(notification.string) debug( "Received notification: " + str( string ) ) - if string.tqcontains( "configure" ): + if string.contains( "configure" ): self.configure() - if string.tqcontains( "engineStateChange: play" ): + if string.contains( "engineStateChange: play" ): self.engineStatePlay() - if string.tqcontains( "engineStateChange: idle" ): + if string.contains( "engineStateChange: idle" ): self.engineStateIdle() - if string.tqcontains( "engineStateChange: pause" ): + if string.contains( "engineStateChange: pause" ): self.engineStatePause() - if string.tqcontains( "engineStateChange: empty" ): + if string.contains( "engineStateChange: empty" ): self.engineStatePause() - if string.tqcontains( "trackChange" ): + if string.contains( "trackChange" ): self.trackChange() # Notification callbacks. Implement these functions to react to specific notification diff --git a/amarok/src/scripts/webcontrol/Playlist.py b/amarok/src/scripts/webcontrol/Playlist.py index b93f2894..b26a8f8d 100644 --- a/amarok/src/scripts/webcontrol/Playlist.py +++ b/amarok/src/scripts/webcontrol/Playlist.py @@ -237,9 +237,9 @@ class Playlist: counter = "countdown(" + str(status.timeLeft()) + ");" self.fullPage = code % ( counter, - self._createActions(status).encode(self.encoding,'tqreplace'), + self._createActions(status).encode(self.encoding,'replace'), os.environ['LOGNAME'], - self._createTable(status).encode(self.encoding,'tqreplace') ) + self._createTable(status).encode(self.encoding,'replace') ) def _getMtime(self): """gets the mtime from the current.xml file, to check if the current.xml diff --git a/amarok/src/scripts/webcontrol/RequestHandler.py b/amarok/src/scripts/webcontrol/RequestHandler.py index 02fe479e..cf6e87fe 100644 --- a/amarok/src/scripts/webcontrol/RequestHandler.py +++ b/amarok/src/scripts/webcontrol/RequestHandler.py @@ -63,7 +63,7 @@ class AmaroktqStatus: if self.playState != -1: res = self.playState == self.EnginePlay else: - res = string.tqfind(self.dcop_isplaying.result(), "true") >= 0 + res = string.find(self.dcop_isplaying.result(), "true") >= 0 if res: self.playState = self.EnginePlay else: @@ -229,15 +229,15 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): # Surely there must be a better way that this:) # 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.end_headers() 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.end_headers() 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.end_headers() self._sendFile(self.path) diff --git a/amarok/src/scripts/webcontrol/WebControl.py b/amarok/src/scripts/webcontrol/WebControl.py index bf0188e1..a6eb91cc 100755 --- a/amarok/src/scripts/webcontrol/WebControl.py +++ b/amarok/src/scripts/webcontrol/WebControl.py @@ -65,8 +65,8 @@ class ConfigDialog( QDialog ): try: config = ConfigParser.ConfigParser() config.read( "webcontrolrc" ) - allowControl = string.tqfind(config.get( "General", "allowcontrol" ), "True") >= 0 - publish = string.tqfind(config.get( "General", "publish" ), "True") >= 0 + allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0 + publish = string.find(config.get( "General", "publish" ), "True") >= 0 except: pass @@ -159,8 +159,8 @@ class WebControl( QApplication ): config.read( "webcontrolrc" ) try: - RequestHandler.AmaroktqStatus.allowControl = string.tqfind(config.get( "General", "allowcontrol" ), "True") >= 0 - RequestHandler.AmaroktqStatus.publish = string.tqfind(config.get( "General", "publish" ), "True") >= 0 + RequestHandler.AmaroktqStatus.allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0 + RequestHandler.AmaroktqStatus.publish = string.find(config.get( "General", "publish" ), "True") >= 0 except: debug( "No config file found, using defaults." ) @@ -198,25 +198,25 @@ class WebControl( QApplication ): string = QString(notification.string) debug( "Received notification: " + str( string ) ) - if string.tqcontains( "configure" ): + if string.contains( "configure" ): self.configure() - elif string.tqcontains( "exit" ): + elif string.contains( "exit" ): cleanup(None,None) - elif string.tqcontains( "engineStateChange: play" ): + elif string.contains( "engineStateChange: play" ): self.engineStatePlay() - elif string.tqcontains( "engineStateChange: idle" ): + elif string.contains( "engineStateChange: idle" ): self.engineStateIdle() - elif string.tqcontains( "engineStateChange: pause" ): + elif string.contains( "engineStateChange: pause" ): self.engineStatePause() - elif string.tqcontains( "engineStateChange: empty" ): + elif string.contains( "engineStateChange: empty" ): self.engineStatePause() - elif string.tqcontains( "trackChange" ): + elif string.contains( "trackChange" ): self.trackChange() else: diff --git a/amarok/src/scripts/webcontrol/main.js b/amarok/src/scripts/webcontrol/main.js index 071a42f9..1f09d591 100644 --- a/amarok/src/scripts/webcontrol/main.js +++ b/amarok/src/scripts/webcontrol/main.js @@ -205,7 +205,7 @@ function setScrollInUrl(newUrl) { if (newUrl.match(/scroll=\d*/)) { - return newUrl.tqreplace(/scroll=\d*/g, "scroll=" + getPageScroll()); + return newUrl.replace(/scroll=\d*/g, "scroll=" + getPageScroll()); } else { if (newUrl.match(/\?/)) { return newUrl + "&scroll=" + getPageScroll(); diff --git a/amarok/src/scrobbler.cpp b/amarok/src/scrobbler.cpp index 74525985..3edcdaf0 100644 --- a/amarok/src/scrobbler.cpp +++ b/amarok/src/scrobbler.cpp @@ -712,7 +712,7 @@ void ScrobblerSubmitter::audioScrobblerHandshakeResult( KIO::Job* job ) //SLOT // INTERVAL n (protocol 1.1) 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 ) reason = reason.mid( 7 ).stripWhiteSpace(); @@ -773,7 +773,7 @@ void ScrobblerSubmitter::audioScrobblerSubmitResult( KIO::Job* job ) //SLOT // INTERVAL n (protocol 1.1) 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 ) reason = reason.mid( 7 ).stripWhiteSpace(); diff --git a/amarok/src/sliderwidget.cpp b/amarok/src/sliderwidget.cpp index c8d2f157..4e2c1d81 100644 --- a/amarok/src/sliderwidget.cpp +++ b/amarok/src/sliderwidget.cpp @@ -78,7 +78,7 @@ Amarok::Slider::mouseMoveEvent( TQMouseEvent *e ) //feels better, but using set value of 20 is bad of course 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 ) TQSlider::setValue( m_prevValue ); m_outside = true; @@ -107,7 +107,7 @@ Amarok::Slider::mousePressEvent( TQMouseEvent *e ) m_sliding = true; m_prevValue = TQSlider::value(); - if ( !sliderRect().tqcontains( e->pos() ) ) + if ( !sliderRect().contains( e->pos() ) ) mouseMoveEvent( e ); } diff --git a/amarok/src/smartplaylisteditor.cpp b/amarok/src/smartplaylisteditor.cpp index 9002164c..d81e3e12 100644 --- a/amarok/src/smartplaylisteditor.cpp +++ b/amarok/src/smartplaylisteditor.cpp @@ -123,7 +123,7 @@ SmartPlaylistEditor::SmartPlaylistEditor( TQWidget *tqparent, TQDomElement xml, TQDomElement orderby = orderbyList.item(0).toElement(); // we only allow one orderby node //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 ); updateOrderTypes( dbfield ); @@ -146,7 +146,7 @@ SmartPlaylistEditor::SmartPlaylistEditor( TQWidget *tqparent, TQDomElement xml, m_expandCheck->setChecked( true ); 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 ); } } @@ -438,7 +438,7 @@ CriteriaEditor::CriteriaEditor( SmartPlaylistEditor *editor, TQWidget *tqparent, } if ( !criteria.isNull() ) { - int field = m_dbFields.tqfindIndex( criteria.attribute( "field" ) ); + int field = m_dbFields.findIndex( criteria.attribute( "field" ) ); 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 ); else if( criteria == i18n("does not contain") ) searchCriteria += " NOT " + CollectionDB::likeCondition( value, true, true ); @@ -816,20 +816,20 @@ void CriteriaEditor::slotFieldSelected( int field ) && fs != "fdescfs" && fs != "kernfs" && fs != "usbfs" - && !fs.tqcontains( "proc" ) + && !fs.contains( "proc" ) && fs != "unknown" && fs != "none" && fs != "sunrpc" && fs != "none" && device != "tmpfs" - && device.tqfind("shm") == -1 + && device.find("shm") == -1 && mountpoint != "/dev/swap" && mountpoint != "/dev/pts" - && mountpoint.tqfind("/proc") != 0 - && mountpoint.tqfind("/sys") != 0 - || fs.tqfind( "smb" ) != -1 - || fs.tqfind( "cifs" ) != -1 - || fs.tqfind( "nfs" ) != -1 + && mountpoint.find("/proc") != 0 + && mountpoint.find("/sys") != 0 + || fs.find( "smb" ) != -1 + || fs.find( "cifs" ) != -1 + || fs.find( "nfs" ) != -1 ) items << mountpoint; } @@ -1003,7 +1003,7 @@ void CriteriaEditor::loadCriteriaList( int valueType, TQString condition ) switch( valueType ) { case String: 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( "ends with" ) << i18n( "does not end with" ); break; @@ -1027,7 +1027,7 @@ void CriteriaEditor::loadCriteriaList( int valueType, TQString condition ) m_criteriaCombo->insertStringList( items ); if ( !condition.isEmpty() ) { - int index = items.tqfindIndex( condition ); + int index = items.findIndex( condition ); if (index!=-1) m_criteriaCombo->setCurrentItem( index ); } diff --git a/amarok/src/smartplaylisteditor.h b/amarok/src/smartplaylisteditor.h index 1e2dd6dc..03021851 100644 --- a/amarok/src/smartplaylisteditor.h +++ b/amarok/src/smartplaylisteditor.h @@ -35,7 +35,7 @@ Q_OBJECT 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 }; diff --git a/amarok/src/sqlite/sqlite3.c b/amarok/src/sqlite/sqlite3.c index a7b1e93f..1742e80e 100644 --- a/amarok/src/sqlite/sqlite3.c +++ b/amarok/src/sqlite/sqlite3.c @@ -3516,7 +3516,7 @@ typedef struct VdbeOpList VdbeOpList; #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. */ #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" ** 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 # include "os_other.h" @@ -4410,7 +4410,7 @@ struct IoMethod { /* ** 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 -** 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 ** entry (pointing to the virtual function table) always occurs first ** so that we can always find the appropriate methods. @@ -9499,7 +9499,7 @@ typedef struct Mem Mem; #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 ** of the function. This is used to implement the sqlite3_get_auxdata() ** 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, ** 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 ** 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 @@ -22837,7 +22837,7 @@ struct BtLock { /* ** 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 -** 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 ** 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. @@ -26464,7 +26464,7 @@ static int allocateBtreePage( memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); } }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 ** 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 ** 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. ** ** 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)) /* -** 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 ** is responsible for deallocating that string. Because the stack entry ** 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 ... #/" ** 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 ** vdbe stack when it is executed. See function opcode() in ** vdbeaux.c for details. @@ -38939,7 +38939,7 @@ int sqlite3_blob_open( if( rc==STQLITE_ROW ){ /* 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. */ 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 ** 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 ** the table take priority. For example, if zType is 'BLOBINT', ** 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 ** from A by replacing every occurance of B with C. The match ** 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 }, { "changes", 0, 0xff, STQLITE_UTF8, 0, 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", 2, 1, 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 ** 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. ** ** 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. ** -** 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: ** ** 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 cursor number for the original outer query FROM element in ** 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 ** elements we are now copying in. */ @@ -58801,7 +58801,7 @@ update_cleanup: /* ** 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: ** ** (A) The original rowid of that row. @@ -61192,7 +61192,7 @@ static double bestVirtualIndex( } *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 ** changing them. We have to do some funky casting in order to ** initialize those fields. @@ -61791,7 +61791,7 @@ static void whereInfoFree(WhereInfo *pWInfo){ /* ** 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 ** should invoke sqlite3WhereEnd() with the return value of this function ** in order to complete the WHERE clause processing. diff --git a/amarok/src/statistics.cpp b/amarok/src/statistics.cpp index 605a84e8..33b64113 100644 --- a/amarok/src/statistics.cpp +++ b/amarok/src/statistics.cpp @@ -701,7 +701,7 @@ void StatisticsItem::setIcon( const TQString &icon ) { 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; diff --git a/amarok/src/statusbar/statusBarBase.cpp b/amarok/src/statusbar/statusBarBase.cpp index 616a90fb..645a9f19 100644 --- a/amarok/src/statusbar/statusBarBase.cpp +++ b/amarok/src/statusbar/statusBarBase.cpp @@ -371,7 +371,7 @@ StatusBar::newProgressOperation( TQObject *owner ) { SHOULD_BE_GUI - if ( m_progressMap.tqcontains( owner ) ) + if ( m_progressMap.contains( owner ) ) return *m_progressMap[owner]; if( allDone() ) @@ -437,7 +437,7 @@ StatusBar::endProgressOperation( TQObject *owner ) //NOTE we don't delete it yet, as this upsets some //things, we just call setDone(). - if ( !m_progressMap.tqcontains( owner ) ) + if ( !m_progressMap.contains( owner ) ) { SingleShotPool::startTimer( 2000, TQT_TQOBJECT(this), TQT_SLOT(hideMainProgressBar()) ); return ; @@ -521,7 +521,7 @@ StatusBar::setProgress( KIO::Job *job, unsigned long percent ) void StatusBar::setProgress( const TQObject *owner, int steps ) { - if ( !m_progressMap.tqcontains( owner ) ) + if ( !m_progressMap.contains( owner ) ) return ; m_progressMap[ owner ] ->setProgress( steps ); @@ -532,7 +532,7 @@ StatusBar::setProgress( const TQObject *owner, int steps ) void StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc ) { - if ( !m_progressMap.tqcontains( owner ) ) + if ( !m_progressMap.contains( owner ) ) return ; m_progressMap[ owner ] ->setTotalSteps( m_progressMap[ owner ] ->totalSteps() + inc ); @@ -543,7 +543,7 @@ StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc ) void StatusBar::setProgresstqStatus( const TQObject *owner, const TQString &text ) { - if ( !m_progressMap.tqcontains( owner ) ) + if ( !m_progressMap.contains( owner ) ) return ; m_progressMap[owner]->settqStatus( text ); @@ -557,7 +557,7 @@ void StatusBar::incrementProgress() void StatusBar::incrementProgress( const TQObject *owner ) { - if ( !m_progressMap.tqcontains( owner ) ) + if ( !m_progressMap.contains( owner ) ) return; m_progressMap[owner]->setProgress( m_progressMap[ owner ] ->progress() + 1 ); diff --git a/amarok/src/statusbar/statusbar.cpp b/amarok/src/statusbar/statusbar.cpp index 72363027..8b210a84 100644 --- a/amarok/src/statusbar/statusbar.cpp +++ b/amarok/src/statusbar/statusbar.cpp @@ -164,7 +164,7 @@ StatusBar::engineStateChanged( Engine::State state, Engine::State /*oldState*/ ) void StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ ) { - #define escapeHTML(s) TQString(s).tqreplace( "&", "&" ).tqreplace( "<", "<" ).tqreplace( ">", ">" ) + #define escapeHTML(s) TQString(s).replace( "&", "&" ).replace( "<", "<" ).replace( ">", ">" ) TQString title = escapeHTML( bundle.title() ); TQString prettyTitle = escapeHTML( bundle.prettyTitle() ); TQString artist = escapeHTML( bundle.artist() ); diff --git a/amarok/src/tagdialog.cpp b/amarok/src/tagdialog.cpp index b2997688..4f0a36a1 100644 --- a/amarok/src/tagdialog.cpp +++ b/amarok/src/tagdialog.cpp @@ -355,7 +355,7 @@ TagDialog::fillSelected( KTRMResult selected ) //SLOT if ( selected.track() != 0 ) mb.setTrack( selected.track() ); if ( selected.year() != 0 ) mb.setYear( selected.year() ); - storedTags.tqreplace( m_mbTrack.path(), mb ); + storedTags.replace( m_mbTrack.path(), mb ); } #else Q_UNUSED(selected); @@ -959,7 +959,7 @@ TagDialog::getCommonLabels() TQStringList labels = labelsForURL( *iter ); foreach( labels ) { - if ( counterMap.tqcontains( *it ) ) + if ( counterMap.contains( *it ) ) counterMap[ *it ] = counterMap[ *it ] +1; else counterMap[ *it ] = 1; @@ -1051,15 +1051,15 @@ TagDialog::storeTags( const KURL &kurl ) mb.setLength( m_bundle.length() ); mb.setBitrate( m_bundle.bitrate() ); mb.setSampleRate( m_bundle.sampleRate() ); - storedTags.tqreplace( url, mb ); + storedTags.replace( url, mb ); } if( result & TagDialog::SCORECHANGED ) - storedScores.tqreplace( url, kIntSpinBox_score->value() ); + storedScores.replace( url, kIntSpinBox_score->value() ); if( result & TagDialog::RATINGCHANGED ) - storedRatings.tqreplace( url, kComboBox_rating->currentItem() ); + storedRatings.replace( url, kComboBox_rating->currentItem() ); if( result & TagDialog::LYRICSCHANGED ) { if ( kTextEdit_lyrics->text().isEmpty() ) - storedLyrics.tqreplace( url, TQString() ); + storedLyrics.replace( url, TQString() ); else { TQDomDocument doc; TQDomElement e = doc.createElement( "lyrics" ); @@ -1068,13 +1068,13 @@ TagDialog::storeTags( const KURL &kurl ) TQDomText t = doc.createTextNode( kTextEdit_lyrics->text() ); e.appendChild( t ); doc.appendChild( e ); - storedLyrics.tqreplace( url, doc.toString() ); + storedLyrics.replace( url, doc.toString() ); } } if( result & TagDialog::LABELSCHANGED ) { generateDeltaForLabelList( labelListFromText( kTextEdit_selectedLabels->text() ) ); TQStringList tmpLabels; - if ( newLabels.tqfind( url ) != newLabels.end() ) + if ( newLabels.find( url ) != newLabels.end() ) tmpLabels = newLabels[ url ]; else tmpLabels = originalLabels[ url ]; @@ -1085,10 +1085,10 @@ TagDialog::storeTags( const KURL &kurl ) } foreach( m_addedLabels ) { - if( tmpLabels.tqfind( *it ) == tmpLabels.end() ) + if( tmpLabels.find( *it ) == tmpLabels.end() ) 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 ) { if ( changes & TagDialog::TAGSCHANGED ) - storedTags.tqreplace( url.path(), mb ); + storedTags.replace( url.path(), mb ); if ( changes & TagDialog::SCORECHANGED ) - storedScores.tqreplace( url.path(), mb.score() ); + storedScores.replace( url.path(), mb.score() ); if ( changes & TagDialog::RATINGCHANGED ) - storedRatings.tqreplace( url.path(), mb.rating() ); + storedRatings.replace( url.path(), mb.rating() ); } void 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 TagDialog::bundleForURL( const KURL &url ) { - if( storedTags.tqfind( url.path() ) != storedTags.end() ) + if( storedTags.find( url.path() ) != storedTags.end() ) return storedTags[ url.path() ]; return MetaBundle( url, url.isLocalFile() ); @@ -1159,7 +1159,7 @@ TagDialog::bundleForURL( const KURL &url ) float TagDialog::scoreForURL( const KURL &url ) { - if( storedScores.tqfind( url.path() ) != storedScores.end() ) + if( storedScores.find( url.path() ) != storedScores.end() ) return storedScores[ url.path() ]; return CollectionDB::instance()->getSongPercentage( url.path() ); @@ -1168,7 +1168,7 @@ TagDialog::scoreForURL( const KURL &url ) int TagDialog::ratingForURL( const KURL &url ) { - if( storedRatings.tqfind( url.path() ) != storedRatings.end() ) + if( storedRatings.find( url.path() ) != storedRatings.end() ) return storedRatings[ url.path() ]; return CollectionDB::instance()->getSongRating( url.path() ); @@ -1177,7 +1177,7 @@ TagDialog::ratingForURL( const KURL &url ) TQString TagDialog::lyricsForURL( const KURL &url ) { - if( storedLyrics.tqfind( url.path() ) != storedLyrics.end() ) + if( storedLyrics.find( url.path() ) != storedLyrics.end() ) return storedLyrics[ url.path() ]; return CollectionDB::instance()->getLyrics( url.path() ); @@ -1186,9 +1186,9 @@ TagDialog::lyricsForURL( const KURL &url ) TQStringList TagDialog::labelsForURL( const KURL &url ) { - if( newLabels.tqfind( url.path() ) != newLabels.end() ) + if( newLabels.find( url.path() ) != newLabels.end() ) return newLabels[ url.path() ]; - if( originalLabels.tqfind( url.path() ) != originalLabels.end() ) + if( originalLabels.find( url.path() ) != originalLabels.end() ) return originalLabels[ url.path() ]; TQStringList tmp = CollectionDB::instance()->getLabels( url.path(), CollectionDB::typeUser ); originalLabels[ url.path() ] = tmp; @@ -1315,7 +1315,7 @@ TagDialog::applyToAllTracks() } 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 ); } storeLabels( *it, tmpLabels ); @@ -1332,7 +1332,7 @@ TagDialog::labelListFromText( const TQString &text ) { TQString tmpString = (*it).stripWhiteSpace(); if ( !tmpString.isEmpty() ) - map.tqreplace( tmpString, 0 ); + map.replace( tmpString, 0 ); } TQStringList result; TQMap::ConstIterator endMap( map.end() ); @@ -1349,12 +1349,12 @@ TagDialog::generateDeltaForLabelList( const TQStringList &list ) m_removedLabels.clear(); foreach( list ) { - if ( !m_labels.tqcontains( *it ) ) + if ( !m_labels.contains( *it ) ) m_addedLabels.append( *it ); } foreach( m_labels ) { - if ( !list.tqcontains( *it ) ) + if ( !list.contains( *it ) ) m_removedLabels.append( *it ); } m_labels = list; @@ -1403,7 +1403,7 @@ TagDialog::openURLRequest(const KURL &url ) //SLOT { TQString text = kTextEdit_selectedLabels->text(); TQStringList currentLabels = labelListFromText( text ); - if ( currentLabels.tqcontains( url.path() ) ) + if ( currentLabels.contains( url.path() ) ) return; if ( !text.isEmpty() ) text.append( ", " ); diff --git a/amarok/src/tagguesser.cpp b/amarok/src/tagguesser.cpp index 8d6a3d6d..1fe60553 100644 --- a/amarok/src/tagguesser.cpp +++ b/amarok/src/tagguesser.cpp @@ -30,17 +30,17 @@ FileNameScheme::FileNameScheme( const TQString &s ) , m_composerField( -1 ) , m_genreField( -1 ) { - int artist = s.tqfind( "%artist" ); - int title = s.tqfind( "%title" ); - int track = s.tqfind( "%track" ); - int album = s.tqfind( "%album" ); - int comment = s.tqfind( "%comment" ); - int year = s.tqfind( "%year" ); - int composer = s.tqfind( "%composer" ); - int genre = s.tqfind( "%genre" ); + int artist = s.find( "%artist" ); + int title = s.find( "%title" ); + int track = s.find( "%track" ); + int album = s.find( "%album" ); + int comment = s.find( "%comment" ); + int year = s.find( "%year" ); + int composer = s.find( "%composer" ); + int genre = s.find( "%genre" ); int fieldNumber = 1; - int i = s.tqfind( '%' ); + int i = s.find( '%' ); while ( i > -1 ) { if ( title == i ) m_titleField = fieldNumber++; @@ -59,7 +59,7 @@ FileNameScheme::FileNameScheme( const TQString &s ) if ( genre == i ) m_genreField = fieldNumber++; - i = s.tqfind('%', i + 1); + i = s.find('%', i + 1); } m_regExp.setPattern( composeRegExp( s ) ); } @@ -70,7 +70,7 @@ bool FileNameScheme::matches( const TQString &fileName ) const * does not work as a separator. */ TQString stripped = fileName; - stripped.truncate( stripped.tqfindRev( '.' ) ); + stripped.truncate( stripped.findRev( '.' ) ); return m_regExp.exactMatch( stripped ); } @@ -148,7 +148,7 @@ TQString FileNameScheme::composeRegExp( const TQString &s ) const TQString regExp = TQRegExp::escape( s.simplifyWhiteSpace() ); regExp = ".*" + regExp; - regExp.tqreplace( ' ', "\\s+" ); + regExp.replace( ' ', "\\s+" ); regExp = KMacroExpander::expandMacros( regExp, substitutions ); regExp += "[^/]*$"; return regExp; @@ -233,14 +233,14 @@ void TagGuesser::guess( const TQString &absFileName ) const FileNameScheme schema( *it ); if( schema.matches( absFileName ) ) { debug() <<"Schema used: " << " " << schema.pattern() < -1 ) { result[ i + 1 ] = result[ i + 1 ].upper(); - i = result.tqfind( wordRegExp, ++i ); + i = result.find( wordRegExp, ++i ); } return result; diff --git a/amarok/src/tracktooltip.cpp b/amarok/src/tracktooltip.cpp index c6e7b1c5..54e3f039 100644 --- a/amarok/src/tracktooltip.cpp +++ b/amarok/src/tracktooltip.cpp @@ -60,7 +60,7 @@ TrackToolTip::TrackToolTip(): m_haspos( false ) void TrackToolTip::addToWidget( TQWidget *widget ) { - if( widget && !m_widgets.tqcontainsRef( widget ) ) + if( widget && !m_widgets.containsRef( widget ) ) { m_widgets.append( widget ); Amarok::ToolTip::add( this, widget ); @@ -69,7 +69,7 @@ void TrackToolTip::addToWidget( TQWidget *widget ) void TrackToolTip::removeFromWidget( TQWidget *widget ) { - if( widget && m_widgets.tqcontainsRef( widget ) ) + if( widget && m_widgets.containsRef( widget ) ) { Amarok::ToolTip::remove( 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_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 ); if ( m_cover == CollectionDB::instance()->notAvailCover() ) diff --git a/amarok/src/xspfplaylist.cpp b/amarok/src/xspfplaylist.cpp index 16592edf..c1d00daa 100644 --- a/amarok/src/xspfplaylist.cpp +++ b/amarok/src/xspfplaylist.cpp @@ -129,7 +129,7 @@ XSPFPlaylist::setTitle( TQString title ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "title" ).tqreplaceChild( createTextNode( title ), documentElement().namedItem( "title" ).firstChild() ); + documentElement().namedItem( "title" ).replaceChild( createTextNode( title ), documentElement().namedItem( "title" ).firstChild() ); } void @@ -143,7 +143,7 @@ XSPFPlaylist::setCreator( TQString creator ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "creator" ).tqreplaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() ); + documentElement().namedItem( "creator" ).replaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() ); } void @@ -157,7 +157,7 @@ XSPFPlaylist::setAnnotation( TQString annotation ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "annotation" ).tqreplaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() ); + documentElement().namedItem( "annotation" ).replaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() ); } void @@ -171,7 +171,7 @@ XSPFPlaylist::setInfo( KURL info ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "info" ).tqreplaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() ); + documentElement().namedItem( "info" ).replaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() ); } void @@ -185,7 +185,7 @@ XSPFPlaylist::setLocation( KURL location ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "location" ).tqreplaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() ); + documentElement().namedItem( "location" ).replaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() ); } void @@ -199,7 +199,7 @@ XSPFPlaylist::setIdentifier( TQString identifier ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "identifier" ).tqreplaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() ); + documentElement().namedItem( "identifier" ).replaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() ); } void @@ -213,7 +213,7 @@ XSPFPlaylist::setImage( KURL image ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "image" ).tqreplaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() ); + documentElement().namedItem( "image" ).replaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() ); } void @@ -230,7 +230,7 @@ XSPFPlaylist::setDate( TQDateTime date ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } 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 @@ -244,7 +244,7 @@ XSPFPlaylist::setLicense( KURL license ) documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } else - documentElement().namedItem( "license" ).tqreplaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() ); + documentElement().namedItem( "license" ).replaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() ); } void @@ -267,7 +267,7 @@ XSPFPlaylist::setAttribution( KURL attribution, bool append ) TQDomNode subSubNode = createTextNode( attribution.url() ); subNode.appendChild( subSubNode ); 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" ) ); } 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 - documentElement().tqreplaceChild( node, documentElement().namedItem( "trackList" ) ); + documentElement().replaceChild( node, documentElement().namedItem( "trackList" ) ); }