The deprecated Drawing module still uses some classes that have been removed with Qt6.
These are the classes:
* QRegExp that is replaced with QRegularExpression
* QGLWidget that is replaced with QOpenGLWidget
* updated ts files
* merged crowdin translations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [Base] Add hasExtension for multiple values
* [Gui] Use hasExtension for multiple values
* [Drawing] Use hasExtension for multiple values
* [Fem] Use hasExtension for multiple values
* [Import] Use hasExtension for multiple values
* [Mesh] Use hasExtension for multiple values
* [Part] Use hasExtension for multiple values
* [TechDraw] Use hasExtension for multiple values
Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option,
which can be set to either "Auto" (default), 5, or 6. Auto detects which
version of Qt is installed on the system and chooses it. If both version
are installed, Qt5 is used.
Note that this DOES NOT implement compiling against Qt6, it only adds
the necessary cMake infrastructure to begin work on the source code
changes that will be required.
This undoes most of the Xerces related part of the commits listed below.
The issue resolved here is that the Xerces include dir *is* set in the
CMakeLists.txt of src/Base, but it got removed from various App and Gui
dirs in src/Mod. If those now include a header from src/Base, which
itself includes xercesc, the build fails using Apple clang version 11.0.0
(clang-1100.0.33.17) on Mojave, configured using cmake 3.22.1, with
errors like the following:
In file included from .../src/Mod/Part/App/FeaturePartBoolean.cpp:34:
In file included from .../src/App/Application.h:33:
.../src/Base/Parameter.h:54:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
#include <xercesc/util/XercesDefs.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Finally, a full list of the commits that introduced this spurious include
dir optimization for reference:
- Drawing: commit 96ad045b91
- Image: commit dde71a21d5
- Import: commit c9d28b542f
- Inspection: commit d41f55f382
- Mesh: commit 19072b0538
- Part: commit fe213a48f0
- PartDesign: commit b037d8e240
- Path: commit f23fa31f42
- Points: commit bec723ba17
- Raytracing: commit 08d4ac63a3
- ReverseEnginering: commit 5ca787cb0e
- Robot: commit bad4809a1c
- Sketcher: commit 3c96daf105
- Spreadsheet: commit 66e8a2bef3
- Start: commit c9dee5e70a
- Surface: commit 6b04215be6
- TechDraw: commit 5e6699e48d
- Test: commit ea5b45b92c
- Web: commit ee6d631531
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]