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 c282724a21)
r14.1.x
Michele Calgaro 1 year ago
parent e5e8e32215
commit 6013ecdd54
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -65,6 +65,8 @@
#include "tagtransactionmanager.h" #include "tagtransactionmanager.h"
#include "cache.h" #include "cache.h"
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
using namespace ActionCollection; using namespace ActionCollection;
/** /**
@ -2168,7 +2170,7 @@ void Playlist::slotRenameTag()
TQStringList genreList; TQStringList genreList;
TagLib::StringList genres = TagLib::ID3v1::genreList(); TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
genreList.append(TStringToQString((*it))); genreList.append(TStringToTQString((*it)));
edit->completionObject()->setItems(genreList); edit->completionObject()->setItems(genreList);
break; break;
} }

@ -41,6 +41,8 @@
#include "mediafiles.h" #include "mediafiles.h"
#include "stringshare.h" #include "stringshare.h"
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// public members // public members
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -227,11 +229,11 @@ Tag::Tag(const TQString &fileName, bool) :
void Tag::setup(TagLib::File *file) void Tag::setup(TagLib::File *file)
{ {
m_title = TQString(TStringToQString(file->tag()->title())).stripWhiteSpace(); m_title = TStringToTQString(file->tag()->title()).stripWhiteSpace();
m_artist = TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace(); m_artist = TStringToTQString(file->tag()->artist()).stripWhiteSpace();
m_album = TQString(TStringToQString(file->tag()->album())).stripWhiteSpace(); m_album = TStringToTQString(file->tag()->album()).stripWhiteSpace();
m_genre = TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace(); m_genre = TStringToTQString(file->tag()->genre()).stripWhiteSpace();
m_comment = TQString(TStringToQString(file->tag()->comment())).stripWhiteSpace(); m_comment = TStringToTQString(file->tag()->comment()).stripWhiteSpace();
m_track = file->tag()->track(); m_track = file->tag()->track();
m_year = file->tag()->year(); m_year = file->tag()->year();

@ -44,6 +44,8 @@
#undef KeyRelease #undef KeyRelease
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
using namespace ActionCollection; using namespace ActionCollection;
class FileNameValidator : public TQValidator class FileNameValidator : public TQValidator
@ -403,7 +405,7 @@ void TagEditor::updateCollection()
TagLib::StringList genres = TagLib::ID3v1::genreList(); TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
genreHash.insert(TStringToQString((*it))); genreHash.insert(TStringToTQString((*it)));
m_genreList = genreHash.values(); m_genreList = genreHash.values();
m_genreList.sort(); m_genreList.sort();
@ -436,7 +438,7 @@ void TagEditor::readConfig()
TagLib::StringList genres = TagLib::ID3v1::genreList(); TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
m_genreList.append(TStringToQString((*it))); m_genreList.append(TStringToTQString((*it)));
m_genreList.sort(); m_genreList.sort();
m_genreBox->clear(); m_genreBox->clear();

@ -43,6 +43,8 @@
#define TAGLIB_1_2 #define TAGLIB_1_2
#endif #endif
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
#include <tstring.h> #include <tstring.h>
#include <tfile.h> #include <tfile.h>
#include <flacfile.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 date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString();
TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString(); TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString();
appendItem(commentgroup, "Title", TQString(TStringToQString(file->tag()->title())).stripWhiteSpace()); appendItem(commentgroup, "Title", TStringToTQString(file->tag()->title()).stripWhiteSpace());
appendItem(commentgroup, "Artist", TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace()); appendItem(commentgroup, "Artist", TStringToTQString(file->tag()->artist()).stripWhiteSpace());
appendItem(commentgroup, "Album", TQString(TStringToQString(file->tag()->album())).stripWhiteSpace()); appendItem(commentgroup, "Album", TStringToTQString(file->tag()->album()).stripWhiteSpace());
appendItem(commentgroup, "Date", date); 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, "Tracknumber", track);
appendItem(commentgroup, "Genre", TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace()); appendItem(commentgroup, "Genre", TStringToTQString(file->tag()->genre()).stripWhiteSpace());
} }
if (readTech && file->audioProperties()) if (readTech && file->audioProperties())

@ -40,6 +40,8 @@
#include <id3v1genres.h> #include <id3v1genres.h>
#include <id3v2framefactory.h> #include <id3v2framefactory.h>
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
typedef KGenericFactory<KMp3Plugin> Mp3Factory; typedef KGenericFactory<KMp3Plugin> Mp3Factory;
K_EXPORT_COMPONENT_FACTORY(tdefile_mp3, Mp3Factory( "tdefile_mp3" )) 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 date = file.tag()->year() > 0 ? TQString::number(file.tag()->year()) : TQString();
TQString track = file.tag()->track() > 0 ? TQString::number(file.tag()->track()) : 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()) if (!title.isEmpty())
appendItem(id3group, "Title", title); appendItem(id3group, "Title", title);
TQString artist = TQString(TStringToQString(file.tag()->artist())).stripWhiteSpace(); TQString artist = TStringToTQString(file.tag()->artist()).stripWhiteSpace();
if (!artist.isEmpty()) if (!artist.isEmpty())
appendItem(id3group, "Artist", artist); appendItem(id3group, "Artist", artist);
TQString album = TQString(TStringToQString(file.tag()->album())).stripWhiteSpace(); TQString album = TStringToTQString(file.tag()->album()).stripWhiteSpace();
if (!album.isEmpty()) if (!album.isEmpty())
appendItem(id3group, "Album", album); appendItem(id3group, "Album", album);
appendItem(id3group, "Date", date); appendItem(id3group, "Date", date);
TQString comment = TQString(TStringToQString(file.tag()->comment())).stripWhiteSpace(); TQString comment = TStringToTQString(file.tag()->comment()).stripWhiteSpace();
if (!comment.isEmpty()) if (!comment.isEmpty())
appendItem(id3group, "Comment", comment); appendItem(id3group, "Comment", comment);
appendItem(id3group, "Tracknumber", track); appendItem(id3group, "Tracknumber", track);
TQString genre = TQString(TStringToQString(file.tag()->genre())).stripWhiteSpace(); TQString genre = TStringToTQString(file.tag()->genre()).stripWhiteSpace();
if (!genre.isEmpty()) if (!genre.isEmpty())
appendItem(id3group, "Genre", genre); appendItem(id3group, "Genre", genre);
} }
@ -294,7 +296,7 @@ TQValidator *KMp3Plugin::createValidator(const TQString & /* mimetype */,
TagLib::StringList genres = TagLib::ID3v1::genreList(); TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) 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); return new ComboValidator(l, false, true, parent, name);
} }

@ -46,6 +46,8 @@
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
K_EXPORT_COMPONENT_FACTORY(tdefile_mpc, KGenericFactory<KMpcPlugin>("tdefile_mpc")) K_EXPORT_COMPONENT_FACTORY(tdefile_mpc, KGenericFactory<KMpcPlugin>("tdefile_mpc"))
KMpcPlugin::KMpcPlugin( TQObject *parent, const char *name, 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 date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString();
TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString(); TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString();
appendItem(commentgroup, "Title", TQString(TStringToQString(file->tag()->title())).stripWhiteSpace()); appendItem(commentgroup, "Title", TStringToTQString(file->tag()->title()).stripWhiteSpace());
appendItem(commentgroup, "Artist", TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace()); appendItem(commentgroup, "Artist", TStringToTQString(file->tag()->artist()).stripWhiteSpace());
appendItem(commentgroup, "Album", TQString(TStringToQString(file->tag()->album())).stripWhiteSpace()); appendItem(commentgroup, "Album", TStringToTQString(file->tag()->album()).stripWhiteSpace());
appendItem(commentgroup, "Date", date); 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, "Tracknumber", track);
appendItem(commentgroup, "Genre", TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace()); appendItem(commentgroup, "Genre", TStringToTQString(file->tag()->genre()).stripWhiteSpace());
} }
if (readTech) if (readTech)

Loading…
Cancel
Save