summaryrefslogtreecommitdiffstats
path: root/src/entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry.cpp')
-rw-r--r--src/entry.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/entry.cpp b/src/entry.cpp
index 136fb49..96f46ac 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -48,16 +48,16 @@ bool Entry::operator==(const Entry& e1) {
e1.m_coll && e1.m_coll->type() == Collection::File) {
// don't forget case where both could have empty urls
// but different values for other fields
- TQString u = field(TQString::tqfromLatin1("url"));
+ TQString u = field(TQString::fromLatin1("url"));
if(!u.isEmpty()) {
// versions before 1.2.7 could have saved the url without the protocol
- bool b = KURL::fromPathOrURL(u) == KURL::fromPathOrURL(e1.field(TQString::tqfromLatin1("url")));
+ bool b = KURL::fromPathOrURL(u) == KURL::fromPathOrURL(e1.field(TQString::fromLatin1("url")));
if(b) {
return true;
} else {
- Data::FieldPtr f = m_coll->fieldByName(TQString::tqfromLatin1("url"));
- if(f && f->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true")) {
- return KURL(Document::self()->URL(), u) == KURL::fromPathOrURL(e1.field(TQString::tqfromLatin1("url")));
+ Data::FieldPtr f = m_coll->fieldByName(TQString::fromLatin1("url"));
+ if(f && f->property(TQString::fromLatin1("relative")) == Latin1Literal("true")) {
+ return KURL(Document::self()->URL(), u) == KURL::fromPathOrURL(e1.field(TQString::fromLatin1("url")));
}
}
}
@@ -125,17 +125,17 @@ void Entry::setCollection(CollPtr coll_) {
// it would be better to do this in a real OOO way, but this should work
const bool addEntryType = m_coll->type() == Collection::Book &&
coll_->type() == Collection::Bibtex &&
- !m_coll->hasField(TQString::tqfromLatin1("entry-type"));
+ !m_coll->hasField(TQString::fromLatin1("entry-type"));
m_coll = coll_;
m_id = -1;
// set this after changing the m_coll pointer since setField() checks field validity
if(addEntryType) {
- setField(TQString::tqfromLatin1("entry-type"), TQString::tqfromLatin1("book"));
+ setField(TQString::fromLatin1("entry-type"), TQString::fromLatin1("book"));
}
}
TQString Entry::title() const {
- return formattedField(TQString::tqfromLatin1("title"));
+ return formattedField(TQString::fromLatin1("title"));
}
TQString Entry::field(Data::FieldPtr field_, bool formatted_/*=false*/) const {
@@ -317,7 +317,7 @@ TQStringList Entry::groupNamesByFieldName(const TQString& fieldName_) const {
// only use first column for group
TQStringList::Iterator it = groups.begin();
while(it != groups.end()) {
- (*it) = (*it).section(TQString::tqfromLatin1("::"), 0, 0);
+ (*it) = (*it).section(TQString::fromLatin1("::"), 0, 0);
if((*it).isEmpty()) {
it = groups.remove(it); // points to next in list
} else {
@@ -423,7 +423,7 @@ int Entry::compareValues(EntryPtr e1, EntryPtr e2, FieldPtr f) {
}
}
// try removing punctuation
- TQRegExp notAlphaNum(TQString::tqfromLatin1("[^\\s\\w]"));
+ TQRegExp notAlphaNum(TQString::fromLatin1("[^\\s\\w]"));
TQString s1a = s1; s1a.remove(notAlphaNum);
TQString s2a = s2; s2a.remove(notAlphaNum);
if(!s1a.isEmpty() && s1a == s2a) {
@@ -437,7 +437,7 @@ int Entry::compareValues(EntryPtr e1, EntryPtr e2, FieldPtr f) {
return 3;
}
// try removing everything between parentheses
- TQRegExp rx(TQString::tqfromLatin1("\\s*\\(.*\\)\\s*"));
+ TQRegExp rx(TQString::fromLatin1("\\s*\\(.*\\)\\s*"));
s1.remove(rx);
s2.remove(rx);
if(!s1.isEmpty() && s1 == s2) {