diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /knewsticker/common/newsiconmgr.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/common/newsiconmgr.cpp')
-rw-r--r-- | knewsticker/common/newsiconmgr.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/knewsticker/common/newsiconmgr.cpp b/knewsticker/common/newsiconmgr.cpp index b6787dff..59044942 100644 --- a/knewsticker/common/newsiconmgr.cpp +++ b/knewsticker/common/newsiconmgr.cpp @@ -37,9 +37,9 @@ NewsIconMgr *NewsIconMgr::self() return m_instance; } -NewsIconMgr::NewsIconMgr(TQObject *parent, const char *name) - : TQObject(parent, name), DCOPObject("NewsIconMgr"), - m_stdIcon(SmallIcon(TQString::fromLatin1("news"))) +NewsIconMgr::NewsIconMgr(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), DCOPObject("NewsIconMgr"), + m_stdIcon(SmallIcon(TQString::tqfromLatin1("news"))) { connectDCOPSignal("kded", "favicons", "iconChanged(bool, TQString, TQString)", @@ -64,7 +64,7 @@ void NewsIconMgr::getIcon(const KURL &url) TQPixmap icon(url.encodedPathAndQuery()); if (!icon.isNull()) { if (icon.size() != TQSize(16, 16)) { - if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, TQImage::ScaleMin))) { + if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, TQ_ScaleMin))) { emit gotIcon(url, m_stdIcon); return; } @@ -85,7 +85,7 @@ void NewsIconMgr::getIcon(const KURL &url) kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data); } else { emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache", - TQString::fromLatin1("favicons/%1.png").arg(url.host())))); + TQString::tqfromLatin1("favicons/%1.png").tqarg(url.host())))); } } else { KIO::Job *job = KIO::get(url, true, false); @@ -127,13 +127,13 @@ void NewsIconMgr::slotGotIcon(bool isHost, TQString hostOrURL, TQString iconName { KURL url = KURL(hostOrURL); if (!isHost) - url.setProtocol(TQString::fromLatin1("http")); + url.setProtocol(TQString::tqfromLatin1("http")); if (iconName.isNull()) emit gotIcon(url, m_stdIcon); else emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache", - TQString::fromLatin1("favicons/%1.png").arg(url.host())))); + TQString::tqfromLatin1("favicons/%1.png").tqarg(url.host())))); } TQString NewsIconMgr::favicon(const KURL &url) const @@ -146,14 +146,14 @@ TQString NewsIconMgr::favicon(const KURL &url) const kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data, replyType, reply); - if (replyType == "TQString") { + if (replyType == TQSTRING_OBJECT_NAME_STRING) { TQDataStream replyStream(reply, IO_ReadOnly); TQString result; replyStream >> result; return result; } - return TQString::null; + return TQString(); } #include "newsiconmgr.moc" |