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

QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::Active) not returning any active configuration when instantiated and called from Secondary thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.4
    • 4.7.2
    • Symbian wk_09, Symbian ^3 wk_15
    • 5f241ec1426447380b1e938ac7888fb16cde94f8, 5f879c55e531165cc2569b03c3796d0f33d0a0b7, 38db40d9a2db44e47b0aabd9487284cd1106b353

    Description

      Hi,

      When i instantiated QNetworkConfigurationManager in the main thread, and called "QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::Active)" method, it's returning the active configuration successfully. But when i do the same thing in a secondary thread, then this call returns no active configurations. This is the same situation even with "QNetworkConfigurationManager::defaultConfiguration()" method. Please find the sample code below.

              QList<QNetworkConfiguration> activeConfigurations = myNCM->allConfigurations(QNetworkConfiguration::Active);
              QNetworkConfiguration currentConfig;
              if (activeConfigurations.count() > 0) {
                  qDebug()<<"activeConfiguration retrieved";
              }
              else
              {
                  qDebug()<<"activeConfiguration retrieval failed";
                  QNetworkConfiguration defaultConfiguration = myNCM->defaultConfiguration();
                  if (defaultConfiguration.isValid())
                      {
                      qDebug()<<"defaultConfiguration retrieved";
                      }
                  else
                      {
                      qDebug()<<"defaultConfiguration retrieval failed";
                      }
              }
      

      Can you check this and give a solution for 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

              shkearns Shane Kearns
              baluvaranasi BalaSubrahmanyam Varanasi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes