Review Request 122628: [dataengine/geolocation] Switch to datalocation service provided by Mozilla

Martin Gräßlin mgraesslin at kde.org
Wed Feb 18 13:26:25 UTC 2015



> On Feb. 18, 2015, 2:20 p.m., Vishesh Handa wrote:
> > dataengines/geolocation/location_ip.cpp, line 45
> > <https://git.reviewboard.kde.org/r/122628/diff/1/?file=350150#file350150line45>
> >
> >     Any idea why we have this magic number?

I can only guess: the accuracy returned by mozilla's service for just IP address is 50000, so I guess it's what was considered a useful accuracy for the old service.


> On Feb. 18, 2015, 2:20 p.m., Vishesh Handa wrote:
> > dataengines/geolocation/location_ip.cpp, line 55
> > <https://git.reviewboard.kde.org/r/122628/diff/1/?file=350150#file350150line55>
> >
> >     It could be possible that 'lat' and 'lng' do not exist in the response. Perhaps we should be checking for it.

I consider this as unlikely given that it already checks whehter the key "location" is available. Assuming well formed data here and if the key is missing we get a default value anyway.


> On Feb. 18, 2015, 2:20 p.m., Vishesh Handa wrote:
> > dataengines/geolocation/location_ip.cpp, line 58
> > <https://git.reviewboard.kde.org/r/122628/diff/1/?file=350150#file350150line58>
> >
> >     This is slightly strange.
> >     
> >     
> >     Normally it's given a double value, but otherwise we give it a string. Why not just not add it?

I based that on the old implementation. If it wasn't present it added it as an empty string. I wanted to keep it compatible (as it explicitly mentions the ordering mattered in a comment).


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122628/#review76231
-----------------------------------------------------------


On Feb. 18, 2015, 1:52 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122628/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2015, 1:52 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> The service used so far is broken (doesn't resolve latitude and
> longitude). Which means we need to switch the service to unbreak.
> 
> This change implements support for the Mozilla Location Service [1].
> Advantages are:
> * free
> * open
> * supports wifi based locationing
> * provided by our FLOSS friends
> 
> [1] https://location.services.mozilla.com/
> 
> 
> Diffs
> -----
> 
>   dataengines/geolocation/location_ip.cpp 1be2acd9478fceafa83896c552e7a3177368b194 
> 
> Diff: https://git.reviewboard.kde.org/r/122628/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150218/45370644/attachment.html>


More information about the Plasma-devel mailing list