|
|
|
@ -143,15 +143,10 @@ void RssFeed::rename(const QString &new_name) {
@@ -143,15 +143,10 @@ void RssFeed::rename(const QString &new_name) {
|
|
|
|
|
|
|
|
|
|
// Return the alias if the stream has one, the url if it has no alias
|
|
|
|
|
QString RssFeed::displayName() const { |
|
|
|
|
if (!m_alias.isEmpty()) { |
|
|
|
|
//qDebug("getName() returned alias: %s", (const char*)alias.toLocal8Bit());
|
|
|
|
|
if (!m_alias.isEmpty()) |
|
|
|
|
return m_alias; |
|
|
|
|
} |
|
|
|
|
if (!m_title.isEmpty()) { |
|
|
|
|
//qDebug("getName() returned title: %s", (const char*)title.toLocal8Bit());
|
|
|
|
|
if (!m_title.isEmpty()) |
|
|
|
|
return m_title; |
|
|
|
|
} |
|
|
|
|
//qDebug("getName() returned url: %s", (const char*)url.toLocal8Bit());
|
|
|
|
|
return m_url; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -213,9 +208,8 @@ RssArticleList RssFeed::unreadArticleList() const {
@@ -213,9 +208,8 @@ RssArticleList RssFeed::unreadArticleList() const {
|
|
|
|
|
|
|
|
|
|
// download the icon from the adress
|
|
|
|
|
QString RssFeed::iconUrl() const { |
|
|
|
|
const QUrl siteUrl(m_url); |
|
|
|
|
// XXX: This works for most sites but it is not perfect
|
|
|
|
|
return QString("http://")+siteUrl.host()+QString("/favicon.ico"); |
|
|
|
|
return QString("http://")+QUrl(m_url).host()+QString("/favicon.ico"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RssFeed::parseRSSChannel(QXmlStreamReader& xml) |
|
|
|
|