PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 973 - shouldInterruptJavaScript slot override is never called
: shouldInterruptJavaScript slot override is never called
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtWebKit
: 1.0.5
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-17 13:42 EEST by mikael.lammentausta
Modified: 2011-09-21 20:49 EEST (History)
8 users (show)

See Also:


Attachments
example of the problem with shouldInterruptJavaScript (701 bytes, text/x-python-script)
2011-08-17 13:42 EEST, mikael.lammentausta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikael.lammentausta 2011-08-17 13:42:31 EEST
Created attachment 401 [details]
example of the problem with shouldInterruptJavaScript

When a QWebPage runs JavaScript that takes too long to run, WebKit will
interrupt its processing. Qt by default prompts a UI dialog with yes/no
buttons, but the API offers a slot that can override this default behaviour:

http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#shouldInterruptJavaScript

However, this is not called when using PySide. Attached is a test case for
this. The script will prompt a UI dialog, when it should call the Python method
instead.


The exact same problem was discussed on StackOverflow:
http://stackoverflow.com/questions/6868286/override-shouldinterruptjavascript-in-qwebpage-with-pyside
Comment 1 renato filho 2011-08-26 23:20:17 EEST
fixed on shiboken commit:

commit f225c0c06d6c5ea07eba1800014d2f50d26b0a7c
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Fri Aug 26 14:55:03 2011 -0300

and pyside commit:
commit 1cf8ce88ca3b98ee5a064a0bb9763d6271d5ebd5
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Fri Aug 26 16:03:08 2011 -0300
Comment 2 mikael.lammentausta 2011-08-27 12:40:14 EEST
Wow! Thank you very much.

I'll compile Shiboken and PySide soon as I have a chance and report back.
Comment 3 Hugo Parente Lima 2011-08-29 16:20:14 EEST
(In reply to comment #2)
> Wow! Thank you very much.
> 
> I'll compile Shiboken and PySide soon as I have a chance and report back.

Better compile the whole tool chain, i.e. ApiExtractor and GeneratorRunner
unless you have the latest version of both.
Comment 4 mikael.lammentausta 2011-09-03 19:04:26 EEST
I got around to test this on both Ubuntu Linux and OSX. Both work as expected.
=)
I had a look at the diff, looks like the change was not too trivial. Closing
this issue now. Good work!
Comment 5 Hugo Parente Lima 2011-09-05 17:16:13 EEST
(In reply to comment #4)
> I got around to test this on both Ubuntu Linux and OSX. Both work as expected.
> =)
> I had a look at the diff, looks like the change was not too trivial. Closing
> this issue now. Good work!

Hi,

You don't need to worry about close the bug, we close all bugs only when a
release is done.

thanks for trying to help.

regards
Comment 6 renato filho 2011-09-21 20:49:30 EEST
Release 1.0.7