D10444: Improve KLanguageButton::insertLanguage when no name is passed

Aleix Pol Gonzalez noreply at phabricator.kde.org
Mon Feb 12 13:43:45 UTC 2018


apol added inline comments.

INLINE COMMENTS

> klanguagebutton.cpp:148
>      if (name.isEmpty()) {
> -        text = languageCode;
> -        QLocale locale(languageCode);
> -        if (locale != QLocale::c()) {
> -            text = locale.nativeLanguageName();
> -        } else {
> -            showCodes = false;
> +        const QString entryFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("locale") + QLatin1Char('/') + languageCode + QStringLiteral("/kf5_entry.desktop"));
> +        if (QFile::exists(entryFile)) {

Why `QStringLiteral("locale") + QLatin1Char('/')`?

REPOSITORY
  R265 KConfigWidgets

REVISION DETAIL
  https://phabricator.kde.org/D10444

To: aacid
Cc: apol, #frameworks, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180212/cde30e64/attachment.html>


More information about the Kde-frameworks-devel mailing list