← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/ubuntu-clock-app/clock-location into lp:ubuntu-clock-app

 

Victor Thompson has proposed merging lp:~vthompson/ubuntu-clock-app/clock-location into lp:ubuntu-clock-app.

Commit message:
* Use city for location if available

Requested reviews:
  Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
  Bug #1465496 in Ubuntu Clock App: "[clock] Location granularity is not sufficient"
  https://bugs.launchpad.net/ubuntu-clock-app/+bug/1465496

For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-clock-app/clock-location/+merge/262043

* Use city for location if available
-- 
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-clock-app/clock-location into lp:ubuntu-clock-app.
=== modified file 'backend/modules/GeoLocation/geolocation.cpp'
--- backend/modules/GeoLocation/geolocation.cpp	2014-11-04 15:58:05 +0000
+++ backend/modules/GeoLocation/geolocation.cpp	2015-06-16 05:39:55 +0000
@@ -82,11 +82,11 @@
     foreach (const QVariant &entry, cityData.toMap().value("geonames").toList())
     {
         auto data = entry.toMap();
-        auto adminName2 = data.value("adminName2").toString();
+        auto name = data.value("name").toString();
         auto adminName1 = data.value("adminName1").toString();
 
-        if (!adminName2.isEmpty()) {
-            m_location = adminName2;
+        if (!name.isEmpty()) {
+            m_location = name;
             emit locationChanged();
         }
 


Follow ups