diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /akregator/src/articlefilter.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'akregator/src/articlefilter.cpp')
-rw-r--r-- | akregator/src/articlefilter.cpp | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/akregator/src/articlefilter.cpp b/akregator/src/articlefilter.cpp index 21009190f..fc1ff29af 100644 --- a/akregator/src/articlefilter.cpp +++ b/akregator/src/articlefilter.cpp @@ -43,35 +43,35 @@ TQString Criterion::subjectToString(Subject subj) switch (subj) { case Title: - return TQString::tqfromLatin1("Title"); + return TQString::fromLatin1("Title"); case Link: - return TQString::tqfromLatin1("Link"); + return TQString::fromLatin1("Link"); case Author: - return TQString::tqfromLatin1("Author"); + return TQString::fromLatin1("Author"); case Description: - return TQString::tqfromLatin1("Description"); - case tqStatus: - return TQString::tqfromLatin1("Status"); + return TQString::fromLatin1("Description"); + case Status: + return TQString::fromLatin1("Status"); case KeepFlag: - return TQString::tqfromLatin1("KeepFlag"); + return TQString::fromLatin1("KeepFlag"); default: // should never happen (TM) - return TQString::tqfromLatin1("Description"); + return TQString::fromLatin1("Description"); } } Criterion::Subject Criterion::stringToSubject(const TQString& subjStr) { - if (subjStr == TQString::tqfromLatin1("Title")) + if (subjStr == TQString::fromLatin1("Title")) return Title; - else if (subjStr == TQString::tqfromLatin1("Link")) + else if (subjStr == TQString::fromLatin1("Link")) return Link; - else if (subjStr == TQString::tqfromLatin1("Description")) + else if (subjStr == TQString::fromLatin1("Description")) return Description; - else if (subjStr == TQString::tqfromLatin1("Author")) + else if (subjStr == TQString::fromLatin1("Author")) return Author; - else if (subjStr == TQString::tqfromLatin1("Status")) - return tqStatus; - else if (subjStr == TQString::tqfromLatin1("KeepFlag")) + else if (subjStr == TQString::fromLatin1("Status")) + return Status; + else if (subjStr == TQString::fromLatin1("KeepFlag")) return KeepFlag; // hopefully never reached @@ -83,27 +83,27 @@ TQString Criterion::predicateToString(Predicate pred) switch (pred) { case Contains: - return TQString::tqfromLatin1("Contains"); + return TQString::fromLatin1("Contains"); case Equals: - return TQString::tqfromLatin1("Equals"); + return TQString::fromLatin1("Equals"); case Matches: - return TQString::tqfromLatin1("Matches"); + return TQString::fromLatin1("Matches"); case Negation: - return TQString::tqfromLatin1("Negation"); + return TQString::fromLatin1("Negation"); default:// hopefully never reached - return TQString::tqfromLatin1("Contains"); + return TQString::fromLatin1("Contains"); } } Criterion::Predicate Criterion::stringToPredicate(const TQString& predStr) { - if (predStr == TQString::tqfromLatin1("Contains")) + if (predStr == TQString::fromLatin1("Contains")) return Contains; - else if (predStr == TQString::tqfromLatin1("Equals")) + else if (predStr == TQString::fromLatin1("Equals")) return Equals; - else if (predStr == TQString::tqfromLatin1("Matches")) + else if (predStr == TQString::fromLatin1("Matches")) return Matches; - else if (predStr == TQString::tqfromLatin1("Negation")) + else if (predStr == TQString::fromLatin1("Negation")) return Negation; // hopefully never reached @@ -124,24 +124,24 @@ Criterion::Criterion( Subject subject, Predicate predicate, const TQVariant &obj void Criterion::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("subject"), subjectToString(m_subject)); + config->writeEntry(TQString::fromLatin1("subject"), subjectToString(m_subject)); - config->writeEntry(TQString::tqfromLatin1("predicate"), predicateToString(m_predicate)); + config->writeEntry(TQString::fromLatin1("predicate"), predicateToString(m_predicate)); - config->writeEntry(TQString::tqfromLatin1("objectType"), TQString(m_object.typeName())); + config->writeEntry(TQString::fromLatin1("objectType"), TQString(m_object.typeName())); - config->writeEntry(TQString::tqfromLatin1("objectValue"), m_object); + config->writeEntry(TQString::fromLatin1("objectValue"), m_object); } void Criterion::readConfig(KConfig* config) { - m_subject = stringToSubject(config->readEntry(TQString::tqfromLatin1("subject"))); - m_predicate = stringToPredicate(config->readEntry(TQString::tqfromLatin1("predicate"))); - TQVariant::Type type = TQVariant::nameToType(config->readEntry(TQString::tqfromLatin1("objType")).ascii()); + m_subject = stringToSubject(config->readEntry(TQString::fromLatin1("subject"))); + m_predicate = stringToPredicate(config->readEntry(TQString::fromLatin1("predicate"))); + TQVariant::Type type = TQVariant::nameToType(config->readEntry(TQString::fromLatin1("objType")).ascii()); if (type != TQVariant::Invalid) { - m_object = config->readPropertyEntry(TQString::tqfromLatin1("objectValue"), type); + m_object = config->readPropertyEntry(TQString::fromLatin1("objectValue"), type); } } @@ -163,7 +163,7 @@ bool Criterion::satisfiedBy( const Article &article ) const // ### Maybe use prettyURL here? concreteSubject = TQVariant(article.link().url()); break; - case tqStatus: + case Status: concreteSubject = TQVariant(article.status()); break; case KeepFlag: @@ -269,15 +269,15 @@ bool ArticleMatcher::matches( const Article &a ) const void ArticleMatcher::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("matcherAssociation"), associationToString(m_association)); + config->writeEntry(TQString::fromLatin1("matcherAssociation"), associationToString(m_association)); - config->writeEntry(TQString::tqfromLatin1("matcherCriteriaCount"), m_criteria.count()); + config->writeEntry(TQString::fromLatin1("matcherCriteriaCount"), m_criteria.count()); int index = 0; for (TQValueList<Criterion>::ConstIterator it = m_criteria.begin(); it != m_criteria.end(); ++it) { - config->setGroup(config->group()+TQString::tqfromLatin1("_Criterion")+TQString::number(index)); + config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(index)); (*it).writeConfig(config); ++index; } @@ -286,14 +286,14 @@ void ArticleMatcher::writeConfig(KConfig* config) const void ArticleMatcher::readConfig(KConfig* config) { m_criteria.clear(); - m_association = stringToAssociation(config->readEntry(TQString::tqfromLatin1("matcherAssociation"))); + m_association = stringToAssociation(config->readEntry(TQString::fromLatin1("matcherAssociation"))); - int count = config->readNumEntry(TQString::tqfromLatin1("matcherCriteriaCount"), 0); + int count = config->readNumEntry(TQString::fromLatin1("matcherCriteriaCount"), 0); for (int i = 0; i < count; ++i) { Criterion c; - config->setGroup(config->group()+TQString::tqfromLatin1("_Criterion")+TQString::number(i)); + config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(i)); c.readConfig(config); m_criteria.append(c); } @@ -343,9 +343,9 @@ bool ArticleMatcher::allCriteriaMatch( const Article &a ) const ArticleMatcher::Association ArticleMatcher::stringToAssociation(const TQString& assocStr) { - if (assocStr == TQString::tqfromLatin1("LogicalAnd")) + if (assocStr == TQString::fromLatin1("LogicalAnd")) return LogicalAnd; - else if (assocStr == TQString::tqfromLatin1("LogicalOr")) + else if (assocStr == TQString::fromLatin1("LogicalOr")) return LogicalOr; else return None; @@ -356,11 +356,11 @@ TQString ArticleMatcher::associationToString(Association association) switch (association) { case LogicalAnd: - return TQString::tqfromLatin1("LogicalAnd"); + return TQString::fromLatin1("LogicalAnd"); case LogicalOr: - return TQString::tqfromLatin1("LogicalOr"); + return TQString::fromLatin1("LogicalOr"); default: - return TQString::tqfromLatin1("None"); + return TQString::fromLatin1("None"); } } @@ -408,13 +408,13 @@ TagMatcher::TagMatcher(const TagMatcher& other) : AbstractMatcher(other), d(0) void TagMatcher::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("matcherType"), TQString::tqfromLatin1("TagMatcher")); - config->writeEntry(TQString::tqfromLatin1("matcherParams"), d->tagID); + config->writeEntry(TQString::fromLatin1("matcherType"), TQString::fromLatin1("TagMatcher")); + config->writeEntry(TQString::fromLatin1("matcherParams"), d->tagID); } void TagMatcher::readConfig(KConfig* config) { - d->tagID = config->readEntry(TQString::tqfromLatin1("matcherParams")); + d->tagID = config->readEntry(TQString::fromLatin1("matcherParams")); } bool TagMatcher::operator==(const AbstractMatcher& other) const @@ -449,7 +449,7 @@ SeStatusAction::SeStatusAction(int status) : m_status(status) void SeStatusAction::exec(Article& article) { if (!article.isNull()) - article.setqStatus(m_status); + article.seStatus(m_status); } int SeStatusAction::status() const @@ -457,20 +457,20 @@ int SeStatusAction::status() const return m_status; } -void SeStatusAction::setqStatus(int status) +void SeStatusAction::seStatus(int status) { m_status = status; } void SeStatusAction::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("SeStatusAction")); - config->writeEntry(TQString::tqfromLatin1("actionParams"), m_status); + config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("SeStatusAction")); + config->writeEntry(TQString::fromLatin1("actionParams"), m_status); } void SeStatusAction::readConfig(KConfig* config) { - m_status = config->readNumEntry(TQString::tqfromLatin1("actionParams"), Article::Read); + m_status = config->readNumEntry(TQString::fromLatin1("actionParams"), Article::Read); } bool SeStatusAction::operator==(const AbstractAction& other) @@ -581,12 +581,12 @@ bool ArticleFilter::operator==(const ArticleFilter& other) const void ArticleFilterList::writeConfig(KConfig* config) const { - config->setGroup(TQString::tqfromLatin1("Filters")); - config->writeEntry(TQString::tqfromLatin1("count"), count()); + config->setGroup(TQString::fromLatin1("Filters")); + config->writeEntry(TQString::fromLatin1("count"), count()); int index = 0; for (ArticleFilterList::ConstIterator it = begin(); it != end(); ++it) { - config->setGroup(TQString::tqfromLatin1("Filters_")+TQString::number(index)); + config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(index)); (*it).writeConfig(config); ++index; } @@ -595,11 +595,11 @@ void ArticleFilterList::writeConfig(KConfig* config) const void ArticleFilterList::readConfig(KConfig* config) { clear(); - config->setGroup(TQString::tqfromLatin1("Filters")); - int count = config->readNumEntry(TQString::tqfromLatin1("count"), 0); + config->setGroup(TQString::fromLatin1("Filters")); + int count = config->readNumEntry(TQString::fromLatin1("count"), 0); for (int i = 0; i < count; ++i) { - config->setGroup(TQString::tqfromLatin1("Filters_")+TQString::number(i)); + config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(i)); ArticleFilter filter; filter.readConfig(config); append(filter); @@ -609,13 +609,13 @@ void ArticleFilterList::readConfig(KConfig* config) void AssignTagAction::readConfig(KConfig* config) { - m_tagID = config->readEntry(TQString::tqfromLatin1("actionParams")); + m_tagID = config->readEntry(TQString::fromLatin1("actionParams")); } void AssignTagAction::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("AssignTagAction")); - config->writeEntry(TQString::tqfromLatin1("actionParams"), m_tagID); + config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("AssignTagAction")); + config->writeEntry(TQString::fromLatin1("actionParams"), m_tagID); } bool AssignTagAction::operator==(const AbstractAction& other) @@ -644,7 +644,7 @@ void DeleteAction::readConfig(KConfig* /*config*/) void DeleteAction::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("DeleteAction")); + config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("DeleteAction")); } bool DeleteAction::operator==(const AbstractAction& other) @@ -661,27 +661,27 @@ void ArticleFilter::readConfig(KConfig* config) delete d->action; d->action = 0; - d->name = config->readEntry(TQString::tqfromLatin1("name")); - d->id = config->readNumEntry(TQString::tqfromLatin1("id"), 0); + d->name = config->readEntry(TQString::fromLatin1("name")); + d->id = config->readNumEntry(TQString::fromLatin1("id"), 0); - TQString matcherType = config->readEntry(TQString::tqfromLatin1("matcherType")); + TQString matcherType = config->readEntry(TQString::fromLatin1("matcherType")); - if (matcherType == TQString::tqfromLatin1("TagMatcher")) + if (matcherType == TQString::fromLatin1("TagMatcher")) d->matcher = new TagMatcher(); - else if (matcherType == TQString::tqfromLatin1("ArticleMatcher")) + else if (matcherType == TQString::fromLatin1("ArticleMatcher")) d->matcher = new ArticleMatcher(); if (d->matcher) d->matcher->readConfig(config); - TQString actionType = config->readEntry(TQString::tqfromLatin1("actionType")); + TQString actionType = config->readEntry(TQString::fromLatin1("actionType")); - if (actionType == TQString::tqfromLatin1("AssignTagAction")) + if (actionType == TQString::fromLatin1("AssignTagAction")) d->action = new AssignTagAction(); - else if (actionType == TQString::tqfromLatin1("DeleteAction")) + else if (actionType == TQString::fromLatin1("DeleteAction")) d->action = new DeleteAction(); - else if (actionType == TQString::tqfromLatin1("SeStatusAction")) + else if (actionType == TQString::fromLatin1("SeStatusAction")) d->action = new SeStatusAction(); if (d->action) @@ -690,8 +690,8 @@ void ArticleFilter::readConfig(KConfig* config) void ArticleFilter::writeConfig(KConfig* config) const { - config->writeEntry(TQString::tqfromLatin1("name"), d->name); - config->writeEntry(TQString::tqfromLatin1("id"), d->id); + config->writeEntry(TQString::fromLatin1("name"), d->name); + config->writeEntry(TQString::fromLatin1("id"), d->id); d->matcher->writeConfig(config); d->action->writeConfig(config); } |