Review Request: Get rid of excessive Knm::Connection::typeAsString usage and remove hardcoded scope strings to make it i18n friendly.

Lamarque Vieira Souza lamarque at gmail.com
Fri May 13 19:57:38 CEST 2011


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



libs/internals/connection.cpp
<http://git.reviewboard.kde.org/r/101354/#comment2776>

    My other comment applies here. Using a translatable string here is asking for trouble. Depending on where this function is called the needed translation catalog may not be loaded. I have seen this kind of problem in Plasma NM before and the solution was avoiding using functions such as this one.
    
    Fortunately this function is not used in Plasma NM, so it is not a problem yet. I think we should remove this function to prevent someone using it.


- Lamarque Vieira


On May 13, 2011, 1:31 p.m., Gökcen Eraslan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101354/
> -----------------------------------------------------------
> 
> (Updated May 13, 2011, 1:31 p.m.)
> 
> 
> Review request for Network Management and Lamarque Vieira Souza.
> 
> 
> Summary
> -------
> 
> 2 things are done with this patch:
> 
> * "System" and "User" keywords are not translatable and hardcoded. There is a Knm::Connection::scopeAsString method but it's not used in anywhere. Patch makes use of it and also change this method to use i18ned words. Now I can see translated uses of System and User words in UI.
> 
> *  A little refactoring done in settings/config/manageconnectionwidget.cpp to remove excessive usage of Knm::Connection::typeAsString. I've used the enum value of Type to use a switch-case structure instead of string comparison with if-elses.
> 
> 
> Diffs
> -----
> 
>   libs/internals/connection.h bb7e21b 
>   libs/internals/connection.cpp 7085b1b 
>   settings/config/manageconnectionwidget.cpp 6d3dd44 
> 
> Diff: http://git.reviewboard.kde.org/r/101354/diff
> 
> 
> Testing
> -------
> 
> I did not encountered with an error.
> 
> 
> Thanks,
> 
> Gökcen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-networkmanager/attachments/20110513/cfff1901/attachment-0001.htm 


More information about the kde-networkmanager mailing list