Review Request 119618: add theme selection for screen lockers

David Edmundson david at davidedmundson.co.uk
Tue Aug 5 15:59:12 UTC 2014



> On Aug. 5, 2014, 3:35 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/kcm/lockermodel.cpp, line 1
> > <https://git.reviewboard.kde.org/r/119618/diff/1/?file=296884#file296884line1>
> >
> >     http://qt-project.org/doc/qt-5/qstandarditemmodel.html#setItemRoleNames
> 
> Marco Martin wrote:
>     you mean to avoid to subclass the model altogether?

Yes.

For QAbstractItemModel it's virtual in 5.x, for QStandardItemModel it's still has the get/set approach.
It looked to be the only reason you're subclassing it?


> On Aug. 5, 2014, 3:35 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/kcm/package/contents/ui/main.qml, line 128
> > <https://git.reviewboard.kde.org/r/119618/diff/1/?file=296885#file296885line128>
> >
> >     what's this for? I assume you're working round something.
> >     
> >     (and don't reply here, reply in code comments :) )
> 
> Marco Martin wrote:
>     i'll add it in the comments as well ;)
>     basically, list.setCurrentIndex doesn't work while the model is getting loaded, so list.currentIndex = index in a component.onCompleted of the delegate, doesn't work, restarting a timer when a delegate gets created, seems the only place where we can approximate "set the property when the view really is done loading"

One approach I've seen done in the past (not sure if it'll work here) is to have a currentPlugin string property on the root view then in the delegate do

Component.onCompleted: {
  if (root.currentPluginString == myString) {
    view.currentIndex = index
  }
}


- David


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


On Aug. 5, 2014, 3:18 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119618/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2014, 3:18 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> one thing that was requested a lot as well, is an override on the screen locker package as is done in the splash screen as well (master already supports reading it from config, the kcm to set that was missing tough)
> 
> 
> Diffs
> -----
> 
>   lookandfeel/contents/lockscreen/screenshot.png PRE-CREATION 
>   ksmserver/screenlocker/kcm/lockermodel.h PRE-CREATION 
>   ksmserver/screenlocker/kcm/lockermodel.cpp PRE-CREATION 
>   ksmserver/screenlocker/kcm/package/contents/ui/main.qml PRE-CREATION 
>   ksmserver/screenlocker/kcm/package/metadata.desktop PRE-CREATION 
>   ksmserver/screenlocker/kcm/CMakeLists.txt 17e4f70 
>   ksmserver/screenlocker/kcm/kcm.cpp d74ab75 
>   ksmserver/screenlocker/kcm/kcm.ui 1cc2653 
> 
> Diff: https://git.reviewboard.kde.org/r/119618/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> locker.png
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/08/05/1174ed52-d86c-4345-9790-0cb5dd8f75ca__locker.png
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140805/05b447a4/attachment-0001.html>


More information about the Plasma-devel mailing list