[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: Krzysztof Lichota <krzysiek () lichota ! net>
Date: 2007-03-28 11:32:57
Message-ID: 460A5269.4040607 () lichota ! net
[Download RAW message or body]
David Faure napisaĆ(a):
>>> OK I think the Qt3 way would be to just have a QMap in the dialog
>>> that associates the button with whatever it needs to be associated
>>> with. Then you don't need this void* usage and this extra class
>>> [which even pollutes the header that you want to make public :)]. I
>>> strongly recomment a QMap<QPushButton*, SomeStruct> to avoid the
>>> new/deletes and risks of memleaks.
>> Mapping from pushbutton to struct is only part of the problem. The other
>> part is how to identify which button was pushed? clicked() signal does
>> not carry this information.
>
> Calling sender() from the slot. (if the slot is only called by a signal, never directly!)
And how to check if it is called from signal? I would prefer to avoid
it, if it might cause problems later on. It does not look like a clean
solution :(
Krzysztof Lichota
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic