--nextPart2259632.IzvqbAXhdN Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On May 15, 2010, Dawit A wrote: > On Saturday, May 15, 2010 11:37:28 Aaron J. Seigo wrote: > > On May 14, 2010, Dawit A wrote: > > > If this was done because there is some feature or functionality missi= ng > > > from the KURIFilter class, then the missing functionality needs to be > > > added there. This blatant misuse of the configuration files need to > > > stop. > >=20 > > i think the problem is that KURIFilter is not well known :) >=20 > Well in some cases perhaps, but for example khtml_ext.cpp and even the > copied code in kwebkitpart_ext.cpp use this class but still end up reading > the configuration file because of functionality not available in this > class. >=20 > > i took a look yesterday at using KURIFilter in the krunner plugin and t= he > > questions i eneded up with were: > >=20 > > * threading: is it safe to run KURIFilter outside the GUI thread? >=20 > Yes... >=20 > > is it safe to have two KURIFilter classes in different threads making t= he > > same calls? >=20 > Partially because KURIFilter uses the Singleton pattern, but does not > serialize (use mutex lock) its creation when KURIFilter::self() is invoke= d. > Obviously, this is something that can easily be remedied by using a mutex > locked in self(). :) >=20 > Additionally, the plugins themselves have some member variables that they > reload by listening for configuration changes through dbus. Not entirely > sure whether or not this would impact re-entrancy or thread safety, but I > am inclined not to think so based on what I looked at... ok; we can work around the non-thread-safe self() easily by just calling th= at=20 in the ctor of the KRunner plugin. and if this is true: > > even better, is it safe to use one KURIFilter class in multiple > > threads? (the latter isn't a requirement; the first two are) >=20 > As far as I can tell the answer to this question is also yes, provided the that would be perfect ...=20 > > * information for the user: the runner plugin advertises what it is > > capable of, e.g. "gg: =3D> Search on google for ". > > KURIFilter gives a list of plugins with QStringList pluginNames() const, > > but how do we go from that to a rich set of information (KPluginInfo or > > KService objects would be perfect) >=20 > Yes, after looking at the KRunner webshortcut plugin, I was working on a > patch to remedy that... It is just a matter of adding a way to set and get > information about the search term and the search engine in the > KURIFilterData class. great; when that's done then it looks like the krunner plugin can move over= to=20 it. since you're already doing this part of the work, if you'd like, i can = do=20 the krunner plugin porting (not that i have much excess time, but figure it= 's=20 a nice quid-pro-quo, esp as you probably have other areas of the code t fix= in=20 similar ways as shown in this thread.) let me know ... (and yes, i'd still = be=20 happy for someone else to do it ;P ) > Anyhow, I am only aware of the uri filter plugins provided by default in > kdebase/runtime/kurifilter-plugins. Perhaps some sort of documentation > should be included in the documentation of the KURIFilterPlugin class as > to what each of those do... that'd be nice :) =2D-=20 Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Development Frameworks --nextPart2259632.IzvqbAXhdN Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEABECAAYFAkvx1Z8ACgkQ1rcusafx20MIXACdHuzgoNng4nbxYLqegvHSggt4 8E0An06GcPRVuBdp+culQIDjXR7BG1Ed =tOoG -----END PGP SIGNATURE----- --nextPart2259632.IzvqbAXhdN--