[Kde-pim] Re: Review Request: kmail: now it is allowed to create a new folder on the top of an imap folder

Antonis Tsiapaliokas kok3rs at gmail.com
Fri Jul 22 18:59:29 BST 2011



> On July 21, 2011, 6:50 p.m., Torgny Nyblom wrote:
> > Can't really say go/no go but it feels wrong to initialize the rights to "CanCreate..." and not "ReadOnly".

ok, so could it be better if we change those rights inside from the kmail (using a signal and slot) and after the action is finished, then we could restore the rights.


> On July 21, 2011, 6:50 p.m., Torgny Nyblom wrote:
> > resources/imap/addcollectiontask.cpp, line 53
> > <http://git.reviewboard.kde.org/r/102031/diff/1/?file=27780#file27780line53>
> >
> >     Is this really portable?
> >     
> >     Ie. does all imap servers use this char as a separator?

i haven't think that. I change it because the first later from the remoteid (when it belongs to an imap collection) is 'i' because of the imap://.... (and then the remoteid is set wrong....)
So something like that will work

  Akonadi::CollectionFetchJob fetchjob(parentCollection(), Akonadi::CollectionFetchJob::Base);
  fetchjob.exec();
  if( !fetchjob.error() ) {
    foreach ( Akonadi::Collection col, fetchjob.collections() ) {
      if ( col.id() != parentCollection.id() ) {
        separator = parentCollection().remoteId().at( 0 );
	break;
      }
    }
}


> On July 21, 2011, 6:50 p.m., Torgny Nyblom wrote:
> > resources/imap/retrievecollectionstask.cpp, line 49
> > <http://git.reviewboard.kde.org/r/102031/diff/1/?file=27782#file27782line49>
> >
> >     What is the reason for this?

Because the "Add folder" action, is only enable when the col.isStructural() returns false. And since an imap folder doesn't have any ContentMimeType then the isStractural() returns true, so the "Add folder" action is disable.

http://quickgit.kde.org/?p=kdepim.git&a=blob&h=6641ec4919ab3d7bc8466ba676fea955a914d6b4&hb=5ed63244ed47410ed104778765d0bf36be4b9aa1&f=kmail/kmmainwidget.cpp

line 3745

As regards the "KMime::Message::mimeType()", please look at line 104 from the resources/imap/retrievecollectionstask.cpp.


- Antonis


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


On July 21, 2011, 4:46 p.m., Antonis Tsiapaliokas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102031/
> -----------------------------------------------------------
> 
> (Updated July 21, 2011, 4:46 p.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Summary
> -------
> 
> Hello
> 
> On kmail 2, if you try to add a folder under your top imap folder, you will see that the button "Add folder" is disable. This patch is fixing this issue.
> 
> 
> This addresses bug 251704.
>     http://bugs.kde.org/show_bug.cgi?id=251704
> 
> 
> Diffs
> -----
> 
>   resources/imap/addcollectiontask.cpp 5ce6aec 
>   resources/imap/retrievecollectionmetadatatask.cpp 3c9ead4 
>   resources/imap/retrievecollectionstask.cpp 48f0e57 
> 
> Diff: http://git.reviewboard.kde.org/r/102031/diff
> 
> 
> Testing
> -------
> 
> Kdepim and kdepim-runtime compiles and runs without any issue.
> 
> 
> Thanks,
> 
> Antonis
> 
>

_______________________________________________
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