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

List:       kfm-devel
Subject:    Re: Review Request 126904: Avoid checking if the right-clicked folder is in
From:       Frank Reininghaus <frank78ac () googlemail ! com>
Date:       2016-02-10 21:43:29
Message-ID: 20160210214329.23891.32880 () mimi ! kde ! org
[Download RAW message or body]

--===============4225374682658775932==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> On Jan. 27, 2016, 9:38 a.m., Thomas Lübking wrote:
> > src/dolphincontextmenu.cpp, line 430
> > <https://git.reviewboard.kde.org/r/126904/diff/1/?file=441732#file441732line430>
> > 
> > As this will likely feed the places panel as well, it needs to be dynamic?
> > 
> > => Could you just operate on a global singleton instance (feeding the panel view \
> > as well as used for such queries) instead?
> 
> Emmanuel Pescosta wrote:
> The idea is good but the problem is, that the KItemListController takes over the \
> ownership of the model. So if we really want a singleton places model, we either \
> have to change the controller implemenation or we need a proxy object for the \
> places model.

I think that a singleton object (maybe in KIO) that can be used to manage the Places \
might make sense. This could make it possible to find out if a URL is in the Places \
without expensive Solid queries for the devices, and it would also make the code in \
Dolphin's PlacesItemModel and KFilePlacesModel easier. I have been thinking about \
this for quite some time, but have not managed to work on it yet.


- Frank


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126904/#review91653
-----------------------------------------------------------


On Feb. 10, 2016, 9:38 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126904/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2016, 9:38 p.m.)
> 
> 
> Review request for Dolphin and Thomas Lübking.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> This prevents that the setup of the PlacesItemModel queries Solid for the available \
> devices, which can take some time. 
> Places can be added multiple times now using the context menu, but this has always \
> been possible with drag and drop anyway. 
> See https://forum.kde.org/viewtopic.php?f=223&t=130617 for a dicsussion on this \
> topic. 
> 
> Diffs
> -----
> 
> src/dolphincontextmenu.cpp af283cf 
> 
> Diff: https://git.reviewboard.kde.org/r/126904/diff/
> 
> 
> Testing
> -------
> 
> The "Add to Places" entry is always enabled now in the context menu. I never \
> observed a noticeable delay when right-clicking folders, but I am confident that \
> this change removes the delay for the users who saw it. 
> 
> Thanks,
> 
> Frank Reininghaus
> 
> 


--===============4225374682658775932==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 27th, 2016, 9:38 a.m. UTC, <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/126904/diff/1/?file=441732#file441732line430" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/dolphincontextmenu.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">430</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">PlacesItemModel</span> <span class="n">model</span><span \
class="p">;</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">430</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span class="c1">// Creating up a \
PlacesItemModel to find out if &#39;url&#39; is one of the Places</span></pre></td>  \
</tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">As \
this will likely feed the places panel as well, it needs to be dynamic?</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">=&gt; Could you just operate on a global singleton instance (feeding the \
panel view as well as used for such queries) instead?</p></pre>  </blockquote>



 <p>On January 28th, 2016, 8:53 p.m. UTC, <b>Emmanuel Pescosta</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;">The idea is good but the \
problem is, that the KItemListController takes over the ownership of the model. So if \
we really want a singleton places model, we either have to change the controller \
implemenation or we need a proxy object for the places model.</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">I think that a singleton object (maybe in KIO) that can be used to manage \
the Places might make sense. This could make it possible to find out if a URL is in \
the Places without expensive Solid queries for the devices, and it would also make \
the code in Dolphin's PlacesItemModel and KFilePlacesModel easier. I have been \
thinking about this for quite some time, but have not managed to work on it \
yet.</p></pre> <br />




<p>- Frank</p>


<br />
<p>On February 10th, 2016, 9:38 p.m. UTC, Frank Reininghaus wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Dolphin and Thomas Lübking.</div>
<div>By Frank Reininghaus.</div>


<p style="color: grey;"><i>Updated Feb. 10, 2016, 9:38 p.m.</i></p>









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


<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This prevents that the setup of the PlacesItemModel \
queries Solid for the available devices, which can take some time.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Places can be added multiple times now using the context menu, but this has \
always been possible with drag and drop anyway.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">See \
https://forum.kde.org/viewtopic.php?f=223&amp;t=130617 for a dicsussion on this \
topic.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The "Add to Places" entry is always enabled now in the \
context menu. I never observed a noticeable delay when right-clicking folders, but I \
am confident that this change removes the delay for the users who saw it.</p></pre>  \
</td>  </tr>
</table>


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

 <li>src/dolphincontextmenu.cpp <span style="color: grey">(af283cf)</span></li>

</ul>

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






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







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


--===============4225374682658775932==--


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

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