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

QNetworkProxyFactory::SystemProxyForQuery() returns QNetworkProxy::NoProxy when called from secondary thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.7.2
    • Network: Proxies
    • None
    • Symbian Wk_09

    Description

      Hi,

      When called "QNetworkProxyFactory::SystemProxyForQuery()" method in main thread, it successfully retrieved the proxy information. But when called from secondary thread (without calling it in main thread), this is not retrieving proxy information. Please check the attached sample app to reproduce this issue (SystemProxyforQueryVerifyApp.zip file).

      I debugged SystemProxyForQuery() method in both success (called from main thread) and failure (called from secondary thread) scenarios. Please see my observations below.

      SystemProxyForQuery() called from Main Thread [Success Scenario]:

      1. "findCurrentConfiguration()" method internally calling "configurationManager.allConfigurations(QNetworkConfiguration::Active)" method to retrieve activeConfigurations. This call succeeded with "if (activeConfigurations.count() > 0)" call returning true. This retrieved activeConfiguration was returned from this function, which is a valid configuration, hence retrieved proxy information successfully.

      SystemProxyForQuery() called from Secondary Thread [Failure Scenario]:

      1. "findCurrentConfiguration()" method internally calling "configurationManager.allConfigurations(QNetworkConfiguration::Active)" method to retrieve activeConfigurations. But it failed to retrieve any.

      2. So, "if (activeConfigurations.count() > 0)" call returned false, then it tried to return "configurationManager.defaultConfiguration()". But this also failed to retrieve any valid configuration.
      3. With this, "findCurrentConfiguration()" method is returning "invalidConfiguration", which led to non-retrieval of proxy information.

      Looking forward for some solution for this issue. Please let me know if you need more information on this issue.

      Thanks & Regards,
      BalaSubrahmanyam Varanasi

      Attachments

        Issue Links

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

          Activity

            People

              earthdomain Earth Domain (Inactive)
              baluvaranasi BalaSubrahmanyam Varanasi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes