Logo Search packages:      
Sourcecode: akregator version File versions

bool View::importFeeds ( const QDomDocument &  doc  ) 

Adds the feeds in doc to the "Imported Folder"

doc the DOM tree (OPML) of the feeds to import

Definition at line 433 of file akregator_view.cpp.

References Akregator::FeedList::append(), Akregator::FeedGroup::appendChild(), Akregator::FeedList::fromOPML(), m_feedList, Akregator::FeedList::rootNode(), and Akregator::FeedList::title().

    FeedList* feedList = FeedList::fromOPML(doc);

    // FIXME: parsing error, print some message
    if (!feedList)
        return false;
    QString title = feedList->title();

    if (title.isEmpty())
        title = i18n("Imported Folder");
    bool ok;
    title = KInputDialog::getText(i18n("Add Imported Folder"), i18n("Imported folder name:"), title, &ok);

    if (!ok)
        delete m_feedList;
        m_feedList = 0;
        return false;
    FeedGroup* fg = new FeedGroup(title);
    m_feedList->append(feedList, fg);

    return true;

Generated by  Doxygen 1.6.0   Back to index