Commit Graph

88 Commits

Author SHA1 Message Date
Kohei Takahashi
194a9f9751 Base: Expanded FindAttribute() to get rid of frequent constant transcode 2024-12-31 10:30:23 +09:00
Kohei Takahashi
7ae463f245 Base: Added helper macro for caching transcode-ed string literal 2024-12-26 17:16:45 +09:00
Kohei Takahashi
8752982b78 Base: Improved FindElement performance by reducing call of transcode 2024-12-18 20:19:12 +09:00
Jacob Oursland
516691fb95 Base: switch header include type for consistency with codebase. 2024-09-13 12:27:18 -06:00
huguesdpdn-aerospace
611bab3d6d PD: Xerces-C++ - Prepare for the latest version (backward compatible) 2024-09-08 20:31:25 -05:00
pre-commit-ci[bot]
09386be6a9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-25 07:29:42 +00:00
Pieter Hijma
1f3f14740e Core: Maintain the lock while reading config file 2024-05-17 11:29:49 +02:00
wmayer
281230c520 Core: Fix possible race conditions when reading or writing config file 2024-05-06 13:24:17 +02:00
wmayer
0c25b29680 Base: Fix possible race condition when restarting the application
When restarting the application (e.g. after installing an addon) the application will be closed and a new instance will be launched. Now it can happen that the old instance is still busy writing the config files to disk while the new instance wants to read them in. At this time it's possible that a config file is in an invalid state so that the new instance will ignore it but then starts with a default configuration.
Later when closing the new instance the config files will be overwritten and destroy the user's original settings.

By using a lock file this race condition will be avoided. It uses a timeout of 1 second that should be enough for the old instance to write the files to disk.
2024-04-18 23:07:58 -05:00
wmayer
a713d5f96f Tests: add more unit tests for ParameterGrp 2024-04-17 21:45:26 +02:00
wmayer
a043ed6a3d Base: fix some linter warnings 2024-04-14 21:22:08 +02:00
wmayer
4263ab1937 C++: replace deprecated vsprintf and sprintf
With future C++ compilers the methods vsprintf and sprintf are declared as deprecated due to security issues.
They are replaced with the secure counterpart of the fmt library

Fixes the compiler warnings -Wdeprecated-declarations
2024-04-03 10:04:56 +02:00
Ladislav Michl
3a25a66a05 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
wmayer
3ac4dc0686 fix cppcoreguidelines-*
* cppcoreguidelines-init-variables
* cppcoreguidelines-c-copy-assignment-signature
* cppcoreguidelines-macro-usage
* cppcoreguidelines-non-private-member-variables-in-classes
* cppcoreguidelines-pro-type-member-init
* cppcoreguidelines-slicing
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-virtual-class-destructor
2023-11-16 01:22:09 +01:00
wmayer
365e7136cd fix bugprone-*
* bugprone-throw-keyword-missing
* bugprone-unhandled-self-assignment
* bugprone-suspicious-string-compare
* bugprone-reserved-identifier
* bugprone-narrowing-conversions
* bugprone-macro-parentheses
* bugprone-implicit-widening-of-multiplication-result
* bugprone-exception-escape
* bugprone-copy-constructor-init
2023-11-16 01:22:09 +01:00
wmayer
276bbcad6e fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
bd88162b9d fix readability-*:
* readability-const-return-type
* readability-container-data-pointer
* readability-container-size-empty
* readability-delete-null-pointer
* readability-else-after-return
* readability-inconsistent-declaration-parameter-name
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-redundant-string-cstr
* readability-use-anyofallof
* readability-static-definition-in-anonymous-namespace
* readability-static-accessed-through-instance
* readability-simplify-boolean-expr
2023-11-16 01:22:08 +01:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
9f9b3a5af1 fix parameter 2023-08-31 01:03:51 -03:00
AgCaliva
eebf751751 fix merge 2023-08-30 17:59:41 -03:00
AgCaliva
3da00e36a3 Merge Master 2023-08-30 16:24:16 -03:00
mosfet80
cb607ffe1e [BASE] Removed dead code (#10330) 2023-08-28 10:41:20 -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
38fb97947b Lint: fix several issues discovered by clang-tidy 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
wmayer
761905dbc2 Base: modernize C++: use range-based for loop 2023-08-14 14:09:29 +02:00
wmayer
7fe0d5b9a6 modernize C++: use equals delete 2023-08-10 17:29:05 +02:00
AgCaliva
5c4631165a merge master 2023-08-08 23:29:40 -03:00
wmayer
ec73caa40e modernize C++: make unique 2023-08-07 19:51:30 -06:00
wmayer
9f99285d59 modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
AgCaliva
20da8341c6 Implementing agnostic version of ParameterGrp for reading XML, replacing XMLReader from src/Base/reader.cpp with new class DocumentReader 2023-06-16 15:36:43 -03:00
Zheng, Lei
e4aa389cc4 Base/App/Gui: force using Base::Handle for ParameterManager
For reference counting
2023-01-06 09:14:41 -06:00
berniev
7546ce8ab7 Simplify switch statement (modded) 2022-12-04 19:37:04 +01:00
Zheng, Lei
01f7782124 Base/App: add new signal interface to Parameter
Added new signal interface using boost::signals2 signalParamChanged.

Exposed to Python as ParameterGrpPy.AttachManager() to monitor changes
to all parameters, sub groups under the referring group.

Added new attribute for ParameterGrp(Py) to query the Parent and Manager
of the referring group.
2022-12-03 17:08:17 -06:00
berniev
5678fc1abe remove xcerces2 2022-09-09 08:02:35 +02:00
wmayer
d92eaf7a72 Base: fix several warnings reported by code analyzers 2022-08-02 13:04:50 +02:00
berniev
15419982d4 Base: Modernise ctors dtors defs etc 2022-08-02 12:37:46 +02:00
berniev
ba5c312a58 remove redundant void from Base 2022-07-31 14:10:34 +02:00
wmayer
25483b78be Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
2022-07-24 22:29:06 +02:00
Uwe
61303b0a01 [Base] remove some more superfluous nullptr checks 2022-07-18 13:07:16 +02:00
Uwe
746f24efa3 [Base] remove more superfluous nullptr checks 2022-07-18 03:29:03 +02:00
Uwe
4b2ffd2eca [Base] remove superfluous nullptr checks 2022-07-18 03:16:22 +02:00
Zheng, Lei
8bec44934b Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
b5c72abee4 Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05:00
wmayer
c01846c3e7 Base: fix handling of path separators in parameter group names 2022-03-29 14:54:03 +02:00
wmayer
d5fd3f996e Base: make Parameter class less vulnerable for invalid user config files 2022-03-24 11:43:39 +01:00
wmayer
055793e12c Base: [skip ci] remove several superfluous static_cast 2022-03-24 11:27:55 +01:00
wmayer
4183c45a01 Base: modernize C++11
* use nullptr
2022-03-23 16:57:25 +01:00