Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52239

QWebEngineUrlRequestInterceptor::interceptRequest invalid type returned by QWebEngineUrlRequestInfo::navigationType()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.6.0
    • WebEngine
    • None
    • Windows 7 Qt 5.6.0 msvc 2013

      When you want to implement the function QWebEngineUrlRequestInterceptor::interceptRequest, you get an object QWebEngineUrlRequestInfo as parameter. The NavigationType member of this object is not properly set for links clicked by the user.

      If you try to intercept only the requests made by a user when he clicks on a link, then you want to test that QWebEngineUrlRequestInfo::navigationType() == NavigationTypeLink. If you do that then you will realize that you can intercept clicked links requests but you will also intercept all resources loaded by the webpage (ie images, js scripts, css scripts etc ....)

      I think that it's an issue because the description of the QWebEngineUrlRequestInfo::NavigationTypeLink enum value is "Navigation initiated by clicking a link".

        1. QTBUG-52239.zip
          2 kB
          Vincent Bonvalot
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            vfloyd Vincent Bonvalot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes