Short hostnames in URLs
hausmann at kde.org
Wed Aug 7 15:45:58 BST 2002
On Wed, Aug 07, 2002 at 04:35:55PM +0200, Lubos Lunak wrote:
> Dne st 7. srpen 2002 15:32 Marc Mutz napsal(a):
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > On Wednesday 07 August 2002 10:02, Lubos Lunak wrote:
> > <snip>
> > > > Isn't there a way that does _not_ use QApp::processEvents()?
> > >
> > > Sure. Would you prefer the one starting another process, or the one
> > > starting another thread, or the one possibly blocking in
> > > gethostbyname()?
> > <snip>
> > QDns is not blocking. Never. You just need to allocate it on the heap
> > and connect the right signals.
> Let me correct it a bit :
> 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.
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.
Simon (wishing these parts of QApplication would be private API)
More information about the kde-core-devel