[PATCH] RFC: Changing the language of individual KDE programs
Krzysztof Lichota
krzysiek at lichota.net
Thu Mar 29 09:21:32 BST 2007
David Faure napisaĆ(a):
> On Wednesday 28 March 2007, Krzysztof Lichota wrote:
>> +#include <klanguagebutton.h>
>> +#include <kpushbutton.h>
>> +
>> +class QGridLayout;
>> +class KPushButtonWithData;
>
> All this can be removed now.
Right :)
>> + SwitchApplicationLanguage, ///< @since 3.5.7
> Remove trailing comma.
>> + menuSwitchLanguage = 5,
> Same here ;)
I prefer to put commas at last element, so that if another value is
added, the diff does not contain spurious information that previous line
is modified. It is useful for blame^Wline annotation in CVS ;)
>> + 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;
> }
I knew there must be such cast somewhere... Unfortunately
techbase.kde.org mentions only qobject_cast :(
> (Might need a const_cast here if find() doesn't work with the const pointer, not sure).
Yes, it is needed, I had it a few lines below :)
>> + 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();
Done :)
> With the above, the patch looks fine to me, please commit.
Thanks for review and comments :) Committed :)
Krzysztof Lichota
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070329/da45ec90/attachment.sig>
More information about the kde-core-devel
mailing list