Review Request 124980: Add org.kde.plasma.private.sessions with a SessionModel
Martin Gräßlin
mgraesslin at kde.org
Mon Aug 31 11:37:40 UTC 2015
> On Aug. 31, 2015, 8:25 a.m., Martin Gräßlin wrote:
> > components/sessionsprivate/sessionsmodel.h, line 56
> > <https://git.reviewboard.kde.org/r/124980/diff/1/?file=399560#file399560line56>
> >
> > suggestion: enum class, and then drop the Role from each name. Usage will be e.g. Roles::Icon
>
> Kai Uwe Broulik wrote:
> I don't think that'll work given QAbstractItemModel passes roles around as int and you cannot implicitly convert an enum class to int?
not implicitly, but explicitly should work.
> On Aug. 31, 2015, 8:25 a.m., Martin Gräßlin wrote:
> > components/sessionsprivate/sessionsmodel.h, line 85
> > <https://git.reviewboard.kde.org/r/124980/diff/1/?file=399560#file399560line85>
> >
> > Playing Milian: cetero censeo QList delendam esset.
> >
> > -> use QVector ;-)
>
> Kai Uwe Broulik wrote:
> I though QList was only evil if sizeof T is <= void* ?
Please see https://marcmutz.wordpress.com/effective-qt/containers/ - section on QVector and QList. Random quote:
"Guideline: Avoid QList<T> where T is not declared as either Q_MOVABLE_TYPE or Q_PRIMITIVE_TYPE or where sizeof(T) != sizeof(void*) (remember to check both 32 and 64-bit platforms)."
I think you hit all conditions here on when to avoid.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124980/#review84618
-----------------------------------------------------------
On Aug. 29, 2015, 4:14 p.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124980/
> -----------------------------------------------------------
>
> (Updated Aug. 29, 2015, 4:14 p.m.)
>
>
> Review request for Plasma and Martin Gräßlin.
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> This way it can be used in the lock screen, user switcher, and a user switcher plasmoid I'm planning.
>
> Compared to the one in the lock screen it can also get the user's full name and avatar, and some other information.
>
> Perhaps we could also try to have it wait for the screen to actually lock before switching sessions?
>
>
> Diffs
> -----
>
> components/CMakeLists.txt 21fc61c
> components/sessionsprivate/CMakeLists.txt PRE-CREATION
> components/sessionsprivate/qmldir PRE-CREATION
> components/sessionsprivate/sessionsmodel.h PRE-CREATION
> components/sessionsprivate/sessionsmodel.cpp PRE-CREATION
> components/sessionsprivate/sessionsprivateplugin.h PRE-CREATION
> components/sessionsprivate/sessionsprivateplugin.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/124980/diff/
>
>
> Testing
> -------
>
> Lists my sessions, allows to switch between them and start new ones. Locking when creating a new session is missing.
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150831/31355df5/attachment.html>
More information about the Plasma-devel
mailing list