Review Request: Block keyboard events from the internal widget(buttons) of the KPluginSelector widget, to avoid a misbehaviour on SystemSettings (KWin Effects page)

Darío Andrés andresbajotierra at gmail.com
Sat Apr 11 22:54:11 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/559/
-----------------------------------------------------------

Review request for kdelibs.


Summary
-------

This patch blocks the Keyboard events that the internal buttons/widgets of the KPluginSelector dialog emits. (this widgets are: the enabled "CheckBox", the "Settings" button and the "About" button ) If any of those buttons were focused, pressing a key duplicated the keyevent causing a mis-behaviour.

The attached patch fixes a bad behaviour that caused bug 189381 (https://bugs.kde.org/show_bug.cgi?id=189381):
In the KWin Effects KCM page on System Settings (which uses KPluginSelector), pressing ESC produced two keyboard events for that key, thus causing a crash (before "fixing" bug 189381), or (currently) produces a second "Unsaved changes" widget.

You can check that, checking for the key on "KCMultiWidget::keyPressEvent( QKeyEvent * event )" (kdebase/workspace/systemsettings), and going to the KWin Effects page, change some setting and put the focus on any internal widget. Pressing ESC brings the Unsaved Changes, canceling that dialog will bring it again (this is caused by the second keyevent of the ESC key being pressed)

I don't know if this wasn't done this way from the first time because it is needed by other applications to work OK, so I'm posting this here to get review instead of commiting directly.

Regards


This addresses bug 189381.
    https://bugs.kde.org/show_bug.cgi?id=189381


Diffs
-----

  svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/kutils/kpluginselector.cpp 951942 

Diff: http://reviewboard.kde.org/r/559/diff


Testing
-------


Thanks,

Darío





More information about the kde-core-devel mailing list