[Qt-interest] Qt 4.5.0 WebKit not loading resources that were loaded by 4.4.3
Rush Manbert
rush at manbert.com
Thu Mar 19 19:28:10 CET 2009
My test platform is Mac OSX 10.5.6 with Xcode 3.1.2.
I have a small web browser application that is a prototype for a much
more complicated web browser application. The simple version always
loads the same HTML. The web page that the HTML defines loads an
external CSS file, an external JavaScript file, and a number of
images, each in one of the supported image formats. The JavaScript
causes the images to move on the page, the CSS causes the div that
contains the images to have a purple background, and each image
includes text that identifies its format. This all makes it easy to
tell whether all of the content was loaded.
Because of the way the complicated browser works, we implemented this
by deriving from QNetworkAccessManager and overriding its
createRequest() method. We also derived from QNetworkReply so that we
could override its readData() and bytesAvailable() methods, among
others.
The createRequest() override instantiates our NetworkReply class and
gives it a pointer to the rendered HTML. The NetworkReply::readData()
method returns the HTML string in however many chunks are required.
The current implementation is a fairly short string, so it only gets
called once and it just returns the whole thing.
I have been using qmake to read my .pro file and make Xcode projects.
I have tested this using Qt 4.4.3 and 4.5.0. Both of my Qt
installations use the -static configuration, so I am using static
libraries.
The biggest difference that I see between Qt 4.4.3 and 4.5.0 is that
my app built against 4.4.3 loads all of the external resources and
behaves as I expect. When I build it against 4.5.0 it loads none of
the external resources. The HTML is being read and interpreted,
because it contains a <button> element that shows up, but everything
else is missing.
Do I need to implement something else for Qt 4.5.0 in order to get my
resources loaded? The biggest difference I see between the 4.4.3 and
4.5.0 sources is the new caching, so I am wondering whether I need to
implement some sort of custom cache, or hook up a default cache. Any
help would be greatly appreciated. I can furnish my source, or the
entire project directory as a 16k ZIP file.
Thanks,
Rush
More information about the Qt-interest-old
mailing list