[Kde-pim] akregator patch

Kleag kleag at free.fr
Sun Nov 18 10:17:46 GMT 2007


Sorry, my patch was probably false. To define a real order relation, it should 
be like that, I think:
Index: akregator/src/articlejobs.h
===================================================================
--- akregator/src/articlejobs.h (révision 738190)
+++ akregator/src/articlejobs.h (copie de travail)
@@ -42,7 +42,8 @@
     QString guid;
     bool operator<( const ArticleId& other ) const
     {
-        return feedUrl < other.feedUrl && guid < other.guid;
+        return ( (feedUrl < other.feedUrl)
+                || (feedUrl == other.feedUrl && guid < other.guid));
     }
 };


Also, it could be simpler like that, but maybe costly:
 return ( (feedUrl+guid < other.feedUrl+other+guid)

Best regards,

Kleag
On Sunday 18 November 2007 09:47:01 Kleag wrote:
> Hello,
>
> I submitted the following bug at
> http://techbase.kde.org/Contribute/Bugsquad/KrushDays :
> Marking feeds or messages as Read does not work. Even when reading a
> message, it is not marked as read. (Kleag 23:46, 7 November 2007 (CET)) -
> fixed in 734910
>
> It is marked as fixed in revision 734910, but for me it still don't
> work738188738188 at738188 738188. In fact, I traced down the problem up to
> the loop on all messages of the field. In all cases, there was only one
> message stored in the m_status map. It seems to me that the order function
> used  for this class was wrong. Here is a patch that solves this problem.
> The treeview is not immediatly updated (must click on it) but the data is
> correctly updated.
>
> Index: akregator/src/articlejobs.h
> ===================================================================
> --- akregator/src/articlejobs.h (révision 737593)
> +++ akregator/src/articlejobs.h (copie de travail)
> @@ -42,7 +42,8 @@
>      QString guid;
>      bool operator<( const ArticleId& other ) const
>      {
> -        return feedUrl < other.feedUrl && guid < other.guid;
> +        return ((feedUrl < other.feedUrl && guid < other.guid)
> +        || (feedUrl == other.feedUrl && guid < other.guid));
>      }
>  };
>
> Can I apply it ?
>
> Best regards,
>
> Kleag



-- 
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk

KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list