Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CGAL: Qt5 -> Qt6 #7397

Merged
merged 96 commits into from
Nov 24, 2023
Merged

CGAL: Qt5 -> Qt6 #7397

merged 96 commits into from
Nov 24, 2023

Conversation

afabri
Copy link
Member

@afabri afabri commented Apr 19, 2023

Summary of Changes

We have to make the transition from Qt5 to Qt6.

This PR starts with the files in Installation/cmake/modules, and the demos in GraphicsView/demos.
Locally the Polyhedron demo also works (at least with the 3rd party libraries I have installed on my machine).

There are some commented code sections concerning QRegExp as that has changed a lot, and concerning scripting.

And there is a beginning of scripting with the QJSEngine with this commit.

Release Management

TODO

  • Remove all occurrences of Qt5 from the code base (except in CI, to be compatible with release branches).
  • Remove the option "Use OpenGL" from DemoMainWindow.h.
  • fix the picking by shift+click, to select an items among others (see CGAL: Qt5 -> Qt6 #7397 (comment))
  • Merge master and address the comment from Albert: CGAL: Qt5 -> Qt6 #7397 (comment)

@afabri
Copy link
Member Author

afabri commented Apr 19, 2023

The AABB_tree demo works, but there is a runtime error concerning a destructor when exiting the program.

@afabri
Copy link
Member Author

afabri commented Apr 20, 2023

When editing in the Surface Mesh Selection I get

QOpenGLBuffer::bind: buffer is not valid in the current context

afabri and others added 10 commits April 20, 2023 16:35
# Conflicts:
#	AABB_tree/demo/AABB_tree/CMakeLists.txt
#	Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt
#	Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt
#	Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt
#	GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt
#	GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt
#	GraphicsView/demo/Bounding_volumes/CMakeLists.txt
#	GraphicsView/demo/Circular_kernel_2/CMakeLists.txt
#	GraphicsView/demo/Generator/CMakeLists.txt
#	GraphicsView/demo/GraphicsView/CMakeLists.txt
#	GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt
#	GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt
#	GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt
#	GraphicsView/demo/Polygon/CMakeLists.txt
#	GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt
#	GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt
#	GraphicsView/demo/Snap_rounding_2/CMakeLists.txt
#	GraphicsView/demo/Spatial_searching_2/CMakeLists.txt
#	GraphicsView/demo/Stream_lines_2/CMakeLists.txt
#	GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h
#	Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt
#	Installation/cmake/modules/CGAL_add_test.cmake
#	Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt
#	Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt
#	Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt
#	Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt
#	Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake
#	Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt
#	Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt
#	Triangulation_3/demo/Triangulation_3/CMakeLists.txt
#	Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt
@MaelRL MaelRL added this to the 6.0-beta milestone Jun 12, 2023
@lrineau lrineau marked this pull request as ready for review November 2, 2023 15:40
@afabri
Copy link
Member Author

afabri commented Nov 15, 2023

In a previous commit I added virtual to a destructor as the base class destructor is virtual.
Reading the error message in the third link you give above


/usr/bin/ld: CMakeFiles/scene_c3t3_item.dir/scene_c3t3_item_autogen/mocs_compilation.cpp.o:(.data.rel.ro._ZTV15Scene_c3t3_item[_ZTV15Scene_c3t3_item]+0x260): undefined reference to `non-virtual thunk to Scene_c3t3_item::~Scene_c3t3_item()'
/usr/bin/ld: CMakeFiles/scene_c3t3_item.dir/scene_c3t3_item_autogen/mocs_compilation.cpp.o:(.data.rel.ro._ZTV15Scene_c3t3_item[_ZTV15Scene_c3t3_item]+0x268): undefined reference to `non-virtual thunk to Scene_c3t3_item::copyProperties(CGAL::Three::Scene_item*)'
collect2: error: ld returned 1 exit status

I am wondering if we have to add virtual in many places. @sloriot ?

@afabri
Copy link
Member Author

afabri commented Nov 15, 2023

For the second "link error" I have no idea.

@@ -78,7 +78,7 @@ ALIASES = "cgal=%CGAL" \
"gnu=GNU" \
"ms=MS" \
"qt=Qt" \
"qt5=Qt5" \
"qt6=Qt6" \
Copy link
Contributor

@albert-github albert-github Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should also be done in the, on November 15 2023, integrated 1.10.0 version (see warnings in the overnight documentation build https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.0-Ic-108/logs_master/Documentation.log

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note this as a TODO (see the top message).

@lrineau lrineau added the TODO label Nov 16, 2023
@afabri afabri removed the TODO label Nov 16, 2023
@sloriot
Copy link
Member

sloriot commented Nov 24, 2023

CGAL-6.0-Ic-113 looks good except some issues that are only present in the testsuite and that are tracked in #7882. We decided to merge the branch so that developer can start testing and report issues.

@sloriot sloriot merged commit 05e6889 into CGAL:master Nov 24, 2023
1 check passed
@lrineau lrineau deleted the CGAL-Qt6-GF branch November 24, 2023 10:11
@lrineau lrineau added the Qt6 label Nov 24, 2023
@lrineau lrineau changed the title CGAL: Qt5 -> Qt6 [ WIP] CGAL: Qt5 -> Qt6 Nov 24, 2023
@gdamiand
Copy link
Member

Error when compiling Linear cell complex demo:

/home/gdamiand/sources/cgal/builds/debug/demo/Linear_cell_complex/ui_MainWindow.h:14:10: fatal error: QtWidgets/QAction: Aucun fichier ou dossier de ce type
14 | #include <QtWidgets/QAction>

@afabri
Copy link
Member Author

afabri commented Nov 24, 2023

Why not in the testsuite?

@gdamiand
Copy link
Member

No error when compiling from a fresh install; the error comes probably from some cache effect. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arrangement_2: Error in draw_arr.cpp What are the Qt 6 migration plans?
8 participants