[PATCH] Fix KActionCategory::add()
Aurélien Gâteau
aurelien.gateau at free.fr
Sat Nov 1 19:17:37 GMT 2008
Michael Jansen wrote:
> On Saturday 01 November 2008 18:51:48 Aurélien Gâteau wrote:
>> Michael Jansen wrote:
>>> On Saturday 01 November 2008 11:21:09 Aurélien Gâteau wrote:
>>>> Hello,
>>>>
>>>> KActionCategory::add() is broken right now, it misses a
>>>> KActionCategory::add(QAction*).
>>>>
>>>> Attached patch fix this. Ok to commit?
>>>>
>>>> Aurélien
>>> Just use
>>>
>>> KAction * addAction(const QString &name, QAction *action);
>>>
>>> You HAVE to provide a name. And the actions HAS TO BE a member of the
>>> associated action collection. Your new method breaks that requirement.
>>>
>>> So just tell me your use case.
>> My use case is using KActionCategory::add() to create a KToggleAction.
>> If you look at add() implementation, you will see that it calls
>> addAction(action), but there is no such thing as
>> KActionCategory::addAction(QAction*).
>> I guess you are concerned with publishing such a new method, it doesn't
>> need to be public in fact, would it be ok to add it as a private method
>> instead?
>>
>> Aurélien
>
> Missed that. Now i see. Yes. Just add it as a private method. Thx.
Ok, done.
Aurélien
More information about the kde-core-devel
mailing list