[immodule-qt] Problem in qt-x11-immodule-unified-qt3.3.4-20041203 patch

LiuCougar liucougar at gmail.com
Thu Mar 3 22:56:27 EET 2005


Hi,
I just discovered an issue with
qt-x11-immodule-unified-qt3.3.4-20041203 patch (bc mode).

Basicly, I ask scim-qtimm to display some debug messages when
QScimInputContext is created or destroyed. However, I noticed that in
the editest program (shipped with scim-qtimm package), I can see that
whenever I click the right button in the qtextedit/qlineedit, a new
QScimInputContext is created, and it is never deleted again. So after
I do several right clicks, a bunch of QScimInputContexts are created.

This is definitely not we are expected, right? Only one
QScimInputContext should be created for the test program editest. I
found the problem is that, the QPopupMenu is the one who triggers the
creation of new QInputContext.

My suggestion is that, modify two lines in qwidget.cpp to test whether
inputmethod is enabled for the target widget:

line 3296 from
if ( prev != this ) {
to
if ( prev != this && prev->isInputMethodEnabled()) {

and add this line:
if(isInputMethodEnabled())
before line 3310  which is
focusInputContext();

What do you think?

Another potential issue is that I never notice the destructor of
QScimInputContext is called, when I exit editest. Of course, this is
not a big issue. (The destructor IS called when I change QInputContext
in the right click menu)

Regards,
Cougar
-- 
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage



More information about the immodule-qt mailing list