Logo Search packages:      
Sourcecode: akregator version File versions

bool View::loadFeeds ( const QDomDocument &  doc,
FeedGroup parent = 0 
)

Parse OPML presentation of feeds and read in articles archive, if present. If parent is NULL, the current feed list is replaced by the parsed one

Parameters:
doc QDomDocument generated from OPML
parent The parent group the new nodes

Definition at line 462 of file akregator_view.cpp.

References Akregator::FeedList::append(), Akregator::FeedList::fromOPML(), m_feedList, and m_tree.

Referenced by Akregator::Part::openFile().

{
    FeedList* feedList = FeedList::fromOPML(doc);
    
    // parsing went wrong
    if (!feedList)
        return false;

    m_tree->setUpdatesEnabled(false);
    
    if (!parent)
    {
        m_tree->setFeedList(feedList);
        disconnectFromFeedList(feedList);
        delete m_feedList;
        m_feedList = feedList;
        connectToFeedList(feedList);
    }
    else
        m_feedList->append(feedList, parent);     
    
    m_tree->setUpdatesEnabled(true);
    m_tree->triggerUpdate();
    return true;
}


Generated by  Doxygen 1.6.0   Back to index