tags:

views:

29

answers:

0

We've implemented a subclass of QTextBrowser to act as a local cache. We've overriden loadResource to provide all the resources requested. This works well as long as the resource is properly formatted. However, if there is some problem with the resource then Qt will try to load the resource itself. We'd like to disable that functionality. I.e. if there is a problem with the resource, ignore it.

Our approach used to work, however, since at least 4.6.3 Qt has become very aggressive at trying to load the resources if there are any problems with whatever is provided by loadResource. Is there any way to disable this functionality?

[edit] To clarify: our problem isn't with loadResource, it seems to be with the user of loadResource. We are returning a filesystem based resource from loadResource and then whomever calls us is unhappy with the resource and tries to load it from the original url using some other mechanism.