Bug 38634 - [Qt] QWebFrame::setHtml doesn't emit loadFinished signal
Summary: [Qt] QWebFrame::setHtml doesn't emit loadFinished signal
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-05-06 02:14 PDT by Jędrzej Nowacki
Modified: 2011-02-10 03:58 PST (History)
5 users (show)

See Also:


Attachments
Proposed autotest (561 bytes, application/octet-stream)
2010-05-06 02:14 PDT, Jędrzej Nowacki
no flags Details
patch to check loadFinished signal (1.75 KB, patch)
2011-02-09 15:05 PST, kasthuri
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 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.
Comment 1 kasthuri 2011-02-03 12:46:28 PST
Tried to reproduce with latest version of webkit trunk and the signal is emitted properly.
Comment 2 Jędrzej Nowacki 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?
Comment 3 Antonio Gomes 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 :)
Comment 4 kasthuri 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.
Comment 5 Laszlo Gombos 2011-02-08 14:41:28 PST
Kasthuri, can you apply the patch and see if the test is still passing ?
Comment 6 kasthuri 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.
Comment 7 Antonio Gomes 2011-02-09 20:42:42 PST
Comment on attachment 81881 [details]
patch to check loadFinished signal

ok
Comment 8 WebKit Commit Bot 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>
Comment 9 WebKit Commit Bot 2011-02-10 03:58:24 PST
All reviewed patches have been landed.  Closing bug.