summaryrefslogtreecommitdiffstats
path: root/src/fetch/execexternalfetcher.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-18 18:15:24 -0600
committerTimothy Pearson <[email protected]>2011-12-18 18:15:24 -0600
commit8d9b90ca794ffabf151719c2edebe9278a2d3f36 (patch)
tree55f446de8694c45be6bf0f1178920c2b92b0c9f5 /src/fetch/execexternalfetcher.cpp
parent2781e27b871150395a5a82e221684108641002b2 (diff)
downloadtellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.tar.gz
tellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'src/fetch/execexternalfetcher.cpp')
-rw-r--r--src/fetch/execexternalfetcher.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/fetch/execexternalfetcher.cpp b/src/fetch/execexternalfetcher.cpp
index 630abc9..0aeecbe 100644
--- a/src/fetch/execexternalfetcher.cpp
+++ b/src/fetch/execexternalfetcher.cpp
@@ -42,10 +42,10 @@ using Tellico::Fetch::ExecExternalFetcher;
TQStringList ExecExternalFetcher::parseArguments(const TQString& str_) {
// matching escaped quotes is too hard... :(
-// TQRegExp quotes(TQString::tqfromLatin1("[^\\\\](['\"])(.*[^\\\\])\\1"));
- TQRegExp quotes(TQString::tqfromLatin1("(['\"])(.*)\\1"));
+// TQRegExp quotes(TQString::fromLatin1("[^\\\\](['\"])(.*[^\\\\])\\1"));
+ TQRegExp quotes(TQString::fromLatin1("(['\"])(.*)\\1"));
quotes.setMinimal(true);
- TQRegExp spaces(TQString::tqfromLatin1("\\s+"));
+ TQRegExp spaces(TQString::fromLatin1("\\s+"));
spaces.setMinimal(true);
TQStringList args;
@@ -139,13 +139,13 @@ void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
value.remove('-'); // remove hyphens from isbn values
// shouldn't hurt and might keep from confusing stupid search sources
}
- TQRegExp rx1(TQString::tqfromLatin1("['\"].*\\1"));
+ TQRegExp rx1(TQString::fromLatin1("['\"].*\\1"));
if(!rx1.exactMatch(value)) {
value.prepend('"').append('"');
}
TQString args = m_args[key_];
- TQRegExp rx2(TQString::tqfromLatin1("['\"]%1\\1"));
- args.replace(rx2, TQString::tqfromLatin1("%1"));
+ TQRegExp rx2(TQString::fromLatin1("['\"]%1\\1"));
+ args.replace(rx2, TQString::fromLatin1("%1"));
startSearch(parseArguments(args.tqarg(value))); // replace %1 with search value
}
@@ -196,7 +196,7 @@ void ExecExternalFetcher::slotData(KProcess*, char* buffer_, int len_) {
void ExecExternalFetcher::slotError(KProcess*, char* buffer_, int len_) {
GUI::CursorSaver cs(TQt::arrowCursor);
TQString msg = TQString::fromLocal8Bit(buffer_, len_);
- msg.prepend(source() + TQString::tqfromLatin1(": "));
+ msg.prepend(source() + TQString::fromLatin1(": "));
if(msg.endsWith(TQChar('\n'))) {
msg.truncate(msg.length()-1);
}
@@ -235,7 +235,7 @@ void ExecExternalFetcher::slotProcessExited(KProcess*) {
Data::CollPtr coll = imp->collection();
if(!coll) {
if(!imp->statusMessage().isEmpty()) {
- message(imp->statusMessage(), MessageHandler::tqStatus);
+ message(imp->statusMessage(), MessageHandler::Status);
}
myDebug() << "ExecExternalFetcher::slotProcessExited() - "<< source() << ": no collection pointer" << endl;
delete imp;
@@ -256,56 +256,56 @@ void ExecExternalFetcher::slotProcessExited(KProcess*) {
switch(coll->type()) {
case Data::Collection::Book:
case Data::Collection::Bibtex:
- desc = entry->field(TQString::tqfromLatin1("author"))
+ desc = entry->field(TQString::fromLatin1("author"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"));
- if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
- } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
- desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("publisher"));
+ if(!entry->field(TQString::fromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("cr_year"));
+ } else if(!entry->field(TQString::fromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::fromLatin1("pub_year"));
}
break;
case Data::Collection::Video:
- desc = entry->field(TQString::tqfromLatin1("studio"))
+ desc = entry->field(TQString::fromLatin1("studio"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("director"))
+ + entry->field(TQString::fromLatin1("director"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"))
+ + entry->field(TQString::fromLatin1("year"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("medium"));
+ + entry->field(TQString::fromLatin1("medium"));
break;
case Data::Collection::Album:
- desc = entry->field(TQString::tqfromLatin1("artist"))
+ desc = entry->field(TQString::fromLatin1("artist"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("label"))
+ + entry->field(TQString::fromLatin1("label"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
case Data::Collection::Game:
- desc = entry->field(TQString::tqfromLatin1("platform"));
+ desc = entry->field(TQString::fromLatin1("platform"));
break;
case Data::Collection::ComicBook:
- desc = entry->field(TQString::tqfromLatin1("publisher"))
+ desc = entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("pub_year"));
+ + entry->field(TQString::fromLatin1("pub_year"));
break;
case Data::Collection::BoardGame:
- desc = entry->field(TQString::tqfromLatin1("designer"))
+ desc = entry->field(TQString::fromLatin1("designer"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("publisher"))
+ + entry->field(TQString::fromLatin1("publisher"))
+ TQChar('/')
- + entry->field(TQString::tqfromLatin1("year"));
+ + entry->field(TQString::fromLatin1("year"));
break;
default:
break;
}
- 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, entry);
emit signalResultFound(r);
}
@@ -398,8 +398,8 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt
gridLayout->addWidget(cb, ++row, 0);
m_cbDict.insert(key, cb);
GUI::LineEdit* le = new GUI::LineEdit(grid);
- le->setHint(TQString::tqfromLatin1("%1")); // for example
- le->completionObject()->addItem(TQString::tqfromLatin1("%1"));
+ le->setHint(TQString::fromLatin1("%1")); // for example
+ le->completionObject()->addItem(TQString::fromLatin1("%1"));
gridLayout->addWidget(le, row, 1);
m_leDict.insert(key, le);
if(fetcher_ && fetcher_->m_args.contains(key)) {
@@ -417,9 +417,9 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt
m_cbUpdate = new TQCheckBox(i18n("Update"), grid);
gridLayout->addWidget(m_cbUpdate, ++row, 0);
m_leUpdate = new GUI::LineEdit(grid);
- m_leUpdate->setHint(TQString::tqfromLatin1("%{title}")); // for example
- m_leUpdate->completionObject()->addItem(TQString::tqfromLatin1("%{title}"));
- m_leUpdate->completionObject()->addItem(TQString::tqfromLatin1("%{isbn}"));
+ m_leUpdate->setHint(TQString::fromLatin1("%{title}")); // for example
+ m_leUpdate->completionObject()->addItem(TQString::fromLatin1("%{title}"));
+ m_leUpdate->completionObject()->addItem(TQString::fromLatin1("%{isbn}"));
gridLayout->addWidget(m_leUpdate, row, 1);
/* TRANSLATORS: Do not translate %{author}. */
w2 = i18n("<p>Enter the arguments which should be used to search for available updates to an entry.</p><p>"