<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hei Lorn<br><br></div>I probably didn't make myself clear =(<br></div>1) wifi is turned on<br></div>2) app is launched, i can download files with QNAM<br></div>3) app is still launched, i turn off the wifi (mobile network activated)<br></div>4) i can no longer download any files. No network errors, but QNAM's reply returns empty files<br></div>5) turn the wifi back on - i can download files<br><br></div>When wifi is turned off, i've tried:<br></div>1) creating new instance: _pManager = new QNetworkAccessManager(this);<br></div><div>2) clearing access cache: _pManager->clearAccessCache();<br></div>3) updating network configuration: _configManager.updateConfigurations() and then <br><br>QList<QNetworkConfiguration> activeConfigs = _configManager.allConfigurations(QNetworkConfiguration::Active);<br>if (activeConfigs.count() > 0) {<br> _pManager->setConfiguration(activeConfigs.at(0));<br> qDebug() << "QNetworkConfiguration = " << activeConfigs.at(0).name();<br><div><div><div><div><div><div><div><div><div>}<br></div><div>In that case qDebug shows that active configuration is, indeed, mobile network<br><br></div><div>But nothing helped. Only restarting app helps<br><br></div><div>Maybe you can look at sources, if you have couple of spare minutes<br><a href="https://github.com/virgi26/harbour-vk-music/blob/master/src/downloadmanager.cpp">https://github.com/virgi26/harbour-vk-music/blob/master/src/downloadmanager.cpp</a><br></div><div>Thank you for your time.<br><br></div><div>Alex.<br></div><div><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 1:13 PM, Lorn Potter <span dir="ltr"><<a href="mailto:lorn.potter@jolla.com" target="_blank">lorn.potter@jolla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 11 Nov 2015, at 8:09 pm, Lorn Potter <<a href="mailto:lorn.potter@jolla.com">lorn.potter@jolla.com</a>> wrote:<br>
><br>
> Hi Alex,<br>
><br>
> Having tested this, it does seem to be a bug in that when connecting to wlan<br>
<br>
</span>I should have specified here when already connected to mobile data and then connecting to wlan without first disconnecting mobile data.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> , QNAM’s networkAccessibility sometimes will go to NotAccessible, but then go to Accessible when wlan connects. or sometimes it won’t even go to NotAccessible then Accessible when wlan is connected.<br>
><br>
> You should be able to track QNAM through its networkAccessibilty property. it should follow the online state, unless you specifically set it to NotAccessible.<br>
><br>
> QNAM uses QNetworkConfiguration internally, and it should automatically switch this to the current Active configuration.<br>
><br>
><br>
> -<br>
> Lorn<br>
><br>
>> On 10 Nov 2015, at 10:37 am, Alexander Ladygin <<a href="mailto:fake.ae@gmail.com">fake.ae@gmail.com</a>> wrote:<br>
>><br>
>> Hey!<br>
>><br>
>> I've got an issue: QNetworkAccessManager is losing connection upon switching between wifi and mobile:( What exactly should i do/update to make it work properly? Maybe need to change network configuration? Why it is not handled by platform?<br>
>> Thanks.<br>
>><br>
>> Alex<br>
>> _______________________________________________<br>
>> SailfishOS.org Devel mailing list<br>
>> To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
><br>
<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a></div></div></blockquote></div><br></div>