Commit Graph

334 Commits

Author SHA1 Message Date
Abdullah Tahiri
c604d1741d Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
mosfet80
3137dea940 remove Python2 code 2023-03-04 17:51:43 -06:00
wmayer
ea190ce3c2 Test: expected failure of Rotation::setValue() in unit tests 2023-03-01 18:43:15 +01:00
Yorik van Havre
46653420a6 merged crowdin translations 2023-02-27 16:01:15 +01:00
Jolbas
6c3efbdb3b Fix create Rotation from scaled matrix
Support for creation of Rotation from matrices which is a combination of non uniform scale and a rotation
Fixes according to review
Scale -1 is Uniform, Not NoScaling
Fix hasScale() when negative scale
2023-02-24 20:33:40 -06:00
Yorik van Havre
50fb6d6b46 merged crowdin translations 2023-02-13 15:45:26 +01:00
luzpaz
729685316e Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
Yorik van Havre
199ef42f62 Merged crowdin translations 2023-01-17 09:40:31 +01:00
Yorik van Havre
3a8fcb53ec Merged crowdin translations 2023-01-09 14:06:28 +01:00
wmayer
9498691ea8 App: fix failure to detect cyclic dependencies on expressions
See also forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=74331
2023-01-02 16:36:10 +01:00
wmayer
0566ba0a9e Core: fixes #8119: Make axis values in Property view persistent 2023-01-02 12:48:40 +01:00
wmayer
c9b5cc20ec Test: [skip ci] write results to stdout 2022-12-25 14:28:42 +01:00
wmayer
3c709f31df Gui: make unit tests working from command line if Gui is up 2022-12-24 19:13:40 +01:00
Yorik van Havre
b5c5d0af95 Merged crowdin translations 2022-12-20 10:01:00 +01:00
Yorik van Havre
a95b7dc4b5 Updated ts files 2022-12-20 09:31:25 +01:00
Uwe
ff247f84bf [Test] enable precompiled headers
- also remove unused headers
2022-12-14 04:25:52 +01:00
luz paz
fa98553775 Fix various typos and grammatical issues 2022-11-30 12:45:29 +01:00
wmayer
de04434d1f Test: [skip ci] add method clear() to document observers 2022-11-14 19:53:35 +01:00
wmayer
d6a7b282d5 Core: Qt6 migration, use PySide 2022-11-06 14:09:18 +01:00
Chris Hennes
2f7be9e782 cMake: Add support for compiling against Qt6 (#7647)
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.
2022-10-31 09:24:09 -05:00
Yorik van Havre
d8d55a0e88 Merged crowdin translations 2022-10-17 15:12:16 +02:00
wmayer
9282fffa07 App: add tests for cell rows and absolute cells 2022-10-13 20:16:48 +02:00
Yorik van Havre
8b7c61277a Merged crowdin translations 2022-10-06 12:48:05 +02:00
Chris Hennes
3871af1388 Test: Add more tag testing to Metadata tests 2022-10-03 19:13:48 -07:00
wmayer
de7949a3b7 [skip ci] Debian patches:
* Fix FTBFS on armhf/armel, undefined GL_PROJECTION (issue 1014875)
* Disable syntax checks for some Python modules
2022-09-06 14:40:10 +02:00
wmayer
97967743a4 TD: modernize C++: replace 'typedef' with 'using' 2022-08-30 10:59:39 +02:00
berniev
6953310116 Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
Jonas Bähr
a1776d3e74 Fix build on MacOS-X 10.14: missing Xerces include dir
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
2022-08-24 07:40:04 +02:00
wmayer
8efe30c8a9 Test: add test feature for unit tests 2022-08-22 15:46:40 +02:00
wmayer
020bf1789a Base: expose enum NumberFormat to Python 2022-08-15 11:12:53 +02:00
wmayer
43b6c65311 Test: unit test for handling of the factor of F/m
This test is supposed to cause a failure because of the wrong factor of F/m for SI1 and SI2 in commit 9db5dff7
2022-08-14 20:17:13 +02:00
wmayer
7ed74fa63d Test: [skip ci] failUnless is deprecated, replace it with assertTrue 2022-08-14 19:06:39 +02:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
wmayer
91ea39a5c0 Base: extend Placement/Rotation API
* Add Placement::isSame() and expose to Python
* Add Placement::multRight/Placement::multLeft
* Fix PlacementPy::rotate
* Add Rotation::multRight/Rotation::multLeft
* Add a test feature FeatureTestPlacement for uni tests
* Add unit tests
2022-08-09 11:54:05 +02:00
Uwe
fb5c731847 [Test] remove unnecessary Python check
we only support Python 3
2022-07-31 05:28:47 +02:00
luz paz
c457f3bfbd Fix various 'testing inequality to None' syntax issues
Substitute `is not None` for `!= None`
2022-07-30 22:41:31 -04:00
wmayer
79de5318cb Test: [skip ci] fix typo 2022-07-27 13:35:34 +02:00
wmayer
0dddd3336e App/Test: implement unit test for PR #7250 2022-07-27 13:22:00 +02:00
Uwe
003757176c Mod: remove some more superfluous Boolean checks 2022-07-19 02:40:59 +02:00
Uwe
3a50f95be4 Mod: remove some superfluous Boolean checks (#7213)
* Mod: remove some superfluous Python Boolean checks
2022-07-19 01:35:12 +02:00
wmayer
b4c480737f Test: [skip ci] set direct connection mode as otherwise the test will fail 2022-07-05 15:28:28 +02:00
0penBrain
5dcd27df93 Gui: test for ILoggerBlocker 2022-07-05 13:35:18 +02:00
wmayer
45d7151dfa Test: [skip ci] unit test for fix of Vector2d::Rotate 2022-07-04 16:53:47 +02:00
wmayer
b50e0485d9 Test: ignore UnicodeEncodeError in TestMetadata.test_file_path 2022-06-30 13:32:29 +02:00
wmayer
898b1007b9 Test: use codecs.open in TestMetadata.test_file_path 2022-06-29 15:51:42 +02:00
wmayer
82bbe47d68 Test: set encoding to utf-8 in TestMetadata.test_file_path 2022-06-29 12:28:02 +02:00
wmayer
448b1ec9f3 Test: [skip ci] test file path with utf-8 <-> utf-16 conversion 2022-06-29 11:23:15 +02:00
wmayer
e07cfa09bb Test: extend test for enumeration 2022-06-28 21:24:19 +02:00
wmayer
35919e2a75 Test: [skip ci] test for fixed Rotation::inverse() 2022-06-20 12:39:22 +02:00
wmayer
b8434f2ddc Test: [skip ci] extend test for issue #6949 2022-06-11 16:10:09 +02:00