[PATCH] Unbreak global shortcuts configuration

Kevin Ottens ervin at kde.org
Mon Jan 28 19:36:54 GMT 2008


Le dimanche 27 janvier 2008, Aurélien Gâteau a écrit :
> I announced last week I was working on the global shortcuts kcm and
> intended to post a patch this monday. Obviously I am a bit late :-), but
> here are the patches.

Yeah, and you made me lazy, since I knew you were on it I didn't pursue this 
one (I had something to co-organize anyway). ;-)

> The patches are against kdelibs and kdebase. I use git-svn for kdelibs and
> svn+quilt for kdebase right now, so the patches are formatted a bit
> differently, sorry about that.

That's still readable.

> # 0_dont_loose_shortcut_on_close.diff
> This is the patch I posted to fix shortcuts disappearing when you close the
> kcm. It's not elegant, since it involves intentionally leaking the KAction
> instances so that their destructor do not delete the shortcuts. I include
> it nevertheless because the other patches are based on it. As I said in my
> previous message, it could be done in a more elegant way by adding a flag
> to KAction to disable shortcut deletion when it is deleted. Will probably
> do it.

I'm still not confident with leaking actions like this... But I had an idea in 
the meantime, what about controlling the KAction dtor with a flag? Since the 
kcm would be the only user of this, using a dynamic property and checking for 
it in the dtor would probably be the way to do (no cluttering of KAction 
API).

> # 1_{kdelibs,kdebase}_show_empty_actions.diff
> [...]
> # 2_{kdelibs,kdebase}_default_shortcuts.diff
> [...]

That's roughly what I had in mind to complete my own patches. So I agree with 
the approach.

I'd say the best way to move on from here would be to give a try to my 
proposal for #0, and then testing those patches after reverting commit 
r757400. This way the situation for global shortcuts should be sane again 
(able to configure them, no random loss and working even if you have non 
english locale).

Anyway, great work! You're about to kill my most hated pet bugs in 4.0. :-)

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080128/50b0ab73/attachment.sig>


More information about the kde-core-devel mailing list