diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /akregator/src/article.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/article.cpp')
-rw-r--r-- | akregator/src/article.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/akregator/src/article.cpp b/akregator/src/article.cpp index 09f631a0a..c0151af39 100644 --- a/akregator/src/article.cpp +++ b/akregator/src/article.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include "article.h" @@ -55,7 +55,7 @@ struct Article::Private : public Shared 0001 0000 Keep */ - enum Status {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10}; + enum tqStatus {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10}; TQString guid; Backend::FeedStorage* archive; @@ -109,7 +109,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) if (article.meta("deleted") == "true") { // if article is in deleted state, we just add the status and omit the rest d->status = Private::Read | Private::Deleted; - d->archive->seStatus(d->guid, d->status); + d->archive->setqStatus(d->guid, d->status); } else { // article is not deleted, let's add it to the archive @@ -157,7 +157,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) int statusInt = status.toInt(); if (statusInt == New) statusInt = Unread; - seStatus(statusInt); + setqStatus(statusInt); } setKeep(article.meta("keep") == "true"); } @@ -210,9 +210,9 @@ void Article::setDeleted() if (isDeleted()) return; - seStatus(Read); + setqStatus(Read); d->status = Private::Deleted | Private::Read; - d->archive->seStatus(d->guid, d->status); + d->archive->setqStatus(d->guid, d->status); d->archive->setDeleted(d->guid); if (d->feed) @@ -299,13 +299,13 @@ int Article::status() const return Unread; } -void Article::seStatus(int stat) +void Article::setqStatus(int stat) { // use status() rather than statusBits() here to filter out status flags that we are not // interested in - int oldStatus = status(); + int oldtqStatus = status(); - if (oldStatus != stat) + if (oldtqStatus != stat) { switch (stat) { @@ -319,9 +319,9 @@ void Article::seStatus(int stat) d->status = ( d->status | Private::New) & ~Private::Read; break; } - d->archive->seStatus(d->guid, d->status); + d->archive->setqStatus(d->guid, d->status); if (d->feed) - d->feed->setArticleChanged(*this, oldStatus); + d->feed->setArticleChanged(*this, oldtqStatus); } } @@ -404,7 +404,7 @@ RSS::Enclosure Article::enclosure() const void Article::setKeep(bool keep) { d->status = keep ? ( statusBits() | Private::Keep) : ( statusBits() & ~Private::Keep); - d->archive->seStatus(d->guid, d->status); + d->archive->setqStatus(d->guid, d->status); if (d->feed) d->feed->setArticleChanged(*this); } @@ -453,11 +453,11 @@ TQString Article::buildTitle(const TQString& description) if (description.stripWhiteSpace().isEmpty()) return ""; - int i = s.find('>',500); /*avoid processing too much */ + int i = s.tqfind('>',500); /*avoid processing too much */ if (i != -1) s = s.left(i+1); TQRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false); - TQString tagName, toReplace, tqreplaceWith; + TQString tagName, toReplace, replaceWith; while (rx.search(s) != -1 ) { tagName=rx.cap(2); @@ -466,11 +466,11 @@ TQString Article::buildTitle(const TQString& description) else if (tagName.startsWith("br") || tagName.startsWith("BR")) { toReplace=rx.cap(1); - tqreplaceWith=" "; + replaceWith=" "; } else toReplace=rx.cap(1); // strip just tag - s=s.tqreplace(s.find(toReplace),toReplace.length(),tqreplaceWith); // do the deed + s=s.tqreplace(s.tqfind(toReplace),toReplace.length(),replaceWith); // do the deed } if (s.length()> 90) s=s.left(90)+"..."; |