[PATCH] RFC: Changing the language of individual KDE programs

Krzysztof Lichota krzysiek at lichota.net
Wed Mar 28 09:57:56 BST 2007


David Faure napisaƂ(a):
> On Saturday 24 March 2007, Krzysztof Lichota wrote:
>> I have implemented "Remove" buttons, moved implementation into separate
>> files (switchapplang.{cpp,h}) and fixed some minor issues. 
> Please name the files after the classname, without contractions.
> kswitchapplicationlanguagedialog.cpp is a bit long, but you chose the classname, not me :-)
> Maybe the application can be removed (from both the classname and the filename).

KSwitchLanguageDialog is fine for me. I will change that :)

>> I have added KPushButtonWithData class, I could not find any other way
>> of tying remove push button to label and language button. Maybe it could
>> be done better? Any ideas?
> Please use QVariant instead of dangerous void*.
> 
> Oh, this is Qt3/kde3 code. I hope QVariant can contain the type of data you want to put into it then...

I do not see the option to put arbitrary pointer in QVariant in Qt3 docs.

> +    protected:
> +        /**
> +            Fills language button with names of languages for which given application has translation.
> +        */
> +        void fillApplicationLanguages(KLanguageButton *button);
> +        
> +        /**
> +            Adds one button with language to widget.
> +        */
> +        void addLanguageButton(const QString & languageCode, bool primaryLanguage);
> +        
> +        /**
> +            Returns list of languages chosen for application or default languages is they are not set.
> +        */
> +        QStringList applicationLanguageList();
> +        
> +        QPtrList<KLanguageButton> languageButtons;
> +        QGridLayout *languagesLayout;
> +        QWidget *page;
> Make all of this private, use a d pointer.
> 
> Alternatively, don't export the class, and don't install its header - i.e. make it really private to kdeui.

I will change it to d-pointer, I think this class should be exported so
that apps which do not have Help menu could open this dialog using other
means.

Thanks for comments :)

	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/20070328/99d1a5d1/attachment.sig>


More information about the kde-core-devel mailing list