@ -97,7 +97,7 @@ namespace Amarok
if ( datediff > = 6 * 7 /*six weeks*/ ) { // return absolute month/year
const KCalendarSystem * cal = KGlobal : : locale ( ) - > calendar ( ) ;
const TQDate date = datetime . date ( ) ;
return i18n ( " monthname year " , " %1 %2 " ) . tq arg( cal - > monthName ( date ) , cal - > yearString ( date , false ) ) ;
return i18n ( " monthname year " , " %1 %2 " ) . arg( cal - > monthName ( date ) , cal - > yearString ( date , false ) ) ;
}
//TODO "last week" = maybe within 7 days, but prolly before last sunday
@ -175,7 +175,7 @@ static
TQString albumImageTooltip ( const TQString & albumImage , int size )
{
if ( albumImage = = CollectionDB : : instance ( ) - > notAvailCover ( false , size ) )
return escapeHTMLAttr ( i18n ( " Click to fetch cover from amazon.%1, right-click for menu. " ) . tq arg( CoverManager : : amazonTld ( ) ) ) ;
return escapeHTMLAttr ( i18n ( " Click to fetch cover from amazon.%1, right-click for menu. " ) . arg( CoverManager : : amazonTld ( ) ) ) ;
return escapeHTMLAttr ( i18n ( " Click for information from Amazon, right-click for menu. " ) ) ;
}
@ -497,7 +497,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if ( url . protocol ( ) = = " musicbrainz " )
{
const TQString url = " http://www.musicbrainz.org/taglookup.html?artist=%1&album=%2&track=%3 " ;
Amarok : : invokeBrowser ( url . tq arg( KURL : : encode_string_no_slash ( artist , 106 /*utf-8*/ ) ,
Amarok : : invokeBrowser ( url . arg( KURL : : encode_string_no_slash ( artist , 106 /*utf-8*/ ) ,
KURL : : encode_string_no_slash ( album , 106 /*utf-8*/ ) ,
KURL : : encode_string_no_slash ( track , 106 /*utf-8*/ ) ) ) ;
}
@ -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 " )
. tq arg( KURL : : encode_string_no_slash ( unescapeHTMLAttr ( url . path ( ) ) . replace ( " " , " + " ) , 106 /*utf-8*/ ) ) ;
. arg( KURL : : encode_string_no_slash ( unescapeHTMLAttr ( url . path ( ) ) . replace ( " " , " + " ) , 106 /*utf-8*/ ) ) ;
Amarok : : invokeBrowser ( url2 ) ;
}
@ -802,7 +802,7 @@ void ContextBrowser::saveHtmlData()
. replace ( " <html> " ,
TQString ( " <html><head><style type= \" text/css \" > "
" %1</style></head> " )
. tq arg( HTMLView : : loadStyleSheet ( ) ) ) ; // and the
. arg( HTMLView : : loadStyleSheet ( ) ) ) ; // and the
// stylesheet
// code
exportedDocument . close ( ) ;
@ -1243,7 +1243,7 @@ void ContextBrowser::showCurrentTrack() //SLOT
debug ( ) < < " current browser is not context, aborting showCurrentTrack() " < < endl ;
m_dirtyCurrentTrackPage = true ;
m_currentTrackPage - > set ( TQString ( " <html><body><div class='box-body'>%1</div></body></html> " )
. tq arg( i18n ( " Updating... " ) ) ) ;
. arg( i18n ( " Updating... " ) ) ) ;
return ;
}
# endif
@ -1492,7 +1492,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
< < albumValues [ 6 ]
< < reqResult [ i + 1 ] //album.id
< < escapeHTMLAttr ( discNumber )
< < i18n ( " Disc %1 " ) . tq arg( discNumber ) ) ) ;
< < i18n ( " Disc %1 " ) . arg( discNumber ) ) ) ;
}
TQString track = albumValues [ j + 2 ] . stripWhiteSpace ( ) ;
if ( track . length ( ) > 0 )
@ -1576,7 +1576,7 @@ CurrentTrackJob::showHomeByAlbums()
date = ep . dateTime ( ) . toString ( ) ;
TQString image = CollectionDB : : instance ( ) - > podcastImage ( pcb . imageURL ( ) . url ( ) , true , 50 ) ;
TQString imageAttr = escapeHTMLAttr ( i18n ( " Click to go to podcast website: %1. " ) . tq arg( pcb . link ( ) . prettyURL ( ) ) ) ;
TQString imageAttr = escapeHTMLAttr ( i18n ( " Click to go to podcast website: %1. " ) . arg( pcb . link ( ) . prettyURL ( ) ) ) ;
m_HTMLSource . append ( QStringx (
" <tr class=' " + TQString ( ( i % 2 ) ? " box-row-alt " : " box-row " ) + " '> \n "
@ -1615,7 +1615,7 @@ CurrentTrackJob::showHomeByAlbums()
)
) ;
m_HTMLSource . append ( QStringx ( " <p>%1</p> \n " ) . tq arg( ep . description ( ) ) ) ;
m_HTMLSource . append ( QStringx ( " <p>%1</p> \n " ) . arg( ep . description ( ) ) ) ;
m_HTMLSource . append (
" </div> \n "
@ -1929,7 +1929,7 @@ void CurrentTrackJob::addMetaHistory()
for ( uint i = 0 ; i < m_metadataHistory . count ( ) ; + + i )
{
const TQString & str = m_metadataHistory [ i ] ;
m_HTMLSource . append ( QStringx ( " <tr class='box-row'><td>%1</td></tr> \n " ) . tq arg( str ) ) ;
m_HTMLSource . append ( QStringx ( " <tr class='box-row'><td>%1</td></tr> \n " ) . arg( str ) ) ;
}
m_HTMLSource . append (
@ -1959,7 +1959,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
image = CollectionDB : : instance ( ) - > notAvailCover ( true ) ;
TQString imageAttr = escapeHTMLAttr ( pcb . link ( ) . isValid ( )
? i18n ( " Click to go to podcast website: %1. " ) . tq arg( pcb . link ( ) . prettyURL ( ) )
? i18n ( " Click to go to podcast website: %1. " ) . arg( pcb . link ( ) . prettyURL ( ) )
: i18n ( " No podcast website. " )
) ;
@ -1994,7 +1994,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
< < imageAttr
< < escapeHTML ( peb . author ( ) . isEmpty ( )
? i18n ( " Podcast " )
: i18n ( " Podcast by %1 " ) . tq arg( peb . author ( ) ) )
: i18n ( " Podcast by %1 " ) . arg( peb . author ( ) ) )
< < ( peb . localUrl ( ) . isValid ( )
? " <br /> \n " + escapeHTML ( i18n ( " (Cached) " ) )
: " " )
@ -2011,7 +2011,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
for ( uint i = 0 ; i < m_metadataHistory . count ( ) ; + + i )
{
const TQString & str = m_metadataHistory [ i ] ;
m_HTMLSource . append ( QStringx ( " <tr class='box-row'><td>%1</td></tr> \n " ) . tq arg( str ) ) ;
m_HTMLSource . append ( QStringx ( " <tr class='box-row'><td>%1</td></tr> \n " ) . arg( str ) ) ;
}
m_HTMLSource . append (
@ -2024,7 +2024,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
" <div id='albums_box-header' class='box-header'> \n "
" <span id='albums_box-header-title' class='box-header-title'> \n "
+ ( channelInDB
? i18n ( " Episodes from %1 " ) . tq arg( escapeHTML ( pcb . title ( ) ) )
? i18n ( " Episodes from %1 " ) . arg( escapeHTML ( pcb . title ( ) ) )
: i18n ( " Episodes from this Channel " )
)
+ " </span> \n "
@ -2072,7 +2072,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
)
) ;
m_HTMLSource . append ( QStringx ( " <p>%1</p> \n " ) . tq arg( ep . description ( ) ) ) ;
m_HTMLSource . append ( QStringx ( " <p>%1</p> \n " ) . arg( ep . description ( ) ) ) ;
m_HTMLSource . append (
" </div> \n "
@ -2106,9 +2106,9 @@ void CurrentTrackJob::showBrowseArtistHeader( const TQString &artist )
" <td><div id='current_box-header-nav' class='box-header-nav'>%3</div></td> \n "
" </tr></table> \n "
" </div> \n " )
. tq arg( escapeHTML ( artist ) )
. tq arg( escapeHTML ( i18n ( " Browse Artist " ) ) )
. tq arg( back ) ) ;
. arg( escapeHTML ( artist ) )
. arg( escapeHTML ( i18n ( " Browse Artist " ) ) )
. arg( back ) ) ;
m_HTMLSource . append (
" <table id='current_box-table' class='box-body' width='100%' cellpadding='0' cellspacing='0'> \n "
) ;
@ -2126,16 +2126,16 @@ void CurrentTrackJob::showBrowseArtistHeader( const TQString &artist )
m_HTMLSource . append (
" <tr> \n "
" <td id='artist-wikipedia'> \n "
+ TQString ( " <a id='artist-wikipedia-a' href='wikipedia:%1'> \n " ) . tq arg( escapeHTMLAttr ( artist + b - > wikiArtistPostfix ( ) ) )
+ i18n ( " Wikipedia Information for %1 " ) . tq arg( escapeHTML ( artist ) ) +
+ TQString ( " <a id='artist-wikipedia-a' href='wikipedia:%1'> \n " ) . arg( escapeHTMLAttr ( artist + b - > wikiArtistPostfix ( ) ) )
+ i18n ( " Wikipedia Information for %1 " ) . arg( escapeHTML ( artist ) ) +
" </a> \n "
" </td> \n "
" </tr> \n " ) ;
m_HTMLSource . append (
" <tr> \n "
" <td id='artist-google'> \n "
+ TQString ( " <a id='artist-google-a' href='ggartist:%1'> \n " ) . tq arg( escapeHTMLAttr ( artist ) )
+ i18n ( " Google Musicsearch for %1 " ) . tq arg( escapeHTML ( artist ) ) +
+ TQString ( " <a id='artist-google-a' href='ggartist:%1'> \n " ) . arg( escapeHTMLAttr ( artist ) )
+ i18n ( " Google Musicsearch for %1 " ) . arg( escapeHTML ( artist ) ) +
" </a> \n "
" </td> \n "
" </tr> \n "
@ -2170,9 +2170,9 @@ CurrentTrackJob::showBrowseLabelHeader( const TQString &label )
" <td><div id='current_box-header-nav' class='box-header-nav'>%3</div></td> \n "
" </tr></table> \n "
" </div> \n " )
. tq arg( escapeHTML ( label ) )
. tq arg( escapeHTML ( i18n ( " Browse Label " ) ) )
. tq arg( back ) ) ;
. arg( escapeHTML ( label ) )
. arg( escapeHTML ( i18n ( " Browse Label " ) ) )
. arg( back ) ) ;
m_HTMLSource . append (
" <table id='current_box-table' class='box-body' width='100%' cellpadding='0' cellspacing='0'> \n "
) ;
@ -2190,8 +2190,8 @@ CurrentTrackJob::showBrowseLabelHeader( const TQString &label )
m_HTMLSource . append (
" <tr> \n "
" <td id='label-lastfm'> \n "
+ TQString ( " <a id='label-lastfm-a' href='externalurl://www.last.fm/tag/%1'> \n " ) . tq arg( escapeHTMLAttr ( label ) )
+ i18n ( " Last.fm Information for %1 " ) . tq arg( escapeHTML ( label ) ) +
+ TQString ( " <a id='label-lastfm-a' href='externalurl://www.last.fm/tag/%1'> \n " ) . arg( escapeHTMLAttr ( label ) )
+ i18n ( " Last.fm Information for %1 " ) . arg( escapeHTML ( label ) ) +
" </a> \n "
" </td> \n "
" </tr> \n " ) ;
@ -2281,11 +2281,11 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle ¤tTrack )
" </td> \n "
" <td id='current_box-information-td' align='right'> \n "
)
. tq arg( escapeHTML ( currentTrack . prettyTitle ( ) ) )
. tq arg( escapeHTMLAttr ( currentTrack . artist ( ) ) )
. tq arg( escapeHTMLAttr ( currentTrack . album ( ) ) )
. tq arg( escapeHTMLAttr ( albumImage ) )
. tq arg( albumImageTitleAttr )
. arg( escapeHTML ( currentTrack . prettyTitle ( ) ) )
. arg( escapeHTMLAttr ( currentTrack . artist ( ) ) )
. arg( escapeHTMLAttr ( currentTrack . album ( ) ) )
. arg( escapeHTMLAttr ( albumImage ) )
. arg( albumImageTitleAttr )
) ) ;
if ( ! values . isEmpty ( ) & & values [ 2 ] . toInt ( ) )
@ -2299,18 +2299,18 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle ¤tTrack )
const uint score = static_cast < uint > ( values [ 3 ] . toFloat ( ) ) ;
const uint rating = values [ 4 ] . toInt ( ) ;
//SAFE = . tq arg( x, y )
//UNSAFE = . tq arg( x ).tq arg( y )
//SAFE = . arg( x, y )
//UNSAFE = . arg( x ).arg( y )
m_HTMLSource . append ( TQString (
" <span>%1</span><br /> \n "
" <div>%2</div> \n "
" <span>%3</span><br /> \n "
" <span>%4</span> \n "
)
. tq arg( i18n ( " Track played once " , " Track played %n times " , playtimes ) ,
. arg( i18n ( " Track played once " , " Track played %n times " , playtimes ) ,
statsHTML ( score , rating , false ) ,
i18n ( " Last played: %1 " ) . tq arg( Amarok : : verboseTimeSince ( lastPlay ) ) ,
i18n ( " First played: %1 " ) . tq arg( Amarok : : verboseTimeSince ( firstPlay ) ) ) ) ;
i18n ( " Last played: %1 " ) . arg( Amarok : : verboseTimeSince ( lastPlay ) ) ,
i18n ( " First played: %1 " ) . arg( Amarok : : verboseTimeSince ( firstPlay ) ) ) ) ;
}
else
m_HTMLSource . append ( i18n ( " Never played before " ) ) ;
@ -2391,7 +2391,7 @@ void CurrentTrackJob::showRelatedArtists( const TQString &artist, const TQString
" <span id='related_box-header-title' class='box-header-title'>%1</span> \n "
" </div> \n "
" <table class='box-body' id='T_RA' width='100%' border='0' cellspacing='0' cellpadding='1'> \n " )
. tq arg( i18n ( " Artists Related to %1 " ) . tq arg( escapeHTML ( artist ) ) ) ) ;
. arg( i18n ( " Artists Related to %1 " ) . arg( escapeHTML ( artist ) ) ) ) ;
m_HTMLSource . append ( " <tr><td> \n " ) ;
for ( uint i = 0 ; i < relArtists . count ( ) ; i + = 1 )
{
@ -2492,7 +2492,7 @@ CurrentTrackJob::showSongsWithLabel( const TQString &label )
" <div id='suggested_box' class='box'> \n "
" <div id='suggested_box-header' class='box-header' onClick= \" toggleBlock('T_SS'); window.location.href='togglebox:ss'; \" style='cursor: pointer;'> \n "
" <span id='suggested_box-header-title' class='box-header-title'> \n "
+ i18n ( " Songs with label %1 " ) . tq arg( label ) +
+ i18n ( " Songs with label %1 " ) . arg( label ) +
" </span> \n "
" </div> \n "
" <table class='box-body' id='T_' width='100%' border='0' cellspacing='0' cellpadding='0'> \n " ) ;
@ -2540,7 +2540,7 @@ CurrentTrackJob::showUserLabels( const MetaBundle ¤tTrack )
" <div id='songlabels_box' class='box'> \n "
" <div id='songlabels-header' class='box-header' onCLick= \" toggleBlock('T_SL');window.location.href='togglebox:sl'; \" style='cursor: pointer;'> \n "
" <span id='songlabels_box-header-title' class='box-header-title'> \n "
+ i18n ( " Labels for %1 " ) . tq arg( escapeHTML ( title ) ) +
+ i18n ( " Labels for %1 " ) . arg( escapeHTML ( title ) ) +
" </span> \n "
" </div> \n "
" <table class='box-body' id='T_SL' width='100%' border='0' cellspacing='0' cellpadding='1'> \n " ) ;
@ -2555,7 +2555,7 @@ CurrentTrackJob::showUserLabels( const MetaBundle ¤tTrack )
}
}
m_HTMLSource . append ( " </td></tr> \n " ) ;
m_HTMLSource . append ( " <tr><td><a id='songlabels_box_addlabel' href='show:editLabels'> " + i18n ( " Add labels to %1 " ) . tq arg( escapeHTML ( title ) ) + " </a></td></tr> \n " ) ;
m_HTMLSource . append ( " <tr><td><a id='songlabels_box_addlabel' href='show:editLabels'> " + i18n ( " Add labels to %1 " ) . arg( escapeHTML ( title ) ) + " </a></td></tr> \n " ) ;
m_HTMLSource . append (
" </table> \n "
" </div> \n " ) ;
@ -2588,7 +2588,7 @@ void CurrentTrackJob::showArtistsFaves( const TQString &artist, uint artist_id )
" <div id='favoritesby_box' class='box'> \n "
" <div id='favoritesby-header' class='box-header' onClick= \" toggleBlock('T_FT'); window.location.href='togglebox:ft'; \" style='cursor: pointer;'> \n "
" <span id='favoritesby_box-header-title' class='box-header-title'> \n "
+ i18n ( " Favorite Tracks by %1 " ) . tq arg( artistName ) +
+ i18n ( " Favorite Tracks by %1 " ) . arg( artistName ) +
" </span> \n "
" </div> \n "
" <table class='box-body' id='T_FT' width='100%' border='0' cellspacing='0' cellpadding='0'> \n " ) ;
@ -2642,7 +2642,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
" <div id='albums_box' class='box'> \n "
" <div id='albums_box-header' class='box-header'> \n "
" <span id='albums_box-header-title' class='box-header-title'> \n "
+ i18n ( " Albums by %1 " ) . tq arg( artistName ) +
+ i18n ( " Albums by %1 " ) . arg( artistName ) +
" </span> \n "
" </div> \n "
" <table id='albums_box-body' class='box-body' width='100%' border='0' cellspacing='0' cellpadding='0'> \n " ) ;
@ -2744,7 +2744,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
< < TQString : : number ( artist_id )
< < values [ i + 1 ] //album.id
< < escapeHTMLAttr ( discNumber )
< < i18n ( " Disc %1 " ) . tq arg( discNumber ) ) ) ;
< < i18n ( " Disc %1 " ) . arg( discNumber ) ) ) ;
}
TQString track = albumValues [ j + 2 ] . stripWhiteSpace ( ) ;
if ( track . length ( ) > 0 ) {
@ -2806,7 +2806,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
" <div id='albums_box' class='box'> \n "
" <div id='albums_box-header' class='box-header'> \n "
" <span id='albums_box-header-title' class='box-header-title'> \n "
+ i18n ( " Compilations with %1 " ) . tq arg( artistName ) +
+ i18n ( " Compilations with %1 " ) . arg( artistName ) +
" </span> \n "
" </div> \n "
" <table id='albums_box-body' class='box-body' width='100%' border='0' cellspacing='0' cellpadding='0'> \n " ) ;
@ -2904,7 +2904,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
. args ( TQStringList ( )
< < values [ i + 1 ] //album.id
< < escapeHTMLAttr ( discNumber )
< < i18n ( " Disc %1 " ) . tq arg( discNumber ) ) ) ;
< < i18n ( " Disc %1 " ) . arg( discNumber ) ) ) ;
}
TQString track = albumValues [ j + 2 ] . stripWhiteSpace ( ) ;
@ -2921,7 +2921,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
TQString tracktitle_formated ;
TQString tracktitle ;
tracktitle = escapeHTML ( i18n ( " %1 - %2 " ) . tq arg( albumValues [ j + 5 ] , albumValues [ j ] ) ) ;
tracktitle = escapeHTML ( i18n ( " %1 - %2 " ) . arg( albumValues [ j + 5 ] , albumValues [ j ] ) ) ;
tracktitle_formated = " <span class='album-song-title'> \n " ;
if ( i = = vectorPlace & & albumValues [ j + 2 ] . toInt ( ) = = m_currentTrack . track ( ) & & discNumber . toInt ( ) = = m_currentTrack . discNumber ( ) )
tracktitle_formated + = " <i> \n " ;
@ -2966,11 +2966,11 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
rating = 10 ;
TQString table = TQString ( " <table %1 align='right' border='0' cellspacing='0' cellpadding='0' width='100%'>%2</table> \n " )
. tq arg( statsbox ? " class='statsBox' " : " " ) ;
. arg( statsbox ? " class='statsBox' " : " " ) ;
TQString contents ;
if ( AmarokConfig : : useScores ( ) )
contents + = TQString ( " <tr title='%1'> \n " ) . tq arg( i18n ( " Score: %1 " ) . tq arg( score ) ) +
contents + = TQString ( " <tr title='%1'> \n " ) . arg( i18n ( " Score: %1 " ) . arg( score ) ) +
" <td class='sbtext' width='100%' align='right'> \n " + TQString : : number ( score ) + " </td> \n "
" <td align='left' width='1'> \n "
" <div class='sbouter'> \n "
@ -2982,8 +2982,8 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
if ( AmarokConfig : : useRatings ( ) )
{
contents + = TQString ( " <tr title='%1'> \n " ) . tq arg( i18n ( " Rating: %1 " )
. tq arg( MetaBundle : : ratingDescription ( rating ) ) ) +
contents + = TQString ( " <tr title='%1'> \n " ) . arg( i18n ( " Rating: %1 " )
. arg( MetaBundle : : ratingDescription ( rating ) ) ) +
" <td class='ratingBox' align='right' colspan='2'> \n " ;
if ( rating )
{
@ -3002,7 +3002,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
const TQString img = " <img src='%1' height='13px' class='ratingStar'></img> \n " ;
for ( int i = 0 , n = rating / 2 ; i < n ; + + i )
contents + = img . tq arg( TQString ( " data:image/png;base64, " + fullStar ) ) ;
contents + = img . arg( TQString ( " data:image/png;base64, " + fullStar ) ) ;
if ( rating % 2 )
{
TQImageIO halfStarIO ;
@ -3014,7 +3014,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
halfStarIO . write ( ) ;
halfStarBuf . close ( ) ;
TQCString halfStar = KCodecs : : base64Encode ( halfStarBuf . buffer ( ) , true ) ;
contents + = img . tq arg( TQString ( " data:image/png;base64, " + halfStar ) ) ;
contents + = img . arg( TQString ( " data:image/png;base64, " + halfStar ) ) ;
}
contents + = " </nobr> \n " ;
}
@ -3024,7 +3024,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
" </tr> \n " ;
}
return table . tq arg( contents ) ;
return table . arg( contents ) ;
}
bool CurrentTrackJob : : doJob ( )
@ -3220,7 +3220,7 @@ ContextBrowser::getEncodedImage( const TQString &imageUrl )
tqApp - > lock ( ) ;
img . save ( & buffer , " PNG " ) ; // writes image into ba in PNG format
tqApp - > unlock ( ) ;
const TQString coverImage = TQString ( " data:image/png;base64,%1 " ) . tq arg( KCodecs : : base64Encode ( ba ) . data ( ) ) ;
const TQString coverImage = TQString ( " data:image/png;base64,%1 " ) . arg( KCodecs : : base64Encode ( ba ) . data ( ) ) ;
//debug() << "Encoded imageUrl: " << coverImage << endl;
return coverImage ;
}
@ -3282,7 +3282,7 @@ void ContextBrowser::showLyrics( const TQString &url )
}
m_lyricSearchUrl = TQString ( " http://www.google.com/search?ie=UTF-8&q=lyrics+%1+%2 " )
. tq arg( KURL : : encode_string_no_slash ( ' " ' + artist + ' " ' , 106 /*utf-8*/ ) ,
. arg( KURL : : encode_string_no_slash ( ' " ' + artist + ' " ' , 106 /*utf-8*/ ) ,
KURL : : encode_string_no_slash ( ' " ' + title + ' " ' , 106 /*utf-8*/ ) ) ;
m_lyricsToolBar - > getButton ( LYRICS_BROWSER ) - > setEnabled ( false ) ;
@ -3294,7 +3294,7 @@ void ContextBrowser::showLyrics( const TQString &url )
" <br /><div class='info'> \n " +
i18n ( " Available Lyrics Scripts: " ) + " <br /> \n " ;
foreach ( scripts ) {
lyrics + = TQString ( " <a href= \" runscript:%1 \" >%2</a><br /> \n " ) . tq arg( * it , * it ) ;
lyrics + = TQString ( " <a href= \" runscript:%1 \" >%2</a><br /> \n " ) . arg( * it , * it ) ;
}
lyrics + = " <br /> \n " + i18n ( " Click on one of the scripts to run it, or use the Script Manager, to be able "
" to see all the scripts, and download new ones from the Web. " ) ;
@ -3425,12 +3425,12 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
const TQString artist = l . item ( i ) . toElement ( ) . attribute ( " artist " ) ;
const TQString title = l . item ( i ) . toElement ( ) . attribute ( " title " ) ;
lyrics + = " <a href='show:suggestLyric- " + url + " '> \n " + i18n ( " %1 - %2 " ) . tq arg( artist , title ) ;
lyrics + = " <a href='show:suggestLyric- " + url + " '> \n " + i18n ( " %1 - %2 " ) . arg( artist , title ) ;
lyrics + = " </a><br/> \n " ;
}
}
lyrics + = i18n ( " <p>You can <a href= \" %1 \" >search for the lyrics</a> on the Web.</p> " )
. tq arg( TQString ( m_lyricSearchUrl ) . replace ( TQRegExp ( " ^http: " ) , " externalurl: " ) ) ;
. arg( TQString ( m_lyricSearchUrl ) . replace ( TQRegExp ( " ^http: " ) , " externalurl: " ) ) ;
}
else {
lyrics = el . text ( ) ;
@ -3444,7 +3444,7 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
lyrics . prepend ( " <font size='2'><b> \n " + title + " </b><br/><u> \n " + artist + " </font></u></font><br/> \n " ) ;
if ( ! cached ) {
lyrics . append ( " <br/><br/><i> \n " + i18n ( " Powered by %1 (%2) " ) . tq arg( site , site_url ) + " </i> \n " ) ;
lyrics . append ( " <br/><br/><i> \n " + i18n ( " Powered by %1 (%2) " ) . arg( site , site_url ) + " </i> \n " ) ;
CollectionDB : : instance ( ) - > setLyrics ( EngineController : : instance ( ) - > bundle ( ) . url ( ) . path ( ) , xmldoc , EngineController : : instance ( ) - > bundle ( ) . uniqueId ( ) ) ;
}
}
@ -3742,7 +3742,7 @@ ContextBrowser::wikiURL( const TQString &item )
// add any special characters to be replaced here
TQString wStr = TQString ( item ) . replace ( " / " , " " ) ;
return TQString ( " http://%1.wikipedia.org/wiki/ " ) . tq arg( wikiLocale ( ) )
return TQString ( " http://%1.wikipedia.org/wiki/ " ) . arg( wikiLocale ( ) )
+ KURL : : encode_string_no_slash ( wStr , 106 /*utf-8*/ ) ;
}
@ -3815,7 +3815,7 @@ ContextBrowser::showLabelsDialog()
showCurrentTrack ( ) ;
}
}
delete dialog ; //deletes tq children
delete dialog ; //deletes children
m_addLabelEdit = 0 ;
m_labelListView = 0 ;
}