Commit graph

9 commits

Author SHA1 Message Date
Dirk Hohndel
bda482a30a Geo taxonomy: add higher level notion of city
This renames the local name for the location as town and adds the concept
of a city as the level 3 admin category. In some regions (e.g. at times in
Italy) the local hamlet name is shown as toponymName but the name of the
actual city is given as adminName3.

With this change "city" will always reflect our best guess: adminName3 if
it exists, otherwise the toponymName. Whereas "town" is always the
toponymName.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10 09:51:50 -07:00
Dirk Hohndel
bc8c54f1ee Rename enum values for taxonomy
This avoids confusion and namespace collisions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 10:22:31 -07:00
Dirk Hohndel
08f8eb6eb5 Don't try to pass QString to report_error()
No idea why the compiler on my system didn't complain about this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 07:17:51 -07:00
Dirk Hohndel
0a0a6f07d5 Remove a few more debug messages
Yes, I could go back and try to fix the earlier commits.
This is easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:59:08 -07:00
Dirk Hohndel
b42bae2ce8 Geo taxonomy: download the taxonomy data from geonames.org
There are a number of web servies we could use. All have their drawbacks.
This one is free with free data. It's daily limits are reasonably high.
For many coordinates I tested the results were good, for others at least
not terrible.

We can always consider supporting multiple such services. But for now this
seems like a reasonable choice.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:49 -07:00
Tomaz Canabrava
b9a3234371 Add a timeout (500ms) to GeoLoccation discovery
GeoLocation discovery would hang if on an incorrectly configured proxy -
this way we will finish as soon as it tries to get everything.

I also need to see what to do with the dive sites if it fails to find any.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01 13:13:45 -07:00
Paul-Erik Törrönen
cfa5403192 Fix typo
Loockup -> Lookup

Signed-off-by: Paul-Erik Törrönen <poltsi@777-team.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-21 16:05:09 -07:00
Tomaz Canabrava
627de38c01 Get the location information in a separate thread
This makes Subsurface usable faster for those without a good internet
connection when they are opening an older data file.

While parsing, we are only feeding an vector of locations, after the
parsing is done, we traverse the vector searching for the information on
the web.

I need to also add a way to stop if there`s no internet connection - but
this will be another patch.

Also, fixed two small memory leaks from the old imp.

[Dirk Hohndel: cleaned up the whitespace mess]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-10 11:14:20 -07:00
Dirk Hohndel
ddc01e39e7 Move helper functions around
We had a ton of helper functions in qt-gui.cpp which really didn't make
much sense. So I moved them all into qthelper.cpp.

Also moved the UserAgent helper that didn't belong in the UpdateHandler to
begin with - that's a generic helper used in many places...

With this we can successfully build using cmake again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 09:31:08 -08:00