From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- akregator/src/feediconmanager.cpp | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'akregator/src/feediconmanager.cpp') diff --git a/akregator/src/feediconmanager.cpp b/akregator/src/feediconmanager.cpp index b115ed92..13e65d51 100644 --- a/akregator/src/feediconmanager.cpp +++ b/akregator/src/feediconmanager.cpp @@ -33,17 +33,17 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Akregator { class FeedIconManager::FeedIconManagerPrivate { public: - QValueList registeredFeeds; - QDict urlDict; + TQValueList registeredFeeds; + TQDict urlDict; }; FeedIconManager *FeedIconManager::m_instance = 0; @@ -62,19 +62,19 @@ void FeedIconManager::fetchIcon(Feed* feed) if (!d->registeredFeeds.contains(feed)) { d->registeredFeeds.append(feed); - connect(feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotFeedDestroyed(TreeNode*))); + connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotFeedDestroyed(TreeNode*))); } - QString iconURL = getIconURL(KURL(feed->xmlUrl())); + TQString iconURL = getIconURL(KURL(feed->xmlUrl())); d->urlDict.insert(iconURL, feed); loadIcon(iconURL); } -FeedIconManager::FeedIconManager(QObject * parent, const char *name) -: QObject(parent, name), DCOPObject("FeedIconManager"), d(new FeedIconManagerPrivate) +FeedIconManager::FeedIconManager(TQObject * parent, const char *name) +: TQObject(parent, name), DCOPObject("FeedIconManager"), d(new FeedIconManagerPrivate) { connectDCOPSignal("kded", - "favicons", "iconChanged(bool, QString, QString)", - "slotIconChanged(bool, QString, QString)", false); + "favicons", "iconChanged(bool, TQString, TQString)", + "slotIconChanged(bool, TQString, TQString)", false); } @@ -84,16 +84,16 @@ FeedIconManager::~FeedIconManager() d = 0; } -void FeedIconManager::loadIcon(const QString & url) +void FeedIconManager::loadIcon(const TQString & url) { KURL u(url); - QString iconFile = iconLocation(u); + TQString iconFile = iconLocation(u); if (iconFile.isNull()) { - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << u; kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data); @@ -103,30 +103,30 @@ void FeedIconManager::loadIcon(const QString & url) } -QString FeedIconManager::getIconURL(const KURL& url) +TQString FeedIconManager::getIconURL(const KURL& url) { return "http://" +url.host() + "/"; } -QString FeedIconManager::iconLocation(const KURL & url) const +TQString FeedIconManager::iconLocation(const KURL & url) const { - QByteArray data, reply; - QCString replyType; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data, reply; + TQCString replyType; + TQDataStream ds(data, IO_WriteOnly); ds << url; kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data, replyType, reply); - if (replyType == "QString") { - QDataStream replyStream(reply, IO_ReadOnly); - QString result; + if (replyType == "TQString") { + TQDataStream replyStream(reply, IO_ReadOnly); + TQString result; replyStream >> result; return result; } - return QString::null; + return TQString::null; } void FeedIconManager::slotFeedDestroyed(TreeNode* node) @@ -137,13 +137,13 @@ void FeedIconManager::slotFeedDestroyed(TreeNode* node) d->registeredFeeds.remove(d->registeredFeeds.find(feed)); } -void FeedIconManager::slotIconChanged(bool /*isHost*/, const QString& hostOrURL, - const QString& iconName) +void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL, + const TQString& iconName) { - QString iconFile = KGlobal::dirs()->findResource("cache", + TQString iconFile = KGlobal::dirs()->findResource("cache", iconName+".png"); Feed* f; - QPixmap p = QPixmap(iconFile); + TQPixmap p = TQPixmap(iconFile); if (!p.isNull()) // we don't set null pixmaps, as feed checks pixmap.isNull() to find out whether the icon was already loaded or not. It would request the icon another time, resulting an infinite loop (until stack overflow that is { while (( f = d->urlDict.take(hostOrURL) )) -- cgit v1.2.3