[immodule-qt] potential issue of the latest patch

YamaKen yamaken at bp.iij4u.or.jp
Tue Aug 17 08:57:44 EEST 2004


Hi Cougar,

At Sun, 15 Aug 2004 02:41:24 +0000,
liucougar at gmail.com wrote:
> 
> On Sun, 15 Aug 2004 11:17:17 +0900, YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > > On Sun, 15 Aug 2004 09:26:27 +0900, YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > > > Although the plugin loading is unnecessary for users, imsw-multi
> > > > requires loading all plugins to construct the popup menu. See
> > > > QMultiInputContext::createImSelPopup(). I think that there is no
> > > > way to avoid this plugin loading.
> > > Maybe we can borrow the method in GTK immodule: a separate program to
> > > generate the list of all available input method plugins (
> > > gtk-query-immodules-2.0) when a plugin is installed/uninstalled.

> > Comparing mtime of plugins/input/ and qt.immodules file is a
> > efficient way. 
> Agree.
> 
> > - who should generate the list?
> >   -> qt-query-immodules or the equivalent in Qt application
> >      process
> > 
> > - when should generate the list?
> >   -> when any Qt application starts (regenerated when actually needed)
> >   -> when new plugin installed/uninstalled (optional)
> I do not think the first item here (when any Qt application starts) 
> is needed if the second item is required rather than optional: AFAIK
> gtk does not have this mechanism.
> 
> OK, I do admit that if we introduce the first item, some hassels may
> be avoided. However, do we have to check the validation of the list
> everytime an app starts?

No additional validation is required for startup process. We
only have to check mtime at startup in most case. See following
pseudo code to see what is my intention.

if (mtime_list < mtime_plugin_dir) {
  // (1) Run qt-query-immodules (or equivalent embedded code) to
  //     update the input method list
}
// (2) Always read and parse the list to construct the popup
//     menu. This part is not involving plugin loading


Or you're meaning an optimization for (2) using some
inter-process data sharing of the list to avoid file reading?

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp



More information about the immodule-qt mailing list