Commit Graph

350 Commits

Author SHA1 Message Date
wmayer
c9774cdacc Test: add test for default file system encoding 2023-09-06 23:54:42 +02:00
Chris Hennes
fb0f543da2 Test: Final application of pre-commit 2023-09-04 08:18:51 -05:00
wmayer
e48964fad5 Test: apply clang format 2023-09-04 07:22:09 -05:00
Chris Hennes
40f130643a Update translations 2023-08-29 07:38:09 -05:00
wmayer
142b86fde2 Mod: modernize C++: use equals default 2023-08-21 20:21:30 +02:00
Chris Hennes
58cf9f3212 Update translations
Adds the ten units strings from Base as well.
2023-08-16 22:50:39 -05:00
Chris Hennes
edda57292c Merge pull request #10146 from marioalexis84/app-string_hasher_py
App: Fix crash and undefined behavior in StringHasherPy and StringIDPy
2023-08-13 13:45:06 -07:00
wmayer
e2aa8660a3 Test: avoid to expand test dialog if label text is too long 2023-08-10 19:51:48 +02:00
marioalexis
ae69dd90de Test: Add StringHasher test 2023-08-10 11:55:21 -03:00
Petter Reinholdtsen
6b7f3c55b9 Use python3 as the interpreter instead of python (ie v2)
This fixes lintian warning "unusual-interpreter".

Part of the Debian edition of FreeCAD since 2023.
2023-07-01 03:09:19 +02:00
Abdullah Tahiri
9d9f928b2d Console: Extend framework with intended recipient and content type metainformation
==================================================================================

Limitations of the current framework:
- Codes the translated state only for TranslatedNotification as part of the type.
- Does not code the intended recipient (user, developer, ...)

Problems:
- Some errors are intended for developers, some errors may only be intended for users,
if, for example, there is another developer error which already contains all the information.
The current framework may lead to information duplication or to showing to the user developer
information, which is perceived as annoying.
- Logs shall be in English (report view), while every message to the user (UI) shall be translated.
The current framework can only differentiate where to report based on subscription (legacy logs do not
subscribe to notifications), and for notifications, whether it is translated or not depends on the type.
It is not possible to code errors or warnings that are already translated.

Solution:
- To extend the ILogger interface with additional metainformation, indicating the intended recipient
(User, Developer, All), and the content of the message (translated, untranslated, untranslatable). The latter
is useful for dynamic strings that won't find a match in the translation framework.

Bonus:
- This extended version allows to do away with translatednotification, as now any message can be independently
marked as translated or untranslated or untraslatable.
- It is now possible to provide the right icon of severity (error, warning, info), even when it is only user intended
and already translated.
2023-05-23 14:24:45 +02:00
wmayer
0df9d12530 Test: Create .qm out of .ts files 2023-05-07 08:51:20 +02:00
Chris Hennes
e30a768e0a Merged crowdin translations 2023-05-06 11:56:32 -05:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Ronny Standtke
edc7ae8bd7 removed test gainst label name (useless because of i18n) 2023-04-20 21:51:18 +02:00
wmayer
9aadf2cd79 Test: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
Abdullah Tahiri
ee0c3ad5c1 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
bed7b76524 remove Python2 code 2023-03-04 17:51:43 -06:00
wmayer
5774721284 Test: expected failure of Rotation::setValue() in unit tests 2023-03-01 18:43:15 +01:00
Yorik van Havre
be6a654b3e merged crowdin translations 2023-02-27 16:01:15 +01:00
Jolbas
554a40f91c 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
0566d90cc5 merged crowdin translations 2023-02-13 15:45:26 +01:00
luzpaz
79e150a81b Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
Yorik van Havre
5033f64ce9 Merged crowdin translations 2023-01-17 09:40:31 +01:00
Yorik van Havre
ec6b14bbee Merged crowdin translations 2023-01-09 14:06:28 +01:00
wmayer
9efac962ac 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
d60f2e291f Core: fixes #8119: Make axis values in Property view persistent 2023-01-02 12:48:40 +01:00
wmayer
b1123954a9 Test: [skip ci] write results to stdout 2022-12-25 14:28:42 +01:00
wmayer
fa6dc8d0e1 Gui: make unit tests working from command line if Gui is up 2022-12-24 19:13:40 +01:00
Yorik van Havre
3376e387da Merged crowdin translations 2022-12-20 10:01:00 +01:00
Yorik van Havre
d206d5cd1f Updated ts files 2022-12-20 09:31:25 +01:00
Uwe
4531349539 [Test] enable precompiled headers
- also remove unused headers
2022-12-14 04:25:52 +01:00
luz paz
056d1aea87 Fix various typos and grammatical issues 2022-11-30 12:45:29 +01:00
wmayer
ecd9b0136d Test: [skip ci] add method clear() to document observers 2022-11-14 19:53:35 +01:00
wmayer
d91de9ceb2 Core: Qt6 migration, use PySide 2022-11-06 14:09:18 +01:00
Chris Hennes
1fac3fead0 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
1ae780d3b1 Merged crowdin translations 2022-10-17 15:12:16 +02:00
wmayer
9f8cfe22f8 App: add tests for cell rows and absolute cells 2022-10-13 20:16:48 +02:00
Yorik van Havre
4ca1b838a9 Merged crowdin translations 2022-10-06 12:48:05 +02:00
Chris Hennes
bc27561ea5 Test: Add more tag testing to Metadata tests 2022-10-03 19:13:48 -07:00
wmayer
bdb1e22fc0 [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
5f91eaa5eb TD: modernize C++: replace 'typedef' with 'using' 2022-08-30 10:59:39 +02:00
berniev
180edfa3cc Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
Jonas Bähr
46cee50bd5 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 f4411478d106ba9f4827754a50efa53bd7767a66
- Image: commit e3476815c04c571199779bd1e444b950e6398025
- Import: commit b7b264e52c8fd97e83987c4ce42ce563170c8918
- Inspection: commit 1f64d8b1b8fcabe983c6e5e624d65766b4429ea0
- Mesh: commit 5a8fed0720d681cdbb9fedc840d2532c4f2f6042
- Part: commit 26bb65f11f4b51e5e47b65b2d6049ece10705a83
- PartDesign: commit f4e49f2aecf08f2337e84510ed019b7fa4b685a3
- Path: commit e3d9cc98577d2073297d55ffd8de28dd50f8444c
- Points: commit 09f3e867cdccd31294cced4e3c73015d3add3f4a
- Raytracing: commit 7b92dedc53f09e2ce8365408f3003e5700aebfc8
- ReverseEnginering: commit eeacc51ad0cd82e5f17d63207f78f79eb20bf9a9
- Robot: commit 4d06684cbd0328e4f43c78b5dab7e7fcebab148d
- Sketcher: commit 079125665495a08a7e2e2a4f01da406128dca625
- Spreadsheet: commit 514097954e95c04a7ec9d7e8ec1afc3aac3dd8d
- Start: commit 2ea2bb0dc393d7b8b41e9137c6d4ae40ce29719d
- Surface: commit 272268dd6c0b460ae9aeecdf371495ea26aa044d
- TechDraw: commit c70fdc3e0aa6b409626a6fa6b7266d05f3338c6d
- Test: commit 49a07b121e08e9bf3fef0f414a8da5602533592e
- Web: commit a93a23d7e4da13b2d5c37ac087b2dcf41aae197d
2022-08-24 07:40:04 +02:00
wmayer
3f07755a8f Test: add test feature for unit tests 2022-08-22 15:46:40 +02:00
wmayer
b485f7943c Base: expose enum NumberFormat to Python 2022-08-15 11:12:53 +02:00
wmayer
86be2871d4 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 2f0824be
2022-08-14 20:17:13 +02:00
wmayer
35478e5aef Test: [skip ci] failUnless is deprecated, replace it with assertTrue 2022-08-14 19:06:39 +02:00
berniev
71dc5ead2f Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
wmayer
00bdd16dff 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