[Kde-pim] Review Request 109208: Work harder to ensure we have a trash folder

Kevin Krammer krammer at kde.org
Thu Feb 28 17:01:09 GMT 2013



> On Feb. 28, 2013, 3:54 p.m., Kevin Krammer wrote:
> > I am not sure this is fixing the problem at the right location. The question is why does SpecialCollections::hasDefaultCollection()return true if there is no valid collection for the queried type
> 
> Wolfgang Rohdewald wrote:
>     it has an invalid default collection (negative id, no remoteId), and the function is not "hasValidDefaultCollection". But I looked closer and the patch is now simpler. SpecialCollections::defaultCollection() always returns a collection - if there is none, it returns an invalid collection (with id -1). And all collections with negative id return false for isValid().

Well, an invalid collection is not something one would consider as a collection if you explicitly call a check function.
Or at least I don't see any use case of first checking if there is a collection and then not getting one.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109208/#review28269
-----------------------------------------------------------


On Feb. 28, 2013, 4:45 p.m., Wolfgang Rohdewald wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109208/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2013, 4:45 p.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Description
> -------
> 
> collection.isValid() is not enough, collection might have a negative id and no remoteId
> 
> 
> This addresses bugs 285532, 303117 and 307016.
>     http://bugs.kde.org/show_bug.cgi?id=285532
>     http://bugs.kde.org/show_bug.cgi?id=303117
>     http://bugs.kde.org/show_bug.cgi?id=307016
> 
> 
> Diffs
> -----
> 
>   akonadi/specialcollectionsrequestjob.cpp 29db72f0e3bc60b0f8b9c9434151176bea44b14f 
> 
> Diff: http://git.reviewboard.kde.org/r/109208/diff/
> 
> 
> Testing
> -------
> 
> removed all .local/share/akonadi* and restarted kmail. Without patch, no trash. With patch, trash is generated.
> 
> 
> Thanks,
> 
> Wolfgang Rohdewald
> 
>

_______________________________________________
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