From 687f002352a02f190591c10fded61b2e566f521e Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 7 Jun 2013 14:59:39 +0200 Subject: BlackBerry QNetworkConfiguration: Keep track of bearer type I.e. let the user know whether he is on 2G / 3G / 4G. Since usually apps are rather interested whether they are on Wifi or cellular, change of cellular type (i.e. transition from 3G to 4G etc.) will not trigger emission of the "QNetworkConfigurationManager::configurationChanged" signal. The cellular type check will only be performed if the user queries it by calling the respective member methods (bearerType() and bearerTypeName()). Reading the cellular type takes around 1-2 milliseconds. In addition, add new fields "BearerEVDO" and "BearerLTE" to the public API for QNetworkConfiguration. Change-Id: I4c4ec52926f862b84487c91a88b1e20e590dd793 Reviewed-by: Kevin Krammer Reviewed-by: Friedemann Kleint Reviewed-by: Thomas McGuire --- src/plugins/bearer/blackberry/qbbengine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/blackberry/qbbengine.cpp b/src/plugins/bearer/blackberry/qbbengine.cpp index ab1ba9aa19..37093a09ec 100644 --- a/src/plugins/bearer/blackberry/qbbengine.cpp +++ b/src/plugins/bearer/blackberry/qbbengine.cpp @@ -98,10 +98,9 @@ interfaceType(netstatus_interface_type_t type) return QNetworkConfiguration::BearerBluetooth; case NETSTATUS_INTERFACE_TYPE_CELLULAR: - //### TODO not sure which BearerType would be the best - //to return here. We need to be able to get more - //information on the bearer type in order to return - //the exact match. + // The exact bearer type is determined in QNetworkConfiguration + // at the time this info is queried, because opposed to the + // information here the type might change quickly. return QNetworkConfiguration::Bearer2G; case NETSTATUS_INTERFACE_TYPE_VPN: -- cgit v1.2.3