[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: kio::netaccess and imagepreview
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-11 0:23:10
[Download RAW message or body]

On Sat, Jun 10, 2000 at 06:12:27PM -0700, Waldo Bastian wrote:
> On Sat, 10 Jun 2000, David Faure wrote:
> > > Yes, this is exactly the problem I filed a bugreport for the other day..
> > > if you do a saveAs in konqueror and then close the window, the "save-as"
> > > action gets aborted.
> > >
> > > What about registering network operations to kapp and/or ktmainwindow
> > > (refcounting)?
> > >
> > > Basically you want a generic signal like
> > > "no active parts left". KTMainWindow::queryExit() is a signal like this
> > > but specific to "mainwindows", to handle this situation we need a more
> > > generic solution.
> > >
> > > Note that a typical KDE application never actually should do something
> > > with queryExit() besides returning true.
> > >
> > > What about adding something like "ref()" and "deref()" to KApplication.
> > > When the ref-count decreases and becomes 0 or smaller we quit. Then it's
> > > just a matter of letting KTMainWindow do a ref() and ~KTMainWindow do a
> > > deref(), things like download then need to do their own ref() and
> > > deref().
> >
> > I totally agree with this very good (and very general) solution.
> >
> > Note, however that it will fix the problem you reported (konqueror aborting
> > the download because exiting) but _not_, as far as I can see, the problem
> > that Simon reported.
> > Unless I misunderstood, the problem with NetAccess is that
> > enter_loop/exit_loop trick. You make a call, the control supposedly stays
> > there but in fact the application still process events. If somebody closes
> > the window (even if it's not the last one !) you would still get a crash,
> > when the NetAccess call returns... into a class that was deleted.
> >
> > :-(
> 
> Ah.. I see. NetAccess should behave as if it had a modal dialog active, even 
> if it doesn't actually have one :-)
Exactly.

> I asked the trolls for such a feature in a wishreport... but I don't think it 
> made it into Qt2.1.1
Oh, yes, I remember about that.

> What about the following hack (see attachment) Microsoft would be proud of 
> our exploitation of this hidden API >:-)
Hehe :-)
The difference is that we can do that because Qt is open source... so we
can look for the hidden API quite easily :)

So we need to do the enter_loop AND the qt_enter_modal ? Wow.
I see. It emulates a modal dialog.... which doesn't exist.

Hmm, it's getting late. I'll test it tomorrow, if Simon isn't faster.

Thanks for the enlightenement !

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic