[PATCH] remove crashing kdebug in kshortcutseditoritem.cpp

Andreas Hartmetz ahartmetz at gmail.com
Sun May 11 18:09:27 BST 2008

2008/5/10 Michael Jansen <kde at michael-jansen.biz>:
> On Friday 09 May 2008 01:05:24 Andreas Hartmetz wrote:
>> >  > I remember a recent bug, for example in KWin's effects configuration,
>> >  > where your changes will always be discarded. Or at least it looks so
>> >  > in the GUI. Well, we can probably sort this out quickly now.
>> >
>> >  ???? Just send me steps to reproduce and i will have a look.
>> Note: I designed the editor so that it would commit changes
>> immediately and only undo them when you explicitly press the "undo"
>> button. Of course I wrote the original code under this assumption
>> everywhere. It may or may not be easy to change or modify that
>> behavior without breaking something else.
> Probably. But the code worked perfect for kcmshell4 keys and the applications
> configuration dialogs. Only the effect do not work. And i'm currently not able
> to make that work. See below.
That could a symptom of forgetting to set the dynamic property
"isConfigurationShortcut" as described below or a logic bug or
something entirely different :(.

>> To reproduce the bug I described:
>> Open system settings, click on Look&Feel/Desktop, then:
>> Desktop effects, check "enable desktop effects". Under the "all
>> effects" tab open the settings dialog of any module that has one,
>> change a shortcut, say to Ctrl-Alt-F10. Close the dialog, open it
>> again. It displays the old, unchanged shortcut. Set it again to
>> Ctrl-Alt-F10. Oh, now there's a conflict with itself which is
>> especially confusing.
>> This bug may or may not have somehing to do with undo-on-close
>> actually, it was just recently pointed out to me. Hey, maybe I broke
>> it with per-component global shortcuts (but the person who told me
>> about the bug didn't mention it being very new).
> If you change the shortcut, apply. and immediately open kcmshell4 keys you
> will see the change is active.
> I'm pretty sure you're per-component  global shortcuts code introduced some
> regressions. I encounter many problems i never seen before.
Not all of the problems below look like they could have been
introduced with that modification.

> 1. KWin's shortcuts exist three times: Under Components KWin, KCMShell, KDE
> Control Module
OK, this looks like KAction's globalShortcut() autosave feature which
should be disabled in "configuration mode".

> 2. Changing global shortcuts in kcmshell4 keys fails for me. For all
> components. I've seen some changes written to kglobalshortcutsrc but never
> getting active. Most of the time the change doesn't get saved.
> Other things i noticed during my search
> KWin Effects Configuration never set the isConfigurationShortcut Property for
> their actions. I THINK this will lead to problems.
I think so, too. Good find.

> They try to save their action collections with
> KActionCollection::writeSettings() instead of KShortcutsEditor::save().  That
> definetely will lead to problems.
Damn, that is something we (I don't remember who contributed, but we
did collaborate in some way?) did not consider during the, uhm, design
phase of KActionCollection. It is not good that there are two
plausible ways to save shortcuts. Not sure what to do here right now.
Documentation, I guess? :/

> The magnifier effects configuration dialog shows all of it's shortcuts twice.
Ungh. I would really like to say something helpful here but I can't :/

> The KWin component has no name in kcmshell4 keys.
Cool, this is AFAICS the symptom of not setting the property

By the way, I did not read any code to back up my statements so I may
be wrong. But I don't have much time right now, either.

More information about the kde-core-devel mailing list