Bug 114997 - akregator article list malfunction (? on duplicated articles)
Summary: akregator article list malfunction (? on duplicated articles)
Status: RESOLVED WORKSFORME
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: HI major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: investigated, triaged
: 119669 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-24 14:30 UTC by Frank Lin
Modified: 2018-10-21 04:58 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example of the bug (screenshot series in .tar.gz format) (414.60 KB, application/x-gzip)
2005-12-15 04:45 UTC, Frank Lin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Lin 2005-10-24 14:30:47 UTC
Version:            (using KDE KDE 3.4.92)
Installed from:    Slackware Packages
OS:                Linux

Ok ... this bug did *not* exist in KDE 3.4.3 ... someone must have broken something in the new 1.2 ;)

What happened:
1. Switch to normal view and choose any feed, preferably a feed with a long list.

2. Try to scroll through the articles with left/right keys and occassionally:
 a) the left/right key will get stuck/not jump to the next/prev article
 b) it jumps to a random article (i.e. not in order shown in the list)

3. Duplicated articles are shown twice at least

4. If you click on an unread title, another title in the list (unrelated) will change its name to the article you just clicked. The article that has its name changed is lost afterwards.

I do not have full source in hand, but I suspect some of the ?new duplication detection mechanism was not working the way it should be.

Cheers,

Frank
Comment 1 Frank Lin 2005-12-15 04:45:08 UTC
Created attachment 13924 [details]
Example of the bug (screenshot series in .tar.gz format)

A picture is better than 1000+ words. Here I post a series of screenshots
describing this bug.
Comment 2 Frank Osterfeld 2005-12-15 08:07:54 UTC
I confirm 2a). Sometimes, the prev/next actions get stuck.
I've seen 3 and 4, too. But this is only "visual", i.e. if you switch to another feed and back, all should be fine again, right?
It's not about dupe detection, it has to do with the list items (which are created per article). Thus, when switching to another feed and back, the items are cleared and recreated properly.
Comment 3 Frank Lin 2005-12-15 13:42:19 UTC
> I've seen 3 and 4, too. But this is only "visual", i.e. if you switch to another feed and back, all should be fine again, right?
That is correct. 

> It's not about dupe detection, it has to do with the list items (which are created per article). 
Thanks -- sounds very logical. The reason I suspected "dupe detection" originally was that it only happens with new (red) and unread (blue) items. The read items (black) items does not seem to be affected.

> Thus, when switching to another feed and back, the items are cleared and recreated properly. 
Yes. That is also correct.
Comment 4 Frank Osterfeld 2006-01-08 13:02:01 UTC
*** Bug 119669 has been marked as a duplicate of this bug. ***
Comment 5 Frank Osterfeld 2006-01-08 13:09:03 UTC
SVN commit 495480 by osterfeld:

Fix comparison operators of Article, such as < and <=.
This fixes problems with QMap and articles having identical pubdate (operator< just compared pubdates, and QMap consideres 
articles as equal when items are not comparable).
Fixes 114997 navigation problems and prevents creation of a new item when selecting an unread dupe article. (a new item was 
created as map lookup failed).

BUG: 114997


 M  +6 -4      article.cpp  


--- branches/KDE/3.5/kdepim/akregator/src/article.cpp #495479:495480
@@ -241,22 +241,24 @@
 
 bool Article::operator<(const Article &other) const
 {
-    return pubDate() > other.pubDate();
+    return pubDate() > other.pubDate() || 
+            (pubDate() == other.pubDate() && guid() < other.guid() );
 }
 
 bool Article::operator<=(const Article &other) const
 {
-    return pubDate() >= other.pubDate();
+    return (pubDate() > other.pubDate() || *this == other);
 }
 
 bool Article::operator>(const Article &other) const
 {
-    return pubDate() < other.pubDate();
+    return pubDate() < other.pubDate() || 
+            (pubDate() == other.pubDate() && guid() > other.guid() );
 }
 
 bool Article::operator>=(const Article &other) const
 {
-    return pubDate() <= other.pubDate();
+    return (pubDate() > other.pubDate() || *this == other);
 }
 
 bool Article::operator==(const Article &other) const
Comment 6 Frank Osterfeld 2006-01-08 13:19:03 UTC
SVN commit 495485 by osterfeld:

forward port: fix semantics of comparison operators <, <=, >, >=. Bug 114997 as seen in 3.5 should be fixed in trunk anyway, 
as we use QHash there (using operator==) instead of QMap (using operator<), however, the operators should work correctly 
nevertheless.
CCBUG: 114997


 M  +6 -4      article.cpp  


--- trunk/KDE/kdepim/akregator/src/article.cpp #495484:495485
@@ -241,22 +241,24 @@
 
 bool Article::operator<(const Article &other) const
 {
-    return pubDate() > other.pubDate();
+    return pubDate() > other.pubDate() || 
+            (pubDate() == other.pubDate() && guid() < other.guid() );
 }
 
 bool Article::operator<=(const Article &other) const
 {
-    return pubDate() >= other.pubDate();
+    return (pubDate() > other.pubDate() || *this == other);
 }
 
 bool Article::operator>(const Article &other) const
 {
-    return pubDate() < other.pubDate();
+    return pubDate() < other.pubDate() || 
+            (pubDate() == other.pubDate() && guid() > other.guid() );
 }
 
 bool Article::operator>=(const Article &other) const
 {
-    return pubDate() <= other.pubDate();
+    return (pubDate() > other.pubDate() || *this == other);
 }
 
 bool Article::operator==(const Article &other) const
Comment 7 Marcin Trybus 2008-02-07 22:44:19 UTC
Excuse, but when exactly has this bug been resolved? If it's fixed for more that 2 years now, then why in my latest akregator 1.2.8 (KDE 3.5.8, Debian testing), the bug is still there? 

Try subscribing a feed from Slashdot and e.g. Slashdot Linux. Whenever they double (which happens more often than not), the problem occurs. 

Same with my brother's akregator (same version, under Kubuntu 7.10).
Comment 8 Rich Johnson 2008-02-24 04:10:47 UTC
I have to second Marcin on this, this has not been fixed and is actually known about on IRC in #kontact.

This issue happens to me on:

3x Kubuntu Hardy boxes (2 just fresh install today)
1x Debian Experimental
1x OpenSUSE
1x Fedora 8 & 9
1x Slackware

I haven't tested my KDE SVN checkout yet because I can't get kdepim to build correctly on my amd64 box right now.
Comment 9 Harald Sitter 2008-09-10 18:24:28 UTC
Reopen as per comment #8

Is this issue still valid for KDE 4.1?
Comment 10 Dominik Tritscher 2008-11-09 12:31:20 UTC
I just checked with Akregator 1.3.3 (KDE 4.1.3) and couldn't reproduce the described behaviour.
Comment 11 Christophe Marin 2009-03-08 21:18:12 UTC
Due to lack of feedback, we will now change this bug status.
Comment 12 Andrew Crouthamel 2018-09-19 04:32:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Andrew Crouthamel 2018-10-21 04:58:28 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!