bool Article::operator==(const Article &other) const { return d->title == other.title() && d->link == other.link() && d->description == other.description() && d->pubDate == other.pubDate() && d->guid == other.guid() && d->guidIsPermaLink == other.guidIsPermaLink(); }
bool Feed::isExpired(const Article& a) const { QDateTime now = QDateTime::currentDateTime(); int expiryAge = -1; // check whether the feed uses the global default and the default is limitArticleAge if ( d->archiveMode == globalDefault && Settings::archiveMode() == Settings::EnumArchiveMode::limitArticleAge) expiryAge = Settings::maxArticleAge() *24*3600; else // otherwise check if this feed has limitArticleAge set if ( d->archiveMode == limitArticleAge) expiryAge = d->maxArticleAge *24*3600; return ( expiryAge != -1 && a.pubDate().secsTo(now) > expiryAge); }