Backport of QGeo*InfoSourceMaemo5 and others fixes
[googlelatitude] / googlelatitude.cpp
index 81b1d5b..47e90c5 100644 (file)
@@ -95,12 +95,10 @@ void GoogleLatitude::sendCurrentLocation() {
         if (abs(CurrentLongitude) <= 0.01) return;
         if (abs(CurrentAccuracy) <= 0.01) return;
 
-        if (!OauthSettings.value("net_auto").toBool()) {
-            QNetworkConfigurationManager mgr;
-            if (!mgr.isOnline()) {
-                qDebug() << "* GoogleLatitude::sendCurrentLocation" << "offline";
-                return;
-            }
+        QNetworkConfigurationManager mgr;
+        if (!OauthSettings.value("net_auto").toBool() && !mgr.isOnline()) {
+            qDebug() << "* GoogleLatitude::sendCurrentLocation" << "offline";
+            return;
         }
 
         QByteArray json_location;