Results 1 to 2 of 2

Thread: Redundant call of QWebPage::extension() after unsupportedContent(QNetworkReply*)

  1. #1
    Join Date
    Sep 2010
    Posts
    14
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Redundant call of QWebPage::extension() after unsupportedContent(QNetworkReply*)

    In my QWebPage subclass, I have overridden both supportsExtension() and extension() to support the ErrorPageExtension extension type.

    These two functions are called in most cases where data fails to load, and in most cases that's the appropriate behaviour.

    However, I have also setForwardUnsupportedContent(true) on the subclass, and so the data that QWebPage doesn't know how to handle it forwards to the slot connected to unsupportedContent(QNetworkReply*).

    What I don't understand is why it also (afterwards) calls extension with an ErrorPageExtension request, with a domain of QWebPage::WebKit.

    If I handle the reply in my slot, is there any way to prevent it from making an ErrorPageExtension request?

    Of course, I could just use extension() and get rid of the slot, since it handles _all_ the error cases. It's just - that will miss out on the QNetworkReply* passed to the slot, which could point to fairly important data.

    Is this the appropriate behaviour? And if I wanted to override it, would a sensible way then be to return false from supportsExtension (for an ErrorPageExtension type) temporarily, just after handling the unsupportedContent() signal?

    Or would it be better to just return false from extension() in this case? (since in most situations I will not want it to display an error page after handling the unsupported content successfully)

    Thanks in advance.

  2. #2
    Join Date
    Sep 2010
    Posts
    14
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Redundant call of QWebPage::extension() after unsupportedContent(QNetworkReply*)

    Last-ditch bump in the hope of finding someone in-the-know

Similar Threads

  1. Replies: 0
    Last Post: 18th February 2011, 13:25
  2. using qmotif extension
    By pascasio in forum Newbie
    Replies: 7
    Last Post: 30th November 2010, 13:53
  3. Unwanted downloads with QWebPage/QWebPage
    By ouekah in forum Newbie
    Replies: 6
    Last Post: 11th May 2010, 22:48
  4. How to use qwebpage in non-gui app
    By Cykus in forum Newbie
    Replies: 4
    Last Post: 10th May 2010, 11:35
  5. QwebPage within a QGraphicsWidget
    By Osprey in forum Qt Programming
    Replies: 0
    Last Post: 16th June 2009, 17:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.