[PATCH] Avoid crash in Konsole (TEWidget::setCursorPos)
Andras Mantia
amantia at kde.org
Fri Sep 8 00:51:09 BST 2006
Hi,
KDevelop users frequently experience crashes on project loading. I know
about two backtraces which always end with a call to
QWidget::setMicroFocusHint and from there a
QXIMInputContext::setMicroFocus call (actually the
QWidget::mapFromGlobal is the one which crashes). Altough I
don't know the exact reason, I could find out that the crash only
happens if the widget for what setMicroFocusHint is called does not
have the focus.
I could workaround in KDevelop one of the cases where the katepart was
involved, but for the second case where the embedded konsole part is
crashing I couldn't see any solution. Both KDevelop's code and the
konsolePart constructor tries to set the focus to the embedded widget,
but it still doesn't get it or loses it later. As a solution I would
recommend the following patch. This fixes the KDevelop problem, but I
have no idea if it has any bad effects or not.
An alternative way to avoid the crash was not calling the
setMicroFocusHint if xpos or ypos is less than zero, but that might be a
worser "fix".
Please comment, otherwise I will commit before 3.5.5 is tagged.
Andras
--
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TEWidget.cpp.diff
Type: text/x-diff
Size: 534 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060908/1f019a45/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060908/1f019a45/attachment.sig>
More information about the kde-core-devel
mailing list