Browse Source

Fix Amarok FTBFS

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1242446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 11 years ago
parent
commit
9df0fe41af
  1. 2
      amarok/src/Options5.ui.h
  2. 14
      amarok/src/collectiondb.cpp
  3. 42
      amarok/src/contextbrowser.cpp
  4. 2
      amarok/src/mediadevice/daap/daapreader/reader.cpp
  5. 2
      amarok/src/mediadevice/daap/proxy.cpp
  6. 2
      amarok/src/mediadevice/generic/genericmediadevice.cpp
  7. 2
      amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h
  8. 2
      amarok/src/organizecollectiondialog.ui.h
  9. 2
      amarok/src/osd.cpp
  10. 22
      amarok/src/qstringx.h

2
amarok/src/Options5.ui.h

@ -56,7 +56,7 @@ void Options5::init()
connect( kcfg_OsdEnabled, TQT_SIGNAL( toggled(bool) ),
m_pOSDPreview, TQT_SLOT( setShown(bool) ) );
Amarok::TQStringx text = i18n(
Amarok::QStringx text = i18n(
"<h3>Tags Displayed in OSD</h3>"
"You can use the following tokens:"
"<ul>"

14
amarok/src/collectiondb.cpp

@ -90,7 +90,7 @@
#include "inotify/inotify-syscalls.h"
#endif
using Amarok::TQStringx;
using Amarok::QStringx;
#define DEBUG 0
@ -2833,7 +2833,7 @@ CollectionDB::updatePodcastChannel( const PodcastChannelBundle &b )
{
if( getDbConnectionType() == DbConnection::postgresql )
{
query( TQStringx( "UPDATE podcastchannels SET title='%1', weblink='%2', comment='%3', "
query( QStringx( "UPDATE podcastchannels SET title='%1', weblink='%2', comment='%3', "
"copyright='%4', tqparent=%5, directory='%6', autoscan=%7, fetchtype=%8, "
"autotransfer=%9, haspurge=%10, purgecount=%11 WHERE url='%12';" )
.args ( TQStringList()
@ -2862,7 +2862,7 @@ CollectionDB::updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b
{
if( getDbConnectionType() == DbConnection::postgresql )
{
query( TQStringx( "UPDATE podcastepisodes SET url='%1', localurl='%2', tqparent='%3', title='%4', subtitle='%5', composer='%6', comment='%7', "
query( QStringx( "UPDATE podcastepisodes SET url='%1', localurl='%2', tqparent='%3', title='%4', subtitle='%5', composer='%6', comment='%7', "
"filetype='%8', createdate='%9', guid='%10', length=%11, size=%12, isNew=%13 WHERE id=%14;" )
.args( TQStringList()
<< escapeString( b.url().url() )
@ -2891,7 +2891,7 @@ void
CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, const int parent_id, const bool isOpen )
{
if( getDbConnectionType() == DbConnection::postgresql ) {
query( TQStringx( "UPDATE podcastfolders SET name='%1', tqparent=%2, isOpen=%3 WHERE id=%4;" )
query( QStringx( "UPDATE podcastfolders SET name='%1', tqparent=%2, isOpen=%3 WHERE id=%4;" )
.args( TQStringList()
<< escapeString(name)
<< TQString::number(parent_id)
@ -2901,7 +2901,7 @@ CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, co
);
}
else {
query( TQStringx( "REPLACE INTO podcastfolders ( id, name, tqparent, isOpen ) "
query( QStringx( "REPLACE INTO podcastfolders ( id, name, tqparent, isOpen ) "
"VALUES ( %1, '%2', %3, %4 );" )
.args( TQStringList()
<< TQString::number(folder_id)
@ -3090,7 +3090,7 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
if( !tempTablesAndInPermanent && urls.empty() && uniqueids.empty() )
{
//debug() << "first case" << endl;
TQString insertline = TQStringx( "INSERT INTO uniqueid%1 (deviceid, url, uniqueid, dir) "
TQString insertline = QStringx( "INSERT INTO uniqueid%1 (deviceid, url, uniqueid, dir) "
"VALUES ( %2,'%3', '%4', '%5');" )
.args( TQStringList()
<< ( tempTables ? "_temp" : "" )
@ -3123,7 +3123,7 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
{
//debug() << "stat was NOT successful, updating tables with: " << endl;
//debug() << TQString( "UPDATE uniqueid%1 SET url='%2', dir='%3' WHERE uniqueid='%4';" ).tqarg( ( tempTables ? "_temp" : "" ), currurl, currdir, currid ) << endl;
query( TQStringx( "UPDATE uniqueid%1 SET deviceid = %2, url='%3', dir='%4' WHERE uniqueid='%5';" )
query( QStringx( "UPDATE uniqueid%1 SET deviceid = %2, url='%3', dir='%4' WHERE uniqueid='%5';" )
.args( TQStringList()
<< ( tempTables ? "_temp" : "" )
<< currdeviceid

42
amarok/src/contextbrowser.cpp

@ -165,7 +165,7 @@ namespace Amarok
}
using Amarok::TQStringx;
using Amarok::QStringx;
using Amarok::escapeHTML;
using Amarok::escapeHTMLAttr;
using Amarok::unescapeHTMLAttr;
@ -1325,7 +1325,7 @@ void CurrentTrackJob::showHome()
TQString playTime = MetaBundle::fuzzyTime( a[0].toInt() );
m_HTMLSource.append(
TQStringx(
QStringx(
"<div id='introduction_box' class='box'>\n"
"<div id='introduction_box-header-title' class='box-header'>\n"
"<span id='introduction_box-header-title' class='box-header-title'>\n"
@ -1408,7 +1408,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
TQString albumLength = ( i_albumLength==0 ? i18n( "Unknown" ) : MetaBundle::prettyTime( i_albumLength, true ) );
htmlCode.append( TQStringx (
htmlCode.append( QStringx (
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
"<td>\n"
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
@ -1425,7 +1425,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
// Album image
htmlCode.append( TQStringx (
htmlCode.append( QStringx (
"<td width='1'>\n"
"<a href='fetchcover:%1 @@@ %2'>\n"
"<img class='album-image' align='left' vspace='2' hspace='2' title='%3' src='%4'/>\n"
@ -1451,7 +1451,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
<< albumName ) );
// Tracks number, year and length
htmlCode.append( TQStringx (
htmlCode.append( QStringx (
"<span class='album-info'>%1</span> "
"<br />\n"
"<span class='album-year'>%2</span>\n"
@ -1463,7 +1463,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
<< albumLength) );
// Begining of the 'toggleable div' that contains the songs
htmlCode.append( TQStringx (
htmlCode.append( QStringx (
"</tr>\n"
"</table>\n"
"</div>\n"
@ -1482,7 +1482,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
{
discNumber = newDiscNumber;
htmlCode.append( TQStringx (
htmlCode.append( QStringx (
"<div class='disc-separator'>\n"
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
"%4"
@ -1578,7 +1578,7 @@ CurrentTrackJob::showHomeByAlbums()
TQString image = CollectionDB::instance()->podcastImage( pcb.imageURL().url(), true, 50 );
TQString imageAttr = escapeHTMLAttr( i18n( "Click to go to podcast website: %1." ).tqarg( pcb.link().prettyURL() ) );
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
"<td>\n"
"<div class='album-header' onClick=\"toggleBlock('IDP%1')\">\n"
@ -1615,7 +1615,7 @@ CurrentTrackJob::showHomeByAlbums()
)
);
m_HTMLSource.append( TQStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append(
"</div>\n"
@ -1779,7 +1779,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle &currentTrack )
const TQString banIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("remove"), -KIcon::SizeSmallMedium );
m_HTMLSource.append( TQStringx(
m_HTMLSource.append( QStringx(
"<div id='current_box' class='box'>\n"
"<div id='current_box-header' class='box-header'>\n"
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
@ -1878,7 +1878,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle &currentTrack )
void CurrentTrackJob::showStream( const MetaBundle &currentTrack )
{
m_HTMLSource.append( TQStringx(
m_HTMLSource.append( QStringx(
"<div id='current_box' class='box'>\n"
"<div id='current_box-header' class='box-header'>\n"
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
@ -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( TQStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
}
m_HTMLSource.append(
@ -1963,7 +1963,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
: i18n( "No podcast website." )
);
m_HTMLSource.append( TQStringx(
m_HTMLSource.append( QStringx(
"<div id='current_box' class='box'>\n"
"<div id='current_box-header' class='box-header'>\n"
"<span id='current_box-header-artist' class='box-header-title'>%1</span> "
@ -2011,7 +2011,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
{
const TQString &str = m_metadataHistory[i];
m_HTMLSource.append( TQStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
}
m_HTMLSource.append(
@ -2042,7 +2042,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
date = ep.date() :
date = ep.dateTime().toString();
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
"<td>\n"
"<div class='album-header' onClick=\"toggleBlock('IDE%1')\">\n"
@ -2072,7 +2072,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
)
);
m_HTMLSource.append( TQStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append(
"</div>\n"
@ -2235,7 +2235,7 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle &currentTrack )
"<div id='current_box-header' class='box-header'>\n"
// Show "Title - Artist \n Album", or only "PrettyTitle" if there's no title tag
+ ( !currentTrack.title().isEmpty()
? TQStringx(
? QStringx(
"<span id='current_box-header-songname' class='box-header-title'>%1</span> "
"<span id='current_box-header-separator' class='box-header-title'>-</span> "
"<span id='current_box-header-artist' class='box-header-title'>%2</span>\n"
@ -2689,7 +2689,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
"<td>\n"
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
@ -2734,7 +2734,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
{
discNumber = newDiscNumber;
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<div class='disc-separator'>\n"
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
"%4"
@ -2852,7 +2852,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
"<td>\n"
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
@ -2895,7 +2895,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
{
discNumber = newDiscNumber;
m_HTMLSource.append( TQStringx (
m_HTMLSource.append( QStringx (
"<div class='disc-separator'>\n"
"<a href=\"compilationdisc: __discard__ @@@ %1 @@@ %2\">\n"
"%3"

2
amarok/src/mediadevice/daap/daapreader/reader.cpp

@ -285,7 +285,7 @@ Reader::songListFinished( int /*id*/, bool error )
MetaBundle* bundle = new MetaBundle();
bundle->setTitle( (*it).asMap()["minm"].asList()[0].toString() );
//input url: daap://host:port/databaseId/music.ext
bundle->setUrl( Amarok::TQStringx("daap://%1:%2/%3/%4.%5").args(
bundle->setUrl( Amarok::QStringx("daap://%1:%2/%3/%4.%5").args(
TQStringList() << m_host
<< TQString::number( m_port )
<< m_databaseId

2
amarok/src/mediadevice/daap/proxy.cpp

@ -23,7 +23,7 @@ using namespace Daap;
//input url: daap://host:port/databaseId/music.ext
/*
bundle->setUrl( Amarok::TQStringx("http://%1:3689/databases/%2/items/%3.%4?%5").args(
bundle->setUrl( Amarok::QStringx("http://%1:3689/databases/%2/items/%3.%4?%5").args(
TQStringList() << m_host
<< m_databaseId
<< TQString::number( (*it).asMap()["miid"].asList()[0].asInt() )

2
amarok/src/mediadevice/generic/genericmediadevice.cpp

@ -563,7 +563,7 @@ GenericMediaDevice::buildDestination( const TQString &format, const MetaBundle &
track.sprintf( "%02d", mb.track() );
args["track"] = track;
Amarok::TQStringx formatx( format );
Amarok::QStringx formatx( format );
TQString result = formatx.namedOptArgs( args );
if( !result.startsWith( "/" ) )
result.prepend( "/" );

2
amarok/src/mediadevice/generic/genericmediadeviceconfigdialog.ui.h

@ -189,7 +189,7 @@ GenericMediaDeviceConfigDialog::buildDestination( const TQString &format, const
track.sprintf( "%02d", mb.track() );
args["track"] = track;
Amarok::TQStringx formatx( format );
Amarok::QStringx formatx( format );
TQString result = m_device->mountPoint().append( formatx.namedOptArgs( args ) );
TQString tail = result.mid( m_device->mountPoint().length() );
if( !tail.startsWith( "/" ) )

2
amarok/src/organizecollectiondialog.ui.h

@ -43,7 +43,7 @@ TQString OrganizeCollectionDialog::buildDestination( const TQString &format, con
track.sprintf( "%02d", mb.track() );
args["track"] = track;
Amarok::TQStringx formatx( format );
Amarok::QStringx formatx( format );
TQString result = formatx.namedOptArgs( args );
if( result.startsWith( folderCombo->currentText() ) )
{

2
amarok/src/osd.cpp

@ -725,7 +725,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
timeformat +="0";
timeformat +=TQString::number(sec);
args["elapsed"]=timeformat;
TQStringx osd = AmarokConfig::osdText();
QStringx osd = AmarokConfig::osdText();
// hacky, but works...
if( osd.tqcontains( "%rating" ) )

22
amarok/src/qstringx.h

@ -14,16 +14,16 @@
namespace Amarok
{
class TQStringx : public TQString
class QStringx : public TQString
{
public:
TQStringx() {};
TQStringx( TQChar ch ) : TQString( ch ) {};
TQStringx( const TQString& s ) : TQString( s ) {};
TQStringx( const TQByteArray& ba ) : TQString( ba ) {};
TQStringx( const TQChar* tqunicode, uint length ) : TQString( tqunicode, length ) {};
TQStringx( const char* str ) : TQString( str ) {};
virtual ~TQStringx() {};
QStringx() {};
QStringx( TQChar ch ) : TQString( ch ) {};
QStringx( const TQString& s ) : TQString( s ) {};
QStringx( const TQByteArray& ba ) : TQString( ba ) {};
QStringx( const TQChar* tqunicode, uint length ) : TQString( tqunicode, length ) {};
QStringx( const char* str ) : TQString( str ) {};
virtual ~QStringx() {};
// the numbers following % obviously are not taken into account
TQString args( const TQStringList& args ) const
@ -88,14 +88,14 @@ public:
pos = rxOptArg.search( *this, start ) )
{
int len = rxOptArg.matchedLength();
TQStringx opt = TQString(rxOptArg.capturedTexts()[0].mid(1, len-2));
QStringx opt = TQString(rxOptArg.capturedTexts()[0].mid(1, len-2));
result += TQStringx(mid( start, pos-start )).namedArgs( args );
result += QStringx(mid( start, pos-start )).namedArgs( args );
result += opt.namedArgs( args, true );
start = pos + len;
}
result += TQStringx( mid( start ) ).namedArgs( args );
result += QStringx( mid( start ) ).namedArgs( args );
return result;
}

Loading…
Cancel
Save