summaryrefslogtreecommitdiffstats
path: root/src/fetch/amazonfetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch/amazonfetcher.cpp')
-rw-r--r--src/fetch/amazonfetcher.cpp28
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
}