diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-26 18:32:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-27 19:17:31 +0900 |
commit | 6013ecdd5461270cd2d42bd2d5d78ce364c68c08 (patch) | |
tree | 5dd002f663c2b1578f44c6ce6e9c0075c894bfab /tdefile-plugins | |
parent | e5e8e3221561c92ace9e485a3b8778da1e4b5fbb (diff) | |
download | tdemultimedia-6013ecdd5461270cd2d42bd2d5d78ce364c68c08.tar.gz tdemultimedia-6013ecdd5461270cd2d42bd2d5d78ce364c68c08.zip |
Fix FTBFS caused by taglib as a result of the QString -> TQString remaning
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c282724a2111c15cb624429895f0eab81509d935)
Diffstat (limited to 'tdefile-plugins')
-rw-r--r-- | tdefile-plugins/flac/tdefile_flac.cpp | 12 | ||||
-rw-r--r-- | tdefile-plugins/mp3/tdefile_mp3.cpp | 14 | ||||
-rw-r--r-- | tdefile-plugins/mpc/tdefile_mpc.cpp | 12 |
3 files changed, 22 insertions, 16 deletions
diff --git a/tdefile-plugins/flac/tdefile_flac.cpp b/tdefile-plugins/flac/tdefile_flac.cpp index 85d52068..808af9c9 100644 --- a/tdefile-plugins/flac/tdefile_flac.cpp +++ b/tdefile-plugins/flac/tdefile_flac.cpp @@ -43,6 +43,8 @@ #define TAGLIB_1_2 #endif +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) + #include <tstring.h> #include <tfile.h> #include <flacfile.h> @@ -181,13 +183,13 @@ bool KFlacPlugin::readInfo( KFileMetaInfo& info, uint what ) TQString date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString(); TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString(); - appendItem(commentgroup, "Title", TQString(TStringToQString(file->tag()->title())).stripWhiteSpace()); - appendItem(commentgroup, "Artist", TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace()); - appendItem(commentgroup, "Album", TQString(TStringToQString(file->tag()->album())).stripWhiteSpace()); + appendItem(commentgroup, "Title", TStringToTQString(file->tag()->title()).stripWhiteSpace()); + appendItem(commentgroup, "Artist", TStringToTQString(file->tag()->artist()).stripWhiteSpace()); + appendItem(commentgroup, "Album", TStringToTQString(file->tag()->album()).stripWhiteSpace()); appendItem(commentgroup, "Date", date); - appendItem(commentgroup, "Comment", TQString(TStringToQString(file->tag()->comment())).stripWhiteSpace()); + appendItem(commentgroup, "Comment", TStringToTQString(file->tag()->comment()).stripWhiteSpace()); appendItem(commentgroup, "Tracknumber", track); - appendItem(commentgroup, "Genre", TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace()); + appendItem(commentgroup, "Genre", TStringToTQString(file->tag()->genre()).stripWhiteSpace()); } if (readTech && file->audioProperties()) diff --git a/tdefile-plugins/mp3/tdefile_mp3.cpp b/tdefile-plugins/mp3/tdefile_mp3.cpp index 4e7d4bf6..742f0759 100644 --- a/tdefile-plugins/mp3/tdefile_mp3.cpp +++ b/tdefile-plugins/mp3/tdefile_mp3.cpp @@ -40,6 +40,8 @@ #include <id3v1genres.h> #include <id3v2framefactory.h> +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) + typedef KGenericFactory<KMp3Plugin> Mp3Factory; K_EXPORT_COMPONENT_FACTORY(tdefile_mp3, Mp3Factory( "tdefile_mp3" )) @@ -154,21 +156,21 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) TQString date = file.tag()->year() > 0 ? TQString::number(file.tag()->year()) : TQString(); TQString track = file.tag()->track() > 0 ? TQString::number(file.tag()->track()) : TQString(); - TQString title = TQString(TStringToQString(file.tag()->title())).stripWhiteSpace(); + TQString title = TStringToTQString(file.tag()->title()).stripWhiteSpace(); if (!title.isEmpty()) appendItem(id3group, "Title", title); - TQString artist = TQString(TStringToQString(file.tag()->artist())).stripWhiteSpace(); + TQString artist = TStringToTQString(file.tag()->artist()).stripWhiteSpace(); if (!artist.isEmpty()) appendItem(id3group, "Artist", artist); - TQString album = TQString(TStringToQString(file.tag()->album())).stripWhiteSpace(); + TQString album = TStringToTQString(file.tag()->album()).stripWhiteSpace(); if (!album.isEmpty()) appendItem(id3group, "Album", album); appendItem(id3group, "Date", date); - TQString comment = TQString(TStringToQString(file.tag()->comment())).stripWhiteSpace(); + TQString comment = TStringToTQString(file.tag()->comment()).stripWhiteSpace(); if (!comment.isEmpty()) appendItem(id3group, "Comment", comment); appendItem(id3group, "Tracknumber", track); - TQString genre = TQString(TStringToQString(file.tag()->genre())).stripWhiteSpace(); + TQString genre = TStringToTQString(file.tag()->genre()).stripWhiteSpace(); if (!genre.isEmpty()) appendItem(id3group, "Genre", genre); } @@ -294,7 +296,7 @@ TQValidator *KMp3Plugin::createValidator(const TQString & /* mimetype */, TagLib::StringList genres = TagLib::ID3v1::genreList(); for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) { - l.append(TStringToQString((*it))); + l.append(TStringToTQString((*it))); } return new ComboValidator(l, false, true, parent, name); } diff --git a/tdefile-plugins/mpc/tdefile_mpc.cpp b/tdefile-plugins/mpc/tdefile_mpc.cpp index 9a6a3d42..238307f1 100644 --- a/tdefile-plugins/mpc/tdefile_mpc.cpp +++ b/tdefile-plugins/mpc/tdefile_mpc.cpp @@ -46,6 +46,8 @@ #include <unistd.h> #include <ctype.h> +#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true)) + K_EXPORT_COMPONENT_FACTORY(tdefile_mpc, KGenericFactory<KMpcPlugin>("tdefile_mpc")) KMpcPlugin::KMpcPlugin( TQObject *parent, const char *name, @@ -157,13 +159,13 @@ bool KMpcPlugin::readInfo( KFileMetaInfo& info, uint what ) TQString date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString(); TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString(); - appendItem(commentgroup, "Title", TQString(TStringToQString(file->tag()->title())).stripWhiteSpace()); - appendItem(commentgroup, "Artist", TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace()); - appendItem(commentgroup, "Album", TQString(TStringToQString(file->tag()->album())).stripWhiteSpace()); + appendItem(commentgroup, "Title", TStringToTQString(file->tag()->title()).stripWhiteSpace()); + appendItem(commentgroup, "Artist", TStringToTQString(file->tag()->artist()).stripWhiteSpace()); + appendItem(commentgroup, "Album", TStringToTQString(file->tag()->album()).stripWhiteSpace()); appendItem(commentgroup, "Date", date); - appendItem(commentgroup, "Comment", TQString(TStringToQString(file->tag()->comment())).stripWhiteSpace()); + appendItem(commentgroup, "Comment", TStringToTQString(file->tag()->comment()).stripWhiteSpace()); appendItem(commentgroup, "Tracknumber", track); - appendItem(commentgroup, "Genre", TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace()); + appendItem(commentgroup, "Genre", TStringToTQString(file->tag()->genre()).stripWhiteSpace()); } if (readTech) |