From 20e2fa76adef6f5772811956a7dd872bc59e143c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 29 Jul 2024 00:18:13 +0200 Subject: [PATCH] simplification --- Lab/demo/Lab/CGAL_Lab.cpp | 2 +- Lab/demo/Lab/CGAL_Lab_CDT_3.cpp | 6 +++--- Lab/demo/Lab/CGALlab.cpp | 4 +--- Lab/demo/Lab/CGALlab.h | 2 +- Lab/demo/Lab/Classification.cpp | 6 +++--- Lab/demo/Lab/Mesh_3.cpp | 6 +++--- Lab/demo/Lab/PMP.cpp | 19 ++++--------------- 7 files changed, 16 insertions(+), 29 deletions(-) diff --git a/Lab/demo/Lab/CGAL_Lab.cpp b/Lab/demo/Lab/CGAL_Lab.cpp index 6f1504ab668..96e8f801736 100644 --- a/Lab/demo/Lab/CGAL_Lab.cpp +++ b/Lab/demo/Lab/CGAL_Lab.cpp @@ -28,7 +28,7 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) { QSurfaceFormat::setDefaultFormat(fmt); //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) /// @TODO remove all calls to QT_VERSION_CHECK about Qt5 QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); #endif diff --git a/Lab/demo/Lab/CGAL_Lab_CDT_3.cpp b/Lab/demo/Lab/CGAL_Lab_CDT_3.cpp index 8ecbeb4fd3e..818be1069ac 100644 --- a/Lab/demo/Lab/CGAL_Lab_CDT_3.cpp +++ b/Lab/demo/Lab/CGAL_Lab_CDT_3.cpp @@ -11,8 +11,8 @@ int main(int argc, char **argv) { CGAL_Lab app(argc, argv, - "CGAL Lab (3D Constrained Delaunay Triangulations)", - "Polyhedron_3 demo", - QStringList() << "Viewer" << "CDT_3"); + "CGAL Lab (3D Constrained Delaunay Triangulations)", + "Polyhedron_3 demo", + QStringList() << "Viewer" << "CDT_3"); return app.try_exec(); } diff --git a/Lab/demo/Lab/CGALlab.cpp b/Lab/demo/Lab/CGALlab.cpp index 89383104515..10f39732f17 100644 --- a/Lab/demo/Lab/CGALlab.cpp +++ b/Lab/demo/Lab/CGALlab.cpp @@ -6,8 +6,6 @@ */ int main(int argc, char **argv) { - CGAL_Lab app(argc, argv, - "Polyhedron_3 demo", - "CGAL Lab"); + CGAL_Lab app(argc, argv); return app.try_exec(); } diff --git a/Lab/demo/Lab/CGALlab.h b/Lab/demo/Lab/CGALlab.h index 0e40646762d..47b5d6289a2 100644 --- a/Lab/demo/Lab/CGALlab.h +++ b/Lab/demo/Lab/CGALlab.h @@ -38,7 +38,7 @@ public: /*! Call `QApplication::exec()` unless the main window is already closed */ - int try_exec(); + int try_exec(); /// @TODO Rename to `exec_if_main_window_not_closed()` }; // end class CGAL_Lab #endif // LAB_DEMO_H diff --git a/Lab/demo/Lab/Classification.cpp b/Lab/demo/Lab/Classification.cpp index 9c8734b6cd0..82647438109 100644 --- a/Lab/demo/Lab/Classification.cpp +++ b/Lab/demo/Lab/Classification.cpp @@ -11,8 +11,8 @@ int main(int argc, char **argv) { CGAL_Lab app(argc, argv, - "Classification demo", - "CGAL Classification Demo", - QStringList() << "Classification"); + "Classification demo", + "CGAL Classification Demo", + QStringList() << "Classification"); return app.try_exec(); } diff --git a/Lab/demo/Lab/Mesh_3.cpp b/Lab/demo/Lab/Mesh_3.cpp index f2c14a27194..c0c8844ac2d 100644 --- a/Lab/demo/Lab/Mesh_3.cpp +++ b/Lab/demo/Lab/Mesh_3.cpp @@ -11,8 +11,8 @@ int main(int argc, char **argv) { CGAL_Lab app(argc, argv, - "Mesh_3 demo", - "CGAL Mesh_3 Demo", - QStringList() << "Mesh_3"); + "CGAL Mesh_3 Demo", + "CGAL Lab (Mesh_3)", + QStringList() << "Mesh_3"); return app.try_exec(); } diff --git a/Lab/demo/Lab/PMP.cpp b/Lab/demo/Lab/PMP.cpp index cc8044d3f27..9f9ccd0e9b5 100644 --- a/Lab/demo/Lab/PMP.cpp +++ b/Lab/demo/Lab/PMP.cpp @@ -10,20 +10,9 @@ */ int main(int argc, char **argv) { - QSurfaceFormat fmt; - - fmt.setVersion(4, 3); - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - QStringList keywords; - keywords << "PMP"; - CGAL_Lab app(argc, argv, - "PMP demo", - "CGAL Polygon Mesh Processing Demo", - keywords); - //We set the locale to avoid any trouble with VTK - std::setlocale(LC_ALL, "C"); + CGAL_Lab app(argc, argv, + "PMP demo", + "CGAL Polygon Mesh Processing Demo", + QStringList() << "PMP"); return app.try_exec(); }