diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-09-29 02:39:19 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-09-29 11:00:50 +0200 |
commit | 8e80232676d64a56227e26273c993d5b86826014 (patch) | |
tree | bfeefaae587f91789a1ef6b273fe847fb54625a1 | |
parent | 9c6e80458b2abd59b6399778d07c74f356155841 (diff) | |
download | tellico-8e80232676d64a56227e26273c993d5b86826014.tar.gz tellico-8e80232676d64a56227e26273c993d5b86826014.zip |
Fix FTBFS caused by taglib as a result of the QString -> TQString renaming.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit f163e21e1e0fe88bc9aad1bc0c44fc70b2dd71cc)
-rw-r--r-- | src/translators/audiofileimporter.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/translators/audiofileimporter.cpp b/src/translators/audiofileimporter.cpp index dc376d9..da41fc8 100644 --- a/src/translators/audiofileimporter.cpp +++ b/src/translators/audiofileimporter.cpp @@ -44,6 +44,9 @@ #include <tqdir.h> #include <tqwhatsthis.h> +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) + + using Tellico::Import::AudioFileImporter; AudioFileImporter::AudioFileImporter(const KURL& url_) : Tellico::Import::Importer(url_) @@ -148,7 +151,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() { } TagLib::Tag* tag = f.tag(); - TQString album = TQString(TStringToQString(tag->album())).stripWhiteSpace(); + TQString album = TStringToTQString(tag->album()).stripWhiteSpace(); if(album.isEmpty()) { // can't do anything since tellico entries are by album kdWarning() << "Skipping: no album listed for " << *it << endl; @@ -182,7 +185,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() { } // album entries use the album name as the title entry->setField(title, album); - TQString a = TQString(TStringToQString(tag->artist())).stripWhiteSpace(); + TQString a = TStringToTQString(tag->artist()).stripWhiteSpace(); if(!a.isEmpty()) { if(exists && entry->field(artist).lower() != a.lower()) { various = true; @@ -195,7 +198,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() { entry->setField(year, TQString::number(tag->year())); } if(!tag->genre().isEmpty()) { - entry->setField(genre, TQString(TStringToQString(tag->genre())).stripWhiteSpace()); + entry->setField(genre, TStringToTQString(tag->genre()).stripWhiteSpace()); } if(!tag->title().isEmpty()) { @@ -228,7 +231,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() { } } if(trackNum > 0) { - TQString t = TQString(TStringToQString(tag->title())).stripWhiteSpace(); + TQString t = TStringToTQString(tag->title()).stripWhiteSpace(); t += "::" + a; const int len = f.audioProperties()->length(); if(len > 0) { @@ -255,9 +258,9 @@ Tellico::Data::CollPtr AudioFileImporter::collection() { c += TQString::fromLatin1("<br/>"); } if(!tag->title().isEmpty()) { - c += TQString::fromLatin1("<em>") + TQString(TStringToQString(tag->title())).stripWhiteSpace() + TQString::fromLatin1("</em> - "); + c += TQString::fromLatin1("<em>") + TStringToTQString(tag->title()).stripWhiteSpace() + TQString::fromLatin1("</em> - "); } - c += TQString(TStringToQString(tag->comment().stripWhiteSpace())).stripWhiteSpace(); + c += TStringToTQString(tag->comment().stripWhiteSpace()).stripWhiteSpace(); entry->setField(comments, c); } @@ -392,15 +395,15 @@ int AudioFileImporter::discNumber(const TagLib::FileRef& ref_) const { TQString disc; if(TagLib::MPEG::File* file = dynamic_cast<TagLib::MPEG::File*>(ref_.file())) { if(file->ID3v2Tag() && !file->ID3v2Tag()->frameListMap()["TPOS"].isEmpty()) { - disc = TQString(TStringToQString(file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString())).stripWhiteSpace(); + disc = TStringToTQString(file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString()).stripWhiteSpace(); } } else if(TagLib::Ogg::Vorbis::File* file = dynamic_cast<TagLib::Ogg::Vorbis::File*>(ref_.file())) { if(file->tag() && !file->tag()->fieldListMap()["DISCNUMBER"].isEmpty()) { - disc = TQString(TStringToQString(file->tag()->fieldListMap()["DISCNUMBER"].front())).stripWhiteSpace(); + disc = TStringToTQString(file->tag()->fieldListMap()["DISCNUMBER"].front()).stripWhiteSpace(); } } else if(TagLib::FLAC::File* file = dynamic_cast<TagLib::FLAC::File*>(ref_.file())) { if(file->xiphComment() && !file->xiphComment()->fieldListMap()["DISCNUMBER"].isEmpty()) { - disc = TQString(TStringToQString(file->xiphComment()->fieldListMap()["DISCNUMBER"].front())).stripWhiteSpace(); + disc = TStringToTQString(file->xiphComment()->fieldListMap()["DISCNUMBER"].front()).stripWhiteSpace(); } } |