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

a networkSession based on a networkConfiguration of type BearerWLAN does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.2
    • None

      I used the following codes to choose a WLAN networkConfiguration:

              if(QNetworkConfiguration::BearerWLAN == temConfigration.bearerType ()
                      && QNetworkConfiguration::Discovered == temConfigration.state())
              {
                   myInterestConfigurations.append(temConfigration);
              }
      

      and then use the WLAN networkConfiguration to create a networkSession:

              QNetworkConfiguration mytemConfigration = myInterestConfigurations.takeFirst();
              qDebug()<< "create a session using this Configration: "<< mytemConfigration.name();
              //set callbacks and start internet connection
              m_session = new QNetworkSession(mytemConfigration, this);
      

      and at last open the networkSession:

              connect(m_session, SIGNAL(opened()), this, SLOT(networkSessionOpened()));        connect(m_session,SIGNAL(error(QNetworkSession::SessionError)),this,SLOT(error(QNetworkSession::SessionError)));
              m_session->open();
      

      After the session has been opened, the app first start to connect to the WLAN network.
      But if your phone has another internet access point e.g. named "CMNET", and its priority is higher than the priority of your WLAN, then finally this app will connect to CMNET other than the WLAN which the networkSession is based on.

      We think the app should connect to WLAN directly, should not connect to CMNET regardless of their priorities.

      Please check the attached demo as reference.

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

            peter-har Peter Hartmann
            zhouhl zhou honglei
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes