From kde-core-devel Thu Aug 08 01:43:45 2002 From: "Dawit A." Date: Thu, 08 Aug 2002 01:43:45 +0000 To: kde-core-devel Subject: Re: Short hostnames in URLs X-MARC-Message: https://marc.info/?l=kde-core-devel&m=102877131229018 On Wednesday 07 August 2002 12:45, Lubos Lunak wrote: > Dne st 7. srpen 2002 16:45 Simon Hausmann napsal(a): > [snip] > > > > QDns is not blocking. Never. You just need to connect the right > > > signals and enter (or return to) the event loop. > > > > The fact that the urifilter API is sync is a pity in this very case, > > but I think we shouldn't try to work around it. IMHO there should be > > no code in kdelibs (and I consider this plugin to be a kdelibs > > thing, because it is loaded by kdelibs in every default setup) using > > enter_loop()/exit_loop() or equivalent constructs, unless it is > > explicitly mentioned in the documentation or somewhere. > > enter_loop()/processEvents is asking for absolutely nothing but > > trouble. Just imagine the lookup takes a bit too long and the user > > closes the konqueror window in the meantime. > > *sigh* ... ok. That is not the only problem. This is going to force at least two lookups = in=20 such scenarios and depending on how slow your nameserver is it can be=20 unbearable to some!! I remember how many people complained when the now=20 defunct Realnames Internet Keyword feature was added. This will even do a=20 lookup if I type localhost in the konqueror or minicli for crying out loud= =20 and if as Waldo said QDNS does not check /etc/hosts, there is going to be a= =20 query for that as well ?? > > Aside from that I second Waldo's concern about QDns. The class does > > not obey /etc/nsswitch.conf at all (yes, I've seen setups where host > > lookups were partially done through NIS :( > > > > I'd probably dump the feature instead of taking the risk. > > I wouldn't. Attached is try #2. Unless there are some more technical > details to discuss, could now somebody with dial-up check if the timeout > value doesn't cause some problems? I am completely against this patch or any other patch that does any type of= =20 lookup at this level. I do understand your issue and I can also understand= =20 why you do not like the compromise solution I mentioned to you eventhough i= t=20 is much flexiable in terms of what protocol you can attach to it, but your= =20 patch forces the DNS lookup on everyone like the other browsers do which I= =20 personally do not care for. Having said that I have one really easy way of resolving this issue for you= =2E =20 Take this very patch and write your own URIFilter plugin. All you have to = do=20 is inherit from KURIFilterPlugin and re-implement filterURI and create a=20 desktop for your plugin using the one in the shorturi filter plugin. It is= =20 extremely simple to do this and once installed it will be used by any=20 application that that makes use of KURIFilter (currently konqueror and=20 minicli). And then you can add it in kdeaddons or whereever and viola, no= =20 need to try and convience people about why you need it and no need to reapp= ly=20 patches when KDE changes etc... Regards, Dawit A.