Review Request 123350: Kickoff is not mounting removable devices and shows "Invalid URL"

Konrad Materka materka at gmail.com
Wed Apr 15 08:58:12 UTC 2015



> 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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150415/bd1a876a/attachment.html>


More information about the Plasma-devel mailing list