Review Request 111183: Move KLanguageButton to KWidgets
Kevin Ottens
ervin at kde.org
Mon Jun 24 13:47:14 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111183/#review34980
-----------------------------------------------------------
staging/kwidgets/src/widgets/klanguagebutton.h
<http://git.reviewboard.kde.org/r/111183/#comment25610>
Should say QLocale().
staging/kwidgets/src/widgets/klanguagebutton.h
<http://git.reviewboard.kde.org/r/111183/#comment25611>
Maybe a good opportunity to change that to a const ref? Unlike KLocale, QLocale tends to be used by value.
staging/kwidgets/src/widgets/klanguagebutton.cpp
<http://git.reviewboard.kde.org/r/111183/#comment25613>
IMO this block can be changed into:
QLocale locale(languageCode);
if (locale != QLocale::c())
text = locale.nativeLanguageName()
else
staging/kwidgets/src/widgets/klanguagebutton.cpp
<http://git.reviewboard.kde.org/r/111183/#comment25614>
This line can probably be changed to (assuming locale would be of type QLocale and not QLocale*):
setCurrentItem(locale.name());
If KLocale::defaultLanguage() is still needed that would be something to replace with QLocale::system().name()
- Kevin Ottens
On June 23, 2013, 8:39 a.m., Andrea Scarpino wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111183/
> -----------------------------------------------------------
>
> (Updated June 23, 2013, 8:39 a.m.)
>
>
> Review request for KDE Frameworks and Kevin Ottens.
>
>
> Description
> -------
>
> The KLocate code is commented. I don't know if this is OK, or if I've to port it to QLocale first and then it can be moved to kwidgets.
>
> This patch must be applied with the others 2 that I'm going to push later.
> KHelpMenu uses KLanguageButton through KSwitchLanguageDialogPrivate.
>
>
> Diffs
> -----
>
> kdeui/CMakeLists.txt 3946ebf
> kdeui/widgets/klanguagebutton.h feb2b5b
> kdeui/widgets/klanguagebutton.cpp c5d8e4b
> staging/kwidgets/src/CMakeLists.txt 03a7d7a
> staging/kwidgets/src/widgets/klanguagebutton.h PRE-CREATION
> staging/kwidgets/src/widgets/klanguagebutton.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/111183/diff/
>
>
> Testing
> -------
>
> Builds.
>
>
> Thanks,
>
> Andrea Scarpino
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130624/387c67ef/attachment.html>
More information about the Kde-frameworks-devel
mailing list