diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:15:24 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:15:24 -0600 |
commit | 8d9b90ca794ffabf151719c2edebe9278a2d3f36 (patch) | |
tree | 55f446de8694c45be6bf0f1178920c2b92b0c9f5 /src/fetch/citebasefetcher.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/fetch/citebasefetcher.cpp')
-rw-r--r-- | src/fetch/citebasefetcher.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/fetch/citebasefetcher.cpp b/src/fetch/citebasefetcher.cpp index 744950e..df09d2d 100644 --- a/src/fetch/citebasefetcher.cpp +++ b/src/fetch/citebasefetcher.cpp @@ -44,7 +44,7 @@ CitebaseFetcher::~CitebaseFetcher() { } TQString CitebaseFetcher::defaultName() { - return TQString::tqfromLatin1("Citebase"); + return TQString::fromLatin1("Citebase"); } TQString CitebaseFetcher::source() const { @@ -124,7 +124,7 @@ void CitebaseFetcher::slotComplete(KIO::Job* job_) { #if 0 kdWarning() << "Remove debug from citebasefetcher.cpp" << endl; - TQFile f(TQString::tqfromLatin1("/tmp/test.bib")); + TQFile f(TQString::fromLatin1("/tmp/test.bib")); if(f.open(IO_WriteOnly)) { TQTextStream t(&f); t.setEncoding(TQTextStream::UnicodeUTF8); @@ -148,13 +148,13 @@ void CitebaseFetcher::slotComplete(KIO::Job* job_) { // might get aborted break; } - TQString desc = entry->field(TQString::tqfromLatin1("author")) - + TQChar('/') + entry->field(TQString::tqfromLatin1("publisher")); - if(!entry->field(TQString::tqfromLatin1("year")).isEmpty()) { - desc += TQChar('/') + entry->field(TQString::tqfromLatin1("year")); + TQString desc = entry->field(TQString::fromLatin1("author")) + + TQChar('/') + entry->field(TQString::fromLatin1("publisher")); + if(!entry->field(TQString::fromLatin1("year")).isEmpty()) { + desc += TQChar('/') + entry->field(TQString::fromLatin1("year")); } - SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn"))); + SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn"))); m_entries.insert(r->uid, Data::EntryPtr(entry)); emit signalResultFound(r); } @@ -167,16 +167,16 @@ Tellico::Data::EntryPtr CitebaseFetcher::fetchEntry(uint uid_) { } KURL CitebaseFetcher::searchURL(FetchKey key_, const TQString& value_) const { - KURL u(TQString::tqfromLatin1(CITEBASE_BASE_URL)); + KURL u(TQString::fromLatin1(CITEBASE_BASE_URL)); switch(key_) { case ArxivID: { // remove prefix and/or version number TQString value = value_; - value.remove(TQRegExp(TQString::tqfromLatin1("^arxiv:"), false)); - value.remove(TQRegExp(TQString::tqfromLatin1("v\\d+$"))); - u.addQueryItem(TQString::tqfromLatin1("rft_id"), TQString::tqfromLatin1("oai:arXiv.org:%1").tqarg(value)); + value.remove(TQRegExp(TQString::fromLatin1("^arxiv:"), false)); + value.remove(TQRegExp(TQString::fromLatin1("v\\d+$"))); + u.addQueryItem(TQString::fromLatin1("rft_id"), TQString::fromLatin1("oai:arXiv.org:%1").tqarg(value)); } break; @@ -186,14 +186,14 @@ KURL CitebaseFetcher::searchURL(FetchKey key_, const TQString& value_) const { } #ifdef CITEBASE_TEST - u = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/citebase.bib")); + u = KURL::fromPathOrURL(TQString::fromLatin1("/home/robby/citebase.bib")); #endif myDebug() << "CitebaseFetcher::search() - url: " << u.url() << endl; return u; } void CitebaseFetcher::updateEntry(Data::EntryPtr entry_) { - TQString arxiv = entry_->field(TQString::tqfromLatin1("arxiv")); + TQString arxiv = entry_->field(TQString::fromLatin1("arxiv")); if(!arxiv.isEmpty()) { search(Fetch::ArxivID, arxiv); return; @@ -207,7 +207,7 @@ void CitebaseFetcher::updateEntrySynchronous(Data::EntryPtr entry) { if(!entry) { return; } - TQString arxiv = entry->field(TQString::tqfromLatin1("arxiv")); + TQString arxiv = entry->field(TQString::fromLatin1("arxiv")); if(arxiv.isEmpty()) { return; } |