diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /akregator/src/dragobjects.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/dragobjects.cpp')
-rw-r--r-- | akregator/src/dragobjects.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/akregator/src/dragobjects.cpp b/akregator/src/dragobjects.cpp index 9f7f812b7..679166e1e 100644 --- a/akregator/src/dragobjects.cpp +++ b/akregator/src/dragobjects.cpp @@ -25,27 +25,27 @@ #include "dragobjects.h" #include "feed.h" -#include <qcstring.h> +#include <tqcstring.h> namespace Akregator { class Article; -ArticleDrag::ArticleDrag(const QValueList<Article>& articles, QWidget* dragSource, const char* name) +ArticleDrag::ArticleDrag(const TQValueList<Article>& articles, TQWidget* dragSource, const char* name) : KURLDrag(articleURLs(articles), dragSource, name), m_items(articlesToDragItems(articles)) {} -bool ArticleDrag::canDecode(const QMimeSource* e) +bool ArticleDrag::canDecode(const TQMimeSource* e) { return e->provides("akregator/articles"); } -bool ArticleDrag::decode(const QMimeSource* e, QValueList<ArticleDragItem>& articles) +bool ArticleDrag::decode(const TQMimeSource* e, TQValueList<ArticleDragItem>& articles) { articles.clear(); - QByteArray array = e->encodedData("akregator/articles"); + TQByteArray array = e->encodedData("akregator/articles"); - QDataStream stream(array, IO_ReadOnly); + TQDataStream stream(array, IO_ReadOnly); while (!stream.atEnd()) { @@ -68,16 +68,16 @@ const char* ArticleDrag::format(int i) const return 0; } -QByteArray ArticleDrag::encodedData(const char* mime) const +TQByteArray ArticleDrag::encodedData(const char* mime) const { - QCString mimetype(mime); + TQCString mimetype(mime); if (mimetype == "akregator/articles") { - QByteArray ba; - QDataStream stream(ba, IO_WriteOnly); + TQByteArray ba; + TQDataStream stream(ba, IO_WriteOnly); - QValueList<ArticleDragItem>::ConstIterator end = m_items.end(); - for (QValueList<ArticleDragItem>::ConstIterator it = m_items.begin(); it != end; ++it) + TQValueList<ArticleDragItem>::ConstIterator end = m_items.end(); + for (TQValueList<ArticleDragItem>::ConstIterator it = m_items.begin(); it != end; ++it) { stream << (*it).feedURL; stream << (*it).guid; @@ -90,13 +90,13 @@ QByteArray ArticleDrag::encodedData(const char* mime) const } } -QValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const QValueList<Article>& articles) +TQValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const TQValueList<Article>& articles) { - QValueList<ArticleDragItem> items; + TQValueList<ArticleDragItem> items; - QValueList<Article>::ConstIterator end(articles.end()); + TQValueList<Article>::ConstIterator end(articles.end()); - for (QValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it) + for (TQValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it) { ArticleDragItem i; i.feedURL = (*it).feed() ? (*it).feed()->xmlUrl() : ""; @@ -107,11 +107,11 @@ QValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const QValueList<Ar return items; } -KURL::List ArticleDrag::articleURLs(const QValueList<Article>& articles) +KURL::List ArticleDrag::articleURLs(const TQValueList<Article>& articles) { KURL::List urls; - QValueList<Article>::ConstIterator end(articles.end()); - for (QValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it) + TQValueList<Article>::ConstIterator end(articles.end()); + for (TQValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it) urls.append((*it).link()); return urls; } |