diff options
Diffstat (limited to 'src/fetch/citebasefetcher.cpp')
-rw-r--r-- | src/fetch/citebasefetcher.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/fetch/citebasefetcher.cpp b/src/fetch/citebasefetcher.cpp index 744950e..610d539 100644 --- a/src/fetch/citebasefetcher.cpp +++ b/src/fetch/citebasefetcher.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> // #define CITEBASE_TEST @@ -44,7 +44,7 @@ CitebaseFetcher::~CitebaseFetcher() { } TQString CitebaseFetcher::defaultName() { - return TQString::tqfromLatin1("Citebase"); + return TQString::fromLatin1("Citebase"); } TQString CitebaseFetcher::source() const { @@ -64,7 +64,7 @@ void CitebaseFetcher::search(FetchKey key_, const TQString& value_) { m_started = true; if(!canFetch(Kernel::self()->collectionType())) { - message(i18n("%1 does not allow searching for this collection type.").tqarg(source()), MessageHandler::Warning); + message(i18n("%1 does not allow searching for this collection type.").arg(source()), MessageHandler::Warning); stop(); return; } @@ -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").arg(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; } |