Commit Graph

1139 Commits

Author SHA1 Message Date
mosfet80
cb607ffe1e [BASE] Removed dead code (#10330) 2023-08-28 10:41:20 -05:00
Chris Hennes
3d8ec230f8 Merge pull request #10365 from chennes/wrapPyArgParseWithKeywords
Wrap PyArg_ParseTupleWithKeywords
2023-08-27 10:23:31 -05:00
wmayer
1b7d96f55a Base: add methods to get volume and get max/min points 2023-08-27 03:11:00 +02:00
Chris Hennes
951ad4bf77 Base: Add clearer error message for missing nullptr 2023-08-26 16:11:03 -05:00
wmayer
b4739d3ca4 Base: fix clang-tidy warnings in BoundBox.h 2023-08-26 21:03:58 +02:00
Chris Hennes
f17e6aa98f Base: Add static_assert for keyword array size > 0 2023-08-26 12:32:29 -05:00
wmayer
9dd4779252 Test: add more unit tests 2023-08-26 13:17:53 +02:00
Chris Hennes
6bd1c6be49 Base: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 14:52:30 -05:00
Chris Hennes
9eafbb65af Base: Add wrapper for PyArg_ParseTupleAndKeywords
Enable strict const-correctness for the keywords argument and address
several linter complaints related to using a C function in C++ code.
2023-08-25 14:49:28 -05:00
wmayer
097d5d6fee Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
4210ab01e0 Base: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
5610c22cbb Base: modernize C++: use equals default 2023-08-20 18:10:17 +02:00
wmayer
50af46b7c9 Core: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
Chris Hennes
bac14e81f7 Merge pull request #10258 from chennes/translations20230814
Update translations
2023-08-18 08:52:13 -05:00
wmayer
38fb97947b Lint: fix several issues discovered by clang-tidy 2023-08-18 08:44:49 -05:00
wmayer
ff1981fcdc Lint: fix several issues discovered by clazy 2023-08-18 08:44:49 -05:00
wmayer
59760c723f Base: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Chris Hennes
58cf9f3212 Update translations
Adds the ten units strings from Base as well.
2023-08-16 22:50:39 -05:00
Jonas Bähr
34b176c1db Remove C++ escaping from *Py.xml templates
Now all escaping required for the C++ code generation is done when the
.cpp/.h files are generated. Previously, only newlines were escaped
automatically. This was a) inconsistent and b) leaked c++ details into
the xml data.
In addition, the escaping is now done in one central place, harmonizing
the three previous implementations.

Pre-existing c++ escape sequences in the XML files have been replaced by
their literal equivalent so that the resulting python doc sting remains
unchanged.
2023-08-16 13:17:25 +02:00
wmayer
761905dbc2 Base: modernize C++: use range-based for loop 2023-08-14 14:09:29 +02:00
marioalexis
d7ed0d5433 Base: Explicitly avoid parameters in PrecisionPy methods 2023-08-11 13:15:58 +02:00
wmayer
7fe0d5b9a6 modernize C++: use equals delete 2023-08-10 17:29:05 +02:00
wmayer
ec73caa40e modernize C++: make unique 2023-08-07 19:51:30 -06:00
Benjamin Bræstrup Sayoc
da2ae719f2 [Everywhere] FileInfo::hasExtension for multiple values (#9774)
* [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
2023-08-07 09:55:19 -06:00
wmayer
31ed14db83 modernize C++: use noexcept 2023-08-07 16:06:58 +02:00
wmayer
dbad96d43e modernize C++: use using 2023-08-06 23:17:10 +02:00
wmayer
9f99285d59 modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
Morgan 'ARR\!' Allen
3d5a58b591 add cstdint behind ifdef __GNUC__ for compiling under alpine linux
note: in other headers there is a mix of including the ifdef
2023-08-04 18:45:22 -06:00
wmayer
054a0997e8 Base: modernize C++: use override 2023-08-04 17:09:53 +02:00
sliptonic
ef4ca26382 Merge pull request #9594 from wwmayer/issue_9549_new
Part: fixes #9549: Part Fuse not working inside Part container
2023-07-24 10:16:51 -05:00
marioalexis
5f838a43bd Base: Fix warnings -Wredundant-move 2023-07-24 14:39:21 +00:00
0penBrain
092c906fe6 [Bugfix]Base: fix implementation of isFile() so it is safe to use
Current implementation can freeze the app if called on specific files
2023-07-23 17:19:31 +00:00
wmayer
fa6ee296fc Base: fix bug in CoordinateSystem::setYDirection 2023-07-13 15:12:09 +02:00
Pesc0
c65f049d20 [Toponaming] create ElementMap class (#9175)
* Copypaste ElementMap
* Add MappedNameRef
* Fix missing include
* Copypaste `findTagInElementName`
* fix error introduced _somewhere_
* refactor toponaming constants
* Move `findTagInElementName` in `MappedName`
* reintroduce workaround to compile ElementMap
* Added missing functions copied from complexgeodata
* fix last compile errors, reorder and format files
* remove recursive refs to ComplexGeoData
* Add more comments
* fixed comments and added tests
* added FIXME, make functions private, misc fixes
* Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils
* Fix broken includes due to previous change
* Revert constants from string to const char*
* added childmap tests and made hasher public
* Make functions private
* Added remaining tests
* removed bool return from `erase` functions
* fix missing appexport

Co-authored-by: John Dupuy <jdupuy98@gmail.com>
2023-06-15 09:05:24 -05:00
Abdullah Tahiri
624592fc8b Interpreter: Fix lack of notifier in DeveloperError call 2023-06-01 19:25:00 +02:00
Abdullah Tahiri
ad9cef7bfa Console: Ensure macros have a notifier string 2023-06-01 19:25:00 +02:00
Connor Worrell
edf1bbf6f4 [Base] US Building Schema correct sign on fraction 2023-05-31 19:53:49 -04:00
Abdullah Tahiri
0638a1b507 Console: Update loging macros to only send to developers 2023-05-25 14:09:06 +02:00
Abdullah Tahiri
55a61e82a9 Console: Improve the documentation 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
1b59b75482 Base: Interpreter - Mark Exception reporting and stack as intended for developers 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
5e5d863968 Console: Remove Translated Notification message
===============================================

With the new console extension, the translation state is coded separatedly.

Therefore, it is possible to code a Notification as translated without needing a specific type.

Additionally, any other message, such as Error of Warning can be translated.

It does not make sense to leave this message, if only for reasons of coherence and to simplify
maintainance of code.
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
3b82bf62f7 Console: Extend the Python interface 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
125a6f7bc4 Console: Convenience dedicated functions 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
5f52885fbf Ilogger - Separate behaviour for user exposed and not exposed loggers 2023-05-23 14:24:45 +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
Chris Hennes
9be9f2f8d1 Merge pull request #9582 from chennes/translateUnitSchemes
Gui: Translate unit system UI
2023-05-17 11:06:27 -05:00
marioalexis
623e65f2f0 Base: Include needed header file 2023-05-16 12:46:34 -03:00
Chris Hennes
8b73653633 Gui: Translate unit system UI 2023-05-15 20:16:46 -05:00
wmayer
98a4b1d399 Base: add helper function to quote a string and join a list of strings 2023-05-15 23:40:07 +02:00
Chris Hennes
ec575c612a App/Toponaming: Add missing include to Writer 2023-05-11 14:34:35 -05:00