[Webkit-unassigned] [Bug 61104] [Qt] Signals are not emitted from WebView.onLoadStarted handler when web page is initially loaded.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 5 10:07:35 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=61104





--- Comment #5 from Alexis Menard <alexis.menard at openbossa.org>  2011-07-05 10:07:35 PST ---
(In reply to comment #4)
> I created the original bug report at bugreports.qt.nokia.com so I am interested about this one too.
> 
> Just to be sure; based on your comment, do you expect the signal to work at all? Because it does. It's just that it doesn't work the FIRST time you load a page. 
> 
> What do you think?

It's invalid as comment #3 explained. I expect it to work after the connect because the connection is made after the first load so yes it's perfectly logical and works as expected. I can't be workarounded as well as no patch can be made.

Here is the scenario :

When you do QGraphicsObject *rootItem = viewer.rootObject();

The QML code is parsed, then executed so the load is starting and if it's fast the signal is emitted even before the program arrives to the connect. Then you do :

 QObject::connect(rootItem, SIGNAL(loadStarted(QUrl)),
    this, SLOT(onWebLoadStarted(QUrl)))

which will connect the rootItem to the slot. But as you can see it's already too late, the signal may be fired already. But of course any other loadStarted signal that the QML code can emit *after* will end up to the slot.

There is no magic here. It's just normal imperative programming.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list