[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request: Drop InvisibleCollectionFetch Fetch Strategy in
From:       David_Narváez <david.narvaez () computer ! org>
Date:       2011-11-19 17:09:26
Message-ID: 20111119170926.1608.24770 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Nov. 19, 2011, 3:50 p.m., Christian Mollekopf wrote:
> > You might want to filter the collections out using: 
> > 
> > > Akonadi::EntityMimeTypeFilterModel *collectionsModel = new \
> > > konadi::EntityMimeTypeFilterModel(this); \
> > > collectionsModel->addMimeTypeExclusionFilter( Akonadi::Collection::mimeType() \
> > > );
> > 
> > Otherwise you have the model flattened, with the collections still in.
> > No idea if it is relevant for this case, but with the EntityMimeTypeFilterModel \
> > you would get exactly the same result as an invisible collection fetch.
> 
> David Narváez wrote:
> I thought of adding the filter, but then I noticed that in this case the \
> KDescendantsProxyFilter is flattening a CalendarModel which is, in turn, \
> constructed from a Monitor which is a mime-filtered model itself (see the first \
> context lines of the relevant hunk, which are dealing with the monitor before using \
> it in the calendar). Is that enough for a mime filter as you describe it? 
> Christian Mollekopf wrote:
> I assume your referring to the setMimeTypeMonitored calls on the monitor. This \
> means the monitor is configured to only include items of the configured mimetypes, \
> however they're still in the collection hierarchy. So collections are not mimetype \
> checked (since they're only the containers). Therefore you should still have the \
> collections in the flattened model. So filtering the collections afterwards seems \
> cleaner to me, although the Calendar might work just fine with empty collections in \
> the list.

Yes, I was referring to that. Let me update the patch to include MIME filtering. \
Thanks!


- David


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


On Nov. 10, 2011, 6:12 a.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103088/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2011, 6:12 a.m.)
> 
> 
> Review request for Plasma and Christian Mollekopf.
> 
> 
> Description
> -------
> 
> As the InvisibleCollectionFetch fetch strategy is currently broken, I implemented a \
> suggestion by Christian Mollekopf of working around the issues by flatting the \
> model through a KDescendantsProxyModel to fix crashes in Plasma related to \
> calendars. 
> 
> This addresses bug 279322.
> http://bugs.kde.org/show_bug.cgi?id=279322
> 
> 
> Diffs
> -----
> 
> plasma/generic/dataengines/calendar/calendarengine.cpp 53f98c0 
> 
> Diff: http://git.reviewboard.kde.org/r/103088/diff/diff
> 
> 
> Testing
> -------
> 
> 1. Add an iCal resource from the internet
> 2. Refresh the iCal resource
> 3. Refresh the iCal resource again if Plasma didn't crash on step 2
> 
> Withouth this patch, Plasma crashes when trying to remove an item that has no \
> collection in the Calendar Model embedded in the Dataengine. 
> You should also be able to replicate bug 279322 without this patch and this patch \
> should fix the situation described there. 
> 
> Thanks,
> 
> David Narváez
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103088/">http://git.reviewboard.kde.org/r/103088/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 19th, 2011, 3:50 p.m., <b>Christian \
Mollekopf</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">You might want to filter the collections out using: 

&gt; Akonadi::EntityMimeTypeFilterModel *collectionsModel = new \
konadi::EntityMimeTypeFilterModel(this); &gt; \
collectionsModel-&gt;addMimeTypeExclusionFilter( Akonadi::Collection::mimeType() );

Otherwise you have the model flattened, with the collections still in.
No idea if it is relevant for this case, but with the EntityMimeTypeFilterModel you \
would get exactly the same result as an invisible collection fetch.</pre>  \
</blockquote>




 <p>On November 19th, 2011, 4:41 p.m., <b>David Narváez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I thought of adding the \
filter, but then I noticed that in this case the KDescendantsProxyFilter is \
flattening a CalendarModel which is, in turn, constructed from a Monitor which is a \
mime-filtered model itself (see the first context lines of the relevant hunk, which \
are dealing with the monitor before using it in the calendar). Is that enough for a \
mime filter as you describe it?</pre>  </blockquote>





 <p>On November 19th, 2011, 5:04 p.m., <b>Christian Mollekopf</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I assume your referring \
to the setMimeTypeMonitored calls on the monitor. This means the monitor is \
configured to only include items of the configured mimetypes, however they&#39;re \
still in the collection hierarchy. So collections are not mimetype checked (since \
they&#39;re only the containers). Therefore you should still have the collections in \
the flattened model. So filtering the collections afterwards seems cleaner to me, \
although the Calendar might work just fine with empty collections in the list.</pre>  \
</blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, I was referring to \
that. Let me update the patch to include MIME filtering. Thanks!</pre> <br />








<p>- David</p>


<br />
<p>On November 10th, 2011, 6:12 a.m., David Narváez wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Plasma and Christian Mollekopf.</div>
<div>By David Narváez.</div>


<p style="color: grey;"><i>Updated Nov. 10, 2011, 6:12 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">As the InvisibleCollectionFetch fetch strategy is currently broken, I \
implemented a suggestion by Christian Mollekopf of working around the issues by \
flatting the model through a KDescendantsProxyModel to fix crashes in Plasma related \
to calendars.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">1. Add an iCal resource from the internet 2. Refresh the iCal resource
3. Refresh the iCal resource again if Plasma didn&#39;t crash on step 2

Withouth this patch, Plasma crashes when trying to remove an item that has no \
collection in the Calendar Model embedded in the Dataengine.

You should also be able to replicate bug 279322 without this patch and this patch \
should fix the situation described there.</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=279322">279322</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>plasma/generic/dataengines/calendar/calendarengine.cpp <span style="color: \
grey">(53f98c0)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103088/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic