1. Hide wp_flags from formats by using WAYPT_SET.
2. Don't print values corresponding to Waypoint fields that aren't
valid.
a) if the field uses wp_flags, then the flag must be set.
b) power, cadence heartrate must not be zero.
This is in anticipation of use of std::optional instead of wp_flags
to indicate an optional value is present.
The use of invalid power, cadence, and heartrate values was found
fortuitously.
Note this changes kml output, using empty gx:value elements to
correspond to missing data. gx:value elements are of type
string, the empty string do not violate the schema (unlike empty
when elements). However, it is unclear who is using this extra
SchemaData so we cannot check to make sure they acutally handle
empty string values.
* don't use WAYPT_HAS with wp_flags that aren't optionals.
* fix some bugs with our home grown optionals.
mostly not using WAYPT_SET resulting in the value being lost.
Robert Lipe [Wed, 28 Dec 2022 06:22:37 +0000 (00:22 -0600)]
[WIP] Modernize garmin_txt Take the few remaining good ideas from https://github.com/GPSBabel/gpsbabel/pull/442 and merge them manually into the trunk. (#959)
* Modernize garmin_txt
Take the few remaining good ideas from
https://github.com/GPSBabel/gpsbabel/pull/442
and merge them manually into the trunk.
Robert Lipe [Thu, 22 Dec 2022 23:12:31 +0000 (17:12 -0600)]
Remove all uses of sprintf (#958)
Deprecate sprintf in favor of snprintf or QString::asprintf... This buys time until we have {fmt}
* remove unused bgr in tpo.cc
* more pruning of C-style constructs
* Remove unused lap code in Garmin
Unrelated, but required to build on Mac
* Apply Mac runner updates per active topics from runner images bugreports.
It's my belief there are transient problems in the GitHub-provided images (linked in this CL) but this bulletproofs our installation, so I'm rolling with it.
tsteven4 [Sun, 30 Oct 2022 17:17:28 +0000 (11:17 -0600)]
update documentation to DocBook 5.0 (#940)
* convert to docbook 5.0.
* get jing running.
* use uri to find docbook rng.
* brew install jing-trang. use oasis for rngs.
* add insertion markers to autogen doc files.
* use db5-upgrade.xsl from docbook 5.1 release.
we are still converting to docbook 5.0.
this fixes issues with missing Appendix labels
(e.g. "Appendix A. Supported Datums" was "Suppored Datums")
and Glossary Indexes (e.g. "G" was omitted)
in the html output.
unfortunately it causes issues with translating ulinks inside term
elements. We patch the dropped links back in.
tsteven4 [Thu, 27 Oct 2022 23:39:51 +0000 (17:39 -0600)]
fix makedoc warnings.
and:
die on errors with file creation, creating autogen directory, or
running gpsbabel.
use dirname to get directory portion of $0. previously
"./xmldoc/makedoc" would fail as $dir got set to "." instead of
"./xmldoc". "perl xmldoc/makedoc" would work.
tsteven4 [Mon, 10 Oct 2022 14:59:26 +0000 (08:59 -0600)]
use cmake for ubuntu CI, CMakeFileLists tweaks. (#929)
refactor ubuntu workflow using a matrix.
create gpsbabelfe_lupdate, gpsbabelfe_lrelease targest on all platorms.
add USES_TERMINAL to check-vtesto so we can see test progress live.
update docker images for focal and jammy for Qt5 cmake issues.
update docker image for jammy adding Qt6. This uses a PPA to work
around https://bugs.launchpad.net/ubuntu/+source/qt6-base/+bug/1970057.
Note the PPA isn't actually required to build, but it is required to
run the GUI, i.e. all users on jammy using Qt6 who want to run the GUI will
need the PPA, or need ubuntu to incorporate the upstream debian fix!
build a release level package in CI with cmake on windows & macOS.
this can be compared with the release package build in CI with qmake.
support cmake multi-config generators on macOS (e.g. Xcode) as well
as well as single-config generators (.e.g Unix Makefiles, Ninja).
support packaging of out of source builds on macOS when using cmake.
note that Qt6 support for packaging still has many features in
preview, thus we still use our script based packaging.
move some Ubuntu CI jobs to jammy. Unfortunately Qt6WebEngine is
unusable on jammy due to a bug in qt6-base. So we are still using
Qt5 :(
https://bugs.launchpad.net/ubuntu/+source/qt6-base/+bug/1970057
* isolate qmake and cmake flows for windows.
add on on demand CI workflow for esoteric windows cases.
* use qt tools from cmake prefix, add gpsbabel translation support.
* fix coretool on windows.
add qt binary directory to environment so coretool can find the
Qt DLLs.
1. don't use stderr for coretool output. This avoids comingling of
real error messages with the coretool output.
2. disable the similartext heuristic with coretool. This heuristic,
which is enabled by default, was resulting in occasional mistranslations.
tsteven4 [Tue, 23 Aug 2022 18:36:22 +0000 (12:36 -0600)]
fix GUI handling of track filter start/stop times.
This resolves #915
The timeSpec of the QDateTimeEdit objects is maintained in
accordance with the TZCheck QCheckBox. This solves additional
issues with DST transitions and edits.
tsteven4 [Mon, 22 Aug 2022 13:19:52 +0000 (07:19 -0600)]
fix maps javascript api deprecation warning. (#914)
js: google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead: https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener
tsteven4 [Wed, 3 Aug 2022 23:35:31 +0000 (17:35 -0600)]
convert html writer to html 5. (#905)
this also fixes a bug where we could fail to entitize wpt->description.
this also fixes a bug where we could create illegal fragments and id
attributes.
retire qsort in favor of std::sort, std::stable_sort (#888)
* replace qsort with std::sort or std::stable_sort
* add test for duplicate filter using gc_data exported dates.
* fix reference file permissions.
* fix smplrout sort bug that shows up on macos with std::sort.
the compare function has always generated incorrect values when
both objects are HUGEVAL. The historic function worked with qsort
everywhere, worked with std::sort on linux and windows, but failed
with std::sort on macos.