Commit b3860d3f authored by Volker Krause's avatar Volker Krause
Browse files

Fix build with Qt < 5.14, and make the CI actually notice this

parent 82ce75bd
add_subdirectory(cli)
add_subdirectory(osm)
if (TARGET Qt5::Network AND NOT CMAKE_CROSSCOMPILING AND OSM_PLANET_DIR AND OsmTools_FOUND)
add_subdirectory(osm)
add_subdirectory(knowledgedb-generator)
endif()
add_subdirectory(vdv/certs)
......
......@@ -68,7 +68,11 @@ uint32_t OSM::distance(const std::vector<const OSM::Node*> &path, OSM::Coordinat
QLineF n = lineSegment.normalVector();
n.translate(coord.latF() - n.p1().x(), coord.lonF() - n.p1().y());
QPointF p;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const auto intersect = lineSegment.intersect(n, &p);
#else
const auto intersect = lineSegment.intersects(n, &p);
#endif
if (intersect == QLineF::BoundedIntersection) {
dist = std::min(dist, distance(p.x(), p.y(), coord.latF(), coord.lonF()));
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment