diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:34:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:34:15 -0600 |
commit | 031454e56009d576589c28757f6c6fcf4884095e (patch) | |
tree | ad4c9959d05a814c9090e8fe63ba27057903271b /src/entry.cpp | |
parent | 54011e0e1af8cd96162160ecf5d361a59a2c733e (diff) | |
download | tellico-031454e56009d576589c28757f6c6fcf4884095e.tar.gz tellico-031454e56009d576589c28757f6c6fcf4884095e.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/entry.cpp')
-rw-r--r-- | src/entry.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/entry.cpp b/src/entry.cpp index 136fb49..801a9a4 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 { @@ -332,7 +332,7 @@ bool Entry::isOwned() { return (m_coll && m_id > -1 && m_coll->entryCount() > 0 && m_coll->entries().contains(this)); } -// a null string means tqinvalidate all +// a null string means invalidate all void Entry::invalidateFormattedFieldValue(const TQString& name_) { if(name_.isNull()) { m_formattedFields.clear(); @@ -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) { |