Patch: Crash: blocking JS alert and deleting a window

David Faure david at mandrakesoft.com
Thu Oct 24 10:12:26 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 23 October 2002 19:49, Koos Vriezen wrote:
> On Wed, 23 Oct 2002, David Faure wrote:
> 
> > On Wednesday 23 October 2002 13:50, David Faure wrote:
> > > I think the only solution is to add "void done (int r)" in KDialogBase (to make
> > > QDialog's method public). Patch coming up shortly.
> >
> > Was a bit more complex than that, to get KDialogBase to return the right value.
> > I used the "escape button" instead, emulating a key event (Return) instead
> > of animateClick, so that it's immediate.
> >
> > Patches attached for review.
> 
> Don't forget ecma/kjs_window.cpp.
> 
> Somehow I don't like it :). What if Qt decides to animate the return as
> for the space bar? Wouldn't done(whatever-the-escape-does) be more
> reliable in time?

It's exactly what I'm trying to do.
But I can't do "emit pb->clicked()" - it's the same problem at the QPushButton
level as the problem I had previously at the QDialog level: emulating the user's
action, without using animateClick().

So, other solutions than the fake key event would be:
* using QMetaObject to find out the slot connected to pb's "clicked()", and calling it.
* a big switch depending on mEscapeButton (11 "case"s).

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9t7l672KcVAmwbhARAnJUAJ4hMiTylFAIDHvmN9dS/I2PmjFUQgCfZto4
f9CrneIwIQawoSwbp72CO8M=
=GogI
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list