[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] RFC: Changing the language of individual KDE programs
From:       David Faure <faure () kde ! org>
Date:       2007-03-28 21:12:58
Message-ID: 200703282312.59455.faure () kde ! org
[Download RAW message or body]

On Wednesday 28 March 2007, Krzysztof Lichota wrote:
> +#include <klanguagebutton.h>
> +#include <kpushbutton.h>
> +
> +class QGridLayout;
> +class KPushButtonWithData;

All this can be removed now.

> +        SwitchApplicationLanguage, ///< @since 3.5.7
Remove trailing comma.
> +      menuSwitchLanguage = 5,
Same here ;)

>  +    if (signalSender->inherits("KPushButton") == false)
Inherits is fragile, it breaks when classes get renamed (as happened with Qt4).
Please do
  const KPushButton *removeButton = ::qt_cast<const KPushButton*>(signalSender);
  if (!removeButton) {
    kdError...
    return;
  }
(Might need a const_cast here if find() doesn't work with the const pointer, not sure).

> +        KConfigGroupSaver saver(config, "Locale");
KConfigGroup was already in 3.x, no? Save time on the kde4 porting by doing
KConfigGroup group(config, "Locale");
group.writeEntry("Language", languageString);
config->sync();

With the above, the patch looks fine to me, please commit.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic