Logo Search packages:      
Sourcecode: akregator version File versions

bool Feed::isExpired ( const MyArticle a  )  const [private]

checks whether article a is expired (considering custom and global archive mode settings)

Definition at line 320 of file feed.cpp.

References Akregator::MyArticle::pubDate().

Referenced by appendArticle(), and slotDeleteExpiredArticles().

{
    QDateTime now = QDateTime::currentDateTime();
    int expiryAge = -1;
// check whether the feed uses the global default and the default is limitArticleAge
    if ( m_archiveMode == globalDefault && Settings::archiveMode() == Settings::EnumArchiveMode::limitArticleAge)
        expiryAge = Settings::maxArticleAge() *24*3600;
    else // otherwise check if this feed has limitArticleAge set
        if ( m_archiveMode == limitArticleAge)
            expiryAge = m_maxArticleAge *24*3600;

    return ( expiryAge != -1 && a.pubDate().secsTo(now) > expiryAge);
    

}


Generated by  Doxygen 1.6.0   Back to index