Review Request 109289: Adds exclusive actions group for contact list grouping

Roman Nazarenko me at jtalk.me
Tue Mar 5 15:41:09 UTC 2013



> On March 5, 2013, 11:28 a.m., David Edmundson wrote:
> > contact-list-widget.cpp, line 304
> > <http://git.reviewboard.kde.org/r/109289/diff/2/?file=117041#file117041line304>
> >
> >     Why don't we pass KTp::ContactsModel::GroupMode as the arg type. It's safer, and we don't need to cast.

I assume, Qt signal-slot mechanism will shit the hell out of itself when we'll try namespaced enumerations in slots' signatures.
Have not tested it though.


> On March 5, 2013, 11:28 a.m., David Edmundson wrote:
> > contact-list-widget.cpp, line 313
> > <http://git.reviewboard.kde.org/r/109289/diff/2/?file=117041#file117041line313>
> >
> >     You need this line to reset the filter bar

Right, fixed.


> On March 5, 2013, 11:28 a.m., David Edmundson wrote:
> > contact-list-widget.cpp, line 332
> > <http://git.reviewboard.kde.org/r/109289/diff/2/?file=117041#file117041line332>
> >
> >     alternate way to fix the compile warning
> >     
> >     
> >     d->model->setSortRole(sort ? (int) KTp::ContactPresenceTypeRole : (int)Qt::DisplayRole);
> >     
> >     
> >     (not tested)
> >     
> >     They get casted to an int for setSortRole anyway

It's not the way to fix, it's the way to suppress them. Warning appears because mixing enums is a hell of a bad practice. 
But I don't really want to dig into it, so, it's up to you. Fix is dismissed. 


- Roman


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109289/#review28574
-----------------------------------------------------------


On March 5, 2013, 3:37 p.m., Roman Nazarenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109289/
> -----------------------------------------------------------
> 
> (Updated March 5, 2013, 3:37 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Adds exclusive actions group for contact list grouping.
> Added enumerated action groups, so we could easily convert checked grouped action into appearance modes. 
> Those groups also allow us to replace onFullView/onNormalView slots with one onAppearanceChanged(int), so we can reduce number of manual signal-slot connections (and improve readability and maintainability). 
> 
> Also moved (config file option name <-> widget text <-> mode enumerator) relations for exclusive action groups into separate static class MenuConfig, so we can avoid manual relations tracking.
> 
> 
> This addresses bug 279023.
>     http://bugs.kde.org/show_bug.cgi?id=279023
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 5802d32 
>   action-group-enumerated.h PRE-CREATION 
>   action-group-enumerated.cpp PRE-CREATION 
>   contact-list-widget.h ab2191c 
>   contact-list-widget.cpp f931913 
>   main-widget.h d72c970 
>   main-widget.cpp 778c71e 
> 
> Diff: http://git.reviewboard.kde.org/r/109289/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Roman Nazarenko
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20130305/b835d9ab/attachment-0001.html>


More information about the KDE-Telepathy mailing list