[PATCH] BUG: 182325 Crash in KDatePicker selectYearClicked()

Christoph Feck christoph at maxiom.de
Fri Apr 10 05:30:12 BST 2009


Commit r834444 tried to fix the outside click issue using WA_DeleteOnClose. 
The problem is that clicking outside of the year popup causes the widget to 
be deleted without leaving the event loop. Then later when the application 
exits, the KPopupFrame::exec() calls hide() on the already deleted widget.
(To reproduce the crash, open systemsettings -> Date&Time, click on the year, 
click outside the year field that pops up, then close systemsettings.)

This patch reverts r834444 and tries to fix it the right way.

I am posting this for review because of two reasons:

1) Not sure if adding the hideEvent() handler to KPopupFrame is binary 
compatible. AFAICT only recompiled subclasses benefit from the fix.

2) The source somehow mentions[1] that KPopupFrame is used in multiple code 
places, but I was not able to find any other location that would need a 
similar fix. Anyone in the know? (note [1]: kdatetable.cpp, line 832)

Christoph Feck (kdepepo)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-kdatepicker-crash.diff
Type: text/x-diff
Size: 3656 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090410/846531a2/attachment.diff>

More information about the kde-core-devel mailing list