diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:15:24 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:15:24 -0600 |
commit | 8d9b90ca794ffabf151719c2edebe9278a2d3f36 (patch) | |
tree | 55f446de8694c45be6bf0f1178920c2b92b0c9f5 /src/translators/freedbimporter.cpp | |
parent | 2781e27b871150395a5a82e221684108641002b2 (diff) | |
download | tellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.tar.gz tellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'src/translators/freedbimporter.cpp')
-rw-r--r-- | src/translators/freedbimporter.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/translators/freedbimporter.cpp b/src/translators/freedbimporter.cpp index 8a13ed3..6cb4adc 100644 --- a/src/translators/freedbimporter.cpp +++ b/src/translators/freedbimporter.cpp @@ -96,7 +96,7 @@ void FreeDBImporter::readCDROM() { } { - KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::fromLatin1("ImportOptions - FreeDB")); config.writeEntry("CD-ROM Devices", drives); config.writeEntry("Last Device", drivePath); config.writeEntry("Cache Files Only", false); @@ -185,7 +185,7 @@ void FreeDBImporter::readCDROM() { TQStringList list; KCDDB::CDInfoList infoList = client.lookupResponse(); for(KCDDB::CDInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it) { - list.append(TQString::tqfromLatin1("%1, %2, %3").tqarg((*it).artist) + list.append(TQString::fromLatin1("%1, %2, %3").tqarg((*it).artist) .tqarg((*it).title) .tqarg((*it).genre)); } @@ -254,23 +254,23 @@ void FreeDBImporter::readCDROM() { Data::EntryPtr entry = new Data::Entry(m_coll); // obviously a CD - entry->setField(TQString::tqfromLatin1("medium"), i18n("Compact Disc")); - entry->setField(TQString::tqfromLatin1("title"), info.title); - entry->setField(TQString::tqfromLatin1("artist"), info.artist); - entry->setField(TQString::tqfromLatin1("genre"), info.genre); + entry->setField(TQString::fromLatin1("medium"), i18n("Compact Disc")); + entry->setField(TQString::fromLatin1("title"), info.title); + entry->setField(TQString::fromLatin1("artist"), info.artist); + entry->setField(TQString::fromLatin1("genre"), info.genre); if(info.year > 0) { - entry->setField(TQString::tqfromLatin1("year"), TQString::number(info.year)); + entry->setField(TQString::fromLatin1("year"), TQString::number(info.year)); } - entry->setField(TQString::tqfromLatin1("keyword"), info.category); + entry->setField(TQString::fromLatin1("keyword"), info.category); TQString extd = info.extd; - extd.replace('\n', TQString::tqfromLatin1("<br/>")); - entry->setField(TQString::tqfromLatin1("comments"), extd); + extd.replace('\n', TQString::fromLatin1("<br/>")); + entry->setField(TQString::fromLatin1("comments"), extd); TQStringList trackList; KCDDB::TrackInfoList t = info.trackInfoList; for(uint i = 0; i < t.count(); ++i) { #if KDE_IS_VERSION(3,4,90) - TQString s = t[i].get(TQString::tqfromLatin1("title")).toString() + "::" + info.artist; + TQString s = t[i].get(TQString::fromLatin1("title")).toString() + "::" + info.artist; #else TQString s = t[i].title + "::" + info.artist; #endif @@ -280,7 +280,7 @@ void FreeDBImporter::readCDROM() { trackList << s; // TODO: KDE4 will probably have track length too } - entry->setField(TQString::tqfromLatin1("track"), trackList.join(TQString::tqfromLatin1("; "))); + entry->setField(TQString::fromLatin1("track"), trackList.join(TQString::fromLatin1("; "))); m_coll->addEntries(entry); readCDText(drive); @@ -291,7 +291,7 @@ void FreeDBImporter::readCache() { #ifdef HAVE_KCDDB { // remember the import options - KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::fromLatin1("ImportOptions - FreeDB")); config.writeEntry("Cache Files Only", true); } @@ -320,12 +320,12 @@ void FreeDBImporter::readCache() { // kapp->processEvents(); // really needed ? } - const TQString title = TQString::tqfromLatin1("title"); - const TQString artist = TQString::tqfromLatin1("artist"); - const TQString year = TQString::tqfromLatin1("year"); - const TQString genre = TQString::tqfromLatin1("genre"); - const TQString track = TQString::tqfromLatin1("track"); - const TQString comments = TQString::tqfromLatin1("comments"); + const TQString title = TQString::fromLatin1("title"); + const TQString artist = TQString::fromLatin1("artist"); + const TQString year = TQString::fromLatin1("year"); + const TQString genre = TQString::fromLatin1("genre"); + const TQString track = TQString::fromLatin1("track"); + const TQString comments = TQString::fromLatin1("comments"); uint numFiles = files.count(); if(numFiles == 0) { @@ -372,39 +372,39 @@ void FreeDBImporter::readCache() { // create a new entry and set fields Data::EntryPtr entry = new Data::Entry(m_coll); // obviously a CD - entry->setField(TQString::tqfromLatin1("medium"), i18n("Compact Disc")); + entry->setField(TQString::fromLatin1("medium"), i18n("Compact Disc")); entry->setField(title, info.title); entry->setField(artist, info.artist); entry->setField(genre, info.genre); if(info.year > 0) { - entry->setField(TQString::tqfromLatin1("year"), TQString::number(info.year)); + entry->setField(TQString::fromLatin1("year"), TQString::number(info.year)); } - entry->setField(TQString::tqfromLatin1("keyword"), info.category); + entry->setField(TQString::fromLatin1("keyword"), info.category); TQString extd = info.extd; - extd.replace('\n', TQString::tqfromLatin1("<br/>")); - entry->setField(TQString::tqfromLatin1("comments"), extd); + extd.replace('\n', TQString::fromLatin1("<br/>")); + entry->setField(TQString::fromLatin1("comments"), extd); // step through trackList TQStringList trackList; KCDDB::TrackInfoList t = info.trackInfoList; for(uint i = 0; i < t.count(); ++i) { #if KDE_IS_VERSION(3,4,90) - trackList << t[i].get(TQString::tqfromLatin1("title")).toString(); + trackList << t[i].get(TQString::fromLatin1("title")).toString(); #else trackList << t[i].title; #endif } - entry->setField(track, trackList.join(TQString::tqfromLatin1("; "))); + entry->setField(track, trackList.join(TQString::fromLatin1("; "))); #if 0 // add CDDB info - const TQString br = TQString::tqfromLatin1("<br/>"); + const TQString br = TQString::fromLatin1("<br/>"); TQString comment; if(!info.extd.isEmpty()) { comment.append(info.extd + br); } if(!info.id.isEmpty()) { - comment.append(TQString::tqfromLatin1("CDDB-ID: ") + info.id + br); + comment.append(TQString::fromLatin1("CDDB-ID: ") + info.id + br); } if(info.length > 0) { comment.append("Length: " + TQString::number(info.length) + br); @@ -427,8 +427,8 @@ void FreeDBImporter::readCache() { } #define SETFIELD(name,value) \ - if(entry->field(TQString::tqfromLatin1(name)).isEmpty()) { \ - entry->setField(TQString::tqfromLatin1(name), value); \ + if(entry->field(TQString::fromLatin1(name)).isEmpty()) { \ + entry->setField(TQString::fromLatin1(name), value); \ } void FreeDBImporter::readCDText(const TQCString& drive_) { @@ -443,7 +443,7 @@ void FreeDBImporter::readCDText(const TQCString& drive_) { } if(!entry) { entry = new Data::Entry(m_coll); - entry->setField(TQString::tqfromLatin1("medium"), i18n("Compact Disc")); + entry->setField(TQString::fromLatin1("medium"), i18n("Compact Disc")); m_coll->addEntries(entry); } @@ -470,7 +470,7 @@ void FreeDBImporter::readCDText(const TQCString& drive_) { artist = i18n("Various"); } } - SETFIELD("track", tracks.join(TQString::tqfromLatin1("; "))); + SETFIELD("track", tracks.join(TQString::fromLatin1("; "))); // something special for compilations and such SETFIELD("title", i18n(Data::Collection::s_emptyGroupTitle)); @@ -515,14 +515,14 @@ TQWidget* FreeDBImporter::widget(TQWidget* parent_, const char* name_/*=0*/) { l->addStretch(1); // now read config options - KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::fromLatin1("ImportOptions - FreeDB")); TQStringList devices = config.readListEntry("CD-ROM Devices"); if(devices.isEmpty()) { #if defined(__OpenBSD__) - devices += TQString::tqfromLatin1("/dev/rcd0c"); + devices += TQString::fromLatin1("/dev/rcd0c"); #endif - devices += TQString::tqfromLatin1("/dev/cdrom"); - devices += TQString::tqfromLatin1("/dev/dvd"); + devices += TQString::fromLatin1("/dev/cdrom"); + devices += TQString::fromLatin1("/dev/dvd"); } m_driveCombo->insertStringList(devices); TQString device = config.readEntry("Last Device"); |