summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit0254ebaa5e056092461fd585b6851d15faa43035 (patch)
tree2bf41a1c189b92dc1b9ab89e3ce392f8132214c4
parentfa071926f015f39711632b3fb9fe16004d93d0ec (diff)
downloadtellico-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
-rw-r--r--src/borrowerdialog.cpp2
-rw-r--r--src/borroweritem.cpp2
-rw-r--r--src/calendarhandler.cpp2
-rw-r--r--src/collection.cpp42
-rw-r--r--src/collectionfieldsdialog.cpp14
-rw-r--r--src/collections/bibtexcollection.cpp2
-rw-r--r--src/configdialog.cpp24
-rw-r--r--src/controller.cpp4
-rw-r--r--src/core/dcopinterface_skel.cpp4
-rw-r--r--src/core/netaccess.cpp2
-rw-r--r--src/detailedlistview.cpp8
-rw-r--r--src/document.cpp2
-rw-r--r--src/document.h2
-rw-r--r--src/entry.cpp24
-rw-r--r--src/entryeditdialog.cpp22
-rw-r--r--src/entryiconview.cpp2
-rw-r--r--src/entryview.cpp4
-rw-r--r--src/fetch/amazonfetcher.cpp28
-rw-r--r--src/fetch/animenfofetcher.cpp6
-rw-r--r--src/fetch/configwidget.cpp2
-rw-r--r--src/fetch/discogsfetcher.cpp4
-rw-r--r--src/fetch/entrezfetcher.cpp6
-rw-r--r--src/fetch/execexternalfetcher.cpp10
-rw-r--r--src/fetch/execexternalfetcher.h2
-rw-r--r--src/fetch/fetchmanager.cpp14
-rw-r--r--src/fetch/gcstarpluginfetcher.cpp6
-rw-r--r--src/fetch/googlescholarfetcher.cpp2
-rw-r--r--src/fetch/ibsfetcher.cpp14
-rw-r--r--src/fetch/imdbfetcher.cpp112
-rw-r--r--src/fetch/scripts/dark_horse_comics.py2
-rw-r--r--src/fetch/scripts/ministerio_de_cultura.py6
-rw-r--r--src/fetch/srufetcher.cpp4
-rw-r--r--src/fetch/yahoofetcher.cpp2
-rw-r--r--src/fetch/z3950fetcher.cpp4
-rw-r--r--src/fetchdialog.cpp8
-rw-r--r--src/field.cpp34
-rw-r--r--src/filter.cpp18
-rw-r--r--src/filter.h2
-rw-r--r--src/filterdialog.cpp2
-rw-r--r--src/filterview.cpp2
-rw-r--r--src/groupview.cpp4
-rw-r--r--src/gui/fieldwidget.cpp2
-rw-r--r--src/gui/imagewidget.cpp2
-rw-r--r--src/gui/kwidgetlister.cpp2
-rw-r--r--src/gui/linefieldwidget.cpp2
-rw-r--r--src/gui/listview.cpp8
-rw-r--r--src/gui/numberfieldwidget.cpp2
-rw-r--r--src/gui/parafieldwidget.cpp4
-rw-r--r--src/gui/ratingwidget.cpp2
-rw-r--r--src/imagefactory.cpp28
-rw-r--r--src/isbnvalidator.cpp34
-rw-r--r--src/lccnvalidator.cpp2
-rw-r--r--src/loandialog.cpp2
-rw-r--r--src/mainwindow.cpp30
-rw-r--r--src/newstuff/dialog.cpp2
-rw-r--r--src/progressmanager.cpp8
-rw-r--r--src/ptrvector.h8
-rw-r--r--src/reportdialog.cpp2
-rw-r--r--src/stringset.h4
-rw-r--r--src/tellico_utils.cpp4
-rw-r--r--src/translators/alexandriaexporter.cpp2
-rw-r--r--src/translators/alexandriaimporter.cpp10
-rw-r--r--src/translators/amcimporter.cpp10
-rw-r--r--src/translators/audiofileimporter.cpp2
-rw-r--r--src/translators/bibtexexporter.cpp6
-rw-r--r--src/translators/bibtexhandler.cpp22
-rw-r--r--src/translators/bibteximporter.cpp6
-rw-r--r--src/translators/btparse/btparse.h4
-rw-r--r--src/translators/btparse/parse_auxiliary.c6
-rw-r--r--src/translators/btparse/postprocess.c20
-rw-r--r--src/translators/btparse/sym.c2
-rw-r--r--src/translators/csvexporter.cpp6
-rw-r--r--src/translators/csvimporter.cpp2
-rw-r--r--src/translators/dcimporter.cpp2
-rw-r--r--src/translators/freedbimporter.cpp6
-rw-r--r--src/translators/gcfilmsexporter.cpp2
-rw-r--r--src/translators/gcfilmsimporter.cpp4
-rwxr-xr-xsrc/translators/griffith2tellico.py6
-rw-r--r--src/translators/grs1importer.cpp4
-rw-r--r--src/translators/htmlexporter.cpp12
-rw-r--r--src/translators/pilotdbexporter.cpp6
-rw-r--r--src/translators/risimporter.cpp6
-rw-r--r--src/translators/tellico_xml.cpp2
-rw-r--r--src/translators/tellicoimporter.cpp8
-rw-r--r--src/translators/tellicoxmlexporter.cpp8
-rw-r--r--src/translators/xslthandler.cpp6
-rw-r--r--src/translators/xsltimporter.cpp2
-rw-r--r--src/upcvalidator.cpp12
88 files changed, 394 insertions, 394 deletions
diff --git a/src/borrowerdialog.cpp b/src/borrowerdialog.cpp
index 9969be4..f25416a 100644
--- a/src/borrowerdialog.cpp
+++ b/src/borrowerdialog.cpp
@@ -104,7 +104,7 @@ void BorrowerDialog::selectItem(const TQString& str_) {
return;
}
- TQListViewItem* item = m_itemDict.tqfind(str_);
+ TQListViewItem* item = m_itemDict.find(str_);
if(item) {
m_listView->blockSignals(true);
m_listView->setSelected(item, true);
diff --git a/src/borroweritem.cpp b/src/borroweritem.cpp
index 13d82ca..798cbd5 100644
--- a/src/borroweritem.cpp
+++ b/src/borroweritem.cpp
@@ -32,7 +32,7 @@ int BorrowerItem::count() const {
Tellico::Data::EntryVec BorrowerItem::entries() const {
Data::EntryVec entries;
for(Data::LoanVec::ConstIterator loan = m_borrower->loans().begin(); loan != m_borrower->loans().end(); ++loan) {
- if(!entries.tqcontains(loan->entry())) {
+ if(!entries.contains(loan->entry())) {
entries.append(loan->entry());
}
}
diff --git a/src/calendarhandler.cpp b/src/calendarhandler.cpp
index b377485..5a88ac8 100644
--- a/src/calendarhandler.cpp
+++ b/src/calendarhandler.cpp
@@ -239,7 +239,7 @@ TQString CalendarHandler::timezone() {
int len = ::readlink("/etc/localtime", zonefilebuf, PATH_MAX);
if(len > 0 && len < PATH_MAX) {
zone = TQString::fromLocal8Bit(zonefilebuf, len);
- zone = zone.mid(zone.tqfind(TQString::tqfromLatin1("zoneinfo/")) + 9);
+ zone = zone.mid(zone.find(TQString::tqfromLatin1("zoneinfo/")) + 9);
} else {
tzset();
zone = tzname[0];
diff --git a/src/collection.cpp b/src/collection.cpp
index 2e194ea..02200ff 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -76,7 +76,7 @@ bool Collection::addField(FieldPtr field_) {
m_peopleFields.append(field_); // list of people attributes
if(m_peopleFields.count() > 1) {
// the second time that a person field is added, add a "pseudo-group" for people
- if(m_entryGroupDicts.tqfind(s_peopleGroupName) == 0) {
+ if(m_entryGroupDicts.find(s_peopleGroupName) == 0) {
EntryGroupDict* d = new EntryGroupDict();
d->setAutoDelete(true);
m_entryGroupDicts.insert(s_peopleGroupName, d);
@@ -92,7 +92,7 @@ bool Collection::addField(FieldPtr field_) {
m_imageFields.append(field_);
}
- if(!field_->category().isEmpty() && m_fieldCategories.tqfindIndex(field_->category()) == -1) {
+ if(!field_->category().isEmpty() && m_fieldCategories.findIndex(field_->category()) == -1) {
m_fieldCategories << field_->category();
}
@@ -149,7 +149,7 @@ bool Collection::mergeField(FieldPtr newField_) {
TQStringList allowed = currField->allowed();
const TQStringList& newAllowed = newField_->allowed();
for(TQStringList::ConstIterator it = newAllowed.begin(); it != newAllowed.end(); ++it) {
- if(allowed.tqfindIndex(*it) == -1) {
+ if(allowed.findIndex(*it) == -1) {
allowed.append(*it);
}
}
@@ -216,13 +216,13 @@ bool Collection::modifyField(FieldPtr newField_) {
}
// update name dict
- m_fieldNameDict.tqreplace(fieldName, newField_);
+ m_fieldNameDict.replace(fieldName, newField_);
// update titles
const TQString oldTitle = oldField->title();
const TQString newTitle = newField_->title();
if(oldTitle == newTitle) {
- m_fieldTitleDict.tqreplace(newTitle, newField_);
+ m_fieldTitleDict.replace(newTitle, newField_);
} else {
m_fieldTitleDict.remove(oldTitle);
m_fieldTitles.remove(oldTitle);
@@ -231,7 +231,7 @@ bool Collection::modifyField(FieldPtr newField_) {
}
// now replace the field pointer in the list
- FieldVec::Iterator it = m_fields.tqfind(oldField);
+ FieldVec::Iterator it = m_fields.find(oldField);
if(it != m_fields.end()) {
m_fields.insert(it, newField_);
m_fields.remove(oldField);
@@ -245,7 +245,7 @@ bool Collection::modifyField(FieldPtr newField_) {
m_fieldCategories.clear();
for(FieldVec::Iterator it = m_fields.begin(); it != m_fields.end(); ++it) {
// add category if it's not in the list yet
- if(!it->category().isEmpty() && !m_fieldCategories.tqcontains(it->category())) {
+ if(!it->category().isEmpty() && !m_fieldCategories.contains(it->category())) {
m_fieldCategories += it->category();
}
}
@@ -279,7 +279,7 @@ bool Collection::modifyField(FieldPtr newField_) {
}
if(isPeople) {
// if there's more than one people field and no people dict exists yet, add it
- if(m_peopleFields.count() > 1 && m_entryGroupDicts.tqfind(s_peopleGroupName) == 0) {
+ if(m_peopleFields.count() > 1 && m_entryGroupDicts.find(s_peopleGroupName) == 0) {
EntryGroupDict* d = new EntryGroupDict();
d->setAutoDelete(true);
m_entryGroupDicts.insert(s_peopleGroupName, d);
@@ -303,7 +303,7 @@ bool Collection::modifyField(FieldPtr newField_) {
resetGroups = true;
} else {
// don't do this, it wipes out the old groups!
-// m_entryGroupDicts.tqreplace(fieldName, new EntryGroupDict());
+// m_entryGroupDicts.replace(fieldName, new EntryGroupDict());
}
} else if(isGrouped) {
EntryGroupDict* d = new EntryGroupDict();
@@ -342,7 +342,7 @@ bool Collection::removeField(const TQString& name_, bool force_) {
// force allows me to force the deleting of the title field if I need to
bool Collection::removeField(FieldPtr field_, bool force_/*=false*/) {
- if(!field_ || !m_fields.tqcontains(field_)) {
+ if(!field_ || !m_fields.contains(field_)) {
if(field_) {
myDebug() << "Collection::removeField - false: " << field_->name() << endl;
}
@@ -406,7 +406,7 @@ void Collection::reorderFields(const FieldVec& list_) {
// also reset category list, since the order may have changed
m_fieldCategories.clear();
for(FieldVec::Iterator it = m_fields.begin(); it != m_fields.end(); ++it) {
- if(!it->category().isEmpty() && !m_fieldCategories.tqcontains(it->category())) {
+ if(!it->category().isEmpty() && !m_fieldCategories.contains(it->category())) {
m_fieldCategories << it->category();
}
}
@@ -432,7 +432,7 @@ void Collection::addEntries(EntryVec entries_) {
} else if(entry->id() == -1) {
entry->setId(m_nextEntryId);
++m_nextEntryId;
- } else if(m_entryIdDict.tqfind(entry->id())) {
+ } else if(m_entryIdDict.find(entry->id())) {
if(!foster) {
myDebug() << "Collection::addEntries() - the collection already has an entry with id = " << entry->id() << endl;
}
@@ -452,10 +452,10 @@ void Collection::removeEntriesFromDicts(EntryVec entries_) {
// need a copy of the vector since it gets changed
PtrVector<EntryGroup> groups = entry->groups();
for(PtrVector<EntryGroup>::Iterator group = groups.begin(); group != groups.end(); ++group) {
- if(entry->removeFromGroup(group.ptr()) && !modifiedGroups.tqcontains(group.ptr())) {
+ if(entry->removeFromGroup(group.ptr()) && !modifiedGroups.contains(group.ptr())) {
modifiedGroups.push_back(group.ptr());
}
- if(group->isEmpty() && !m_groupsToDelete.tqcontains(group.ptr())) {
+ if(group->isEmpty() && !m_groupsToDelete.contains(group.ptr())) {
m_groupsToDelete.push_back(group.ptr());
}
}
@@ -494,7 +494,7 @@ bool Collection::removeEntries(EntryVec vec_) {
Tellico::Data::FieldVec Collection::fieldsByCategory(const TQString& cat_) {
#ifndef NDEBUG
- if(m_fieldCategories.tqfindIndex(cat_) == -1) {
+ if(m_fieldCategories.findIndex(cat_) == -1) {
myDebug() << "Collection::fieldsByCategory() - '" << cat_ << "' is not in category list" << endl;
}
#endif
@@ -554,11 +554,11 @@ TQStringList Collection::valuesByFieldName(const TQString& name_) const {
}
Tellico::Data::FieldPtr Collection::fieldByName(const TQString& name_) const {
- return m_fieldNameDict.isEmpty() ? 0 : name_.isEmpty() ? 0 : m_fieldNameDict.tqfind(name_);
+ return m_fieldNameDict.isEmpty() ? 0 : name_.isEmpty() ? 0 : m_fieldNameDict.find(name_);
}
Tellico::Data::FieldPtr Collection::fieldByTitle(const TQString& title_) const {
- return m_fieldTitleDict.isEmpty() ? 0 : title_.isEmpty() ? 0 : m_fieldTitleDict.tqfind(title_);
+ return m_fieldTitleDict.isEmpty() ? 0 : title_.isEmpty() ? 0 : m_fieldTitleDict.find(title_);
}
bool Collection::hasField(const TQString& name_) const {
@@ -575,7 +575,7 @@ bool Collection::isAllowed(const TQString& key_, const TQString& value_) const {
FieldPtr field = fieldByName(key_);
// if the type is not multiple choice or if value_ is allowed, return true
- if(field && (field->type() != Field::Choice || field->allowed().tqfindIndex(value_) > -1)) {
+ if(field && (field->type() != Field::Choice || field->allowed().findIndex(value_) > -1)) {
return true;
}
@@ -587,7 +587,7 @@ Tellico::Data::EntryGroupDict* Collection::entryGroupDictByName(const TQString&
if(name_.isEmpty()) {
return 0;
}
- EntryGroupDict* dict = m_entryGroupDicts.isEmpty() ? 0 : m_entryGroupDicts.tqfind(name_);
+ EntryGroupDict* dict = m_entryGroupDicts.isEmpty() ? 0 : m_entryGroupDicts.find(name_);
if(dict && dict->isEmpty()) {
GUI::CursorSaver cs;
const bool b = signalsBlocked();
@@ -613,7 +613,7 @@ void Collection::populateDict(EntryGroupDict* dict_, const TQString& fieldName_,
if(isBool && groupTitle != i18n(s_emptyGroupTitle)) {
groupTitle = fieldTitleByName(fieldName_);
}
- EntryGroup* group = dict_->tqfind(groupTitle);
+ EntryGroup* group = dict_->find(groupTitle);
// if the group doesn't exist, create it
if(!group) {
group = new EntryGroup(groupTitle, fieldName_);
@@ -886,7 +886,7 @@ bool Collection::mergeEntry(EntryPtr e1, EntryPtr e2, bool overwrite_, bool askU
TQStringList items2 = e2->fields(field, false);
for(TQStringList::ConstIterator it = items2.begin(); it != items2.end(); ++it) {
// possible to have one value formatted and the other one not...
- if(!items1.tqcontains(*it) && !items1.tqcontains(Field::format(*it, field->formatFlag()))) {
+ if(!items1.contains(*it) && !items1.contains(Field::format(*it, field->formatFlag()))) {
items1.append(*it);
}
}
diff --git a/src/collectionfieldsdialog.cpp b/src/collectionfieldsdialog.cpp
index ab68873..3491bb4 100644
--- a/src/collectionfieldsdialog.cpp
+++ b/src/collectionfieldsdialog.cpp
@@ -313,7 +313,7 @@ void CollectionFieldsDialog::applyChanges() {
TQStringList oldValues = m_coll->fieldByName(field->name())->allowed();
TQStringList newValues = field->allowed();
for(TQStringList::ConstIterator vIt = oldValues.begin(); vIt != oldValues.end(); ++vIt) {
- if(newValues.tqcontains(*vIt)) {
+ if(newValues.contains(*vIt)) {
continue;
}
int ret = KMessageBox::warningContinueCancel(this,
@@ -407,7 +407,7 @@ void CollectionFieldsDialog::slotNew() {
TQString name = TQString::tqfromLatin1("custom") + TQString::number(m_newFields.count()+1);
int count = m_newFields.count() + 1;
TQString title = i18n("New Field") + TQString::tqfromLatin1(" %1").tqarg(count);
- while(m_fieldsBox->tqfindItem(title)) {
+ while(m_fieldsBox->findItem(title)) {
++count;
title = i18n("New Field") + TQString::tqfromLatin1(" %1").tqarg(count);
}
@@ -432,7 +432,7 @@ void CollectionFieldsDialog::slotDelete() {
return;
}
- if(m_newFields.tqcontains(m_currentField)) {
+ if(m_newFields.contains(m_currentField)) {
// remove field from vector before deleting item containing field
m_newFields.remove(m_currentField);
m_fieldsBox->removeItem(m_fieldsBox->currentItem());
@@ -533,7 +533,7 @@ void CollectionFieldsDialog::slotHighlightedChanged(int index_) {
// type is limited to certain types, unless it's a new field
m_typeCombo->clear();
- if(m_newFields.tqcontains(field)) {
+ if(m_newFields.contains(field)) {
m_typeCombo->insertStringList(newTypesAllowed(Data::Field::Undef));
} else {
m_typeCombo->insertStringList(newTypesAllowed(field->type()));
@@ -601,7 +601,7 @@ void CollectionFieldsDialog::updateField() {
}
// only update name if it's one of the new ones
- if(m_newFields.tqcontains(field)) {
+ if(m_newFields.contains(field)) {
// name needs to be a valid XML element name
TQString name = XML::elementName(m_titleEdit->text().lower());
if(name.isEmpty()) { // might end up with empty string
@@ -699,13 +699,13 @@ void CollectionFieldsDialog::slotModified() {
static_cast<FieldListBox*>(m_fieldsBox->selectedItem())->setColored(true);
// check if copy exists already
- if(m_copiedFields.tqcontains(m_currentField)) {
+ if(m_copiedFields.contains(m_currentField)) {
return;
}
// or, check if is a new field, in which case no copy is needed
// check if copy exists already
- if(m_newFields.tqcontains(m_currentField)) {
+ if(m_newFields.contains(m_currentField)) {
return;
}
diff --git a/src/collections/bibtexcollection.cpp b/src/collections/bibtexcollection.cpp
index 4218a3c..dbe34ff 100644
--- a/src/collections/bibtexcollection.cpp
+++ b/src/collections/bibtexcollection.cpp
@@ -289,7 +289,7 @@ bool BibtexCollection::deleteField(FieldPtr field_, bool force_) {
}
Tellico::Data::FieldPtr BibtexCollection::fieldByBibtexName(const TQString& bibtex_) const {
- return m_bibtexFieldDict.isEmpty() ? 0 : m_bibtexFieldDict.tqfind(bibtex_);
+ return m_bibtexFieldDict.isEmpty() ? 0 : m_bibtexFieldDict.find(bibtex_);
}
// same as BookCollection::sameEntry()
diff --git a/src/configdialog.cpp b/src/configdialog.cpp
index edf0b6d..609aae4 100644
--- a/src/configdialog.cpp
+++ b/src/configdialog.cpp
@@ -590,10 +590,10 @@ void ConfigDialog::readGeneralConfig() {
const TQRegExp comma(TQString::tqfromLatin1("\\s*,\\s*"));
const TQString semicolon = TQString::tqfromLatin1("; ");
- m_leCapitals->setText(Config::noCapitalizationString().tqreplace(comma, semicolon));
- m_leArticles->setText(Config::articlesString().tqreplace(comma, semicolon));
- m_leSuffixes->setText(Config::nameSuffixesString().tqreplace(comma, semicolon));
- m_lePrefixes->setText(Config::surnamePrefixesString().tqreplace(comma, semicolon));
+ m_leCapitals->setText(Config::noCapitalizationString().replace(comma, semicolon));
+ m_leArticles->setText(Config::articlesString().replace(comma, semicolon));
+ m_leSuffixes->setText(Config::nameSuffixesString().replace(comma, semicolon));
+ m_lePrefixes->setText(Config::surnamePrefixesString().replace(comma, semicolon));
}
void ConfigDialog::readPrintingConfig() {
@@ -608,7 +608,7 @@ void ConfigDialog::readTemplateConfig() {
// entry template selection
const int collType = Kernel::self()->collectionType();
TQString file = Config::templateName(collType);
- file.tqreplace('_', ' ');
+ file.replace('_', ' ');
TQString fileContext = file + TQString::tqfromLatin1(" XSL Template");
m_templateCombo->setCurrentItem(i18n(fileContext.utf8(), file.utf8()));
@@ -668,11 +668,11 @@ void ConfigDialog::saveConfiguration() {
const TQRegExp semicolon(TQString::tqfromLatin1("\\s*;\\s*"));
const TQChar comma = ',';
- Config::setNoCapitalizationString(m_leCapitals->text().tqreplace(semicolon, comma));
- Config::setArticlesString(m_leArticles->text().tqreplace(semicolon, comma));
+ Config::setNoCapitalizationString(m_leCapitals->text().replace(semicolon, comma));
+ Config::setArticlesString(m_leArticles->text().replace(semicolon, comma));
Data::Field::articlesUpdated();
- Config::setNameSuffixesString(m_leSuffixes->text().tqreplace(semicolon, comma));
- Config::setSurnamePrefixesString(m_lePrefixes->text().tqreplace(semicolon, comma));
+ Config::setNameSuffixesString(m_leSuffixes->text().replace(semicolon, comma));
+ Config::setSurnamePrefixesString(m_lePrefixes->text().replace(semicolon, comma));
Config::setPrintFieldHeaders(m_cbPrintHeaders->isChecked());
Config::setPrintFormatted(m_cbPrintFormatted->isChecked());
@@ -797,7 +797,7 @@ void ConfigDialog::slotModifySourceClicked() {
}
Fetch::ConfigWidget* cw = 0;
- if(m_configWidgets.tqcontains(item)) {
+ if(m_configWidgets.contains(item)) {
cw = m_configWidgets[item];
}
if(!cw) {
@@ -997,7 +997,7 @@ void ConfigDialog::loadTemplateList() {
TQFileInfo fi(*it);
TQString file = fi.fileName().section('.', 0, -2);
TQString name = file;
- name.tqreplace('_', ' ');
+ name.replace('_', ' ');
TQString title = i18n((name + TQString::tqfromLatin1(" XSL Template")).utf8(), name.utf8());
templates.insert(title, file);
}
@@ -1042,7 +1042,7 @@ void ConfigDialog::slotDeleteTemplate() {
for(TQStringList::Iterator it = files.begin(); it != files.end(); ++it) {
(*it).truncate((*it).length()-4); // remove ".xsl"
TQString name = (*it);
- name.tqreplace('_', ' ');
+ name.replace('_', ' ');
nameFileMap.insert(name, *it);
}
bool ok;
diff --git a/src/controller.cpp b/src/controller.cpp
index 1713047..948d7c0 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -577,7 +577,7 @@ void Controller::plugUpdateMenu(TQPopupMenu* popup_) {
TQPopupMenu* updatePopup = 0;
const uint count = popup_->count();
for(uint i = 0; i < count; ++i) {
- TQMenuItem* item = popup_->tqfindItem(popup_->idAt(i));
+ TQMenuItem* item = popup_->findItem(popup_->idAt(i));
if(item && item->text() == m_mainWindow->m_updateEntryMenu->text()) {
updatePopup = item->popup();
break;
@@ -679,7 +679,7 @@ void Controller::slotCheckOut() {
for(Data::BorrowerVec::ConstIterator it = borrowers.begin(); it != borrowers.end(); ++it) {
const Data::LoanVec& loans = it->loans();
for(Data::LoanVec::ConstIterator it2 = loans.begin(); it2 != loans.end(); ++it2) {
- if(m_selectedEntries.tqcontains(it2->entry())) {
+ if(m_selectedEntries.contains(it2->entry())) {
alreadyLoaned.insert(it2->entry()->title(), it2->entry());
}
}
diff --git a/src/core/dcopinterface_skel.cpp b/src/core/dcopinterface_skel.cpp
index 49bdce0..8de56bf 100644
--- a/src/core/dcopinterface_skel.cpp
+++ b/src/core/dcopinterface_skel.cpp
@@ -58,7 +58,7 @@ bool ApplicationInterface::process(const TQCString &fun, const TQByteArray &data
for ( int i = 0; ApplicationInterface_ftable[i][1]; i++ )
fdict->insert( ApplicationInterface_ftable[i][1], new int( i ) );
}
- int* fp = fdict->tqfind( fun );
+ int* fp = fdict->find( fun );
switch ( fp?*fp:-1) {
case 0: { // bool importTellico(TQString,TQString)
TQString arg0;
@@ -262,7 +262,7 @@ bool CollectionInterface::process(const TQCString &fun, const TQByteArray &data,
for ( int i = 0; CollectionInterface_ftable[i][1]; i++ )
fdict->insert( CollectionInterface_ftable[i][1], new int( i ) );
}
- int* fp = fdict->tqfind( fun );
+ int* fp = fdict->find( fun );
switch ( fp?*fp:-1) {
case 0: { // long int addEntry()
replyType = CollectionInterface_ftable[0][0];
diff --git a/src/core/netaccess.cpp b/src/core/netaccess.cpp
index ef756cc..ea644ba 100644
--- a/src/core/netaccess.cpp
+++ b/src/core/netaccess.cpp
@@ -61,7 +61,7 @@ void NetAccess::removeTempFile(const TQString& name_) {
if(!s_tmpFiles) {
return;
}
- if(s_tmpFiles->tqcontains(name_)) {
+ if(s_tmpFiles->contains(name_)) {
::unlink(TQFile::encodeName(name_));
s_tmpFiles->remove(name_);
}
diff --git a/src/detailedlistview.cpp b/src/detailedlistview.cpp
index 8590126..93b6894 100644
--- a/src/detailedlistview.cpp
+++ b/src/detailedlistview.cpp
@@ -129,7 +129,7 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
// only need to shift by number of "holes"
TQValueList<int> newOrder;
for(TQValueList<int>::ConstIterator it = colOrder.begin(); it != colOrder.end(); ++it) {
- if(removeCols.tqfindIndex(*it) == -1) {
+ if(removeCols.findIndex(*it) == -1) {
int i = *it;
for(uint j = 0; j < removeCols.count() && removeCols[j] < i; ++j) {
--i;
@@ -142,7 +142,7 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
bool none = true;
Data::FieldVec fields = coll_->fields();
for(Data::FieldVec::Iterator fIt = fields.begin(); fIt != fields.end(); ++fIt) {
- if(colNames.tqfindIndex(fIt->name()) > -1 && colWidths.count() > 0) {
+ if(colNames.findIndex(fIt->name()) > -1 && colWidths.count() > 0) {
addField(fIt, colWidths.front());
if(none && colWidths.front() != 0) {
none = false;
@@ -153,7 +153,7 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
}
}
if(none && columns() > 0 && !colNames.isEmpty()) {
- showColumn(coll_->fieldNames().tqfindIndex(colNames[0]));
+ showColumn(coll_->fieldNames().findIndex(colNames[0]));
}
TQValueList<int>::ConstIterator it = colOrder.begin();
@@ -666,7 +666,7 @@ void DetailedListView::reorderFields(const Data::FieldVec& fields_) {
TQStringList visible = visibleColumns();
for( ; it != fields_.end() && sec < columns(); ++sec, ++it) {
header()->setLabel(sec, it->title());
- bool isVisible = (visible.tqfindIndex(it->title()) > -1);
+ bool isVisible = (visible.findIndex(it->title()) > -1);
m_headerMenu->changeItem(m_headerMenu->idAt(sec+1), it->title());
m_headerMenu->setItemChecked(m_headerMenu->idAt(sec+1), isVisible);
m_columnWidths[sec] = 0;
diff --git a/src/document.cpp b/src/document.cpp
index 2d051a7..178b9e8 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -411,7 +411,7 @@ void Document::unMergeCollection(CollPtr coll_, FieldVec origFields_, MergePair
// don't removeField() until after removeEntry() is done
FieldVec currFields = m_coll->fields();
for(FieldVec::Iterator field = currFields.begin(); field != currFields.end(); ++field) {
- if(origFieldNames.tqfindIndex(field->name()) == -1) {
+ if(origFieldNames.findIndex(field->name()) == -1) {
m_coll->removeField(field);
}
}
diff --git a/src/document.h b/src/document.h
index 2481df9..e0ca467 100644
--- a/src/document.h
+++ b/src/document.h
@@ -32,7 +32,7 @@ namespace Tellico {
/**
* The Document contains everything needed to deal with the contents, thus separated from
- * the viewer, the Tellico object. It can take of opening and saving documents, and tqcontains
+ * the viewer, the Tellico object. It can take of opening and saving documents, and contains
* a list of the collections in the document.
*
* @author Robby Stephenson
diff --git a/src/entry.cpp b/src/entry.cpp
index c733608..136fb49 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -66,7 +66,7 @@ bool Entry::operator==(const Entry& e1) {
return false;
}
for(StringMap::ConstIterator it = e1.m_fields.begin(); it != e1.m_fields.end(); ++it) {
- if(!m_fields.tqcontains(it.key()) || m_fields[it.key()] != it.data()) {
+ if(!m_fields.contains(it.key()) || m_fields[it.key()] != it.data()) {
return false;
}
}
@@ -155,7 +155,7 @@ TQString Entry::field(const TQString& fieldName_, bool formatted_/*=false*/) con
return dependentValue(this, f->description(), false);
}
- if(!m_fields.isEmpty() && m_fields.tqcontains(fieldName_)) {
+ if(!m_fields.isEmpty() && m_fields.contains(fieldName_)) {
return m_fields[fieldName_];
}
return TQString();
@@ -186,7 +186,7 @@ TQString Entry::formattedField(const TQString& fieldName_) const {
return field(fieldName_);
}
- if(m_formattedFields.isEmpty() || !m_formattedFields.tqcontains(fieldName_)) {
+ if(m_formattedFields.isEmpty() || !m_formattedFields.contains(fieldName_)) {
TQString value = field(fieldName_);
if(!value.isEmpty()) {
// special for Bibtex collections
@@ -225,7 +225,7 @@ bool Entry::setField(const TQString& name_, const TQString& value_) {
}
// an empty value means remove the field
if(value_.isEmpty()) {
- if(!m_fields.isEmpty() && m_fields.tqcontains(name_)) {
+ if(!m_fields.isEmpty() && m_fields.contains(name_)) {
m_fields.remove(name_);
}
invalidateFormattedFieldValue(name_);
@@ -264,7 +264,7 @@ bool Entry::setField(const TQString& name_, const TQString& value_) {
}
bool Entry::addToGroup(EntryGroup* group_) {
- if(!group_ || m_groups.tqcontains(group_)) {
+ if(!group_ || m_groups.contains(group_)) {
return false;
}
@@ -329,14 +329,14 @@ TQStringList Entry::groupNamesByFieldName(const TQString& fieldName_) const {
}
bool Entry::isOwned() {
- return (m_coll && m_id > -1 && m_coll->entryCount() > 0 && m_coll->entries().tqcontains(this));
+ return (m_coll && m_id > -1 && m_coll->entryCount() > 0 && m_coll->entries().contains(this));
}
// a null string means tqinvalidate all
void Entry::invalidateFormattedFieldValue(const TQString& name_) {
if(name_.isNull()) {
m_formattedFields.clear();
- } else if(!m_formattedFields.isEmpty() && m_formattedFields.tqcontains(name_)) {
+ } else if(!m_formattedFields.isEmpty() && m_formattedFields.contains(name_)) {
m_formattedFields.remove(name_);
}
}
@@ -352,10 +352,10 @@ TQString Entry::dependentValue(ConstEntryPtr entry_, const TQString& format_, bo
int endPos;
int curPos = 0;
- int pctPos = format_.tqfind('%', curPos);
+ int pctPos = format_.find('%', curPos);
while(pctPos != -1 && pctPos+1 < static_cast<int>(format_.length())) {
if(format_[pctPos+1] == '{') {
- endPos = format_.tqfind('}', pctPos+2);
+ endPos = format_.find('}', pctPos+2);
if(endPos > -1) {
result += format_.mid(curPos, pctPos-curPos);
fieldName = format_.mid(pctPos+2, endPos-pctPos-2);
@@ -380,7 +380,7 @@ TQString Entry::dependentValue(ConstEntryPtr entry_, const TQString& format_, bo
result += format_.mid(curPos, pctPos-curPos+1);
curPos = pctPos+1;
}
- pctPos = format_.tqfind('%', curPos);
+ pctPos = format_.find('%', curPos);
}
result += format_.mid(curPos, format_.length()-curPos);
// myDebug() << "Entry::dependentValue() - " << format_ << " = " << result << endl;
@@ -449,13 +449,13 @@ int Entry::compareValues(EntryPtr e1, EntryPtr e2, FieldPtr f) {
TQStringList sl2 = e2->fields(f, false);
int matches = 0;
for(TQStringList::ConstIterator it = sl1.begin(); it != sl1.end(); ++it) {
- matches += sl2.tqcontains(*it);
+ matches += sl2.contains(*it);
}
if(matches == 0 && f->formatFlag() == Field::FormatName) {
sl1 = e1->fields(f, true);
sl2 = e2->fields(f, true);
for(TQStringList::ConstIterator it = sl1.begin(); it != sl1.end(); ++it) {
- matches += sl2.tqcontains(*it);
+ matches += sl2.contains(*it);
}
}
return matches;
diff --git a/src/entryeditdialog.cpp b/src/entryeditdialog.cpp
index 442fba3..6fc90fa 100644
--- a/src/entryeditdialog.cpp
+++ b/src/entryeditdialog.cpp
@@ -165,7 +165,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// then spacing should be 5, which is set later
TQGridLayout* tqlayout = new TQGridLayout(grid, 0, NCOLS, 8, 2);
// keramik styles make big widget, cut down the spacing a bit
- if(TQCString(tqstyle().name()).lower().tqfind("keramik", 0, false) > -1) {
+ if(TQCString(tqstyle().name()).lower().find("keramik", 0, false) > -1) {
tqlayout->setSpacing(0);
}
@@ -221,7 +221,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// now, the labels in a column should all be the same width
it = fields.begin();
for(int count = 0; it != fields.end(); ++it) {
- GUI::FieldWidget* widget = m_widgetDict.tqfind(TQString::number(m_currColl->id()) + it->name());
+ GUI::FieldWidget* widget = m_widgetDict.find(TQString::number(m_currColl->id()) + it->name());
if(widget) {
widget->setLabelWidth(maxWidth[count%NCOLS]);
++count;
@@ -336,7 +336,7 @@ void EntryEditDialog::slotHandleSave() {
}
for(Data::FieldVec::Iterator fIt = fields.begin(); fIt != fields.end(); ++fIt) {
TQString key = TQString::number(m_currColl->id()) + fIt->name();
- GUI::FieldWidget* widget = m_widgetDict.tqfind(key);
+ GUI::FieldWidget* widget = m_widgetDict.find(key);
if(widget && widget->isEnabled()) {
TQString temp = widget->text();
// ok to set field empty string, just not all of them
@@ -463,7 +463,7 @@ void EntryEditDialog::setContents(Data::EntryVec entries_) {
Data::FieldVec fields = m_currColl->fields();
for(Data::FieldVec::Iterator fIt = fields.begin(); fIt != fields.end(); ++fIt) {
TQString key = TQString::number(m_currColl->id()) + fIt->name();
- GUI::FieldWidget* widget = m_widgetDict.tqfind(key);
+ GUI::FieldWidget* widget = m_widgetDict.find(key);
if(!widget) { // probably read-only
continue;
}
@@ -524,7 +524,7 @@ void EntryEditDialog::setContents(Data::EntryPtr entry_) {
Data::FieldVec fields = m_currColl->fields();
for(Data::FieldVec::Iterator field = fields.begin(); field != fields.end(); ++field) {
TQString key = TQString::number(m_currColl->id()) + field->name();
- GUI::FieldWidget* widget = m_widgetDict.tqfind(key);
+ GUI::FieldWidget* widget = m_widgetDict.find(key);
if(!widget) { // is probably read-only
continue;
}
@@ -552,13 +552,13 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
// myDebug() << "EntryEditDialog::removeField - name = " << field_->name() << endl;
TQString key = TQString::number(m_currColl->id()) + field_->name();
- GUI::FieldWidget* widget = m_widgetDict.tqfind(key);
+ GUI::FieldWidget* widget = m_widgetDict.find(key);
if(widget) {
m_widgetDict.remove(key);
// if this is the last field in the category, need to remove the tab page
// this function is called after the field has been removed from the collection,
// so the category should be gone from the category list
- if(m_currColl->fieldCategories().tqfindIndex(field_->category()) == -1) {
+ if(m_currColl->fieldCategories().findIndex(field_->category()) == -1) {
// myDebug() << "last field in the category" << endl;
// fragile, widget's tqparent is the grid, whose tqparent is the tab page
TQWidget* w = widget->parentWidget()->parentWidget();
@@ -575,7 +575,7 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
Data::FieldVec vec = m_currColl->fieldsByCategory(field_->category());
Data::FieldVec::Iterator it = vec.begin();
for(int count = 0; it != vec.end(); ++it) {
- GUI::FieldWidget* widget = m_widgetDict.tqfind(TQString::number(m_currColl->id()) + it->name());
+ GUI::FieldWidget* widget = m_widgetDict.find(TQString::number(m_currColl->id()) + it->name());
if(widget) {
tqlayout->remove(widget);
tqlayout->addWidget(widget, count/NCOLS, count%NCOLS);
@@ -592,7 +592,7 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
// now, the labels in a column should all be the same width
it = vec.begin();
for(int count = 0; it != vec.end(); ++it) {
- GUI::FieldWidget* widget = m_widgetDict.tqfind(TQString::number(m_currColl->id()) + it->name());
+ GUI::FieldWidget* widget = m_widgetDict.find(TQString::number(m_currColl->id()) + it->name());
if(widget) {
widget->setLabelWidth(maxWidth[count%NCOLS]);
++count;
@@ -625,7 +625,7 @@ void EntryEditDialog::updateCompletions(Data::EntryPtr entry_) {
}
TQString key = TQString::number(m_currColl->id()) + it->name();
- GUI::FieldWidget* widget = m_widgetDict.tqfind(key);
+ GUI::FieldWidget* widget = m_widgetDict.find(key);
if(!widget) {
continue;
}
@@ -734,7 +734,7 @@ void EntryEditDialog::modifyEntries(Data::EntryVec entries_) {
bool updateContents = false;
for(Data::EntryVecIt entry = entries_.begin(); entry != entries_.end(); ++entry) {
updateCompletions(entry);
- if(!updateContents && m_currEntries.tqcontains(entry)) {
+ if(!updateContents && m_currEntries.contains(entry)) {
updateContents = true;
}
}
diff --git a/src/entryiconview.cpp b/src/entryiconview.cpp
index 68931db..105a0b4 100644
--- a/src/entryiconview.cpp
+++ b/src/entryiconview.cpp
@@ -230,7 +230,7 @@ void EntryIconView::removeEntries(Data::EntryVec entries_) {
bool found = false;
EntryIconViewItem* item = firstItem();
while(item) {
- if(entries_.tqcontains(item->entry())) {
+ if(entries_.contains(item->entry())) {
EntryIconViewItem* prev = item;
item = item->nextItem();
delete prev;
diff --git a/src/entryview.cpp b/src/entryview.cpp
index 37659d7..0539754 100644
--- a/src/entryview.cpp
+++ b/src/entryview.cpp
@@ -207,8 +207,8 @@ void EntryView::setXSLTFile(const TQString& file_) {
const TQCString& oldBase = m_handler->param("bgcolor");
const TQCString& oldHigh = m_handler->param("color2");
// remember the string params have apostrophes on either side, so we can start search at pos == 1
- reloadImages = oldBase.tqfind(TQString(Config::templateBaseColor(type).name()).latin1(), 1) == -1
- || oldHigh.tqfind(TQString(Config::templateHighlightedBaseColor(type).name()).latin1(), 1) == -1;
+ reloadImages = oldBase.find(TQString(Config::templateBaseColor(type).name()).latin1(), 1) == -1
+ || oldHigh.find(TQString(Config::templateHighlightedBaseColor(type).name()).latin1(), 1) == -1;
}
if(!m_handler || m_xsltFile != oldFile) {
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
}
diff --git a/src/fetch/animenfofetcher.cpp b/src/fetch/animenfofetcher.cpp
index 393313a..8a938a4 100644
--- a/src/fetch/animenfofetcher.cpp
+++ b/src/fetch/animenfofetcher.cpp
@@ -288,7 +288,7 @@ Tellico::Data::EntryPtr AnimeNfoFetcher::parseEntry(const TQString& str_) {
int oldpos = -1;
for(int pos = infoRx.search(s); pos > -1; pos = infoRx.search(s, pos+1)) {
if(n == 0 && !key.isEmpty()) {
- if(fieldMap.tqcontains(key)) {
+ if(fieldMap.contains(key)) {
value = value.simplifyWhiteSpace();
if(value.length() > 2) { // might be "-"
if(key == Latin1Literal("Genres")) {
@@ -329,13 +329,13 @@ Tellico::Data::EntryPtr AnimeNfoFetcher::parseEntry(const TQString& str_) {
// now look for alternative titles and plot
const TQString a = TQString::tqfromLatin1("Alternative titles");
- pos = s.tqfind(a, oldpos+1, false);
+ pos = s.find(a, oldpos+1, false);
if(pos > -1) {
pos += a.length();
}
int pos2 = -1;
if(pos > -1) {
- pos2 = s.tqfind(TQString::tqfromLatin1("Description"), pos+1, true);
+ pos2 = s.find(TQString::tqfromLatin1("Description"), pos+1, true);
if(pos2 > -1) {
value = s.mid(pos, pos2-pos).remove(tagRx).simplifyWhiteSpace();
entry->setField(TQString::tqfromLatin1("alttitle"), value);
diff --git a/src/fetch/configwidget.cpp b/src/fetch/configwidget.cpp
index 97ff608..f67c39a 100644
--- a/src/fetch/configwidget.cpp
+++ b/src/fetch/configwidget.cpp
@@ -42,7 +42,7 @@ void ConfigWidget::addFieldsWidget(const StringMap& customFields_, const TQStrin
for(StringMap::ConstIterator it = customFields_.begin(); it != customFields_.end(); ++it) {
TQCheckBox* cb = new TQCheckBox(it.data(), box);
m_fields.insert(it.key(), cb);
- if(fieldsToAdd_.tqcontains(it.key())) {
+ if(fieldsToAdd_.contains(it.key())) {
cb->setChecked(true);
}
connect(cb, TQT_SIGNAL(clicked()), TQT_SLOT(slotSetModified()));
diff --git a/src/fetch/discogsfetcher.cpp b/src/fetch/discogsfetcher.cpp
index b569940..13341f6 100644
--- a/src/fetch/discogsfetcher.cpp
+++ b/src/fetch/discogsfetcher.cpp
@@ -289,7 +289,7 @@ Tellico::Data::EntryPtr DiscogsFetcher::fetchEntry(uint uid_) {
const StringMap customFields = this->customFields();
for(StringMap::ConstIterator it = customFields.begin(); it != customFields.end(); ++it) {
- if(!m_fields.tqcontains(it.key())) {
+ if(!m_fields.contains(it.key())) {
coll->removeField(it.key());
}
}
@@ -298,7 +298,7 @@ Tellico::Data::EntryPtr DiscogsFetcher::fetchEntry(uint uid_) {
coll->removeField(TQString::tqfromLatin1("discogs-id"));
entry = coll->entries().front();
- m_entries.tqreplace(uid_, entry);
+ m_entries.replace(uid_, entry);
return entry;
}
diff --git a/src/fetch/entrezfetcher.cpp b/src/fetch/entrezfetcher.cpp
index 99f01f1..6383735 100644
--- a/src/fetch/entrezfetcher.cpp
+++ b/src/fetch/entrezfetcher.cpp
@@ -319,7 +319,7 @@ Tellico::Data::EntryPtr EntrezFetcher::fetchEntry(uint uid_) {
return entry;
}
- if(!m_matches.tqcontains(uid_)) {
+ if(!m_matches.contains(uid_)) {
return 0;
}
@@ -376,7 +376,7 @@ Tellico::Data::EntryPtr EntrezFetcher::fetchEntry(uint uid_) {
Data::EntryPtr e = coll->entries().front();
// try to get a link, but only if necessary
- if(m_fields.tqcontains(TQString::tqfromLatin1("url"))) {
+ if(m_fields.contains(TQString::tqfromLatin1("url"))) {
KURL link(TQString::tqfromLatin1(ENTREZ_BASE_URL));
link.addPath(TQString::tqfromLatin1(ENTREZ_LINK_CGI));
link.addQueryItem(TQString::tqfromLatin1("tool"), TQString::tqfromLatin1("Tellico"));
@@ -409,7 +409,7 @@ Tellico::Data::EntryPtr EntrezFetcher::fetchEntry(uint uid_) {
const StringMap customFields = EntrezFetcher::customFields();
for(StringMap::ConstIterator it = customFields.begin(); it != customFields.end(); ++it) {
- if(!m_fields.tqcontains(it.key())) {
+ if(!m_fields.contains(it.key())) {
coll->removeField(it.key());
}
}
diff --git a/src/fetch/execexternalfetcher.cpp b/src/fetch/execexternalfetcher.cpp
index 3c11c20..630abc9 100644
--- a/src/fetch/execexternalfetcher.cpp
+++ b/src/fetch/execexternalfetcher.cpp
@@ -124,7 +124,7 @@ void ExecExternalFetcher::readConfigHook(const KConfigGroup& config_) {
void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true;
- if(!m_args.tqcontains(key_)) {
+ if(!m_args.contains(key_)) {
stop();
return;
}
@@ -145,8 +145,8 @@ void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
}
TQString args = m_args[key_];
TQRegExp rx2(TQString::tqfromLatin1("['\"]%1\\1"));
- args.tqreplace(rx2, TQString::tqfromLatin1("%1"));
- startSearch(parseArguments(args.tqarg(value))); // tqreplace %1 with search value
+ args.replace(rx2, TQString::tqfromLatin1("%1"));
+ startSearch(parseArguments(args.tqarg(value))); // replace %1 with search value
}
void ExecExternalFetcher::startSearch(const TQStringList& args_) {
@@ -402,7 +402,7 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt
le->completionObject()->addItem(TQString::tqfromLatin1("%1"));
gridLayout->addWidget(le, row, 1);
m_leDict.insert(key, le);
- if(fetcher_ && fetcher_->m_args.tqcontains(key)) {
+ if(fetcher_ && fetcher_->m_args.contains(key)) {
cb->setChecked(true);
le->setEnabled(true);
le->setText(fetcher_->m_args[key]);
@@ -480,7 +480,7 @@ void ExecExternalFetcher::ConfigWidget::readConfig(KConfig* config_) {
TQCheckBox* cb = m_cbDict[key];
KLineEdit* le = m_leDict[key];
if(cb && le) {
- if(args.tqcontains(key)) {
+ if(args.contains(key)) {
cb->setChecked(true);
le->setEnabled(true);
le->setText(args[key]);
diff --git a/src/fetch/execexternalfetcher.h b/src/fetch/execexternalfetcher.h
index 49a16d0..99e3fc8 100644
--- a/src/fetch/execexternalfetcher.h
+++ b/src/fetch/execexternalfetcher.h
@@ -50,7 +50,7 @@ public:
virtual TQString source() const;
virtual bool isSearching() const { return m_started; }
- virtual bool canSearch(FetchKey k) const { return m_args.tqcontains(k); }
+ virtual bool canSearch(FetchKey k) const { return m_args.contains(k); }
virtual bool canUpdate() const { return m_canUpdate; }
virtual void search(FetchKey key, const TQString& value);
virtual void updateEntry(Data::EntryPtr entry);
diff --git a/src/fetch/fetchmanager.cpp b/src/fetch/fetchmanager.cpp
index e0b176c..fb83e9f 100644
--- a/src/fetch/fetchmanager.cpp
+++ b/src/fetch/fetchmanager.cpp
@@ -359,7 +359,7 @@ Tellico::Fetch::FetcherVec Manager::defaultFetchers() {
vec.append(new GoogleScholarFetcher(this));
vec.append(new DiscogsFetcher(this));
// only add IBS if user includes italian
- if(KGlobal::locale()->languagesTwoAlpha().tqcontains(TQString::tqfromLatin1("it"))) {
+ if(KGlobal::locale()->languagesTwoAlpha().contains(TQString::tqfromLatin1("it"))) {
vec.append(new IBSFetcher(this));
}
return vec;
@@ -489,7 +489,7 @@ Tellico::Fetch::ConfigWidget* Manager::configWidget(TQWidget* parent_, Type type
break;
case ExecExternal:
w = new ExecExternalFetcher::ConfigWidget(parent_);
- if(!name_.isEmpty() && m_scriptMap.tqcontains(name_)) {
+ if(!name_.isEmpty() && m_scriptMap.contains(name_)) {
// bundledScriptHasExecPath() actually needs to write the exec path
// back to the config so the configWidget can read it. But if the spec file
// is not readablle, that doesn't work. So work around it with a copy to a temp file
@@ -599,15 +599,15 @@ TQPixmap Manager::fetcherIcon(Fetch::Fetcher::CPtr fetcher_, int group_, int siz
const Fetch::ExecExternalFetcher* f = static_cast<const Fetch::ExecExternalFetcher*>(fetcher_.data());
const TQString p = f->execPath();
KURL u;
- if(p.tqfind(TQString::tqfromLatin1("allocine")) > -1) {
+ if(p.find(TQString::tqfromLatin1("allocine")) > -1) {
u = TQString::tqfromLatin1("http://www.allocine.fr");
- } else if(p.tqfind(TQString::tqfromLatin1("ministerio_de_cultura")) > -1) {
+ } else if(p.find(TQString::tqfromLatin1("ministerio_de_cultura")) > -1) {
u = TQString::tqfromLatin1("http://www.mcu.es");
- } else if(p.tqfind(TQString::tqfromLatin1("dark_horse_comics")) > -1) {
+ } else if(p.find(TQString::tqfromLatin1("dark_horse_comics")) > -1) {
u = TQString::tqfromLatin1("http://www.darkhorse.com");
- } else if(p.tqfind(TQString::tqfromLatin1("boardgamegeek")) > -1) {
+ } else if(p.find(TQString::tqfromLatin1("boardgamegeek")) > -1) {
u = TQString::tqfromLatin1("http://www.boardgamegeek.com");
- } else if(f->source().tqfind(TQString::tqfromLatin1("amarok"), 0, false /*case-sensitive*/) > -1) {
+ } else if(f->source().find(TQString::tqfromLatin1("amarok"), 0, false /*case-sensitive*/) > -1) {
return LOAD_ICON(TQString::tqfromLatin1("amarok"), group_, size_);
}
if(!u.isEmpty() && u.isValid()) {
diff --git a/src/fetch/gcstarpluginfetcher.cpp b/src/fetch/gcstarpluginfetcher.cpp
index d6d049c..ccb963d 100644
--- a/src/fetch/gcstarpluginfetcher.cpp
+++ b/src/fetch/gcstarpluginfetcher.cpp
@@ -43,7 +43,7 @@ GCstarPluginFetcher::PluginParse GCstarPluginFetcher::pluginParse = NotYet;
//static
GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
- if(!pluginMap.tqcontains(collType_)) {
+ if(!pluginMap.contains(collType_)) {
GUI::CursorSaver cs;
TQString gcstar = KStandardDirs::findExe(TQString::tqfromLatin1("gcstar"));
@@ -80,7 +80,7 @@ GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
}
}
- return pluginMap.tqcontains(collType_) ? pluginMap[collType_] : GCstarPluginFetcher::PluginList();
+ return pluginMap.contains(collType_) ? pluginMap[collType_] : GCstarPluginFetcher::PluginList();
}
void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_) {
@@ -156,7 +156,7 @@ void GCstarPluginFetcher::readPluginsOld(int collType_, const TQString& gcstar_)
info.insert(rx.cap(1).lower(), rx.cap(2));
}
// only add if it has a name
- if(info.tqcontains(TQString::tqfromLatin1("name"))) {
+ if(info.contains(TQString::tqfromLatin1("name"))) {
plugins << info;
}
}
diff --git a/src/fetch/googlescholarfetcher.cpp b/src/fetch/googlescholarfetcher.cpp
index d7773d2..e93c7cd 100644
--- a/src/fetch/googlescholarfetcher.cpp
+++ b/src/fetch/googlescholarfetcher.cpp
@@ -158,7 +158,7 @@ void GoogleScholarFetcher::slotComplete(KIO::Job* job_) {
TQString text = TQString::fromUtf8(m_data, m_data.size());
TQString bibtex;
int count = 0;
- for(int pos = text.tqfind(m_bibtexRx); count < m_limit && pos > -1; pos = text.tqfind(m_bibtexRx, pos+m_bibtexRx.matchedLength()), ++count) {
+ for(int pos = text.find(m_bibtexRx); count < m_limit && pos > -1; pos = text.find(m_bibtexRx, pos+m_bibtexRx.matchedLength()), ++count) {
KURL bibtexUrl(TQString::tqfromLatin1(SCHOLAR_BASE_URL), m_bibtexRx.cap(1));
// myDebug() << bibtexUrl << endl;
bibtex += FileHandler::readTextFile(bibtexUrl, true);
diff --git a/src/fetch/ibsfetcher.cpp b/src/fetch/ibsfetcher.cpp
index 734c431..4c86ef3 100644
--- a/src/fetch/ibsfetcher.cpp
+++ b/src/fetch/ibsfetcher.cpp
@@ -174,8 +174,8 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
#ifdef IBS_TEST
KURL url = KURL::fromPathOrURL(TQString::tqfromLatin1("/home/robby/ibs2.html"));
#else
- // the url probable tqcontains &amp; so be careful
- KURL url = u.tqreplace(TQString::tqfromLatin1("&amp;"), TQChar('&'));
+ // the url probable contains &amp; so be careful
+ KURL url = u.replace(TQString::tqfromLatin1("&amp;"), TQChar('&'));
#endif
m_matches.insert(r->uid, url);
@@ -185,9 +185,9 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
}
u = anchorRx.cap(1);
t = anchorRx.cap(2);
- pos2 = s.tqfind(TQString::tqfromLatin1("<br>"), pos, false);
+ pos2 = s.find(TQString::tqfromLatin1("<br>"), pos, false);
if(pos2 > -1) {
- int pos3 = s.tqfind(TQString::tqfromLatin1("<br>"), pos2+1, false);
+ int pos3 = s.find(TQString::tqfromLatin1("<br>"), pos2+1, false);
if(pos3 > -1) {
d = s.mid(pos2, pos3-pos2).remove(tagRx).simplifyWhiteSpace();
}
@@ -197,7 +197,7 @@ void IBSFetcher::slotComplete(KIO::Job* job_) {
if(!u.isEmpty()) {
SearchResult* r = new SearchResult(this, t, d, TQString());
emit signalResultFound(r);
- m_matches.insert(r->uid, u.tqreplace(TQString::tqfromLatin1("&amp;"), TQChar('&')));
+ m_matches.insert(r->uid, u.replace(TQString::tqfromLatin1("&amp;"), TQChar('&')));
}
#endif
@@ -221,7 +221,7 @@ void IBSFetcher::slotCompleteISBN(KIO::Job* job_) {
}
TQString str = Tellico::decodeHTML(TQString(m_data));
- if(str.tqfind(TQString::tqfromLatin1("Libro non presente"), 0, false /* cas-sensitive */) > -1) {
+ if(str.find(TQString::tqfromLatin1("Libro non presente"), 0, false /* cas-sensitive */) > -1) {
stop();
return;
}
@@ -364,7 +364,7 @@ Tellico::Data::EntryPtr IBSFetcher::parseEntry(const TQString& str_) {
TQStringList names = entry->fields(TQString::tqfromLatin1("author"), false);
if(!names.isEmpty() && !names[0].isEmpty()) {
for(TQStringList::Iterator it = names.begin(); it != names.end(); ++it) {
- if((*it).tqfind(',') > -1) {
+ if((*it).find(',') > -1) {
continue; // skip if it has a comma
}
TQStringList words = TQStringList::split(' ', *it);
diff --git a/src/fetch/imdbfetcher.cpp b/src/fetch/imdbfetcher.cpp
index d70429f..682ae1f 100644
--- a/src/fetch/imdbfetcher.cpp
+++ b/src/fetch/imdbfetcher.cpp
@@ -140,7 +140,7 @@ void IMDBFetcher::search(FetchKey key_, const TQString& value_) {
m_url = KURL();
m_url.setProtocol(TQString::tqfromLatin1("http"));
m_url.setHost(m_host.isEmpty() ? TQString::tqfromLatin1(IMDB_SERVER) : m_host);
- m_url.setPath(TQString::tqfromLatin1("/tqfind"));
+ m_url.setPath(TQString::tqfromLatin1("/find"));
switch(key_) {
case Title:
@@ -263,7 +263,7 @@ void IMDBFetcher::parseSingleTitleResult() {
s_titleRx->search(Tellico::decodeHTML(TQString(m_data)));
// split title at parenthesis
const TQString cap1 = s_titleRx->cap(1);
- int pPos = cap1.tqfind('(');
+ int pPos = cap1.find('(');
// FIXME: maybe remove parentheses here?
SearchResult* r = new SearchResult(this,
pPos == -1 ? cap1 : cap1.left(pPos),
@@ -282,9 +282,9 @@ void IMDBFetcher::parseMultipleTitleResults() {
// IMDb can return three title lists, popular, exact, and partial
// the popular titles are in the first table, after the "Popular Results" text
- int pos_popular = output.tqfind(TQString::tqfromLatin1("Popular Titles"), 0, false);
- int pos_exact = output.tqfind(TQString::tqfromLatin1("Exact Matches"), TQMAX(pos_popular, 0), false);
- int pos_partial = output.tqfind(TQString::tqfromLatin1("Partial Matches"), TQMAX(pos_exact, 0), false);
+ int pos_popular = output.find(TQString::tqfromLatin1("Popular Titles"), 0, false);
+ int pos_exact = output.find(TQString::tqfromLatin1("Exact Matches"), TQMAX(pos_popular, 0), false);
+ int pos_partial = output.find(TQString::tqfromLatin1("Partial Matches"), TQMAX(pos_exact, 0), false);
int end_popular = pos_exact; // keep track of where to end
if(end_popular == -1) {
end_popular = pos_partial == -1 ? output.length() : pos_partial;
@@ -348,10 +348,10 @@ void IMDBFetcher::parseTitleBlock(const TQString& str_) {
const TQString cap1 = s_anchorTitleRx->cap(1); // the anchor url
const TQString cap2 = s_anchorTitleRx->cap(2).stripWhiteSpace(); // the anchor text
start += s_anchorTitleRx->matchedLength();
- int pPos = cap2.tqfind('('); // if it has parentheses, use that for description
+ int pPos = cap2.find('('); // if it has parentheses, use that for description
TQString desc;
if(pPos > -1) {
- int pPos2 = cap2.tqfind(')', pPos+1);
+ int pPos2 = cap2.find(')', pPos+1);
if(pPos2 > -1) {
desc = cap2.mid(pPos+1, pPos2-pPos-1);
}
@@ -362,11 +362,11 @@ void IMDBFetcher::parseTitleBlock(const TQString& str_) {
end = str_.length();
}
TQString text = str_.mid(start, end-start);
- pPos = text.tqfind('(');
+ pPos = text.find('(');
if(pPos > -1) {
- int pNewLine = text.tqfind(TQString::tqfromLatin1("<br"));
+ int pNewLine = text.find(TQString::tqfromLatin1("<br"));
if(pNewLine == -1 || pPos < pNewLine) {
- int pPos2 = text.tqfind(')', pPos);
+ int pPos2 = text.find(')', pPos);
desc = text.mid(pPos+1, pPos2-pPos-1);
}
pPos = -1;
@@ -436,24 +436,24 @@ void IMDBFetcher::parseSingleNameResult() {
len = s_anchorTitleRx->cap(0).length();
// split title at parenthesis
const TQString cap2 = s_anchorTitleRx->cap(2).stripWhiteSpace();
- int pPos = cap2.tqfind('(');
+ int pPos = cap2.find('(');
if(pPos > -1) {
desc = cap2.mid(pPos);
} else {
// look until the next <a
- int aPos = output.tqfind(TQString::tqfromLatin1("<a"), pos+len, false);
+ int aPos = output.find(TQString::tqfromLatin1("<a"), pos+len, false);
if(aPos == -1) {
aPos = output.length();
}
TQString tmp = output.mid(pos+len, aPos-pos-len);
- if(tmp.tqfind(tvRegExp) > -1) {
+ if(tmp.find(tvRegExp) > -1) {
isEpisode = true;
}
- pPos = tmp.tqfind('(');
+ pPos = tmp.find('(');
if(pPos > -1) {
- int pNewLine = tmp.tqfind(TQString::tqfromLatin1("<br"));
+ int pNewLine = tmp.find(TQString::tqfromLatin1("<br"));
if(pNewLine == -1 || pPos < pNewLine) {
- int pEnd = tmp.tqfind(')', pPos+1);
+ int pEnd = tmp.find(')', pPos+1);
desc = tmp.mid(pPos+1, pEnd-pPos-1).remove(*s_tagRx);
}
// but need to indicate it wasn't found initially
@@ -501,17 +501,17 @@ void IMDBFetcher::parseMultipleNameResults() {
// the exact results are in the first table after the "exact results" text
TQString output = Tellico::decodeHTML(TQString(m_data));
- int pos = output.tqfind(TQString::tqfromLatin1("Popular Results"), 0, false);
+ int pos = output.find(TQString::tqfromLatin1("Popular Results"), 0, false);
if(pos == -1) {
- pos = output.tqfind(TQString::tqfromLatin1("Exact Matches"), 0, false);
+ pos = output.find(TQString::tqfromLatin1("Exact Matches"), 0, false);
}
// find beginning of partial matches
- int end = output.tqfind(TQString::tqfromLatin1("Other Results"), TQMAX(pos, 0), false);
+ int end = output.find(TQString::tqfromLatin1("Other Results"), TQMAX(pos, 0), false);
if(end == -1) {
- end = output.tqfind(TQString::tqfromLatin1("Partial Matches"), TQMAX(pos, 0), false);
+ end = output.find(TQString::tqfromLatin1("Partial Matches"), TQMAX(pos, 0), false);
if(end == -1) {
- end = output.tqfind(TQString::tqfromLatin1("Approx Matches"), TQMAX(pos, 0), false);
+ end = output.find(TQString::tqfromLatin1("Approx Matches"), TQMAX(pos, 0), false);
if(end == -1) {
end = output.length();
}
@@ -529,7 +529,7 @@ void IMDBFetcher::parseMultipleNameResults() {
KURL u(m_url, s_anchorNameRx->cap(1));
s = s_anchorNameRx->cap(2).stripWhiteSpace() + ' ';
// if more than one exact, add parentheses
- if(nameMap.tqcontains(s) && nameMap[s] > 0) {
+ if(nameMap.contains(s) && nameMap[s] > 0) {
// fix the first one that didn't have a number
if(nameMap[s] == 1) {
KURL u2 = map[s];
@@ -552,7 +552,7 @@ void IMDBFetcher::parseMultipleNameResults() {
while(pos > -1 && m_matches.size() < m_limit) {
KURL u(m_url, s_anchorNameRx->cap(1)); // relative URL
s = s_anchorNameRx->cap(2).stripWhiteSpace();
- if(nameMap.tqcontains(s) && nameMap[s] > 0) {
+ if(nameMap.contains(s) && nameMap[s] > 0) {
// fix the first one that didn't have a number
if(nameMap[s] == 1) {
KURL u2 = map[s];
@@ -685,7 +685,7 @@ Tellico::Data::EntryPtr IMDBFetcher::parseEntry(const TQString& str_) {
}
const TQString imdb = TQString::tqfromLatin1("imdb");
- if(!coll->hasField(imdb) && m_fields.tqfindIndex(imdb) > -1) {
+ if(!coll->hasField(imdb) && m_fields.findIndex(imdb) > -1) {
Data::FieldPtr field = new Data::Field(imdb, i18n("IMDB Link"), Data::Field::URL);
field->setCategory(i18n("General"));
coll->addField(field);
@@ -701,7 +701,7 @@ void IMDBFetcher::doTitle(const TQString& str_, Data::EntryPtr entry_) {
if(s_titleRx->search(str_) > -1) {
const TQString cap1 = s_titleRx->cap(1);
// titles always have parentheses
- int pPos = cap1.tqfind('(');
+ int pPos = cap1.find('(');
TQString title = cap1.left(pPos).stripWhiteSpace();
// remove first and last quotes is there
if(title.startsWith(TQChar('"')) && title.endsWith(TQChar('"'))) {
@@ -742,7 +742,7 @@ void IMDBFetcher::doAspectRatio(const TQString& str_, Data::EntryPtr entry_) {
}
void IMDBFetcher::doAlsoKnownAs(const TQString& str_, Data::EntryPtr entry_) {
- if(m_fields.tqfindIndex(TQString::tqfromLatin1("alttitle")) == -1) {
+ if(m_fields.findIndex(TQString::tqfromLatin1("alttitle")) == -1) {
return;
}
@@ -770,7 +770,7 @@ void IMDBFetcher::doAlsoKnownAs(const TQString& str_, Data::EntryPtr entry_) {
for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) {
TQString s = *it;
// sometimes, the word "more" gets linked to the releaseinfo page, check that
- if(s.tqfind(TQString::tqfromLatin1("releaseinfo")) > -1) {
+ if(s.find(TQString::tqfromLatin1("releaseinfo")) > -1) {
continue;
}
s.remove(*s_tagRx);
@@ -807,7 +807,7 @@ void IMDBFetcher::doPlot(const TQString& str_, Data::EntryPtr entry_, const KURL
thisPlot = plotRx.cap(1);
thisPlot.remove(*s_tagRx); // remove HTML tags
entry_->setField(TQString::tqfromLatin1("plot"), thisPlot);
- // if thisPlot ends with (more) or tqcontains
+ // if thisPlot ends with (more) or contains
// a url that ends with plotsummary, then we'll grab it, otherwise not
if(plotRx.cap(0).endsWith(TQString::tqfromLatin1("(more)</")) || plotURLRx.search(plotRx.cap(0)) > -1) {
useUserSummary = true;
@@ -843,14 +843,14 @@ void IMDBFetcher::doPerson(const TQString& str_, Data::EntryPtr entry_,
TQString name = TQString::tqfromLatin1("/name/");
StringSet people;
- for(int pos = str_.tqfind(imdbHeader_); pos > 0; pos = str_.tqfind(imdbHeader_, pos)) {
+ for(int pos = str_.find(imdbHeader_); pos > 0; pos = str_.find(imdbHeader_, pos)) {
// loop until repeated <br> tags or </div> tag
- const int endPos1 = str_.tqfind(br2Rx, pos);
- const int endPos2 = str_.tqfind(divRx, pos);
+ const int endPos1 = str_.find(br2Rx, pos);
+ const int endPos2 = str_.find(divRx, pos);
const int endPos = TQMIN(endPos1, endPos2); // ok to be -1
pos = s_anchorRx->search(str_, pos+1);
while(pos > -1 && pos < endPos) {
- if(s_anchorRx->cap(1).tqfind(name) > -1) {
+ if(s_anchorRx->cap(1).find(name) > -1) {
people.add(s_anchorRx->cap(2).stripWhiteSpace());
}
pos = s_anchorRx->search(str_, pos+1);
@@ -883,28 +883,28 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
if(castText.isEmpty()) {
// fall back to short list
castText = str_;
- pos = castText.tqfind(TQString::tqfromLatin1("cast overview"), 0, false);
+ pos = castText.find(TQString::tqfromLatin1("cast overview"), 0, false);
if(pos == -1) {
- pos = castText.tqfind(TQString::tqfromLatin1("credited cast"), 0, false);
+ pos = castText.find(TQString::tqfromLatin1("credited cast"), 0, false);
}
} else {
// first look for anchor
TQRegExp castAnchorRx(TQString::tqfromLatin1("<a\\s+name\\s*=\\s*\"cast\""), false);
- pos = castText.tqfind(castAnchorRx);
+ pos = castText.find(castAnchorRx);
if(pos < 0) {
TQRegExp tableClassRx(TQString::tqfromLatin1("<table\\s+class\\s*=\\s*\"cast\""), false);
- pos = castText.tqfind(tableClassRx);
+ pos = castText.find(tableClassRx);
if(pos < 0) {
- // fragile, the word "cast" appears in the title, but need to tqfind
+ // fragile, the word "cast" appears in the title, but need to find
// the one right above the actual cast table
// for TV shows, there's a link on the sidebar for "episodes case"
// so need to not match that one
- pos = castText.tqfind(TQString::tqfromLatin1("cast</"), 0, false);
+ pos = castText.find(TQString::tqfromLatin1("cast</"), 0, false);
if(pos > 9) {
// back up 9 places
if(castText.mid(pos-9, 9).startsWith(TQString::tqfromLatin1("episodes"))) {
// find next cast list
- pos = castText.tqfind(TQString::tqfromLatin1("cast</"), pos+6, false);
+ pos = castText.find(TQString::tqfromLatin1("cast</"), pos+6, false);
}
}
}
@@ -921,10 +921,10 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
TQStringList cast;
// loop until closing table tag
- const int endPos = castText.tqfind(TQString::tqfromLatin1("</table"), pos, false);
+ const int endPos = castText.find(TQString::tqfromLatin1("</table"), pos, false);
pos = s_anchorRx->search(castText, pos+1);
while(pos > -1 && pos < endPos && static_cast<int>(cast.count()) < m_numCast) {
- if(s_anchorRx->cap(1).tqfind(name) > -1) {
+ if(s_anchorRx->cap(1).find(name) > -1) {
// now search for <td> item with character name
// there's a column with ellipses then the character
const int pos2 = tdRx.search(castText, pos);
@@ -944,7 +944,7 @@ void IMDBFetcher::doCast(const TQString& str_, Data::EntryPtr entry_, const KURL
}
void IMDBFetcher::doRating(const TQString& str_, Data::EntryPtr entry_) {
- if(m_fields.tqfindIndex(TQString::tqfromLatin1("imdb-rating")) == -1) {
+ if(m_fields.findIndex(TQString::tqfromLatin1("imdb-rating")) == -1) {
return;
}
@@ -996,7 +996,7 @@ void IMDBFetcher::doCover(const TQString& str_, Data::EntryPtr entry_, const KUR
// didn't find the cover, IMDb also used to put "cover" inside the url
pos = imgRx.search(str_);
while(pos > -1) {
- if(imgRx.cap(0).tqfind(cover, 0, false) > -1) {
+ if(imgRx.cap(0).find(cover, 0, false) > -1) {
KURL u(baseURL_, imgRx.cap(1));
TQString id = ImageFactory::addImage(u, true);
if(!id.isEmpty()) {
@@ -1026,28 +1026,28 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
TQStringList genres, countries, langs, certs, tracks, studios;
for(int pos = s_anchorRx->search(str_); pos > -1; pos = s_anchorRx->search(str_, pos+1)) {
const TQString cap1 = s_anchorRx->cap(1);
- if(cap1.tqfind(genre) > -1) {
- if(s_anchorRx->cap(2).tqfind(TQString::tqfromLatin1(" section"), 0, false) == -1) {
+ if(cap1.find(genre) > -1) {
+ if(s_anchorRx->cap(2).find(TQString::tqfromLatin1(" section"), 0, false) == -1) {
genres += s_anchorRx->cap(2).stripWhiteSpace();
}
- } else if(cap1.tqfind(country) > -1) {
- if(s_anchorRx->cap(2).tqfind(TQString::tqfromLatin1(" section"), 0, false) == -1) {
+ } else if(cap1.find(country) > -1) {
+ if(s_anchorRx->cap(2).find(TQString::tqfromLatin1(" section"), 0, false) == -1) {
countries += s_anchorRx->cap(2).stripWhiteSpace();
}
- } else if(cap1.tqfind(lang) > -1) {
+ } else if(cap1.find(lang) > -1) {
langs += s_anchorRx->cap(2).stripWhiteSpace();
- } else if(cap1.tqfind(colorInfo) > -1) {
+ } else if(cap1.find(colorInfo) > -1) {
// change "black and white" to "black & white"
entry_->setField(TQString::tqfromLatin1("color"),
- s_anchorRx->cap(2).tqreplace(TQString::tqfromLatin1("and"), TQChar('&')).stripWhiteSpace());
- } else if(cap1.tqfind(cert) > -1) {
+ s_anchorRx->cap(2).replace(TQString::tqfromLatin1("and"), TQChar('&')).stripWhiteSpace());
+ } else if(cap1.find(cert) > -1) {
certs += s_anchorRx->cap(2).stripWhiteSpace();
- } else if(cap1.tqfind(soundMix) > -1) {
+ } else if(cap1.find(soundMix) > -1) {
tracks += s_anchorRx->cap(2).stripWhiteSpace();
- } else if(cap1.tqfind(company) > -1) {
+ } else if(cap1.find(company) > -1) {
studios += s_anchorRx->cap(2).stripWhiteSpace();
// if year field wasn't set before, do it now
- } else if(entry_->field(TQString::tqfromLatin1("year")).isEmpty() && cap1.tqfind(year) > -1) {
+ } else if(entry_->field(TQString::tqfromLatin1("year")).isEmpty() && cap1.find(year) > -1) {
entry_->setField(TQString::tqfromLatin1("year"), s_anchorRx->cap(2).stripWhiteSpace());
}
}
@@ -1067,7 +1067,7 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
cert = TQChar('U');
}
cert += TQString::tqfromLatin1(" (") + country + ')';
- if(certsAllowed.tqfindIndex(cert) > -1) {
+ if(certsAllowed.findIndex(cert) > -1) {
entry_->setField(TQString::tqfromLatin1("certification"), cert);
break;
}
@@ -1075,7 +1075,7 @@ void IMDBFetcher::doLists(const TQString& str_, Data::EntryPtr entry_) {
// now add new field for all certifications
const TQString allc = TQString::tqfromLatin1("allcertification");
- if(m_fields.tqfindIndex(allc) > -1) {
+ if(m_fields.findIndex(allc) > -1) {
Data::FieldPtr f = entry_->collection()->fieldByName(allc);
if(!f) {
f = new Data::Field(allc, i18n("Certifications"), Data::Field::Table);
diff --git a/src/fetch/scripts/dark_horse_comics.py b/src/fetch/scripts/dark_horse_comics.py
index 0db83ec..513127c 100644
--- a/src/fetch/scripts/dark_horse_comics.py
+++ b/src/fetch/scripts/dark_horse_comics.py
@@ -220,7 +220,7 @@ class DarkHorseParser:
Retrieve all links related to the search. self.__data contains HTML content fetched by self.__getHTMLContent()
that need to be parsed.
"""
- matchList = re.findall("""<a *href="%s(?P<page>.*?)">(?P<title>.*?)</a>""" % self.__basePath.tqreplace('?', '\?'), self.__data)
+ matchList = re.findall("""<a *href="%s(?P<page>.*?)">(?P<title>.*?)</a>""" % self.__basePath.replace('?', '\?'), self.__data)
if not matchList: return None
return matchList
diff --git a/src/fetch/scripts/ministerio_de_cultura.py b/src/fetch/scripts/ministerio_de_cultura.py
index cdbb580..7f949ba 100644
--- a/src/fetch/scripts/ministerio_de_cultura.py
+++ b/src/fetch/scripts/ministerio_de_cultura.py
@@ -53,7 +53,7 @@ SVN Version:
* Removed "Collection" field as I moved to Series/Series Number
Version 0.3.2:
- * Now tqfind 'notas' field related information
+ * Now find 'notas' field related information
* search URL modified to fetch information of exhausted books too
Version 0.3.1:
@@ -281,7 +281,7 @@ class MinisterioCulturaParser:
# Strip out hyphens if kind is ISBN
if kind == ISBN:
- criteria = criteria.tqreplace('-', NULLSTRING)
+ criteria = criteria.replace('-', NULLSTRING)
# Support for multiple search
isbnList = criteria.split(';')
for n in isbnList:
@@ -502,7 +502,7 @@ Tellico cannot connect to: http://www.mcu.es/comun/bases/isbn/ISBN.htm webpage:
# Now retrieve infos
if links:
for entry in links:
- data = self.__fetchBookInfo( url = self.__baseURL + entry.tqreplace(' ', '%20') )
+ data = self.__fetchBookInfo( url = self.__baseURL + entry.replace(' ', '%20') )
node = self.__domTree.addEntry(data)
else:
return None
diff --git a/src/fetch/srufetcher.cpp b/src/fetch/srufetcher.cpp
index 6719a53..99529c3 100644
--- a/src/fetch/srufetcher.cpp
+++ b/src/fetch/srufetcher.cpp
@@ -289,7 +289,7 @@ void SRUFetcher::slotComplete(KIO::Job* job_) {
const StringMap customFields = SRUFetcher::customFields();
for(StringMap::ConstIterator it = customFields.begin(); it != customFields.end(); ++it) {
- if(!m_fields.tqcontains(it.key())) {
+ if(!m_fields.contains(it.key())) {
coll->removeField(it.key());
}
}
@@ -524,7 +524,7 @@ TQString SRUConfigWidget::preferredName() const {
void SRUConfigWidget::slotCheckHost() {
TQString s = m_hostEdit->text();
// someone might be pasting a full URL, check that
- if(s.tqfind(':') > -1 || s.tqfind('/') > -1) {
+ if(s.find(':') > -1 || s.find('/') > -1) {
KURL u(s);
if(u.isValid()) {
m_hostEdit->setText(u.host());
diff --git a/src/fetch/yahoofetcher.cpp b/src/fetch/yahoofetcher.cpp
index 6e74d60..dcd1823 100644
--- a/src/fetch/yahoofetcher.cpp
+++ b/src/fetch/yahoofetcher.cpp
@@ -346,7 +346,7 @@ TQString YahooFetcher::insertValue(const TQString& str_, const TQString& value_,
bool write = true;
if(!list[pos_-1].isNull()) {
// for some reason, some songs are repeated from yahoo, with 0 length, don't overwrite that
- if(value_.tqcontains(TQString::tqfromLatin1("::")) < 2) { // means no length value
+ if(value_.contains(TQString::tqfromLatin1("::")) < 2) { // means no length value
write = false;
}
}
diff --git a/src/fetch/z3950fetcher.cpp b/src/fetch/z3950fetcher.cpp
index d0bffa3..2496b5b 100644
--- a/src/fetch/z3950fetcher.cpp
+++ b/src/fetch/z3950fetcher.cpp
@@ -416,7 +416,7 @@ void Z3950Fetcher::handleResult(const TQString& result_) {
const StringMap customFields = Z3950Fetcher::customFields();
for(StringMap::ConstIterator it = customFields.begin(); it != customFields.end(); ++it) {
- if(!m_fields.tqcontains(it.key())) {
+ if(!m_fields.contains(it.key())) {
coll->removeField(it.key());
}
}
@@ -759,7 +759,7 @@ void Z3950Fetcher::ConfigWidget::loadPresets(const TQString& current_) {
if(current_.isEmpty() && idx == -1) {
// set the initial selection to something depending on the language
const TQStringList locales = cfg.readListEntry("Locale");
- if(locales.tqfindIndex(lang) > -1 || locales.tqfindIndex(lang2A) > -1) {
+ if(locales.findIndex(lang) > -1 || locales.findIndex(lang2A) > -1) {
idx = m_serverCombo->count() - 1;
}
} else if(id == current_) {
diff --git a/src/fetchdialog.cpp b/src/fetchdialog.cpp
index f80a1aa..11a719d 100644
--- a/src/fetchdialog.cpp
+++ b/src/fetchdialog.cpp
@@ -122,7 +122,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
int maxWidth = m_searchButton->tqsizeHint().width();
int maxHeight = m_searchButton->tqsizeHint().height();
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH),
- SmallIconSet(TQString::tqfromLatin1("tqfind"))));
+ SmallIconSet(TQString::tqfromLatin1("find"))));
maxWidth = TQMAX(maxWidth, m_searchButton->tqsizeHint().width());
maxHeight = TQMAX(maxHeight, m_searchButton->tqsizeHint().height());
m_searchButton->setMinimumWidth(maxWidth);
@@ -195,7 +195,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
connect(m_addButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEntry()));
TQWhatsThis::add(m_addButton, i18n("Add the selected entry to the current collection"));
- m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::tqfromLatin1("tqfind"))), box3);
+ m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::tqfromLatin1("find"))), box3);
m_moreButton->setEnabled(false);
connect(m_moreButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoreClicked()));
TQWhatsThis::add(m_moreButton, i18n("Fetch more results from the current data source"));
@@ -363,7 +363,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) {
// myDebug() << "FetchDialog::slotFetchDone()" << endl;
m_started = false;
m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH),
- SmallIconSet(TQString::tqfromLatin1("tqfind"))));
+ SmallIconSet(TQString::tqfromLatin1("find"))));
stopProgress();
if(m_resultCount == 0) {
slottqStatus(i18n("The search returned no items."));
@@ -560,7 +560,7 @@ void FetchDialog::slotKeyChanged(int idx_) {
m_valueLineEdit->setValidator(upc);
// only want to convert to ISBN if ISBN is accepted by the fetcher
Fetch::KeyMap map = Fetch::Manager::self()->keyMap(m_sourceCombo->currentText());
- upc->setCheckISBN(map.tqcontains(Fetch::ISBN));
+ upc->setCheckISBN(map.contains(Fetch::ISBN));
}
} else {
m_multipleISBN->setChecked(false);
diff --git a/src/field.cpp b/src/field.cpp
index a5ab6a6..c260e9a 100644
--- a/src/field.cpp
+++ b/src/field.cpp
@@ -171,7 +171,7 @@ const TQString& Field::defaultValue() const {
}
void Field::setDefaultValue(const TQString& value_) {
- if(m_type != Choice || m_allowed.tqfindIndex(value_) > -1) {
+ if(m_type != Choice || m_allowed.findIndex(value_) > -1) {
setProperty(TQString::tqfromLatin1("default"), value_);
}
}
@@ -211,7 +211,7 @@ TQStringList Field::dependsOn() const {
TQRegExp rx(TQString::tqfromLatin1("%\\{(.+)\\}"));
rx.setMinimal(true);
// do NOT call recursively!
- for(int pos = m_desc.tqfind(rx); pos > -1; pos = m_desc.tqfind(rx, pos+3)) {
+ for(int pos = m_desc.find(rx); pos > -1; pos = m_desc.find(rx, pos+3)) {
list << rx.cap(1);
}
return list;
@@ -248,7 +248,7 @@ TQString Field::formatTitle(const TQString& title_) {
// special case for multi-column tables, assume user never has '::' in a value
const TQString colonColon = TQString::tqfromLatin1("::");
TQString tail;
- if(newTitle.tqfind(colonColon) > -1) {
+ if(newTitle.find(colonColon) > -1) {
tail = colonColon + newTitle.section(colonColon, 1);
newTitle = newTitle.section(colonColon, 0, 0);
}
@@ -268,7 +268,7 @@ TQString Field::formatTitle(const TQString& title_) {
TQRegExp regexp(TQChar('^') + TQRegExp::escape(*it) + TQString::tqfromLatin1("\\s*"), false);
// can't just use *it since it's in lower-case
TQString article = newTitle.left((*it).length());
- newTitle = newTitle.tqreplace(regexp, TQString())
+ newTitle = newTitle.replace(regexp, TQString())
.append(TQString::tqfromLatin1(", "))
.append(article);
break;
@@ -277,7 +277,7 @@ TQString Field::formatTitle(const TQString& title_) {
}
// also, arbitrarily impose rule that a space must follow every comma
- newTitle.tqreplace(comma_split, TQString::tqfromLatin1(", "));
+ newTitle.replace(comma_split, TQString::tqfromLatin1(", "));
return newTitle + tail;
}
@@ -303,11 +303,11 @@ TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
TQString name = *it;
// special case for 2-column tables, assume user never has '::' in a value
TQString tail;
- if(name.tqfind(colonColon) > -1) {
+ if(name.find(colonColon) > -1) {
tail = colonColon + name.section(colonColon, 1);
name = name.section(colonColon, 0, 0);
}
- name.tqreplace(periodSpace, TQString::tqfromLatin1(". "));
+ name.replace(periodSpace, TQString::tqfromLatin1(". "));
if(Config::autoCapitalization()) {
name = capitalize(name);
}
@@ -317,10 +317,10 @@ TQString Field::formatName(const TQString& name_, bool multiple_/*=true*/) {
lastWord.setPattern(TQChar('^') + TQRegExp::escape(words.last()) + TQChar('$'));
// if it contains a comma already and the last word is not a suffix, don't format it
- if(!Config::autoFormat() || (name.tqfind(',') > -1 && Config::nameSuffixList().grep(lastWord).isEmpty())) {
+ if(!Config::autoFormat() || (name.find(',') > -1 && Config::nameSuffixList().grep(lastWord).isEmpty())) {
// arbitrarily impose rule that no spaces before a comma and
// a single space after every comma
- name.tqreplace(comma_split, TQString::tqfromLatin1(", "));
+ name.replace(comma_split, TQString::tqfromLatin1(", "));
names << name + tail;
continue;
}
@@ -398,11 +398,11 @@ TQString Field::capitalize(TQString str_) {
return str_;
}
// first letter is always capitalized
- str_.tqreplace(0, 1, str_.tqat(0).upper());
+ str_.replace(0, 1, str_.tqat(0).upper());
// special case for french words like l'espace
- int pos = str_.tqfind(rx, 1);
+ int pos = str_.find(rx, 1);
int nextPos;
TQRegExp wordRx;
@@ -418,14 +418,14 @@ TQString Field::capitalize(TQString str_) {
for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) {
uint l = (*it).length();
- str_.tqreplace(l, 1, str_.tqat(l).upper());
+ str_.replace(l, 1, str_.tqat(l).upper());
break;
}
}
while(pos > -1) {
// also need to compare against list of non-capitalized words
- nextPos = str_.tqfind(rx, pos+1);
+ nextPos = str_.find(rx, pos+1);
if(nextPos == -1) {
nextPos = str_.length();
}
@@ -435,7 +435,7 @@ TQString Field::capitalize(TQString str_) {
for(TQStringList::ConstIterator it = s_articlesApos.begin(); it != s_articlesApos.end(); ++it) {
if(word.lower().startsWith(*it)) {
uint l = (*it).length();
- str_.tqreplace(pos+l+1, 1, str_.tqat(pos+l+1).upper());
+ str_.replace(pos+l+1, 1, str_.tqat(pos+l+1).upper());
aposMatch = true;
break;
}
@@ -444,11 +444,11 @@ TQString Field::capitalize(TQString str_) {
if(!aposMatch) {
wordRx.setPattern(TQChar('^') + TQRegExp::escape(word) + TQChar('$'));
if(notCap.grep(wordRx).isEmpty() && nextPos-pos > 1) {
- str_.tqreplace(pos+1, 1, str_.tqat(pos+1).upper());
+ str_.replace(pos+1, 1, str_.tqat(pos+1).upper());
}
}
- pos = str_.tqfind(rx, pos+1);
+ pos = str_.find(rx, pos+1);
}
return str_;
}
@@ -528,7 +528,7 @@ void Field::addAllowed(const TQString& value_) {
if(m_type != Choice) {
return;
}
- if(m_allowed.tqfindIndex(value_) == -1) {
+ if(m_allowed.findIndex(value_) == -1) {
m_allowed += value_;
}
}
diff --git a/src/filter.cpp b/src/filter.cpp
index 1a0c67c..b1c522b 100644
--- a/src/filter.cpp
+++ b/src/filter.cpp
@@ -35,9 +35,9 @@ bool FilterRule::matches(Data::EntryPtr entry_) const {
case FuncNotEquals:
return !equals(entry_);
case FuncContains:
- return tqcontains(entry_);
+ return contains(entry_);
case FuncNotContains:
- return !tqcontains(entry_);
+ return !contains(entry_);
case FuncRegExp:
return matchesRegExp(entry_);
case FuncNotRegExp:
@@ -66,19 +66,19 @@ bool FilterRule::equals(Data::EntryPtr entry_) const {
return false;
}
-bool FilterRule::tqcontains(Data::EntryPtr entry_) const {
+bool FilterRule::contains(Data::EntryPtr entry_) const {
// empty field name means search all
if(m_fieldName.isEmpty()) {
TQStringList list = entry_->fieldValues() + entry_->formattedFieldValues();
// match is true if any strings match
for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- if((*it).tqfind(m_pattern, 0, false) >= 0) {
+ if((*it).find(m_pattern, 0, false) >= 0) {
return true;
}
}
} else {
- return entry_->field(m_fieldName).tqfind(m_pattern, 0, false) >= 0
- || entry_->formattedField(m_fieldName).tqfind(m_pattern, 0, false) >= 0;
+ return entry_->field(m_fieldName).find(m_pattern, 0, false) >= 0
+ || entry_->formattedField(m_fieldName).find(m_pattern, 0, false) >= 0;
}
return false;
@@ -90,14 +90,14 @@ bool FilterRule::matchesRegExp(Data::EntryPtr entry_) const {
if(m_fieldName.isEmpty()) {
TQStringList list = entry_->fieldValues() + entry_->formattedFieldValues();
for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- if((*it).tqfind(rx) >= 0) {
+ if((*it).find(rx) >= 0) {
return true;
break;
}
}
} else {
- return entry_->field(m_fieldName).tqfind(rx) >= 0
- || entry_->formattedField(m_fieldName).tqfind(rx) >= 0;
+ return entry_->field(m_fieldName).find(rx) >= 0
+ || entry_->formattedField(m_fieldName).find(rx) >= 0;
}
return false;
diff --git a/src/filter.h b/src/filter.h
index d269c92..34e75f5 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -85,7 +85,7 @@ public:
private:
bool equals(Data::EntryPtr entry) const;
- bool tqcontains(Data::EntryPtr entry) const;
+ bool contains(Data::EntryPtr entry) const;
bool matchesRegExp(Data::EntryPtr entry) const;
TQString m_fieldName;
diff --git a/src/filterdialog.cpp b/src/filterdialog.cpp
index 9da4ebb..0754a44 100644
--- a/src/filterdialog.cpp
+++ b/src/filterdialog.cpp
@@ -65,7 +65,7 @@ void FilterRuleWidget::initLists() {
if(m_ruleFuncList.isEmpty()) {
// also see FilterRule::matches() and FilterRule::Function
// if you change the following strings!
- m_ruleFuncList.append(i18n("tqcontains"));
+ m_ruleFuncList.append(i18n("contains"));
m_ruleFuncList.append(i18n("does not contain"));
m_ruleFuncList.append(i18n("equals"));
m_ruleFuncList.append(i18n("does not equal"));
diff --git a/src/filterview.cpp b/src/filterview.cpp
index 850b494..ac96699 100644
--- a/src/filterview.cpp
+++ b/src/filterview.cpp
@@ -149,7 +149,7 @@ void FilterView::removeEntries(Data::EntryVec entries_) {
// iterate over all tqchildren and delete items with matching entry pointers
TQListViewItem* c1 = item->firstChild();
while(c1) {
- if(entries_.tqcontains(static_cast<EntryItem*>(c1)->entry())) {
+ if(entries_.contains(static_cast<EntryItem*>(c1)->entry())) {
TQListViewItem* c2 = c1;
c1 = c1->nextSibling();
delete c2;
diff --git a/src/groupview.cpp b/src/groupview.cpp
index 50ad3d0..a392eca 100644
--- a/src/groupview.cpp
+++ b/src/groupview.cpp
@@ -115,7 +115,7 @@ void GroupView::slotModifyGroups(Data::CollPtr coll_, PtrVector<Data::EntryGroup
}
// myDebug() << "GroupView::slotModifyGroups() - " << group->fieldName() << "/" << group->groupName() << endl;
- EntryGroupItem* par = m_groupDict.tqfind(group->groupName());
+ EntryGroupItem* par = m_groupDict.find(group->groupName());
if(par) {
if(group->isEmpty()) {
m_groupDict.remove(par->text(0));
@@ -178,7 +178,7 @@ void GroupView::setEntrySelected(Data::EntryPtr entry_) {
return;
}
- EntryGroupItem* groupItem = m_groupDict.tqfind(group->groupName());
+ EntryGroupItem* groupItem = m_groupDict.find(group->groupName());
if(!groupItem) {
return;
}
diff --git a/src/gui/fieldwidget.cpp b/src/gui/fieldwidget.cpp
index dac9da8..500c6c8 100644
--- a/src/gui/fieldwidget.cpp
+++ b/src/gui/fieldwidget.cpp
@@ -93,7 +93,7 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n
: TQWidget(parent_, name_), m_field(field_) {
TQHBoxLayout* l = new TQHBoxLayout(this, 2, 2); // tqparent, margin, spacing
l->addSpacing(4); // add some more space in the columns between widgets
- if(TQCString(tqstyle().name()).lower().tqfind("keramik", 0, false) > -1) {
+ if(TQCString(tqstyle().name()).lower().find("keramik", 0, false) > -1) {
l->setMargin(1);
}
diff --git a/src/gui/imagewidget.cpp b/src/gui/imagewidget.cpp
index 3fe7353..69e0560 100644
--- a/src/gui/imagewidget.cpp
+++ b/src/gui/imagewidget.cpp
@@ -179,7 +179,7 @@ void ImageWidget::mousePressEvent(TQMouseEvent* event_) {
if(event_->button() == Qt::LeftButton) {
// Store the position of the mouse press.
// check if position is inside the label
- if(m_label->tqgeometry().tqcontains(event_->pos())) {
+ if(m_label->tqgeometry().contains(event_->pos())) {
m_dragStart = event_->pos();
} else {
m_dragStart = TQPoint();
diff --git a/src/gui/kwidgetlister.cpp b/src/gui/kwidgetlister.cpp
index ea51900..49045a1 100644
--- a/src/gui/kwidgetlister.cpp
+++ b/src/gui/kwidgetlister.cpp
@@ -125,7 +125,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w)
{
if (!w) w = this->createWidget(this);
- mLayout->insertWidget( mLayout->tqfindWidget( mButtonBox ), w );
+ mLayout->insertWidget( mLayout->findWidget( mButtonBox ), w );
mWidgetList.append( w );
w->show();
enableControls();
diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp
index ccf00d1..cce1ade 100644
--- a/src/gui/linefieldwidget.cpp
+++ b/src/gui/linefieldwidget.cpp
@@ -47,7 +47,7 @@ LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
TQString LineFieldWidget::text() const {
TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.tqreplace(s_semiColon, TQString::tqfromLatin1("; "));
+ text.replace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.stripWhiteSpace();
}
diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp
index 5ea04cd..0d03228 100644
--- a/src/gui/listview.cpp
+++ b/src/gui/listview.cpp
@@ -121,7 +121,7 @@ void ListView::setColumnText(int column, const TQString& label) {
void ListView::setComparison(int column, ListViewComparison* comp) {
if(comp) {
- m_comparisons.tqreplace(columnText(column), comp);
+ m_comparisons.replace(columnText(column), comp);
}
}
@@ -135,7 +135,7 @@ void ListView::clearComparisons() {
int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem* item2, bool asc) {
if(col >= 0 && col < static_cast<int>(m_comparisons.count())) {
- ListViewComparison* com = m_comparisons.tqfind(columnText(col));
+ ListViewComparison* com = m_comparisons.find(columnText(col));
if(com) {
return com->compare(col, item1, item2, asc);
}
@@ -200,7 +200,7 @@ void ListView::slotSelectionChanged() {
for(GUI::ListViewItemListIt it(m_selectedItems); it.current(); ++it) {
Data::EntryVec more = it.current()->entries();
for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) {
- if(!entries.tqcontains(entry)) {
+ if(!entries.contains(entry)) {
entries.append(entry);
}
}
@@ -336,7 +336,7 @@ Tellico::Data::EntryVec ListViewItem::entries() const {
for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) {
Data::EntryVec more = static_cast<GUI::ListViewItem*>(child)->entries();
for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) {
- if(!entries.tqcontains(entry)) {
+ if(!entries.contains(entry)) {
entries.append(entry);
}
}
diff --git a/src/gui/numberfieldwidget.cpp b/src/gui/numberfieldwidget.cpp
index e2e038a..f2cdaa8 100644
--- a/src/gui/numberfieldwidget.cpp
+++ b/src/gui/numberfieldwidget.cpp
@@ -67,7 +67,7 @@ TQString NumberFieldWidget::text() const {
TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.tqreplace(s_semiColon, TQString::tqfromLatin1("; "));
+ text.replace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.simplifyWhiteSpace();
}
diff --git a/src/gui/parafieldwidget.cpp b/src/gui/parafieldwidget.cpp
index 84af710..9aee35e 100644
--- a/src/gui/parafieldwidget.cpp
+++ b/src/gui/parafieldwidget.cpp
@@ -34,7 +34,7 @@ ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
TQString ParaFieldWidget::text() const {
TQString text = m_textEdit->text();
- text.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
+ text.replace('\n', TQString::tqfromLatin1("<br/>"));
return text;
}
@@ -44,7 +44,7 @@ void ParaFieldWidget::setText(const TQString& text_) {
TQRegExp rx(TQString::tqfromLatin1("<br/?>"), false /*case-sensitive*/);
TQString s = text_;
- s.tqreplace(rx, TQChar('\n'));
+ s.replace(rx, TQChar('\n'));
m_textEdit->setText(s);
m_textEdit->blockSignals(false);
diff --git a/src/gui/ratingwidget.cpp b/src/gui/ratingwidget.cpp
index 52b7367..ec5d717 100644
--- a/src/gui/ratingwidget.cpp
+++ b/src/gui/ratingwidget.cpp
@@ -118,7 +118,7 @@ void RatingWidget::mousePressEvent(TQMouseEvent* event_) {
int idx;
TQWidget* child = tqchildAt(event_->pos());
if(child) {
- idx = m_widgets.tqfindRef(static_cast<TQLabel*>(child));
+ idx = m_widgets.findRef(static_cast<TQLabel*>(child));
// if the widget is clicked beyond the maximum value, clear it
// remember total and min are values, but index is zero-based!
if(idx > m_total-1) {
diff --git a/src/imagefactory.cpp b/src/imagefactory.cpp
index fe9fc6e..12b116d 100644
--- a/src/imagefactory.cpp
+++ b/src/imagefactory.cpp
@@ -157,13 +157,13 @@ const Tellico::Data::Image& ImageFactory::addImageImpl(const TQByteArray& data_,
}
// do not call imageById(), it causes infinite looping with Document::loadImage()
- Data::Image* img = s_imageCache.tqfind(id_);
+ Data::Image* img = s_imageCache.find(id_);
if(img) {
myLog() << "ImageFactory::addImageImpl(TQByteArray) - already exists in cache: " << id_ << endl;
return *img;
}
- img = s_imageDict.tqfind(id_);
+ img = s_imageDict.find(id_);
if(img) {
myLog() << "ImageFactory::addImageImpl(TQByteArray) - already exists in dict: " << id_ << endl;
return *img;
@@ -328,13 +328,13 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) {
// first check the cache, used for images that are in the data file, or are only temporary
// then the dict, used for images downloaded, but not yet saved anywhere
- Data::Image* img = s_imageCache.tqfind(id_);
+ Data::Image* img = s_imageCache.find(id_);
if(img) {
// myLog() << "...imageById() - found in cache" << endl;
return *img;
}
- img = s_imageDict.tqfind(id_);
+ img = s_imageDict.find(id_);
if(img) {
// myLog() << "...imageById() - found in dict" << endl;
return *img;
@@ -345,7 +345,7 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) {
// also, the image info cache might not have it so check if the
// id is a valid absolute url
// yeah, it's probably slow
- if((s_imageInfoMap.tqcontains(id_) && s_imageInfoMap[id_].linkOnly) || !KURL::isRelativeURL(id_)) {
+ if((s_imageInfoMap.contains(id_) && s_imageInfoMap[id_].linkOnly) || !KURL::isRelativeURL(id_)) {
KURL u = id_;
if(u.isValid()) {
return addImageImpl(u, false, KURL(), true);
@@ -369,9 +369,9 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) {
// try to do a delayed loading of the image
if(Data::Document::self()->loadImage(id_)) {
// loadImage() could insert in either the cache or the dict!
- img = s_imageCache.tqfind(id_);
+ img = s_imageCache.find(id_);
if(!img) {
- img = s_imageDict.tqfind(id_);
+ img = s_imageDict.find(id_);
}
if(img) {
// myLog() << "...imageById() - found in doc" << endl;
@@ -429,7 +429,7 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) {
}
Tellico::Data::ImageInfo ImageFactory::imageInfo(const TQString& id_) {
- if(s_imageInfoMap.tqcontains(id_)) {
+ if(s_imageInfoMap.contains(id_)) {
return s_imageInfoMap[id_];
}
@@ -446,7 +446,7 @@ void ImageFactory::cacheImageInfo(const Data::ImageInfo& info) {
bool ImageFactory::validImage(const TQString& id_) {
// don't try s_imageInfoMap[id_] cause it inserts an empty image info
- return s_imageInfoMap.tqcontains(id_) || hasImage(id_) || !imageById(id_).isNull();
+ return s_imageInfoMap.contains(id_) || hasImage(id_) || !imageById(id_).isNull();
}
TQPixmap ImageFactory::pixmap(const TQString& id_, int width_, int height_) {
@@ -455,7 +455,7 @@ TQPixmap ImageFactory::pixmap(const TQString& id_, int width_, int height_) {
}
const TQString key = id_ + '|' + TQString::number(width_) + '|' + TQString::number(height_);
- TQPixmap* pix = s_pixmapCache.tqfind(key);
+ TQPixmap* pix = s_pixmapCache.find(key);
if(pix) {
return *pix;
}
@@ -553,7 +553,7 @@ void ImageFactory::removeImage(const TQString& id_, bool deleteImage_) {
Tellico::StringSet ImageFactory::imagesNotInCache() {
StringSet set;
for(TQDictIterator<Tellico::Data::Image> it(s_imageDict); it.current(); ++it) {
- if(s_imageCache.tqfind(it.currentKey()) == 0) {
+ if(s_imageCache.find(it.currentKey()) == 0) {
set.add(it.currentKey());
}
}
@@ -561,7 +561,7 @@ Tellico::StringSet ImageFactory::imagesNotInCache() {
}
bool ImageFactory::hasImage(const TQString& id_) {
- return s_imageCache.tqfind(id_, false) || s_imageDict.tqfind(id_);
+ return s_imageCache.find(id_, false) || s_imageDict.find(id_);
}
// the purpose here is to remove images from the dict if they're is on the disk somewhere,
@@ -576,7 +576,7 @@ void ImageFactory::releaseImages() {
const TQStringList images = s_imagesToRelease.toList();
for(TQStringList::ConstIterator it = images.begin(); it != images.end(); ++it) {
s_imagesToRelease.remove(*it);
- if(!s_imageDict.tqfind(*it)) {
+ if(!s_imageDict.find(*it)) {
continue;
}
// myLog() << "ImageFactory::releaseImage() - id = " << *it << endl;
@@ -601,7 +601,7 @@ void ImageFactory::setLocalDirectory(const KURL& url_) {
} else {
s_localDir = url_.directory(false);
// could have already been set once
- if(!url_.fileName().tqcontains(TQString::tqfromLatin1("_files"))) {
+ if(!url_.fileName().contains(TQString::tqfromLatin1("_files"))) {
s_localDir += url_.fileName().section('.', 0, 0) + TQString::tqfromLatin1("_files/");
}
myLog() << "ImageFactory::setLocalDirectory() - local dir = " << s_localDir << endl;
diff --git a/src/isbnvalidator.cpp b/src/isbnvalidator.cpp
index a3a9034..6f33c67 100644
--- a/src/isbnvalidator.cpp
+++ b/src/isbnvalidator.cpp
@@ -73,7 +73,7 @@ void ISBNValidator::fixup(TQString& input_) const {
void ISBNValidator::staticFixup(TQString& input_) {
if((input_.startsWith(TQString::tqfromLatin1("978"))
|| input_.startsWith(TQString::tqfromLatin1("979")))
- && input_.tqcontains(TQRegExp(TQString::tqfromLatin1("\\d"))) > 10) {
+ && input_.contains(TQRegExp(TQString::tqfromLatin1("\\d"))) > 10) {
return fixup13(input_);
}
return fixup10(input_);
@@ -95,9 +95,9 @@ TQValidator::State ISBNValidator::validate10(TQString& input_, int& pos_) const
}
*/
// two easy invalid cases are too many hyphens and the 'X' not in the last position
- if(input_.tqcontains('-') > 3
- || input_.tqcontains('X', false) > 1
- || (input_.tqfind('X', 0, false) != -1 && input_[len-1].upper() != 'X')) {
+ if(input_.contains('-') > 3
+ || input_.contains('X', false) > 1
+ || (input_.find('X', 0, false) != -1 && input_[len-1].upper() != 'X')) {
return TQValidator::Invalid;
}
@@ -114,7 +114,7 @@ TQValidator::State ISBNValidator::validate10(TQString& input_, int& pos_) const
// fix the case where the user attempts to delete the checksum; the
// solution is to delete the last digit as well
static const TQRegExp digit(TQString::tqfromLatin1("\\d"));
- if(atEnd && input_.tqcontains(digit) == 9 && input_[len-1] == '-') {
+ if(atEnd && input_.contains(digit) == 9 && input_[len-1] == '-') {
input_.truncate(len-2);
pos_ -= 2;
len -= 2;
@@ -142,9 +142,9 @@ TQValidator::State ISBNValidator::validate13(TQString& input_, int& pos_) const
static const TQRegExp isbn(TQString::tqfromLatin1("(\\d-?){13,17}"));
uint len = input_.length();
- const uint countX = input_.tqcontains('X', false);
+ const uint countX = input_.contains('X', false);
// two easy invalid cases are too many hyphens or 'X'
- if(input_.tqcontains('-') > 4 || countX > 1) {
+ if(input_.contains('-') > 4 || countX > 1) {
return TQValidator::Invalid;
}
@@ -167,7 +167,7 @@ TQValidator::State ISBNValidator::validate13(TQString& input_, int& pos_) const
// fix the case where the user attempts to delete the checksum; the
// solution is to delete the last digit as well
static const TQRegExp digit(TQString::tqfromLatin1("\\d"));
- const uint countN = input_.tqcontains(digit);
+ const uint countN = input_.contains(digit);
if(atEnd && (countN == 12 || countN == 9) && input_[len-1] == '-') {
input_.truncate(len-2);
pos_ -= 2;
@@ -198,8 +198,8 @@ void ISBNValidator::fixup10(TQString& input_) {
return;
}
- //tqreplace "x" with "X"
- input_.tqreplace('x', TQString::tqfromLatin1("X"));
+ //replace "x" with "X"
+ input_.replace('x', TQString::tqfromLatin1("X"));
// remove invalid chars
static const TQRegExp badChars(TQString::tqfromLatin1("[^\\d-X]"));
@@ -226,11 +226,11 @@ void ISBNValidator::fixup10(TQString& input_) {
// the user inserts one, then be sure to put it back
// Find the first hyphen. If there is none,
- // input_.tqfind('-') returns -1 and hyphen2_position = 0
- int hyphen2_position = input_.tqfind('-') + 1;
+ // input_.find('-') returns -1 and hyphen2_position = 0
+ int hyphen2_position = input_.find('-') + 1;
// Find the second one. If none, hyphen2_position = -2
- hyphen2_position = input_.tqfind('-', hyphen2_position) - 1;
+ hyphen2_position = input_.find('-', hyphen2_position) - 1;
// The second hyphen can not be in the last characters
if(hyphen2_position >= 9) {
@@ -240,7 +240,7 @@ void ISBNValidator::fixup10(TQString& input_) {
// Remove all existing hyphens. We will insert ours.
input_.remove('-');
// the only place that 'X' can be is last spot
- for(int xpos = input_.tqfind('X'); xpos > -1; xpos = input_.tqfind('X', xpos+1)) {
+ for(int xpos = input_.find('X'); xpos > -1; xpos = input_.find('X', xpos+1)) {
if(xpos < 9) { // remove if not 10th char
input_.remove(xpos, 1);
--xpos;
@@ -307,11 +307,11 @@ void ISBNValidator::fixup13(TQString& input_) {
}
// Find the first hyphen. If there is none,
- // input_.tqfind('-') returns -1 and hyphen2_position = 0
- int hyphen2_position = after.tqfind('-') + 1;
+ // input_.find('-') returns -1 and hyphen2_position = 0
+ int hyphen2_position = after.find('-') + 1;
// Find the second one. If none, hyphen2_position = -2
- hyphen2_position = after.tqfind('-', hyphen2_position) - 1;
+ hyphen2_position = after.find('-', hyphen2_position) - 1;
// The second hyphen can not be in the last characters
if(hyphen2_position >= 9) {
diff --git a/src/lccnvalidator.cpp b/src/lccnvalidator.cpp
index bee8d35..bde2427 100644
--- a/src/lccnvalidator.cpp
+++ b/src/lccnvalidator.cpp
@@ -45,7 +45,7 @@ TQString LCCNValidator::formalize(const TQString& value_) {
TQString year;
TQString serial;
// have to be able to differentiate 2 and 4-digit years, first check for hyphen position
- int pos = afterAlpha.tqfind('-');
+ int pos = afterAlpha.find('-');
if(pos > -1) {
year = afterAlpha.section('-', 0, 0);
serial = afterAlpha.section('-', 1);
diff --git a/src/loandialog.cpp b/src/loandialog.cpp
index 5d67a8f..ba7a16e 100644
--- a/src/loandialog.cpp
+++ b/src/loandialog.cpp
@@ -204,7 +204,7 @@ void LoanDialog::slotLoadAddressBook() {
Data::BorrowerVec borrowers = m_entries.begin()->collection()->borrowers();
for(Data::BorrowerVec::ConstIterator it = borrowers.constBegin(), end = borrowers.constEnd();
it != end; ++it) {
- if(items.tqfindIndex(it->name()) == -1) {
+ if(items.findIndex(it->name()) == -1) {
m_borrowerEdit->completionObject()->addItem(it->name());
}
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c09b3c4..c6b8dfb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -858,14 +858,14 @@ void MainWindow::initFileOpen(bool nofile_) {
const int type = Kernel::self()->collectionType();
TQString welcomeFile = locate("appdata", TQString::tqfromLatin1("welcome.html"));
TQString text = FileHandler::readTextFile(welcomeFile);
- text.tqreplace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
- text.tqreplace(TQString::tqfromLatin1("$BANNER$"),
+ text.replace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
+ text.replace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
+ text.replace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
+ text.replace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
+ text.replace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
+ text.replace(TQString::tqfromLatin1("$BANNER$"),
i18n("Welcome to the Tellico Collection Manager"));
- text.tqreplace(TQString::tqfromLatin1("$WELCOMETEXT$"),
+ text.replace(TQString::tqfromLatin1("$WELCOMETEXT$"),
i18n("<h3>Tellico is a tool for managing collections of books, "
"videos, music, and whatever else you want to catalog.</h3>"
"<h3>New entries can be added to your collection by "
@@ -943,7 +943,7 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
entryGroup = group.readEntry("Group By", defaultGroup);
}
}
- if(entryGroup.isEmpty() || !coll_->entryGroups().tqcontains(entryGroup)) {
+ if(entryGroup.isEmpty() || !coll_->entryGroups().contains(entryGroup)) {
entryGroup = defaultGroup;
}
m_groupView->setGroupField(entryGroup);
@@ -1426,7 +1426,7 @@ void MainWindow::activateEditSlot(const char* slot_) {
if(w && w->isVisible()) {
TQMetaObject* meta = w->tqmetaObject();
- int idx = meta->tqfindSlot(slot_ + 1, true);
+ int idx = meta->findSlot(slot_ + 1, true);
if(idx > -1) {
w->qt_invoke(idx, 0);
}
@@ -1610,7 +1610,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
}
TQString current = m_groupView->groupBy();
- if(current.isEmpty() || !coll_->entryGroups().tqcontains(current)) {
+ if(current.isEmpty() || !coll_->entryGroups().contains(current)) {
current = coll_->defaultGroupField();
}
@@ -1631,7 +1631,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
}
TQStringList names = groupMap.keys();
- int index = names.tqfindIndex(current);
+ int index = names.findIndex(current);
if(index == -1) {
current = names[0];
index = 0;
@@ -1824,8 +1824,8 @@ void MainWindow::setFilter(const TQString& text_) {
if(!text.isEmpty()) {
filter = new Filter(Filter::MatchAll);
TQString fieldName = TQString();
- // if the text tqcontains '=' assume it's a field name or title
- if(text.tqfind('=') > -1) {
+ // if the text contains '=' assume it's a field name or title
+ if(text.find('=') > -1) {
fieldName = text.section('=', 0, 0).stripWhiteSpace();
text = text.section('=', 1).stripWhiteSpace();
// check that the field name might be a title
@@ -1836,7 +1836,7 @@ void MainWindow::setFilter(const TQString& text_) {
// if the text contains any non-word characters, assume it's a regexp
// but \W in qt is letter, number, or '_', I want to be a bit less strict
TQRegExp rx(TQString::tqfromLatin1("[^\\w\\s-']"));
- if(text.tqfind(rx) == -1) {
+ if(text.find(rx) == -1) {
// split by whitespace, and add rules for each word
TQStringList tokens = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s")), text);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
@@ -2366,7 +2366,7 @@ bool MainWindow::importCollection(Data::CollPtr coll_, Import::Action action_) {
}
break;
- default: // tqreplace
+ default: // replace
Kernel::self()->replaceCollection(coll_);
m_fileOpenRecent->setCurrentItem(-1);
m_newDocument = true;
diff --git a/src/newstuff/dialog.cpp b/src/newstuff/dialog.cpp
index 8e6f229..e2d9c21 100644
--- a/src/newstuff/dialog.cpp
+++ b/src/newstuff/dialog.cpp
@@ -389,7 +389,7 @@ void Dialog::slotSelected(TQListViewItem* item_) {
m_infoLabel->setText(entry->author());
TQString desc = entry->summary(m_lang);
- desc.tqreplace(TQRegExp(TQString::tqfromLatin1("\\n")), TQString::tqfromLatin1("<br>"));
+ desc.replace(TQRegExp(TQString::tqfromLatin1("\\n")), TQString::tqfromLatin1("<br>"));
m_descLabel->setText(desc);
InstalltqStatus installed = static_cast<Item*>(item_)->status();
diff --git a/src/progressmanager.cpp b/src/progressmanager.cpp
index ab83392..6bc0298 100644
--- a/src/progressmanager.cpp
+++ b/src/progressmanager.cpp
@@ -73,7 +73,7 @@ ProgressManager::ProgressManager() : TQObject() {
}
void ProgressManager::setProgress(const TQObject* owner_, uint steps_) {
- if(!m_items.tqcontains(owner_)) {
+ if(!m_items.contains(owner_)) {
return;
}
@@ -83,7 +83,7 @@ void ProgressManager::setProgress(const TQObject* owner_, uint steps_) {
}
void ProgressManager::setTotalSteps(const TQObject* owner_, uint steps_) {
- if(!m_items.tqcontains(owner_)) {
+ if(!m_items.contains(owner_)) {
return;
}
@@ -92,7 +92,7 @@ void ProgressManager::setTotalSteps(const TQObject* owner_, uint steps_) {
}
void ProgressManager::setDone(const TQObject* owner_) {
- if(!m_items.tqcontains(owner_)) {
+ if(!m_items.contains(owner_)) {
return;
}
setDone(m_items[owner_]);
@@ -124,7 +124,7 @@ ProgressItem& ProgressManager::newProgressItemImpl(const TQObject* owner_,
const TQString& label_,
bool canCancel_) {
// myDebug() << "ProgressManager::newProgressItem() - " << owner_->className() << ":" << label_ << endl;
- if(m_items.tqcontains(owner_)) {
+ if(m_items.contains(owner_)) {
return *m_items[owner_];
}
diff --git a/src/ptrvector.h b/src/ptrvector.h
index a27c884..727c29e 100644
--- a/src/ptrvector.h
+++ b/src/ptrvector.h
@@ -134,7 +134,7 @@ public:
m_baseVector.insert(&m_baseVector[pos.m_index], t);
}
- Iterator tqfind(Ptr t) {
+ Iterator find(Ptr t) {
for(size_t i = 0; i < count(); ++i) {
if(m_baseVector[i].data() == t) {
return Iterator(this, i);
@@ -143,7 +143,7 @@ public:
return end();
}
- bool tqcontains(Ptr t) const { return tqFind(m_baseVector.begin(), m_baseVector.end(), Ptr(t)) != m_baseVector.end(); }
+ bool contains(Ptr t) const { return tqFind(m_baseVector.begin(), m_baseVector.end(), Ptr(t)) != m_baseVector.end(); }
bool remove(const Ptr& t) {
Ptr* it = tqFind(m_baseVector.begin(), m_baseVector.end(), t);
if(it == m_baseVector.end()) return false;
@@ -259,7 +259,7 @@ public:
void push_back(T* ptr) { m_baseVector.push_back(ptr); }
bool remove(T* ptr);
bool remove(Iterator it);
- bool tqcontains(const T* ptr) const;
+ bool contains(const T* ptr) const;
private:
#ifndef NDEBUG
@@ -311,7 +311,7 @@ bool Tellico::PtrVector<T>::remove(Iterator it) {
}
template <class T>
-bool Tellico::PtrVector<T>::tqcontains(const T* t) const {
+bool Tellico::PtrVector<T>::contains(const T* t) const {
if(!t) {
return false;
}
diff --git a/src/reportdialog.cpp b/src/reportdialog.cpp
index 7b0d815..d2cb615 100644
--- a/src/reportdialog.cpp
+++ b/src/reportdialog.cpp
@@ -68,7 +68,7 @@ ReportDialog::ReportDialog(TQWidget* parent_, const char* name_/*=0*/)
TQFileInfo fi(*it);
TQString file = fi.fileName();
TQString name = file.section('.', 0, -2);
- name.tqreplace('_', ' ');
+ name.replace('_', ' ');
TQString title = i18n((name + TQString::tqfromLatin1(" XSL Template")).utf8(), name.utf8());
templates.insert(title, file);
}
diff --git a/src/stringset.h b/src/stringset.h
index 68b27d5..934581b 100644
--- a/src/stringset.h
+++ b/src/stringset.h
@@ -28,7 +28,7 @@ public:
StringSet(int size = 17) : m_dict(size) {}
// replace instead of insert, to ensure unique keys
- void add(const TQString& val) { if(!val.isEmpty()) m_dict.tqreplace(val, reinterpret_cast<const int *>(1)); }
+ void add(const TQString& val) { if(!val.isEmpty()) m_dict.replace(val, reinterpret_cast<const int *>(1)); }
void add(const TQStringList& vals) {
for(TQStringList::ConstIterator it = vals.begin(), end = vals.end(); it != end; ++it) {
add(*it);
@@ -36,7 +36,7 @@ public:
}
bool remove(const TQString& val) { return !val.isEmpty() && m_dict.remove(val); }
void clear() { m_dict.clear(); }
- bool has(const TQString& val) const { return !val.isEmpty() && (m_dict.tqfind(val) != 0); }
+ bool has(const TQString& val) const { return !val.isEmpty() && (m_dict.find(val) != 0); }
bool isEmpty() const { return m_dict.isEmpty(); }
uint count() const { return m_dict.count(); }
diff --git a/src/tellico_utils.cpp b/src/tellico_utils.cpp
index d660839..f04036a 100644
--- a/src/tellico_utils.cpp
+++ b/src/tellico_utils.cpp
@@ -41,7 +41,7 @@ TQString Tellico::decodeHTML(TQString text) {
while(pos > -1) {
TQChar c = KCharsets::fromEntity(rx.cap(1));
if(!c.isNull()) {
- text.tqreplace(pos, rx.matchedLength(), c);
+ text.replace(pos, rx.matchedLength(), c);
}
pos = rx.search(text, pos+1);
}
@@ -83,7 +83,7 @@ TQString Tellico::i18nReplace(TQString text) {
static TQRegExp rx(TQString::tqfromLatin1("(?:\\n+ *)*<i18n>([^<]*)</i18n>(?: *\\n+)*"));
int pos = rx.search(text);
while(pos > -1) {
- text.tqreplace(pos, rx.matchedLength(), i18n(rx.cap(1).utf8()));
+ text.replace(pos, rx.matchedLength(), i18n(rx.cap(1).utf8()));
pos = rx.search(text, pos+rx.matchedLength());
}
return text;
diff --git a/src/translators/alexandriaexporter.cpp b/src/translators/alexandriaexporter.cpp
index c00b54b..f59cefe 100644
--- a/src/translators/alexandriaexporter.cpp
+++ b/src/translators/alexandriaexporter.cpp
@@ -35,7 +35,7 @@ namespace {
using Tellico::Export::AlexandriaExporter;
TQString& AlexandriaExporter::escapeText(TQString& str_) {
- str_.tqreplace('"', TQString::tqfromLatin1("\\\""));
+ str_.replace('"', TQString::tqfromLatin1("\\\""));
return str_;
}
diff --git a/src/translators/alexandriaimporter.cpp b/src/translators/alexandriaimporter.cpp
index 1df5116..c3a9db1 100644
--- a/src/translators/alexandriaimporter.cpp
+++ b/src/translators/alexandriaimporter.cpp
@@ -118,7 +118,7 @@ Tellico::Data::CollPtr AlexandriaImporter::collection() {
TQStringList authors;
line = ts.readLine();
TQRegExp begin(TQString::tqfromLatin1("^\\s*-\\s+"));
- while(!line.isNull() && line.tqfind(begin) > -1) {
+ while(!line.isNull() && line.find(begin) > -1) {
line.remove(begin);
authors += clean(line);
line = ts.readLine();
@@ -211,8 +211,8 @@ TQWidget* AlexandriaImporter::widget(TQWidget* parent_, const char* name_/*=0*/)
TQString& AlexandriaImporter::cleanLine(TQString& str_) {
static TQRegExp escRx(TQString::tqfromLatin1("\\\\x(\\w\\w)"), false);
str_.remove(TQString::tqfromLatin1("\\r"));
- str_.tqreplace(TQString::tqfromLatin1("\\n"), TQString::tqfromLatin1("\n"));
- str_.tqreplace(TQString::tqfromLatin1("\\t"), TQString::tqfromLatin1("\t"));
+ str_.replace(TQString::tqfromLatin1("\\n"), TQString::tqfromLatin1("\n"));
+ str_.replace(TQString::tqfromLatin1("\\t"), TQString::tqfromLatin1("\t"));
// YAML uses escape sequences like \xC3
int pos = escRx.search(str_);
@@ -230,7 +230,7 @@ TQString& AlexandriaImporter::cleanLine(TQString& str_) {
pos = escRx.search(str_, pos+1);
}
if(!bytes.isEmpty()) {
- str_.tqreplace(origPos, bytes.length()*4, TQString::fromUtf8(bytes.data()));
+ str_.replace(origPos, bytes.length()*4, TQString::fromUtf8(bytes.data()));
}
return str_;
}
@@ -245,7 +245,7 @@ TQString AlexandriaImporter::clean(TQString& str_) {
}
// we ignore YAML tags, this is not actually a good parser, but will do for now
str_.remove(TQRegExp(TQString::tqfromLatin1("^![^\\s]*\\s+")));
- return str_.tqreplace(quote, TQChar('"'));
+ return str_.replace(quote, TQChar('"'));
}
void AlexandriaImporter::slotCancel() {
diff --git a/src/translators/amcimporter.cpp b/src/translators/amcimporter.cpp
index d988d55..0209ddc 100644
--- a/src/translators/amcimporter.cpp
+++ b/src/translators/amcimporter.cpp
@@ -65,7 +65,7 @@ Tellico::Data::CollPtr AMCImporter::collection() {
m_ds.readRawBytes(buffer.data(), l);
TQString version = TQString::fromLocal8Bit(buffer, l);
TQRegExp versionRx(TQString::tqfromLatin1(".+AMC_(\\d+)\\.(\\d+).+"));
- if(version.tqfind(versionRx) == -1) {
+ if(version.find(versionRx) == -1) {
myDebug() << "AMCImporter::collection() - no file id match" << endl;
return 0;
}
@@ -198,7 +198,7 @@ void AMCImporter::readEntry() {
s = readString();
TQRegExp roleRx(TQString::tqfromLatin1("(.+) \\(([^(]+)\\)"));
roleRx.setMinimal(true);
- if(s.tqfind(roleRx) > -1) {
+ if(s.find(roleRx) > -1) {
TQString role = roleRx.cap(2).lower();
if(role == Latin1Literal("story") || role == Latin1Literal("written by")) {
e->setField(TQString::tqfromLatin1("writer"), roleRx.cap(1));
@@ -209,7 +209,7 @@ void AMCImporter::readEntry() {
e->setField(TQString::tqfromLatin1("producer"), s);
}
e->setField(TQString::tqfromLatin1("nationality"), readString());
- e->setField(TQString::tqfromLatin1("genre"), readString().tqreplace(TQString::tqfromLatin1(", "), TQString::tqfromLatin1("; ")));
+ e->setField(TQString::tqfromLatin1("genre"), readString().replace(TQString::tqfromLatin1(", "), TQString::tqfromLatin1("; ")));
e->setField(TQString::tqfromLatin1("cast"), parseCast(readString()).join(TQString::tqfromLatin1("; ")));
@@ -218,7 +218,7 @@ void AMCImporter::readEntry() {
e->setField(TQString::tqfromLatin1("comments"), readString());
s = readString(); // video format
TQRegExp regionRx(TQString::tqfromLatin1("Region \\d"));
- if(s.tqfind(regionRx) > -1) {
+ if(s.find(regionRx) > -1) {
e->setField(TQString::tqfromLatin1("region"), regionRx.cap(0));
}
e->setField(TQString::tqfromLatin1("audio-track"), readString()); // audio format
@@ -242,7 +242,7 @@ TQStringList AMCImporter::parseCast(const TQString& text_) {
TQRegExp castRx(TQString::tqfromLatin1("[,()]"));
TQString person, role;
int oldPos = 0;
- for(int pos = text_.tqfind(castRx); pos > -1; pos = text_.tqfind(castRx, pos+1)) {
+ for(int pos = text_.find(castRx); pos > -1; pos = text_.find(castRx, pos+1)) {
if(text_.at(pos) == ',' && nPar%2 == 0) {
// we're done with this one
person += text_.mid(oldPos, pos-oldPos).stripWhiteSpace();
diff --git a/src/translators/audiofileimporter.cpp b/src/translators/audiofileimporter.cpp
index 539c03e..e962b18 100644
--- a/src/translators/audiofileimporter.cpp
+++ b/src/translators/audiofileimporter.cpp
@@ -405,7 +405,7 @@ int AudioFileImporter::discNumber(const TagLib::FileRef& ref_) const {
}
if(!disc.isEmpty()) {
- int pos = disc.tqfind('/');
+ int pos = disc.find('/');
int n;
bool ok;
if(pos == -1) {
diff --git a/src/translators/bibtexexporter.cpp b/src/translators/bibtexexporter.cpp
index 867dda3..d51e061 100644
--- a/src/translators/bibtexexporter.cpp
+++ b/src/translators/bibtexexporter.cpp
@@ -287,11 +287,11 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
// insert "and" in between them (e.g. author and editor)
if(fIt->formatFlag() == Data::Field::FormatName
&& fIt->flags() & Data::Field::AllowMultiple) {
- value.tqreplace(Data::Field::delimiter(), TQString::tqfromLatin1(" and "));
+ value.replace(Data::Field::delimiter(), TQString::tqfromLatin1(" and "));
} else if(fIt->flags() & Data::Field::AllowMultiple) {
TQString bibsep = fIt->property(bibtexSep);
if(!bibsep.isEmpty()) {
- value.tqreplace(Data::Field::delimiter(), bibsep);
+ value.replace(Data::Field::delimiter(), bibsep);
}
} else if(fIt->type() == Data::Field::Para) {
// strip HTML from bibtex export
@@ -301,7 +301,7 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
} else if(fIt->property(bibtex) == Latin1Literal("pages")) {
TQRegExp rx(TQString::tqfromLatin1("(\\d)-(\\d)"));
for(int pos = rx.search(value); pos > -1; pos = rx.search(value, pos+2)) {
- value.tqreplace(pos, 3, rx.cap(1)+"--"+rx.cap(2));
+ value.replace(pos, 3, rx.cap(1)+"--"+rx.cap(2));
}
}
diff --git a/src/translators/bibtexhandler.cpp b/src/translators/bibtexhandler.cpp
index e6c07fa..873dc27 100644
--- a/src/translators/bibtexhandler.cpp
+++ b/src/translators/bibtexhandler.cpp
@@ -103,7 +103,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
TQString key;
// if no comma, take the last word
if(!author_.isEmpty()) {
- if(author_.tqfind(',') == -1) {
+ if(author_.find(',') == -1) {
key += author_.section(' ', -1).lower() + '-';
} else {
// if there is a comma, take the string up to the first comma
@@ -116,7 +116,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
}
key += year_;
// bibtex key may only contain [0-9a-zA-Z-]
- return key.tqreplace(s_badKeyChars, TQString());
+ return key.replace(s_badKeyChars, TQString());
}
void BibtexHandler::loadTranslationMaps() {
@@ -155,7 +155,7 @@ TQString BibtexHandler::importText(char* text_) {
TQString str = TQString::fromUtf8(text_);
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
for(TQStringList::Iterator sit = it.data().begin(); sit != it.data().end(); ++sit) {
- str.tqreplace(*sit, it.key());
+ str.replace(*sit, it.key());
}
}
@@ -166,7 +166,7 @@ TQString BibtexHandler::importText(char* text_) {
TQRegExp rx(TQString::tqfromLatin1("\\{([A-Z]+)\\}"));
rx.setMinimal(true);
- str.tqreplace(rx, TQString::tqfromLatin1("\\1"));
+ str.replace(rx, TQString::tqfromLatin1("\\1"));
return str;
}
@@ -191,7 +191,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQString text = text_;
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
- text.tqreplace(it.key(), it.data()[0]);
+ text.replace(it.key(), it.data()[0]);
}
if(macros_.isEmpty()) {
@@ -209,7 +209,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQStringList tokens = TQStringList::split('#', text, true);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
// check to see if token is a macro
- if(macros_.tqfindIndex((*it).stripWhiteSpace()) == -1) {
+ if(macros_.findIndex((*it).stripWhiteSpace()) == -1) {
// the token is NOT a macro, add braces around whole words and also around capitals
list << lquote + addBraces(*it) + rquote;
} else {
@@ -219,7 +219,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
const TQChar octo = '#';
text = list.join(octo);
- text.tqreplace(TQString(rquote)+octo+lquote, octo);
+ text.replace(TQString(rquote)+octo+lquote, octo);
return text;
}
@@ -264,7 +264,7 @@ bool BibtexHandler::setFieldValue(Data::EntryPtr entry_, const TQString& bibtexF
// special case keywords, replace commas with semi-colons so they get separated
TQString value = value_;
if(field->property(TQString::tqfromLatin1("bibtex")).startsWith(TQString::tqfromLatin1("keyword"))) {
- value.tqreplace(',', ';');
+ value.replace(',', ';');
// special case refbase bibtex export, with multiple keywords fields
TQString oValue = entry_->field(field);
if(!oValue.isEmpty()) {
@@ -279,9 +279,9 @@ TQString& BibtexHandler::cleanText(TQString& text_) {
// TQRegExp rx(TQString::tqfromLatin1("(?=[^\\\\])\\\\.+\\{"));
TQRegExp rx(TQString::tqfromLatin1("\\\\.+\\{"));
rx.setMinimal(true);
- text_.tqreplace(rx, TQString());
- text_.tqreplace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
- text_.tqreplace('~', ' ');
+ text_.replace(rx, TQString());
+ text_.replace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
+ text_.replace('~', ' ');
return text_;
}
diff --git a/src/translators/bibteximporter.cpp b/src/translators/bibteximporter.cpp
index 97ab55c..0b4775b 100644
--- a/src/translators/bibteximporter.cpp
+++ b/src/translators/bibteximporter.cpp
@@ -197,7 +197,7 @@ Tellico::Data::CollPtr BibtexImporter::readCollection(const TQString& text, int
}
TQString fieldName = TQString::fromUtf8(name);
if(fieldName == Latin1Literal("author") || fieldName == Latin1Literal("editor")) {
- str.tqreplace(TQRegExp(TQString::tqfromLatin1("\\sand\\s")), TQString::tqfromLatin1("; "));
+ str.replace(TQRegExp(TQString::tqfromLatin1("\\sand\\s")), TQString::tqfromLatin1("; "));
}
BibtexHandler::setFieldValue(entry, fieldName, str);
}
@@ -242,7 +242,7 @@ void BibtexImporter::parseText(const TQString& text) {
bool needsCleanup = false;
int brace = 0;
int startpos = 0;
- int pos = text.tqfind(rx, 0);
+ int pos = text.find(rx, 0);
while(pos > 0 && !m_cancelled) {
if(text[pos] == '{') {
++brace;
@@ -266,7 +266,7 @@ void BibtexImporter::parseText(const TQString& text) {
}
startpos = pos+1;
}
- pos = text.tqfind(rx, pos+1);
+ pos = text.find(rx, pos+1);
}
if(needsCleanup) {
// clean up some structures
diff --git a/src/translators/btparse/btparse.h b/src/translators/btparse/btparse.h
index df5206c..841d3ee 100644
--- a/src/translators/btparse/btparse.h
+++ b/src/translators/btparse/btparse.h
@@ -297,8 +297,8 @@ AST * bt_parse_file (char * filename,
/* postprocess.c */
void bt_postprocess_string (char * s, ushort options);
-char * bt_postprocess_value (AST * value, ushort options, boolean tqreplace);
-char * bt_postprocess_field (AST * field, ushort options, boolean tqreplace);
+char * bt_postprocess_value (AST * value, ushort options, boolean replace);
+char * bt_postprocess_field (AST * field, ushort options, boolean replace);
void bt_postprocess_entry (AST * entry, ushort options);
/* error.c */
diff --git a/src/translators/btparse/parse_auxiliary.c b/src/translators/btparse/parse_auxiliary.c
index 105e84e..401e322 100644
--- a/src/translators/btparse/parse_auxiliary.c
+++ b/src/translators/btparse/parse_auxiliary.c
@@ -71,7 +71,7 @@ void
fix_token_names (void)
{
int i;
- int num_tqreplace;
+ int num_replace;
#ifdef CLEVER_TOKEN_STUFF /* clever, but it doesn't work... */
/* arg! this doesn't work because I don't know how to find out the
@@ -91,8 +91,8 @@ fix_token_names (void)
}
#endif
- num_tqreplace = (sizeof(new_tokens) / sizeof(*new_tokens));
- for (i = 0; i < num_tqreplace; i++)
+ num_replace = (sizeof(new_tokens) / sizeof(*new_tokens));
+ for (i = 0; i < num_replace; i++)
{
const char *new = new_tokens[i].new_name;
const char **old = zztokens + new_tokens[i].token;
diff --git a/src/translators/btparse/postprocess.c b/src/translators/btparse/postprocess.c
index 127342c..ad8c764 100644
--- a/src/translators/btparse/postprocess.c
+++ b/src/translators/btparse/postprocess.c
@@ -156,7 +156,7 @@ bt_postprocess_string (char * s, ushort options)
sub-strings, which would be bad if you intend to concatenate
them later in the BibTeX sense.)
- The 'tqreplace' parameter is used to govern whether the
+ The 'replace' parameter is used to govern whether the
existing strings in the AST should be replaced with their
post-processed versions. This can extend as far as
collapsing a series of simple values into a single BTAST_STRING
@@ -171,7 +171,7 @@ bt_postprocess_string (char * s, ushort options)
rather than the tqparent of that list
-------------------------------------------------------------------------- */
char *
-bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
+bt_postprocess_value (AST * value, ushort options, boolean replace)
{
AST * simple_value; /* current simple value */
boolean pasting;
@@ -300,7 +300,7 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
bt_postprocess_string (tmp_string, string_opts);
}
- if (tqreplace)
+ if (replace)
{
simple_value->nodetype = BTAST_STRING;
if (simple_value->text)
@@ -312,12 +312,12 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
/*
* If the current simple value is a literal string, then just
- * post-process it. This will be done in-place if 'tqreplace' is
+ * post-process it. This will be done in-place if 'replace' is
* true, otherwise a copy of the string will be post-processed.
*/
else if (simple_value->nodetype == BTAST_STRING && simple_value->text)
{
- if (tqreplace)
+ if (replace)
{
tmp_string = simple_value->text;
}
@@ -340,12 +340,12 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
*/
if (simple_value->nodetype == BTAST_NUMBER)
{
- if (tqreplace && (options & BTO_CONVERT))
+ if (replace && (options & BTO_CONVERT))
simple_value->nodetype = BTAST_STRING;
if (simple_value->text)
{
- if (tqreplace)
+ if (replace)
tmp_string = simple_value->text;
else
{
@@ -395,7 +395,7 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
* `field', and replace text for first child with new_string.
*/
- if (tqreplace)
+ if (replace)
{
assert (value->right != NULL); /* there has to be > 1 simple value! */
zzfree_ast (value->right); /* free from second simple value on */
@@ -428,14 +428,14 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
@MODIFIED :
-------------------------------------------------------------------------- */
char *
-bt_postprocess_field (AST * field, ushort options, boolean tqreplace)
+bt_postprocess_field (AST * field, ushort options, boolean replace)
{
if (field == NULL) return NULL;
if (field->nodetype != BTAST_FIELD)
usage_error ("bt_postprocess_field: invalid AST node (not a field)");
strlwr (field->text); /* downcase field name */
- return bt_postprocess_value (field->down, options, tqreplace);
+ return bt_postprocess_value (field->down, options, replace);
} /* bt_postprocess_field() */
diff --git a/src/translators/btparse/sym.c b/src/translators/btparse/sym.c
index b1eabd9..2426dea 100644
--- a/src/translators/btparse/sym.c
+++ b/src/translators/btparse/sym.c
@@ -80,7 +80,7 @@
* a = zzs_new("Truck"); zzs_add(a->symbol, a);
*
* p = zzs_get("Plum");
- * if ( p == NULL ) fprintf(stderr, "Hmmm...Can't tqfind 'Plum'\n");
+ * if ( p == NULL ) fprintf(stderr, "Hmmm...Can't find 'Plum'\n");
*
* p = zzs_rmscope(&scope1)
* for (; p!=NULL; p=p->scope) {printf("Scope1: %s\n", p->symbol);}
diff --git a/src/translators/csvexporter.cpp b/src/translators/csvexporter.cpp
index ef608b7..6936ef0 100644
--- a/src/translators/csvexporter.cpp
+++ b/src/translators/csvexporter.cpp
@@ -46,13 +46,13 @@ TQString CSVExporter::fileFilter() const {
TQString& CSVExporter::escapeText(TQString& text_) {
bool quotes = false;
- if(text_.tqfind('"') != -1) {
+ if(text_.find('"') != -1) {
quotes = true;
// quotation marks will be escaped by using a double pair
- text_.tqreplace('"', TQString::tqfromLatin1("\"\""));
+ text_.replace('"', TQString::tqfromLatin1("\"\""));
}
// if the text contains quotes or the delimiter, it needs to be surrounded by quotes
- if(quotes || text_.tqfind(m_delimiter) != -1) {
+ if(quotes || text_.find(m_delimiter) != -1) {
text_.prepend('"');
text_.append('"');
}
diff --git a/src/translators/csvimporter.cpp b/src/translators/csvimporter.cpp
index b23dd93..532fbcf 100644
--- a/src/translators/csvimporter.cpp
+++ b/src/translators/csvimporter.cpp
@@ -157,7 +157,7 @@ Tellico::Data::CollPtr CSVImporter::collection() {
m_parser->skipLine();
}
- const uint numLines = text().tqcontains('\n');
+ const uint numLines = text().contains('\n');
const uint stepSize = TQMAX(s_stepSize, numLines/100);
const bool showProgress = options() & ImportProgress;
diff --git a/src/translators/dcimporter.cpp b/src/translators/dcimporter.cpp
index 55d9716..5839255 100644
--- a/src/translators/dcimporter.cpp
+++ b/src/translators/dcimporter.cpp
@@ -70,7 +70,7 @@ Tellico::Data::CollPtr DCImporter::collection() {
useNS = UseNS;
}
TQString s = nodeList.item(0).toElement().text();
- s.tqreplace('\n', ' ');
+ s.replace('\n', ' ');
s = s.simplifyWhiteSpace();
e->setField(TQString::tqfromLatin1("title"), s);
diff --git a/src/translators/freedbimporter.cpp b/src/translators/freedbimporter.cpp
index 155f79e..fa864b6 100644
--- a/src/translators/freedbimporter.cpp
+++ b/src/translators/freedbimporter.cpp
@@ -263,7 +263,7 @@ void FreeDBImporter::readCDROM() {
}
entry->setField(TQString::tqfromLatin1("keyword"), info.category);
TQString extd = info.extd;
- extd.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
+ extd.replace('\n', TQString::tqfromLatin1("<br/>"));
entry->setField(TQString::tqfromLatin1("comments"), extd);
TQStringList trackList;
@@ -381,7 +381,7 @@ void FreeDBImporter::readCache() {
}
entry->setField(TQString::tqfromLatin1("keyword"), info.category);
TQString extd = info.extd;
- extd.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
+ extd.replace('\n', TQString::tqfromLatin1("<br/>"));
entry->setField(TQString::tqfromLatin1("comments"), extd);
// step through trackList
@@ -541,7 +541,7 @@ TQWidget* FreeDBImporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
}
void FreeDBImporter::slotClicked(int id_) {
- TQButton* button = m_buttonGroup->tqfind(id_);
+ TQButton* button = m_buttonGroup->find(id_);
if(!button) {
return;
}
diff --git a/src/translators/gcfilmsexporter.cpp b/src/translators/gcfilmsexporter.cpp
index 5bf3285..279a3ab 100644
--- a/src/translators/gcfilmsexporter.cpp
+++ b/src/translators/gcfilmsexporter.cpp
@@ -225,7 +225,7 @@ void GCfilmsExporter::push(TQTextOStream& ts_, TQCString fieldName_, Data::Entry
}
TQString s = entry_->field(TQString::tqfromLatin1(fieldName_), format_);
if(f->flags() & Data::Field::AllowMultiple) {
- ts_ << s.tqreplace(TQString::tqfromLatin1("; "), TQChar(','));
+ ts_ << s.replace(TQString::tqfromLatin1("; "), TQChar(','));
} else {
ts_ << s;
}
diff --git a/src/translators/gcfilmsimporter.cpp b/src/translators/gcfilmsimporter.cpp
index 5b66691..027a233 100644
--- a/src/translators/gcfilmsimporter.cpp
+++ b/src/translators/gcfilmsimporter.cpp
@@ -59,7 +59,7 @@ Tellico::Data::CollPtr GCfilmsImporter::collection() {
readGCfilms(str);
} else {
// need to reparse the string if it's in utf-8
- if(line.lower().tqfind(TQString::tqfromLatin1("utf-8")) > 0) {
+ if(line.lower().find(TQString::tqfromLatin1("utf-8")) > 0) {
str = TQString::fromUtf8(str.local8Bit());
}
readGCstar(str);
@@ -114,7 +114,7 @@ void GCfilmsImporter::readGCfilms(const TQString& text_) {
if(values.size() > 2 && values[2] == Latin1Literal("UTF8")) {
// if locale encoding isn't utf8, need to do a reconversion
TQTextCodec* codec = TQTextCodec::codecForLocale();
- if(TQCString(codec->name()).tqfind("utf-8", 0, false) == -1) {
+ if(TQCString(codec->name()).find("utf-8", 0, false) == -1) {
convertUTF8 = true;
}
}
diff --git a/src/translators/griffith2tellico.py b/src/translators/griffith2tellico.py
index 19bf583..24bfb41 100755
--- a/src/translators/griffith2tellico.py
+++ b/src/translators/griffith2tellico.py
@@ -246,12 +246,12 @@ class GriffithParser:
except:
value = str(row[i])
- col = columns[i].tqreplace('[','').tqreplace(']','')
+ col = columns[i].replace('[','').replace(']','')
if col == 'genre' or col == 'studio':
values = value.split('/')
elif col == 'plot' or col == 'notes':
- value = value.tqreplace('\n', '\n<br/>')
+ value = value.replace('\n', '\n<br/>')
values = (value,)
elif col == 'cast':
values = []
@@ -272,7 +272,7 @@ class GriffithParser:
values = (value,)
else:
values = (value,)
- col = col.tqreplace('"','')
+ col = col.replace('"','')
data[col] = values
# get medium
diff --git a/src/translators/grs1importer.cpp b/src/translators/grs1importer.cpp
index 6b6c8d2..30c9a69 100644
--- a/src/translators/grs1importer.cpp
+++ b/src/translators/grs1importer.cpp
@@ -105,9 +105,9 @@ Tellico::Data::CollPtr GRS1Importer::collection() {
if(field == Latin1Literal("title")) {
val = val.section('/', 0, 0).stripWhiteSpace(); // only take portion of title before slash
} else if(field == Latin1Literal("author")) {
- val.tqreplace(dateRx, TQString());
+ val.replace(dateRx, TQString());
} else if(field == Latin1Literal("publisher")) {
- int pos = val.tqfind(pubRx);
+ int pos = val.find(pubRx);
if(pos > -1) {
e->setField(TQString::tqfromLatin1("address"), pubRx.cap(1));
val = pubRx.cap(2);
diff --git a/src/translators/htmlexporter.cpp b/src/translators/htmlexporter.cpp
index 77a09c0..8ea2218 100644
--- a/src/translators/htmlexporter.cpp
+++ b/src/translators/htmlexporter.cpp
@@ -292,7 +292,7 @@ void HTMLExporter::setFormattingOptions(Data::CollPtr coll) {
}
// the third sort column may be same as first
- if(!m_sort3.isEmpty() && sortTitles.tqfindIndex(m_sort3) == -1) {
+ if(!m_sort3.isEmpty() && sortTitles.findIndex(m_sort3) == -1) {
sortTitles << m_sort3;
}
@@ -539,7 +539,7 @@ const xmlChar* HTMLExporter::handleLink(const xmlChar* link_) {
}
TQString HTMLExporter::handleLink(const TQString& link_) {
- if(m_links.tqcontains(link_)) {
+ if(m_links.contains(link_)) {
return m_links[link_];
}
// assume that if the link_ is not relative, then we don't need to copy it
@@ -593,20 +593,20 @@ TQString HTMLExporter::analyzeInternalCSS(const TQString& str_) {
int start = 0;
int end = 0;
const TQString url = TQString::tqfromLatin1("url(");
- for(int pos = str.tqfind(url); pos >= 0; pos = str.tqfind(url, pos+1)) {
+ for(int pos = str.find(url); pos >= 0; pos = str.find(url, pos+1)) {
pos += 4; // url(
if(str[pos] == '"' || str[pos] == '\'') {
++pos;
}
start = pos;
- pos = str.tqfind(')', start);
+ pos = str.find(')', start);
end = pos;
if(str[pos-1] == '"' || str[pos-1] == '\'') {
--end;
}
- str.tqreplace(start, end-start, handleLink(str.mid(start, end-start)));
+ str.replace(start, end-start, handleLink(str.mid(start, end-start)));
}
return str;
}
@@ -704,7 +704,7 @@ bool HTMLExporter::writeEntryFiles() {
if(multipleTitles) {
file = file.section(';', 0, 0);
}
- file.tqreplace(badChars, TQChar('_'));
+ file.replace(badChars, TQChar('_'));
file += TQChar('-') + TQString::number(entryIt->id()) + html;
outputFile.setFileName(file);
diff --git a/src/translators/pilotdbexporter.cpp b/src/translators/pilotdbexporter.cpp
index caab986..f5ec13b 100644
--- a/src/translators/pilotdbexporter.cpp
+++ b/src/translators/pilotdbexporter.cpp
@@ -143,7 +143,7 @@ bool PilotDBExporter::exec() {
lv.name = codec->fromUnicode(i18n("View Columns")).data();
for(TQStringList::ConstIterator it = m_columns.begin(); it != m_columns.end(); ++it) {
PalmLib::FlatFile::ListViewColumn col;
- col.field = coll->fieldTitles().tqfindIndex(*it);
+ col.field = coll->fieldTitles().findIndex(*it);
lv.push_back(col);
}
db.appendListView(lv);
@@ -182,8 +182,8 @@ bool PilotDBExporter::exec() {
TQDate date(y, m, d);
value = date.toString(TQString::tqfromLatin1("yyyy/MM/dd"));
} else if(fIt->type() == Data::Field::Para) {
- value.tqreplace(br, TQChar('\n'));
- value.tqreplace(tags, TQString());
+ value.replace(br, TQChar('\n'));
+ value.replace(tags, TQString());
}
// the number of fields in the record must match the number of fields in the database
record.appendField(PilotDB::string2field(db.field_type(i),
diff --git a/src/translators/risimporter.cpp b/src/translators/risimporter.cpp
index e0a75a3..bcf4db5 100644
--- a/src/translators/risimporter.cpp
+++ b/src/translators/risimporter.cpp
@@ -201,7 +201,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
}
// myDebug() << tag << ": " << value << endl;
// if the next line is not empty and does not match start regexp, append to value
- while(!nextLine.isEmpty() && nextLine.tqfind(rx) == -1) {
+ while(!nextLine.isEmpty() && nextLine.find(rx) == -1) {
value += nextLine.stripWhiteSpace();
nextLine = t.readLine();
}
@@ -212,7 +212,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
entry = new Data::Entry(m_coll);
needToAddFinal = false;
continue;
- } else if(tag == Latin1Literal("TY") && s_typeMap->tqcontains(value)) {
+ } else if(tag == Latin1Literal("TY") && s_typeMap->contains(value)) {
// for entry-type, switch it to normalized type name
value = (*s_typeMap)[value];
} else if(tag == Latin1Literal("SN")) {
@@ -248,7 +248,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
// the lookup scheme is:
// 1. any field has an RIS property that matches the tag name
// 2. default field mapping tag -> field name
- Data::FieldPtr f = risFields_.tqfind(tag);
+ Data::FieldPtr f = risFields_.find(tag);
if(!f) {
// special case for BT
// primary title for books, secondary for everything else
diff --git a/src/translators/tellico_xml.cpp b/src/translators/tellico_xml.cpp
index cddae3b..d1ad3c1 100644
--- a/src/translators/tellico_xml.cpp
+++ b/src/translators/tellico_xml.cpp
@@ -70,7 +70,7 @@ bool Tellico::XML::validXMLElementName(const TQString& name_) {
TQString Tellico::XML::elementName(const TQString& name_) {
TQString name = name_;
// change white space to dashes
- name.tqreplace(TQRegExp(TQString::tqfromLatin1("\\s+")), TQString::tqfromLatin1("-"));
+ name.replace(TQRegExp(TQString::tqfromLatin1("\\s+")), TQString::tqfromLatin1("-"));
// first cut, if it passes, we're done
if(XML::validXMLElementName(name)) {
return name;
diff --git a/src/translators/tellicoimporter.cpp b/src/translators/tellicoimporter.cpp
index 3f97074..c7ac869 100644
--- a/src/translators/tellicoimporter.cpp
+++ b/src/translators/tellicoimporter.cpp
@@ -389,7 +389,7 @@ void TellicoImporter::readField(uint syntaxVersion_, const TQDomElement& elem_)
if(elem_.hasAttribute(TQString::tqfromLatin1("category"))) {
// at one point, the categories had keyboard accels
TQString cat = elem_.attribute(TQString::tqfromLatin1("category"));
- if(syntaxVersion_ < 9 && cat.tqfind('&') > -1) {
+ if(syntaxVersion_ < 9 && cat.find('&') > -1) {
cat.remove('&');
}
if(isI18n) {
@@ -637,7 +637,7 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl
value += TQString::tqfromLatin1("::");
value += entry->field(TQString::tqfromLatin1("artist"));
}
- if(values.tqfindIndex(value) == -1) {
+ if(values.findIndex(value) == -1) {
values += value;
}
}
@@ -703,9 +703,9 @@ void TellicoImporter::readFilter(const TQDomElement& elem_) {
}
TQString function = e.attribute(TQString::tqfromLatin1("function")).lower();
FilterRule::Function func;
- if(function == Latin1Literal("tqcontains")) {
+ if(function == Latin1Literal("contains")) {
func = FilterRule::FuncContains;
- } else if(function == Latin1Literal("nottqcontains")) {
+ } else if(function == Latin1Literal("notcontains")) {
func = FilterRule::FuncNotContains;
} else if(function == Latin1Literal("equals")) {
func = FilterRule::FuncEquals;
diff --git a/src/translators/tellicoxmlexporter.cpp b/src/translators/tellicoxmlexporter.cpp
index 011d991..9d9d033 100644
--- a/src/translators/tellicoxmlexporter.cpp
+++ b/src/translators/tellicoxmlexporter.cpp
@@ -378,7 +378,7 @@ void TellicoXMLExporter::exportImageXML(TQDomDocument& dom_, TQDomElement& paren
}
void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& parent_) const {
- Data::EntryVec vec = entries(); // need a copy for ::tqcontains();
+ Data::EntryVec vec = entries(); // need a copy for ::contains();
bool exportAll = collection()->entries().count() == vec.count();
// iterate over each group, which are the first tqchildren
for(GroupIterator gIt = Controller::self()->groupIterator(); gIt.group(); ++gIt) {
@@ -390,7 +390,7 @@ void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& paren
// now iterate over all entry items in the group
Data::EntryVec sorted = Data::Document::self()->sortEntries(*gIt.group());
for(Data::EntryVec::Iterator eIt = sorted.begin(); eIt != sorted.end(); ++eIt) {
- if(!exportAll && !vec.tqcontains(eIt)) {
+ if(!exportAll && !vec.contains(eIt)) {
continue;
}
TQDomElement entryRefElem = dom_.createElement(TQString::tqfromLatin1("entryRef"));
@@ -416,10 +416,10 @@ void TellicoXMLExporter::exportFilterXML(TQDomDocument& dom_, TQDomElement& pare
ruleElem.setAttribute(TQString::tqfromLatin1("pattern"), it.current()->pattern());
switch(it.current()->function()) {
case FilterRule::FuncContains:
- ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("tqcontains"));
+ ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("contains"));
break;
case FilterRule::FuncNotContains:
- ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("nottqcontains"));
+ ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("notcontains"));
break;
case FilterRule::FuncEquals:
ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("equals"));
diff --git a/src/translators/xslthandler.cpp b/src/translators/xslthandler.cpp
index bdbe8f2..853f6a6 100644
--- a/src/translators/xslthandler.cpp
+++ b/src/translators/xslthandler.cpp
@@ -151,8 +151,8 @@ void XSLTHandler::setXSLTDoc(const TQDomDocument& dom_, const TQCString& xsltFil
for(uint j = 0; j < childs.count(); ++j) {
if(childs.item(j).isProcessingInstruction()) {
TQDomProcessingInstruction pi = childs.item(j).toProcessingInstruction();
- if(pi.data().lower().tqcontains(TQString::tqfromLatin1("encoding"))) {
- if(!pi.data().lower().tqcontains(TQString::tqfromLatin1("utf-8"))) {
+ if(pi.data().lower().contains(TQString::tqfromLatin1("encoding"))) {
+ if(!pi.data().lower().contains(TQString::tqfromLatin1("utf-8"))) {
utf8 = false;
// } else {
// myDebug() << "XSLTHandler::setXSLTDoc() - PI = " << pi.data() << endl;
@@ -188,7 +188,7 @@ void XSLTHandler::setXSLTDoc(const TQDomDocument& dom_, const TQCString& xsltFil
void XSLTHandler::addStringParam(const TQCString& name_, const TQCString& value_) {
TQCString value = value_;
- value.tqreplace('\'', "&apos;");
+ value.replace('\'', "&apos;");
addParam(name_, TQCString("'") + value + TQCString("'"));
}
diff --git a/src/translators/xsltimporter.cpp b/src/translators/xsltimporter.cpp
index eb4cd2a..3edbcf6 100644
--- a/src/translators/xsltimporter.cpp
+++ b/src/translators/xsltimporter.cpp
@@ -41,7 +41,7 @@ static bool isUTF8(const KURL& url_) {
ref->open();
TQTextStream stream(ref->file());
TQString line = stream.readLine().lower();
- return line.tqfind(TQString::tqfromLatin1("utf-8")) > 0;
+ return line.find(TQString::tqfromLatin1("utf-8")) > 0;
}
}
diff --git a/src/upcvalidator.cpp b/src/upcvalidator.cpp
index 8746595..fb2bd87 100644
--- a/src/upcvalidator.cpp
+++ b/src/upcvalidator.cpp
@@ -31,7 +31,7 @@ TQValidator::State UPCValidator::validate(TQString& input_, int& pos_) const {
}
// no spaces allowed
- if(input_.tqcontains(' ')) {
+ if(input_.contains(' ')) {
return TQValidator::Invalid;
}
@@ -67,7 +67,7 @@ void UPCValidator::fixup(TQString& input_) const {
}
input_ = input_.stripWhiteSpace();
- int pos = input_.tqfind(' ');
+ int pos = input_.find(' ');
if(pos > -1) {
input_ = input_.left(pos);
}
@@ -98,7 +98,7 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
if(!input_.startsWith(TQString::tqfromLatin1(".C3"))) { // all cuecat codes start with .C3
return Invalid;
}
- const int periods = input_.tqcontains('.');
+ const int periods = input_.contains('.');
if(periods < 4) {
return Intermediate; // not enough yet
} else if(periods > 4) {
@@ -113,9 +113,9 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
for(uint i = 0; i < code.length(); ++i) {
if(code[i] >= 'A' && code[i] <= 'Z') {
- code.tqreplace(i, 1, code[i].lower());
+ code.replace(i, 1, code[i].lower());
} else if(code[i] >= 'a' && code[i] <= 'z') {
- code.tqreplace(i, 1, code[i].upper());
+ code.replace(i, 1, code[i].upper());
}
}
@@ -123,7 +123,7 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
for(uint i = 0; i < code.length(); ++i) {
char c = code[i].latin1() ^ 'C';
- code.tqreplace(i, 1, c);
+ code.replace(i, 1, c);
}
input_ = code;