diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-26 11:44:59 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-27 10:36:44 +0900 |
| commit | 0784cbd9b04d181f3b400ea963d20acfeba0ba64 (patch) | |
| tree | a1b08c2ce86d9806385de121be5110845e1dd24c /amarok/src | |
| parent | a7081182235c26e7b03d575bb03404babbaace58 (diff) | |
| download | amarok-0784cbd9b04d181f3b400ea963d20acfeba0ba64.tar.gz amarok-0784cbd9b04d181f3b400ea963d20acfeba0ba64.zip | |
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'amarok/src')
| -rw-r--r-- | amarok/src/app.cpp | 4 | ||||
| -rw-r--r-- | amarok/src/metabundle.cpp | 35 | ||||
| -rw-r--r-- | amarok/src/scripts/databasescripts/databaseScripts.rb | 6 |
3 files changed, 24 insertions, 21 deletions
diff --git a/amarok/src/app.cpp b/amarok/src/app.cpp index 2d367e38..dc060f09 100644 --- a/amarok/src/app.cpp +++ b/amarok/src/app.cpp @@ -78,6 +78,8 @@ email : markey@web.de #include <tqtimer.h> //showHyperThreadingWarning() #include <tqtooltip.h> //default tooltip for trayicon +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) + // For the HyperThreading fix #ifdef __linux__ #ifdef SCHEDAFFINITY_SUPPORT @@ -589,7 +591,7 @@ class ID3v1StringHandler : public TagLib::ID3v1::StringHandler virtual TagLib::ByteVector render( const TagLib::String &ts ) const { - const TQCString qcs = m_codec->fromUnicode( TStringToQString(ts) ); + const TQCString qcs = m_codec->fromUnicode( TStringToTQString(ts) ); return TagLib::ByteVector( qcs, qcs.length() ); } diff --git a/amarok/src/metabundle.cpp b/amarok/src/metabundle.cpp index 7787c503..3a6d199e 100644 --- a/amarok/src/metabundle.cpp +++ b/amarok/src/metabundle.cpp @@ -63,6 +63,7 @@ #include "metabundle.h" #include "podcastbundle.h" +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) namespace Amarok { KURL detachedKURL( const KURL &url ) { @@ -75,7 +76,7 @@ namespace Amarok { MetaBundle::EmbeddedImage::EmbeddedImage( const TagLib::ByteVector& data, const TagLib::String& description ) - : m_description( TStringToQString( description ) ) + : m_description( TStringToTQString( description ) ) { m_data.duplicate( data.data(), data.size() ); } @@ -511,7 +512,7 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag tag = fileref.tag(); if ( tag ) { - #define strip( x ) TQString(TStringToQString( x )).stripWhiteSpace() + #define strip( x ) TStringToTQString( x ).stripWhiteSpace() setTitle( strip( tag->title() ) ); setArtist( strip( tag->artist() ) ); setAlbum( strip( tag->album() ) ); @@ -536,19 +537,19 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag if ( file->ID3v2Tag() ) { if ( !file->ID3v2Tag()->frameListMap()["TPOS"].isEmpty() ) - disc = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() )).stripWhiteSpace(); + disc = TStringToTQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() ).stripWhiteSpace(); if ( !file->ID3v2Tag()->frameListMap()["TBPM"].isEmpty() ) - setBpm( TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TBPM"].front()->toString() )).stripWhiteSpace().toFloat() ); + setBpm( TStringToTQString( file->ID3v2Tag()->frameListMap()["TBPM"].front()->toString() ).stripWhiteSpace().toFloat() ); if ( !file->ID3v2Tag()->frameListMap()["TCOM"].isEmpty() ) - setComposer( TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() )).stripWhiteSpace() ); + setComposer( TStringToTQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() ).stripWhiteSpace() ); if ( !file->ID3v2Tag()->frameListMap()["TPE2"].isEmpty() ) // non-standard: Apple, Microsoft - setAlbumArtist( TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TPE2"].front()->toString() )).stripWhiteSpace() ); + setAlbumArtist( TStringToTQString( file->ID3v2Tag()->frameListMap()["TPE2"].front()->toString() ).stripWhiteSpace() ); if ( !file->ID3v2Tag()->frameListMap()["TCMP"].isEmpty() ) - compilation = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TCMP"].front()->toString() )).stripWhiteSpace(); + compilation = TStringToTQString( file->ID3v2Tag()->frameListMap()["TCMP"].front()->toString() ).stripWhiteSpace(); if(images) { loadImagesFromTag( *file->ID3v2Tag(), *images ); @@ -561,16 +562,16 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag if ( file->tag() ) { if ( !file->tag()->fieldListMap()[ "COMPOSER" ].isEmpty() ) - setComposer( TQString(TStringToQString( file->tag()->fieldListMap()["COMPOSER"].front() )).stripWhiteSpace() ); + setComposer( TStringToTQString( file->tag()->fieldListMap()["COMPOSER"].front() ).stripWhiteSpace() ); if ( !file->tag()->fieldListMap()[ "BPM" ].isEmpty() ) - setBpm( TQString(TStringToQString( file->tag()->fieldListMap()["BPM"].front() )).stripWhiteSpace().toFloat() ); + setBpm( TStringToTQString( file->tag()->fieldListMap()["BPM"].front() ).stripWhiteSpace().toFloat() ); if ( !file->tag()->fieldListMap()[ "DISCNUMBER" ].isEmpty() ) - disc = TQString(TStringToQString( file->tag()->fieldListMap()["DISCNUMBER"].front() )).stripWhiteSpace(); + disc = TStringToTQString( file->tag()->fieldListMap()["DISCNUMBER"].front() ).stripWhiteSpace(); if ( !file->tag()->fieldListMap()[ "COMPILATION" ].isEmpty() ) - compilation = TQString(TStringToQString( file->tag()->fieldListMap()["COMPILATION"].front() )).stripWhiteSpace(); + compilation = TStringToTQString( file->tag()->fieldListMap()["COMPILATION"].front() ).stripWhiteSpace(); } } else if ( TagLib::FLAC::File *file = dynamic_cast<TagLib::FLAC::File *>( fileref.file() ) ) @@ -579,16 +580,16 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag if ( file->xiphComment() ) { if ( !file->xiphComment()->fieldListMap()[ "COMPOSER" ].isEmpty() ) - setComposer( TQString(TStringToQString( file->xiphComment()->fieldListMap()["COMPOSER"].front() )).stripWhiteSpace() ); + setComposer( TStringToTQString( file->xiphComment()->fieldListMap()["COMPOSER"].front() ).stripWhiteSpace() ); if ( !file->xiphComment()->fieldListMap()[ "BPM" ].isEmpty() ) - setBpm( TQString(TStringToQString( file->xiphComment()->fieldListMap()["BPM"].front() )).stripWhiteSpace().toFloat() ); + setBpm( TStringToTQString( file->xiphComment()->fieldListMap()["BPM"].front() ).stripWhiteSpace().toFloat() ); if ( !file->xiphComment()->fieldListMap()[ "DISCNUMBER" ].isEmpty() ) - disc = TQString(TStringToQString( file->xiphComment()->fieldListMap()["DISCNUMBER"].front() )).stripWhiteSpace(); + disc = TStringToTQString( file->xiphComment()->fieldListMap()["DISCNUMBER"].front() ).stripWhiteSpace(); if ( !file->xiphComment()->fieldListMap()[ "COMPILATION" ].isEmpty() ) - compilation = TQString(TStringToQString( file->xiphComment()->fieldListMap()["COMPILATION"].front() )).stripWhiteSpace(); + compilation = TStringToTQString( file->xiphComment()->fieldListMap()["COMPILATION"].front() ).stripWhiteSpace(); } if ( images && file->ID3v2Tag() ) { @@ -601,7 +602,7 @@ MetaBundle::readTags( TagLib::AudioProperties::ReadStyle readStyle, EmbeddedImag TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() ); if( mp4tag ) { - setComposer( TQString(TStringToQString( mp4tag->composer() )) ); + setComposer( TStringToTQString( mp4tag->composer() ) ); setBpm( TQString::number( mp4tag->bpm() ).toFloat() ); disc = TQString::number( mp4tag->disk() ); compilation = TQString::number( mp4tag->compilation() ); @@ -1282,7 +1283,7 @@ MetaBundle::genreList() //static TagLib::StringList genres = TagLib::ID3v1::genreList(); for( TagLib::StringList::ConstIterator it = genres.begin(), end = genres.end(); it != end; ++it ) - list += TStringToQString( (*it) ); + list += TStringToTQString( (*it) ); list.sort(); diff --git a/amarok/src/scripts/databasescripts/databaseScripts.rb b/amarok/src/scripts/databasescripts/databaseScripts.rb index de541510..4d7588ff 100644 --- a/amarok/src/scripts/databasescripts/databaseScripts.rb +++ b/amarok/src/scripts/databasescripts/databaseScripts.rb @@ -27,7 +27,7 @@ class DatabaseScriptChooser < Qt::Dialog attr_reader :m_saveDir attr_reader :m_okayButton - Q_SLOTS 'optionChanged(int)', 'textChanged(const QString &)', 'accept()', 'cancel()' + Q_SLOTS 'optionChanged(int)', 'textChanged(const TQString &)', 'accept()', 'cancel()' def initialize(parent = nil, name = nil, modal = false, fl = 0) super @@ -73,8 +73,8 @@ class DatabaseScriptChooser < Qt::Dialog connect( @m_okayButton, SIGNAL( "clicked()" ), self, SLOT( "accept()" ) ) connect( @m_cancelButton, SIGNAL( "clicked()" ), self, SLOT( "cancel()" ) ) - connect( @m_saveDir, SIGNAL( "textChanged(const QString &)" ), - self, SLOT( "textChanged(const QString &)" ) ); + connect( @m_saveDir, SIGNAL( "textChanged(const TQString &)" ), + self, SLOT( "textChanged(const TQString &)" ) ); @Form1Layout.addLayout(@layout3, 0, 0) languageChange() |
