diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 0254ebaa5e056092461fd585b6851d15faa43035 (patch) | |
tree | 2bf41a1c189b92dc1b9ab89e3ce392f8132214c4 /src/fetch/amazonfetcher.cpp | |
parent | fa071926f015f39711632b3fb9fe16004d93d0ec (diff) | |
download | tellico-0254ebaa5e056092461fd585b6851d15faa43035.tar.gz tellico-0254ebaa5e056092461fd585b6851d15faa43035.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/fetch/amazonfetcher.cpp')
-rw-r--r-- | src/fetch/amazonfetcher.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/fetch/amazonfetcher.cpp b/src/fetch/amazonfetcher.cpp index e67bba6..e5f50b8 100644 --- a/src/fetch/amazonfetcher.cpp +++ b/src/fetch/amazonfetcher.cpp @@ -286,7 +286,7 @@ void AmazonFetcher::doSearch() { TQString s = m_value; // not encValue!!! s.remove('-'); // limit to first 10 - s.tqreplace(TQString::tqfromLatin1("; "), TQString::tqfromLatin1(",")); + s.replace(TQString::tqfromLatin1("; "), TQString::tqfromLatin1(",")); s = s.section(',', 0, 9); u.addQueryItem(TQString::tqfromLatin1("ItemId"), s); } @@ -463,7 +463,7 @@ void AmazonFetcher::slotComplete(KIO::Job* job_) { TQRegExp rx(TQString::tqfromLatin1("\\.([^\\s])")); TQStringList values = entry->fields(TQString::tqfromLatin1("author"), false); for(TQStringList::Iterator it = values.begin(); it != values.end(); ++it) { - (*it).tqreplace(rx, TQString::tqfromLatin1(". \\1")); + (*it).replace(rx, TQString::tqfromLatin1(". \\1")); } entry->setField(TQString::tqfromLatin1("author"), values.join(TQString::tqfromLatin1("; "))); } @@ -472,7 +472,7 @@ void AmazonFetcher::slotComplete(KIO::Job* job_) { if(m_site == UK && coll->type() == Data::Collection::Video) { TQRegExp rx(TQString::tqfromLatin1("\\[(\\d{4})\\]")); TQString t = entry->title(); - if(t.tqfind(rx) > -1) { + if(t.find(rx) > -1) { TQString y = rx.cap(1); t.remove(rx).simplifyWhiteSpace(); entry->setField(TQString::tqfromLatin1("title"), t); @@ -563,7 +563,7 @@ void AmazonFetcher::slotComplete(KIO::Job* job_) { ++m_page; m_countOffset = 0; doSearch(); - } else if(m_value.tqcontains(';') > 9) { + } else if(m_value.contains(';') > 9) { search(m_key, m_value.section(';', 10)); } else { m_countOffset = m_entries.count() % AMAZON_RETURNS_PER_REQUEST; @@ -583,7 +583,7 @@ Tellico::Data::EntryPtr AmazonFetcher::fetchEntry(uint uid_) { TQStringList defaultFields = customFields().keys(); for(TQStringList::Iterator it = defaultFields.begin(); it != defaultFields.end(); ++it) { - if(!m_fields.tqcontains(*it)) { + if(!m_fields.contains(*it)) { entry->setField(*it, TQString()); } } @@ -626,7 +626,7 @@ Tellico::Data::EntryPtr AmazonFetcher::fetchEntry(uint uid_) { // only care about genres that have "Genres" in the amazon response // and take the first word after that for(TQStringList::Iterator it = oldWords.begin(); it != oldWords.end(); ++it) { - if((*it).tqfind(TQString::tqfromLatin1("Genres")) == -1) { + if((*it).find(TQString::tqfromLatin1("Genres")) == -1) { continue; } @@ -663,7 +663,7 @@ Tellico::Data::EntryPtr AmazonFetcher::fetchEntry(uint uid_) { // only care about genres that have "Styles" in the amazon response // and take the first word after that for(TQStringList::Iterator it = oldWords.begin(); it != oldWords.end(); ++it) { - if((*it).tqfind(TQString::tqfromLatin1("Styles")) == -1) { + if((*it).find(TQString::tqfromLatin1("Styles")) == -1) { continue; } @@ -811,23 +811,23 @@ void AmazonFetcher::parseTitle(Data::EntryPtr entry, int collType) { bool AmazonFetcher::parseTitleToken(Data::EntryPtr entry, const TQString& token) { // if res = true, then the token gets removed from the title bool res = false; - if(token.tqfind(TQString::tqfromLatin1("widescreen"), 0, false /* case-insensitive*/) > -1 || - token.tqfind(i18n("Widescreen"), 0, false) > -1) { + if(token.find(TQString::tqfromLatin1("widescreen"), 0, false /* case-insensitive*/) > -1 || + token.find(i18n("Widescreen"), 0, false) > -1) { entry->setField(TQString::tqfromLatin1("widescreen"), TQString::tqfromLatin1("true")); // res = true; leave it in the title - } else if(token.tqfind(TQString::tqfromLatin1("full screen"), 0, false) > -1) { + } else if(token.find(TQString::tqfromLatin1("full screen"), 0, false) > -1) { // skip, but go ahead and remove from title res = true; } - if(token.tqfind(TQString::tqfromLatin1("blu-ray"), 0, false) > -1) { + if(token.find(TQString::tqfromLatin1("blu-ray"), 0, false) > -1) { entry->setField(TQString::tqfromLatin1("medium"), i18n("Blu-ray")); res = true; - } else if(token.tqfind(TQString::tqfromLatin1("hd dvd"), 0, false) > -1) { + } else if(token.find(TQString::tqfromLatin1("hd dvd"), 0, false) > -1) { entry->setField(TQString::tqfromLatin1("medium"), i18n("HD DVD")); res = true; } - if(token.tqfind(TQString::tqfromLatin1("director's cut"), 0, false) > -1 || - token.tqfind(i18n("Director's Cut"), 0, false) > -1) { + if(token.find(TQString::tqfromLatin1("director's cut"), 0, false) > -1 || + token.find(i18n("Director's Cut"), 0, false) > -1) { entry->setField(TQString::tqfromLatin1("directors-cut"), TQString::tqfromLatin1("true")); // res = true; leave it in the title } |