Markus Reitböck
5a423dab39
Base: use CMake to generate precompiled headers on all platforms
...
"Professional CMake" book suggest the following:
"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."
Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
wmayer
21b5bccf5c
Base: Modernize FileInfo
2025-08-22 15:20:25 +02:00
Benjamin Nauck
3253f2c2de
Base: Use std::numeric_limits and std::numbers instead of defines
2025-03-29 13:32:37 +01:00
bofdahof
8ba49db74e
Base: apply std::ranges
2025-03-16 17:14:51 -05:00
Kacper Donat
cc2efa90f8
Base: Add isNullOrEmpty string helper
...
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Benjamin Bræstrup Sayoc
6f619b5f1c
Base: remove unneeded includes
2025-02-18 11:07:57 -06:00
tritao
f7a0cece08
Base: Remove Boost-based filesystem and switch to standard <filesystem>
2025-02-10 10:48:54 -06:00
pre-commit-ci[bot]
7114f6957e
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-12-09 17:29:33 -05:00
ii8
6724a85d35
Base: fix build on musl libc
2024-05-30 08:49:25 +02:00
wmayer
dfc252666e
Base: Implement FileInfo::size()
2024-03-11 16:05:30 +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
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
9c7d00ffcb
fix readability-identifier-length
2023-11-16 01:22:08 +01:00
wmayer
985def3416
Base: apply clang format
2023-11-13 12:01:26 -05:00
wmayer
097d5d6fee
Base: C++ core guidelines: init variables
2023-08-24 18:48:52 +02: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
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
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
Uwe
e0695a18c8
[FEM] Elmer: add missing deformation info
...
- also some formatting changes done by clang
2023-03-26 09:32:56 +02:00
Uwe
4b2ffd2eca
[Base] remove superfluous nullptr checks
2022-07-18 03:16:22 +02:00
Uwe
a04db55476
[Base] remove unnecessary Boolean comparisons
2022-06-19 15:17:50 +02:00
wmayer
1a269929d0
Base: unset flag to skip leading whitespaces when copying a file
2022-06-13 08:43:58 +02:00
wmayer
dd67d9c890
Base: avoid const_cast in FileInfo
2022-06-04 13:13:36 +02:00
wmayer
37611d6e02
Base: fixes #6802 : Raise an exception when using FileInfo::toStdWString() for other platforms than Windows
2022-05-09 14:21:10 +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
Uwe
3907ca0a32
[Base] a compile for for MSVC
2022-03-19 15:02:19 +01:00
wmayer
58a766374f
Base: add method FileInfo::createDirectories() to also create parent directories of a given path
2022-03-19 13:56:06 +01:00
wmayer
4a343ab31e
Base/App: fix warnings from code analysers:
...
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
wmayer
40077d4109
Base: [skip ci] fix build failure with MSYS/clang
2022-02-26 11:16:57 +01:00
Uwe
581a66aa2d
[Base] Exception and FileInfo: remove unused includes
2022-02-23 19:13:13 +01:00
wmayer
cad0d01883
Base: modernize C++11
...
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
luz paz
01b21e0d06
Base: Fix header uniformity, whitespace, and doxygen
...
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
5f0b6714b4
Coverity: Suppress false-positives
2020-07-20 17:34:28 +02:00
plgarcia
59269207b4
Change backup policy
...
1 - Reports the error to the user in a popup.
2 - Names of the backups include the timstamp instead of a number. Names have more sense and the files can be sorted by names what is also the age order.
3 - Behaviors when changing configuration improved, the number of files present on the system was not reduced when reducing the number of backups or backups deactivated.
2020-02-24 23:06:26 +01:00
luz.paz
011e5aedfa
src/Base: [skip ci] fix header uniformity
...
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
asapelkin
ced8100ab9
use emplace_back instead of push_back where justified
2019-11-21 14:48:09 +01:00
Zheng, Lei
ea8965cbc2
Base::FileInfo: fix left overs in transient directory
...
Setting ReadWrite permssion removes executable permission, causing
error when removing directory on Linux.
2019-08-17 14:52:08 +02:00
luz.paz
9167064fc1
Misc. typos
...
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
5d1ba49610
implement FileInfo::completeExtension
2017-10-24 19:38:01 +02:00
wmayer
ff2a361928
fix several gcc warnings
2016-11-08 14:31:08 +01:00
wmayer
a3fe1f2e77
fx wrong cast
2016-09-03 14:58:03 +02:00
wmayer
fb892d35de
fix Coverity issues
2016-09-03 14:51:28 +02:00
wmayer
a399368684
+ if getcwd fails then use '.'
2016-05-11 09:24:29 +02:00
wmayer
2f3a793faf
+ on Windows use the unicode version to get cwd
...
+ on other platforms use getcwd in a platform independent way
2016-05-10 22:47:14 +02:00
Wolfgang E. Sanyer
5540dd81c2
Fixed bug ID0002513, where Mesh.export failed.
...
The failure occered when Mesh.export was passed just a filename, such as 'out.stl'. If
'/some/path/out.stl' was passed it succeeded.
2016-05-10 22:29:40 +02:00
Mateusz Skowroński
05f95c0506
Fix files encoding. Go from ISO8859-1 to UTF-8.
2015-09-21 19:50:49 -03:00
wmayer
859d76faf8
+ fixes #0002075 : Analysis of FreeCAD by PVS-Studio static analyzer
2015-05-01 16:56:31 +02:00