Review Request 119636: Added Chat Plugin for KPeople

Martin Klapetek martin.klapetek at gmail.com
Wed Aug 6 14:56:28 UTC 2014


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


This is some good quality code! Couple issues pointed out below, but nice work


kpeople/chatplugin/chatlistviewdelegate.h
<https://git.reviewboard.kde.org/r/119636/#comment44592>

    The policy in this library is to have everything LGPL, just copy some other license header ;)



kpeople/chatplugin/chatlistviewdelegate.h
<https://git.reviewboard.kde.org/r/119636/#comment44593>

    No. Including a whole module is not allowed



kpeople/chatplugin/chatlistviewdelegate.cpp
<https://git.reviewboard.kde.org/r/119636/#comment44594>

    For string variants we use QVariant::toString() (index.data().toString())



kpeople/chatplugin/chatlistviewdelegate.cpp
<https://git.reviewboard.kde.org/r/119636/#comment44595>

    The +10 and *2 are so called magic numbers
    
    We generally avoid using them as they are random numbers and can break things on systems with eg. high DPI. If using a magic number is needed, add a comment why did you chose that number



kpeople/chatplugin/kpeople_chat_plugin.cpp
<https://git.reviewboard.kde.org/r/119636/#comment44600>

    Why not instantiate these in the constructor? There would be no need for const_casting



kpeople/chatplugin/kpeople_chat_plugin.cpp
<https://git.reviewboard.kde.org/r/119636/#comment44601>

    As with the class name, this is not a DataSource but just a widget plugin, I think this should also be used as the tab title (?)



kpeople/chatplugin/kpeople_chat_plugin.h
<https://git.reviewboard.kde.org/r/119636/#comment44599>

    This include seems unused here, either remove it or move it to the .cpp



kpeople/chatplugin/kpeople_chat_plugin.h
<https://git.reviewboard.kde.org/r/119636/#comment44596>

    This should probably not be called ChatDataSource but rather ChatWidget[Factory]?



kpeople/chatplugin/kpeople_chat_plugin.h
<https://git.reviewboard.kde.org/r/119636/#comment44597>

    You can forward declare this; it will speed up the compilation



kpeople/chatplugin/kpeople_chat_plugin.h
<https://git.reviewboard.kde.org/r/119636/#comment44598>

    All of these can also be forward declarations


- Martin Klapetek


On Aug. 6, 2014, 4:09 p.m., Nilesh Suthar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119636/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2014, 4:09 p.m.)
> 
> 
> Review request for Telepathy and Martin Klapetek.
> 
> 
> Repository: ktp-common-internals
> 
> 
> Description
> -------
> 
> Added Chat Plugin for KPeople
> 
> 
> Diffs
> -----
> 
>   kpeople/CMakeLists.txt c5f1019 
>   kpeople/chatplugin/CMakeLists.txt PRE-CREATION 
>   kpeople/chatplugin/chatlistviewdelegate.h PRE-CREATION 
>   kpeople/chatplugin/chatlistviewdelegate.cpp PRE-CREATION 
>   kpeople/chatplugin/kpeople_chat_plugin.cpp PRE-CREATION 
>   kpeople/chatplugin/kpeople_chat_plugin.desktop PRE-CREATION 
>   kpeople/chatplugin/kpeople_chat_plugin.h PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/119636/diff/
> 
> 
> Testing
> -------
> 
> Both Building fine KPeople and KCI
> 
> 
> Thanks,
> 
> Nilesh Suthar
> 
>

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


More information about the KDE-Telepathy mailing list