Summary: | uim-pref-qt doesn't work when libquiminputcontextplugin.so is installed | ||
---|---|---|---|
Product: | UIM | Reporter: | UTUMI Hirosi <utuhiro78> |
Component: | helper: pref | Assignee: | uim-bugs |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patch to count libuim's initialization
init wrapper patch Revised patch |
Description
UTUMI Hirosi
2008-05-07 05:27:12 UTC
For some reason, Qt3 plugin instance for input methods is created (and destroyed) twice, and this seems to cause a problem for uim-pref-qt when libquiminputcontextplugin.so is installed. One way to avoid such conditions is to count initialization of libuim (see attached patch). Or just remove uim_quit() in UimInputContextPlugin::uimQuit() as a workaround. Created attachment 16424 [details]
Patch to count libuim's initialization
uim-pref-qt works fine now. Thank you so much. I think this bug is critical. Someone might want uim-1.5.1. Thank you for the report and the patch. But IMHO, uim_init() and uim_quit() is not the place to be added the workaround, at least in 1.5 branch since it alters the API specification of the functions. Please resolve the problem in bridge layer. See [Anthy-dev 1563] and following messages for further consideration. We had discussed such behavior once, and reverted to the current specification. (In reply to comment #4) > But IMHO, uim_init() and uim_quit() is not the place to be added the > workaround, at least in 1.5 branch since it alters the API specification of the > functions. Please resolve the problem in bridge layer. > > See [Anthy-dev 1563] and following messages for further consideration. We had > discussed such behavior once, and reverted to the current specification. Hehe, you already considered and tried this init count three years ago, which I don't remember well ;) Do you think just removing uim_quit() in UimInputContextPlugin::uimQuit() is OK for now? (Personally, I don't prefer this workaround because it must be a bug in immodule patch for Qt3). > Do you think just removing uim_quit() in UimInputContextPlugin::uimQuit() is OK
> for now? (Personally, I don't prefer this workaround because it must be a bug
> in immodule patch for Qt3).
Though I don't know sufficient information about the Qt plugin management on immodule arena, the init count workaround is better than just removing uim_quit() since it is more proper and can behave as expected by Qt on any situations we don't know. I don't prefer introducing future possibility of another problem by removing uim_quit().
What about writing a wrapper functions for uim_init() and uim_quit() contaning the your init count workaround in the bridges and replace the uim_init/quit call with them?
Created attachment 16476 [details] [review] init wrapper patch (In reply to comment #6) > What about writing a wrapper functions for uim_init() and uim_quit() contaning > the your init count workaround in the bridges and replace the uim_init/quit > call with them? That should be fine. I'll commit the above new patch if there is no further discussion. (In reply to comment #8) > That should be fine. I'll commit the above new patch if there is no further > discussion. I noticed that the using convenience library cannot share a variable among plugins (uim_panelapplet.so and libquiminputcontextplugin.so in this case). So I'll commit the patch except for kde applet part. In addition, I'm going to remove unused reloadUim() in immodule. Created attachment 16479 [details] [review] Revised patch What about these names? uim_counted_init() uim_counted_quit() uim_force_quit_regardless_of_count() The 3rd name is bit too long, but I think it'll be used rare and so such descriptive name is preferable/acceptable. (In reply to comment #11) > What about these names? > > uim_counted_init() > uim_counted_quit() > uim_force_quit_regardless_of_count() OK. I've committed this with putting the convenience library into uim/. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.