summaryrefslogtreecommitdiffstats
path: root/src/entry.cpp
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 /src/entry.cpp
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
Diffstat (limited to 'src/entry.cpp')
-rw-r--r--src/entry.cpp24
1 files changed, 12 insertions, 12 deletions
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;