More RSS code clean up

This commit is contained in:
Christophe Dumez 2011-01-27 18:03:28 +00:00
parent 138cd90736
commit 7616c22897
7 changed files with 74 additions and 58 deletions

View file

@ -119,7 +119,7 @@ QString RssFeed::title() const{
return m_title;
}
void RssFeed::setAlias(const QString &new_name){
void RssFeed::rename(const QString &new_name){
qDebug() << "Renaming stream to" << new_name;
m_alias = new_name;
}
@ -245,7 +245,7 @@ bool RssFeed::parseRSS(QIODevice* device) {
if(xml.name() == "title") {
m_title = xml.readElementText();
if(m_alias == url())
setAlias(m_title);
rename(m_title);
}
else if(xml.name() == "image") {
QString icon_path = xml.attributes().value("url").toString();