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

QAbstractSocket does not use application socket if its set to NoProxy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 5.9.3
    • 5.9.1
    • Network: Proxies
    • None
    • Linux Mint 18.2
      Qt 5.9.1
    • d0c5e294323c69ef16c44466c3cff8decf4face5

      Hello,

      I wanted to connect to a server in a network with a proxy. The server is not behind the proxy so I used `QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy)` to force not using any proxy. But when I try to connect I get following error:
      QAbstractSocket::UnsupportedSocketOperationError "The proxy type is invalid for this operation"

      If I call `QAbstractSocket::setProxy(QNetworkProxy::NoProxy)` or `QAbstractSocket::setProxy(QNetworkProxy::applicationProxy)` I can connect and don't get any error. I expected that setting the application wide proxy would cause the `QAbstractSocket` to setted proxy (in my case no proxy).

      PS: I am using an extern component so I cannot call `QAbstractSocket::setProxy`. For testing I used a QTcpSocket to get the full error message.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            Psy-Kai Kai Dohmen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes