From 4228eef10af539751ab0b7f698f63a7e42864512 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Tue, 21 Jan 2025 11:51:03 +0100 Subject: [PATCH 01/19] stop splitting nodes if the contained points are only duplicates --- Spatial_searching/include/CGAL/Kd_tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 350b9f533d8..2d47eab2d12 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -196,7 +196,7 @@ private: if (try_parallel_internal_node_creation (nh, c, c_low, tag)) return; - if (c_low.size() > split.bucket_size()) + if (c_low.size() > split.bucket_size() && c_low.max_tight_spread() > 0) { nh->lower_ch = new_internal_node(); create_internal_node (nh->lower_ch, c_low, tag); @@ -204,7 +204,7 @@ private: else nh->lower_ch = create_leaf_node(c_low); - if (c.size() > split.bucket_size()) + if (c.size() > split.bucket_size() && c.max_tight_spread() > 0) { nh->upper_ch = new_internal_node(); create_internal_node (nh->upper_ch, c, tag); @@ -341,7 +341,7 @@ public: Point_container c(dim_, data.begin(), data.end(),traits_); bbox = new Kd_tree_rectangle(c.bounding_box()); - if (c.size() <= split.bucket_size()){ + if (c.size() <= split.bucket_size() || c.max_tight_spread() == 0){ tree_root = create_leaf_node(c); }else { tree_root = new_internal_node(); From 5b28489b16c4312ad781f50b495dfbea50399fb2 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Thu, 23 Jan 2025 11:00:44 +0100 Subject: [PATCH 02/19] fixed test_pmp_distance --- .../test/Polygon_mesh_processing/test_pmp_distance.cpp | 1 + Spatial_searching/include/CGAL/Kd_tree.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp index 5ecd9b9530b..1236f1b8d09 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp @@ -22,6 +22,7 @@ struct Custom_traits_Hausdorff FT operator+(FT)const{return FT();} FT operator*(FT)const{return FT();} bool operator<=(FT)const{return false;} + bool operator==(FT)const{return false;} bool operator>=(FT)const{return false;} bool operator!=(FT)const{return false;} bool operator<(FT)const{return false;} diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 2d47eab2d12..a1d1e670d2b 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -196,7 +196,7 @@ private: if (try_parallel_internal_node_creation (nh, c, c_low, tag)) return; - if (c_low.size() > split.bucket_size() && c_low.max_tight_spread() > 0) + if (c_low.size() > split.bucket_size() && !CGAL::is_zero(c_low.max_tight_spread())) { nh->lower_ch = new_internal_node(); create_internal_node (nh->lower_ch, c_low, tag); @@ -204,7 +204,7 @@ private: else nh->lower_ch = create_leaf_node(c_low); - if (c.size() > split.bucket_size() && c.max_tight_spread() > 0) + if (c.size() > split.bucket_size() && !CGAL::is_zero(c.max_tight_spread())) { nh->upper_ch = new_internal_node(); create_internal_node (nh->upper_ch, c, tag); @@ -341,7 +341,7 @@ public: Point_container c(dim_, data.begin(), data.end(),traits_); bbox = new Kd_tree_rectangle(c.bounding_box()); - if (c.size() <= split.bucket_size() || c.max_tight_spread() == 0){ + if (c.size() <= split.bucket_size() || CGAL::is_zero(c.max_tight_spread())){ tree_root = create_leaf_node(c); }else { tree_root = new_internal_node(); From 48569ff99c49105f9f74a39c6de23058cfd41a72 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Thu, 30 Jan 2025 16:55:51 +0100 Subject: [PATCH 03/19] prevent linearity in median splitters due to duplicated points --- .../include/CGAL/Point_container.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index eb96024348e..c2218eab6b8 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -419,6 +419,24 @@ public: typename Traits::Cartesian_const_iterator_d mpit = construct_it((*(*mid))); FT val1 = *(mpit+split_coord); + + // Avoid using the low coord value as it results in an empty split + if (val1 == tbox.min_coord(split_coord)) { + iterator it = std::min_element(mid, end(), [=](const Point_d* a, const Point_d* b) -> bool { + FT a_c = *(construct_it(*a) + split_coord); + FT b_c = *(construct_it(*b) + split_coord); + + if (a_c == val1) + return false; + + if (b_c == val1) + return true; + + return a_c < b_c; + }); + return *(construct_it(**it) + split_coord); + } + mid++; mpit = construct_it((*(*mid))); FT val2 = *(mpit+split_coord); From 408730b30a6c1f76158e4acd796ea8fe03c98af7 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Wed, 5 Feb 2025 13:29:02 +0100 Subject: [PATCH 04/19] Median_of_rectangle: prevent using largest span of bbox as split axis when actual spread is 0 --- Spatial_searching/include/CGAL/Splitters.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Spatial_searching/include/CGAL/Splitters.h b/Spatial_searching/include/CGAL/Splitters.h index 057c27aae43..437d0f6b09d 100644 --- a/Spatial_searching/include/CGAL/Splitters.h +++ b/Spatial_searching/include/CGAL/Splitters.h @@ -236,7 +236,9 @@ namespace CGAL { void operator() (Separator& sep, Container& c0, Container& c1) const { - sep = Separator(c0.max_span_coord(),FT(0)); + if (!CGAL::is_zero(c0.max_spread())) + sep = Separator(c0.max_span_coord(),FT(0)); + else sep = Separator(c0.max_tight_span_coord(), FT(0)); sep.set_cutting_value(c0.median(sep.cutting_dimension())); c0.split(c1,sep,true); } From 61ab2d3bfd47bf4dc37c8e3021adc821cab20b24 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Wed, 5 Feb 2025 13:47:31 +0100 Subject: [PATCH 05/19] bugfix --- Spatial_searching/include/CGAL/Point_container.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index c2218eab6b8..2fc15680bc3 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -438,6 +438,9 @@ public: } mid++; + if (mid == end()) + return val1; + mpit = construct_it((*(*mid))); FT val2 = *(mpit+split_coord); return (val1+val2)/FT(2); From 9f049bd4256a2d70c02e8d4712aa9c6c1a47f042 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Wed, 5 Feb 2025 14:40:43 +0100 Subject: [PATCH 06/19] added missing header --- Spatial_searching/include/CGAL/Splitters.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Spatial_searching/include/CGAL/Splitters.h b/Spatial_searching/include/CGAL/Splitters.h index 437d0f6b09d..42a5a9eead8 100644 --- a/Spatial_searching/include/CGAL/Splitters.h +++ b/Spatial_searching/include/CGAL/Splitters.h @@ -19,6 +19,7 @@ #include +#include #include #include From 531e612e5fff1aa442c7fbea8ac90c9d54e3d0f3 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Thu, 6 Feb 2025 10:34:41 +0100 Subject: [PATCH 07/19] fix warnings --- Spatial_searching/include/CGAL/Kd_tree_rectangle.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h index ef2f13476d9..ba111699f07 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h +++ b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h @@ -111,11 +111,7 @@ namespace CGAL { explicit Kd_tree_rectangle(const Kd_tree_rectangle& r) - : max_span_coord_(r.max_span_coord_) - { - lower_ = r.lower_; - upper_ = r.upper_; - } + : lower_(r.lower_), upper_(r.upper_), max_span_coord_(r.max_span_coord_) {} template void update_from_point_pointers(PointPointerIter begin, From 88163cc512defc18d0be1ac221fca8fcd289deda Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Thu, 6 Feb 2025 13:03:41 +0100 Subject: [PATCH 08/19] typo fix --- Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h index b36cc8fb973..c83d721efa8 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h @@ -20,7 +20,7 @@ lot of cache misses, leading to non-optimal performance. This is the case for example when indices are stored inside the tree, or to a lesser extent when the points coordinates are stored in a dynamically allocated array (e.g., `Epick_d` with dynamic -dimension) — we says "to a lesser extent" because the points +dimension) — we say "to a lesser extent" because the points are re-created by the kd-tree in a cache-friendly order after its construction, so the coordinates are more likely to be stored in a near-optimal order on the heap. When `EnablePointsCache` is set to `Tag_true`, the points From 636721e7f5cde9c4e04d6890b17fe5ab6e1df127 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Thu, 6 Feb 2025 13:09:58 +0100 Subject: [PATCH 09/19] doc typo fix --- Spatial_searching/doc/Spatial_searching/Spatial_searching.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt index afa3a3eb0ca..f4e3d7832a5 100644 --- a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt +++ b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt @@ -127,7 +127,7 @@ which is the case for point queries. The following two classes implement the standard search strategy for orthogonal distances like the weighted Minkowski distance. The second one is a specialization for incremental neighbor -searching and distance browsing. Both require extendes nodes. +searching and distance browsing. Both require extended nodes. `Orthogonal_k_neighbor_search` From fc08cf5fb253d5b87f9a37aaa4f09756c75e38e7 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 10 Feb 2025 14:54:03 +0100 Subject: [PATCH 10/19] switching to number_utils.h instead of basic.h --- Spatial_searching/include/CGAL/Splitters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_searching/include/CGAL/Splitters.h b/Spatial_searching/include/CGAL/Splitters.h index 42a5a9eead8..659c0954a6a 100644 --- a/Spatial_searching/include/CGAL/Splitters.h +++ b/Spatial_searching/include/CGAL/Splitters.h @@ -19,7 +19,7 @@ #include -#include +#include #include #include From 934054c9ba68c0b96ec79d6861a15dbcfa5504b0 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 10 Feb 2025 17:15:56 +0100 Subject: [PATCH 11/19] documenting that Median_of_rectangle splitter is robust bugfix --- Spatial_searching/include/CGAL/Splitters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_searching/include/CGAL/Splitters.h b/Spatial_searching/include/CGAL/Splitters.h index 659c0954a6a..387144bcf8a 100644 --- a/Spatial_searching/include/CGAL/Splitters.h +++ b/Spatial_searching/include/CGAL/Splitters.h @@ -237,7 +237,7 @@ namespace CGAL { void operator() (Separator& sep, Container& c0, Container& c1) const { - if (!CGAL::is_zero(c0.max_spread())) + if (!CGAL::is_zero(c0.tight_bounding_box().max_coord(c0.max_span_coord()) - c0.tight_bounding_box().min_coord(c0.max_span_coord()))) sep = Separator(c0.max_span_coord(),FT(0)); else sep = Separator(c0.max_tight_span_coord(), FT(0)); sep.set_cutting_value(c0.median(sep.cutting_dimension())); From 295f6488beb573341bb02c97d6849af7e40ffd4e Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 10 Feb 2025 17:15:56 +0100 Subject: [PATCH 12/19] documenting that Median_of_rectangle splitter is robust bugfix --- .../doc/Spatial_searching/Spatial_searching.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt index f4e3d7832a5..9ccd82722ed 100644 --- a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt +++ b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt @@ -175,9 +175,13 @@ because in general the query time will be less than using the default value. Instead of using the default splitting rule `Sliding_midpoint` described below, a user may, depending upon the data, select one from the following splitting rules, -which determine how a separating hyperplane is computed. Every splitter has +which determine how a separating hyperplane is computed. Some splitter have degenerated worst cases, which may lead to a linear tree and a stack overflow. Switching the splitting rule to one of a different kind will solve the problem. +The `Median_of_rectangle` and `Median_of_max_spread` are robust sliders that will +neither lead to a linear tree nor to a stack overflow. The `Median_of_rectangle` +splitter will detect if the data in a node is degenerated and applies the +`Median_of_max_spread` rule for that node to avoid a linear tree.
From fc254c3c03ffe39e9deaa66a14e0ff261a7d17cd Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 24 Feb 2025 14:47:09 +0100 Subject: [PATCH 13/19] fix warning --- Spatial_searching/include/CGAL/Point_container.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index 2fc15680bc3..07ad4053079 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -232,8 +232,9 @@ public: // building the container from a sequence of Point_d* Point_container(const int d, iterator begin, iterator end,const Traits& traits_) : - traits(traits_),m_b(begin), m_e(end), bbox(d, begin, end,traits.construct_cartesian_const_iterator_d_object()), tbox(bbox) + traits(traits_),m_b(begin), m_e(end), bbox(d, begin, end,traits.construct_cartesian_const_iterator_d_object()), tbox() { + tbox = bbox; built_coord = max_span_coord(); } From bb3e3ab06b0115f61764b1dd61be5f8e840fbfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 3 Apr 2025 15:14:02 +0200 Subject: [PATCH 14/19] init pointers of subtraits --- Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 638e5f630b2..f112f8c3b99 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -128,7 +128,11 @@ private: public: /*! Default constructor. */ - Arr_conic_traits_2() {} + Arr_conic_traits_2() + : m_rat_kernel(std::make_shared()), + m_alg_kernel(std::make_shared()), + m_nt_traits(std::make_shared()) + {} /*! Construct from resources. */ From 6da70463071582057fc005fb08c76dae204db43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 7 Apr 2025 11:45:09 +0200 Subject: [PATCH 15/19] revert change backported that was not correct at this point in time --- .../test/STL_Extension/test_Concurrent_compact_container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp index df37dd54f69..a42676f8f7f 100644 --- a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp @@ -45,7 +45,7 @@ struct Node_1 void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } - std::size_t time_stamp_ = std::size_t(-2); + std::size_t time_stamp_; }; class Node_2 From 9911b4e23e4503c58a2261ee60c152cbc884a1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 4 Oct 2024 16:08:31 +0200 Subject: [PATCH 16/19] remove extra template keyword --- .../test/Intersections_3/test_intersections_Line_3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp index 936e077e018..7285c22be72 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp @@ -156,9 +156,9 @@ public: Pl pl(pl0, pl1, pl2); P pl3 = pl0 + FT(this->r.get_double()) * V(pl1 - pl0) + FT(this->r.get_double()) * V(pl1 - pl0); if(pl.has_on(l1)) - Base::template check_intersection(L(pl3, l1), pl, L(pl3, l1)); // both points on the plane + Base::check_intersection(L(pl3, l1), pl, L(pl3, l1)); // both points on the plane else - Base::template check_intersection(L(pl3, l1), pl, pl3); // single point on the plane + Base::check_intersection(L(pl3, l1), pl, pl3); // single point on the plane if(pl.oriented_side(l0) != pl.oriented_side(l1)) // l0 xor l1 on pl is fine { From 9d1a089abfa581d2f101aedf896979a2cd4fec26 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Tue, 8 Apr 2025 11:28:37 +0200 Subject: [PATCH 17/19] missing dimension in constructor removing default constructor for dynamic dimension Kd_tree_rectangle --- Spatial_searching/include/CGAL/Kd_tree_rectangle.h | 6 ------ Spatial_searching/include/CGAL/Point_container.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h index ba111699f07..25c1d68116a 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h +++ b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h @@ -285,12 +285,6 @@ namespace CGAL { std::fill(coords_, coords_ + 2*dim, FT(0)); } - Kd_tree_rectangle() - : coords_(0), dim(0), max_span_coord_(-1) - { -} - - explicit Kd_tree_rectangle(const Kd_tree_rectangle& r) : coords_(new FT[2*r.dim]), dim(r.dim), diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index 07ad4053079..fe4dff645e2 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -232,7 +232,7 @@ public: // building the container from a sequence of Point_d* Point_container(const int d, iterator begin, iterator end,const Traits& traits_) : - traits(traits_),m_b(begin), m_e(end), bbox(d, begin, end,traits.construct_cartesian_const_iterator_d_object()), tbox() + traits(traits_),m_b(begin), m_e(end), bbox(d, begin, end,traits.construct_cartesian_const_iterator_d_object()), tbox(d) { tbox = bbox; built_coord = max_span_coord(); From 18bf7051bd79868be4c2a1c96260c309471a203c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 8 Apr 2025 17:58:37 +0200 Subject: [PATCH 18/19] fix deprecation warning --- Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp b/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp index 15883fa976a..aba383f6bee 100644 --- a/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp @@ -142,9 +142,9 @@ public : this, &Basic_generator_plugin::on_tab_changed); connect(dock_widget, &GeneratorWidget::visibilityChanged, this, &Basic_generator_plugin::on_tab_changed); - connect(dock_widget->prismCheckBox, &QCheckBox::stateChanged, + connect(dock_widget->prismCheckBox, &QCheckBox::checkStateChanged, this, &Basic_generator_plugin::on_tab_changed); - connect(dock_widget->pyramidCheckBox, &QCheckBox::stateChanged, + connect(dock_widget->pyramidCheckBox, &QCheckBox::checkStateChanged, this, &Basic_generator_plugin::on_tab_changed); } From 3b07e3f027b74b3a6fa15d39018e9a3263806e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 9 Apr 2025 09:18:22 +0200 Subject: [PATCH 19/19] deprecation starts in 6.7 --- Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp b/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp index aba383f6bee..1dcad9abcbf 100644 --- a/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PCA/Basic_generator_plugin.cpp @@ -142,10 +142,17 @@ public : this, &Basic_generator_plugin::on_tab_changed); connect(dock_widget, &GeneratorWidget::visibilityChanged, this, &Basic_generator_plugin::on_tab_changed); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) connect(dock_widget->prismCheckBox, &QCheckBox::checkStateChanged, this, &Basic_generator_plugin::on_tab_changed); connect(dock_widget->pyramidCheckBox, &QCheckBox::checkStateChanged, this, &Basic_generator_plugin::on_tab_changed); +#else + connect(dock_widget->prismCheckBox, &QCheckBox::stateChanged, + this, &Basic_generator_plugin::on_tab_changed); + connect(dock_widget->pyramidCheckBox, &QCheckBox::stateChanged, + this, &Basic_generator_plugin::on_tab_changed); +#endif } bool applicable(QAction*) const