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

List:       kde-panel-devel
Subject:    Re: Review Request 123350: Kickoff is not mounting removable devices and shows "Invalid URL"
From:       "Konrad Materka" <materka () gmail ! com>
Date:       2015-04-15 8:58:12
Message-ID: 20150415085812.4623.91287 () mimi ! kde ! org
[Download RAW message or body]

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



> On Kwi 13, 2015, 12:20 po południu, David Edmundson wrote:
> > applets/kickoff/package/contents/ui/BaseView.qml, line 63
> > <https://git.reviewboard.kde.org/r/123350/diff/1/?file=361011#file361011line63>
> > 
> > this change seems uneeded; we're using modelIndex fine in the old code, see line \
> > 40 in KickoffItem.qml  in the old code. 
> > (unless maybe that didn't work ?)
> > 
> > My understanding is setting the model to a QAIM, internally just creates a VDM \
> > anyway.

It didn't work. modelIndex is used only if flag hasModelChildren is set to true. That \
can happen only for ApplicationView, as only there children exist. Also \
ApplicationView uses VisualDataModel explicitly, so method modelIndex is available. \
In SystemView model is set directly, VisualDataModel is not created implicitly (or \
even if it is it is not accessible). In other words listItem.ListView.view.model \
returns SystemModel object which is QAbstractProxyModel/QAbstractItemModel \
implementation. SystemModel does not have any slot that would be usefull in this \
case. Passing "model" variable is not an option. It would be a good idea as it \
contains all data related to current item but this is internal QML/Qt Quick class.

In KDE 4 it was not a problem as it was easy to get QModelIndex from event (lines 860 \
- 878): https://projects.kde.org/projects/kde/kde-workspace/repository/entry/plasma/desktop/applets/kickoff/ui/launcher.cpp?rev=KDE%2F4.9


Patch is broken anyway, I didn't change FavoritesView to use VDM so not it fails with \
error "modelIndex is unknow property of FavoritiesModel" or something like that. \
Probably there are other issues.


- Konrad


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


On Kwi 15, 2015, 7:37 rano, Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123350/
> -----------------------------------------------------------
> 
> (Updated Kwi 15, 2015, 7:37 rano)
> 
> 
> Review request for Plasma.
> 
> 
> Bugs: 346002
> https://bugs.kde.org/show_bug.cgi?id=346002
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> Patch by Konrad Materka
> adress mounting of removable devices by kickoff
> 
> 
> Diffs
> -----
> 
> applets/kickoff/core/systemmodel.cpp 005cfb2 
> applets/kickoff/package/contents/ui/BaseView.qml c74db68 
> applets/kickoff/package/contents/ui/KickoffItem.qml f48d53b 
> 
> Diff: https://git.reviewboard.kde.org/r/123350/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
> 


--===============6385261460231774862==
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/123350/">https://git.reviewboard.kde.org/r/123350/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On Kwiecień 13th, 2015, 12:20 po południu UTC, \
<b>David Edmundson</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/123350/diff/1/?file=361011#file361011line63" \
style="color: black; font-weight: bold; text-decoration: \
underline;">applets/kickoff/package/contents/ui/BaseView.qml</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">63</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">model:</span> <span class="nx">VisualDataModel</span> <span \
class="p">{</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;">this \
change seems uneeded; we're using modelIndex fine in the old code, see line 40 in \
KickoffItem.qml  in the old code.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">(unless maybe that \
didn't work ?)</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">My understanding is setting the model \
to a QAIM, internally just creates a VDM anyway.</p></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;">It didn't work. modelIndex is used only if flag hasModelChildren is set to \
true. That can happen only for ApplicationView, as only there children exist. Also \
ApplicationView uses VisualDataModel explicitly, so method modelIndex is available. \
In SystemView model is set directly, VisualDataModel is not created implicitly (or \
even if it is it is not accessible). In other words listItem.ListView.view.model \
returns SystemModel object which is QAbstractProxyModel/QAbstractItemModel \
implementation. SystemModel does not have any slot that would be usefull in this \
case. Passing "model" variable is not an option. It would be a good idea as it \
contains all data related to current item but this is internal QML/Qt Quick \
class.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">In KDE 4 it was not a problem as it was easy to get \
QModelIndex from event (lines 860 - 878): \
https://projects.kde.org/projects/kde/kde-workspace/repository/entry/plasma/desktop/applets/kickoff/ui/launcher.cpp?rev=KDE%2F4.9</p>
 <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Patch is broken anyway, I didn't change FavoritesView \
to use VDM so not it fails with error "modelIndex is unknow property of \
FavoritiesModel" or something like that. Probably there are other issues.</p></pre> \
<br />




<p>- Konrad</p>


<br />
<p>On Kwiecień 15th, 2015, 7:37 rano UTC, Marco Martin 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 Plasma.</div>
<div>By Marco Martin.</div>


<p style="color: grey;"><i>Updated Kwi 15, 2015, 7:37 rano</i></p>







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


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


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-desktop
</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;">Patch by Konrad Materka adress mounting of removable \
devices by kickoff</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>applets/kickoff/core/systemmodel.cpp <span style="color: \
grey">(005cfb2)</span></li>

 <li>applets/kickoff/package/contents/ui/BaseView.qml <span style="color: \
grey">(c74db68)</span></li>

 <li>applets/kickoff/package/contents/ui/KickoffItem.qml <span style="color: \
grey">(f48d53b)</span></li>

</ul>

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






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







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


--===============6385261460231774862==--


[Attachment #3 (text/plain)]

_______________________________________________
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