Summary: | OpenDesktop plasmoid doesn't show nearby people as expected | ||
---|---|---|---|
Product: | [Unmaintained] plasma4 | Reporter: | Stefan Gründel <stefan.gruendel> |
Component: | widget-opendesktop | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | asraniel, jlp, thelwyn |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Stefan Gründel
2009-07-21 16:12:05 UTC
Hi Stefan, I reproduce the same behavior than you with KDE 4.4 SVN 1068732 | 4.6.0 But i wonder if it's not the Open Desktop api which is deficient. If I query via the api directly on: https://api.opendesktop.org/v1/person/data?latitude=46.083&longitude=6.417&distance=1.5&page=0&pagesize=10 (my coordinates) It shows me people more or less close to me, but not sorted correctly. Actually it seems to me that the distance calculated is wrong (it's not coherent for some coordinates I read). Also, you use 1.5 as distance parameter in your URL whereas the plasmoid uses 2 according to what I understand from the code: http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/opendesktop/opendesktop.cpp?view=markup (line 223) Changing this parameter seems to give very different results... Now I've tried again in Karmic Koala, KDE 4.3.2. After stopping plasma with "kquitapp plasma-desktop" and restarting with "plasma-desktop", I received quite interesting log messages: Location-based search: 49 9 5 URL: KUrl("https://api.opendesktop.org/v1/person/data?latitude=49&longitude=9&distance=5&page=0&pagesize=64") QUrl( "https://api.opendesktop.org/v1/person/data?latitude=49&longitude=9&distance=5&page=0&pagesize=64" ) "<?xml version="1.0"?> ... So the decimal part of the coordinates is cut off, it seems. As I understand the code in http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/opendesktop/opendesktop.cpp?revision=1065206&view=markup, in line 221 latitude and longitude are passed as integers to the constructor, this doesn't look correct to me. Maybe I can figure out how to fix it and send in a patch, although I'm more a Java developer and my last C++ coding lies some years back ... SVN commit 1076590 by gladhorn: don't use integers for lat/lon in geolocation and thanks to the bug reporter who wrote the solution!!! fixed in KDE SC 4.4 BUG: 200996 M +3 -3 opendesktop.cpp M +1 -1 opendesktop.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1076590 |