← Back to team overview

ubuntu-phone team mailing list archive

Re: "Can I use the internet?"

 

On 08/01/2013 05:23 AM, Iain Lane wrote:
> On Wed, Jul 31, 2013 at 05:42:43PM +0100, Iain Lane wrote:
>> On Wed, Jul 31, 2013 at 03:18:27PM +0400, Alberto Mardegan wrote:
>>> On 07/30/2013 07:50 PM, Iain Lane wrote:
>>>> Admittedly I didn't know about it ;-) But looking at that API reference
>>>> it seems to be more about mobile stuff whereas my question is a bit more
>>>> generic than that — I want to know if there's an internet connection of
>>>> any type available.
>>>>
>>>> Maybe I can't see it on this API or maybe Qt has something else for that
>>>> in which case I'd be happy to switch over.
>>>
>>> QNetworkAccessManager::networkAccessible():
>>>
>>> https://qt-project.org/doc/qt-5.0/qtnetwork/qnetworkaccessmanager.html#networkAccessible-prop
>>
>> Thanks for the tip. It looks like it should work, however I always get
>> QNetworkAccessManager::UnknownAccessibility returned. Is there a trick?
> 
> I found [0] and followed that. Then I get Accessible back. I was happy,
> until I tried disconnecting from the network (on my desktop) and still
> got Accessible.
> 
> All the while NM has known the correct state, so if I could use that
> we'd be in happy land.
> 
> Ho hum?
> 
> [0]
> http://www.qtcentre.org/threads/37514-use-of-QNetworkAccessManager-networkAccessible?p=188372#post188372
> 
Along these lines-- we really need to define and document the canonical way for
determining network accessibility. My team is tasked with defining apparmor
policy for this, and SDK app developers should ideally do this one way and then
my team can write tests to make sure that it works for that use case. Everyone
coming up with their own method won't work with application confinement.


-- 
Jamie Strandboge                 http://www.ubuntu.com/

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References