diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:57:51 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:57:51 -0600 |
commit | 2781e27b871150395a5a82e221684108641002b2 (patch) | |
tree | 57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/translators/freedbimporter.cpp | |
parent | 031454e56009d576589c28757f6c6fcf4884095e (diff) | |
download | tellico-2781e27b871150395a5a82e221684108641002b2.tar.gz tellico-2781e27b871150395a5a82e221684108641002b2.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/translators/freedbimporter.cpp')
-rw-r--r-- | src/translators/freedbimporter.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/translators/freedbimporter.cpp b/src/translators/freedbimporter.cpp index 8f08e45..8a13ed3 100644 --- a/src/translators/freedbimporter.cpp +++ b/src/translators/freedbimporter.cpp @@ -43,7 +43,7 @@ #include <tqfile.h> #include <tqdir.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqgroupbox.h> #include <tqwhatsthis.h> #include <tqradiobutton.h> @@ -81,7 +81,7 @@ void FreeDBImporter::readCDROM() { #ifdef HAVE_KCDDB TQString drivePath = m_driveCombo->currentText(); if(drivePath.isEmpty()) { - setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").arg(drivePath)); + setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").tqarg(drivePath)); myDebug() << "FreeDBImporter::readCDROM() - no drive!" << endl; return; } @@ -96,7 +96,7 @@ void FreeDBImporter::readCDROM() { } { - KConfigGroup config(KGlobal::config(), TQString::fromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); config.writeEntry("CD-ROM Devices", drives); config.writeEntry("Last Device", drivePath); config.writeEntry("Cache Files Only", false); @@ -167,7 +167,7 @@ void FreeDBImporter::readCDROM() { #endif if(list.isEmpty()) { - setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").arg(drivePath)); + setStatusMessage(i18n("<qt>Tellico was unable to access the CD-ROM device - <i>%1</i>.</qt>").tqarg(drivePath)); return; } // myDebug() << KCDDB::CDDB::trackOffsetListToId(list) << endl; @@ -185,9 +185,9 @@ void FreeDBImporter::readCDROM() { TQStringList list; KCDDB::CDInfoList infoList = client.lookupResponse(); for(KCDDB::CDInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it) { - list.append(TQString::fromLatin1("%1, %2, %3").arg((*it).artist) - .arg((*it).title) - .arg((*it).genre)); + list.append(TQString::tqfromLatin1("%1, %2, %3").tqarg((*it).artist) + .tqarg((*it).title) + .tqarg((*it).genre)); } // switch back to pointer cursor @@ -254,23 +254,23 @@ void FreeDBImporter::readCDROM() { Data::EntryPtr entry = new Data::Entry(m_coll); // obviously a CD - 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); + 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); if(info.year > 0) { - entry->setField(TQString::fromLatin1("year"), TQString::number(info.year)); + entry->setField(TQString::tqfromLatin1("year"), TQString::number(info.year)); } - entry->setField(TQString::fromLatin1("keyword"), info.category); + entry->setField(TQString::tqfromLatin1("keyword"), info.category); TQString extd = info.extd; - extd.replace('\n', TQString::fromLatin1("<br/>")); - entry->setField(TQString::fromLatin1("comments"), extd); + extd.replace('\n', TQString::tqfromLatin1("<br/>")); + entry->setField(TQString::tqfromLatin1("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::fromLatin1("title")).toString() + "::" + info.artist; + TQString s = t[i].get(TQString::tqfromLatin1("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::fromLatin1("track"), trackList.join(TQString::fromLatin1("; "))); + entry->setField(TQString::tqfromLatin1("track"), trackList.join(TQString::tqfromLatin1("; "))); 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::fromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); config.writeEntry("Cache Files Only", true); } @@ -320,12 +320,12 @@ void FreeDBImporter::readCache() { // kapp->processEvents(); // really needed ? } - 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"); + 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"); 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::fromLatin1("medium"), i18n("Compact Disc")); + entry->setField(TQString::tqfromLatin1("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::fromLatin1("year"), TQString::number(info.year)); + entry->setField(TQString::tqfromLatin1("year"), TQString::number(info.year)); } - entry->setField(TQString::fromLatin1("keyword"), info.category); + entry->setField(TQString::tqfromLatin1("keyword"), info.category); TQString extd = info.extd; - extd.replace('\n', TQString::fromLatin1("<br/>")); - entry->setField(TQString::fromLatin1("comments"), extd); + extd.replace('\n', TQString::tqfromLatin1("<br/>")); + entry->setField(TQString::tqfromLatin1("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::fromLatin1("title")).toString(); + trackList << t[i].get(TQString::tqfromLatin1("title")).toString(); #else trackList << t[i].title; #endif } - entry->setField(track, trackList.join(TQString::fromLatin1("; "))); + entry->setField(track, trackList.join(TQString::tqfromLatin1("; "))); #if 0 // add CDDB info - const TQString br = TQString::fromLatin1("<br/>"); + const TQString br = TQString::tqfromLatin1("<br/>"); TQString comment; if(!info.extd.isEmpty()) { comment.append(info.extd + br); } if(!info.id.isEmpty()) { - comment.append(TQString::fromLatin1("CDDB-ID: ") + info.id + br); + comment.append(TQString::tqfromLatin1("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::fromLatin1(name)).isEmpty()) { \ - entry->setField(TQString::fromLatin1(name), value); \ + if(entry->field(TQString::tqfromLatin1(name)).isEmpty()) { \ + entry->setField(TQString::tqfromLatin1(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::fromLatin1("medium"), i18n("Compact Disc")); + entry->setField(TQString::tqfromLatin1("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::fromLatin1("; "))); + SETFIELD("track", tracks.join(TQString::tqfromLatin1("; "))); // 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::fromLatin1("ImportOptions - FreeDB")); + KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("ImportOptions - FreeDB")); TQStringList devices = config.readListEntry("CD-ROM Devices"); if(devices.isEmpty()) { #if defined(__OpenBSD__) - devices += TQString::fromLatin1("/dev/rcd0c"); + devices += TQString::tqfromLatin1("/dev/rcd0c"); #endif - devices += TQString::fromLatin1("/dev/cdrom"); - devices += TQString::fromLatin1("/dev/dvd"); + devices += TQString::tqfromLatin1("/dev/cdrom"); + devices += TQString::tqfromLatin1("/dev/dvd"); } m_driveCombo->insertStringList(devices); TQString device = config.readEntry("Last Device"); |