RESOLVED FIXED 38634
[Qt] QWebFrame::setHtml doesn't emit loadFinished signal
https://bugs.webkit.org/show_bug.cgi?id=38634
Summary [Qt] QWebFrame::setHtml doesn't emit loadFinished signal
Jędrzej Nowacki
Reported 2010-05-06 02:14:04 PDT
Created attachment 55219 [details] Proposed autotest The method should emit the signal for all types of html code. For now, It seems that the signal is emitted only for a html containing external resources, which is slightly inconsistent.
Attachments
Proposed autotest (561 bytes, application/octet-stream)
2010-05-06 02:14 PDT, Jędrzej Nowacki
no flags
patch to check loadFinished signal (1.75 KB, patch)
2011-02-09 15:05 PST, kasthuri
no flags
kasthuri
Comment 1 2011-02-03 12:46:28 PST
Tried to reproduce with latest version of webkit trunk and the signal is emitted properly.
Jędrzej Nowacki
Comment 2 2011-02-04 00:19:52 PST
Thanks for trying! Hmm, few months ago we had discussion about this bug. Apparently it was received as a feature not an issue. If I remember correctly that was the only way for a browser to set an error / warning page without polluting history. So if it works now, then something may be broken too :( Personally I don't like this kinds of side effects & hacks. I would love to see cleaner API here. Kenneth, is the usecase valid?
Antonio Gomes
Comment 3 2011-02-04 07:44:10 PST
> Hmm, few months ago we had discussion about this bug. Apparently it was received as a feature not an issue. If I remember correctly that was the only way for a browser to set an error / warning page without polluting history. So if it works now, then something may be broken too :( setHTML does not affect back/forward history, that is correct. > Personally I don't like this kinds of side effects & hacks. I would love to see cleaner API here. > > Kenneth, is the usecase valid? I am not kenneth, but I guess it is valid :)
kasthuri
Comment 4 2011-02-04 13:23:56 PST
ok, since I wasn't aware of the history, I just tried with a simple qt app which uses qwebview and calls setHtml() function of mainFrame. In that app I got the loadFinished signal. So do you have a writeup somewhere of the requirement so that I can understand it better? Thanks.
Laszlo Gombos
Comment 5 2011-02-08 14:41:28 PST
Kasthuri, can you apply the patch and see if the test is still passing ?
kasthuri
Comment 6 2011-02-09 15:05:50 PST
Created attachment 81881 [details] patch to check loadFinished signal The proposed test modification was connecting for the loadFinished signal after calling setHtml() api which resulted in missing the signal for simple html files. Hence the test was failing. Updated the test to check for the loadFinished signal using QSignalSpy.
Antonio Gomes
Comment 7 2011-02-09 20:42:42 PST
Comment on attachment 81881 [details] patch to check loadFinished signal ok
WebKit Commit Bot
Comment 8 2011-02-10 03:58:19 PST
Comment on attachment 81881 [details] patch to check loadFinished signal Clearing flags on attachment: 81881 Committed r78192: <http://trac.webkit.org/changeset/78192>
WebKit Commit Bot
Comment 9 2011-02-10 03:58:24 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.