Commit Graph

56 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9caa6d2c7b [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
19dae94f01 Base: fix build on musl libc 2024-05-30 08:49:25 +02:00
wmayer
1775991b50 Base: Implement FileInfo::size() 2024-03-11 16:05:30 +01:00
wmayer
08b10cd287 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
39337ea12e 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
f539138dd9 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
73a1e90e45 fix readability-identifier-length 2023-11-16 01:22:08 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
010dca8303 Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
2bc90e6090 Base: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
367cdb36ed Base: modernize C++: use range-based for loop 2023-08-14 14:09:29 +02:00
Benjamin Bræstrup Sayoc
33384cff9c [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
566ae39519 [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
67c75dad2f [FEM] Elmer: add missing deformation info
- also some formatting changes done by clang
2023-03-26 09:32:56 +02:00
Uwe
53571f7196 [Base] remove superfluous nullptr checks 2022-07-18 03:16:22 +02:00
Uwe
6b09da9ab6 [Base] remove unnecessary Boolean comparisons 2022-06-19 15:17:50 +02:00
wmayer
741fdc53c7 Base: unset flag to skip leading whitespaces when copying a file 2022-06-13 08:43:58 +02:00
wmayer
fc7f3f4e3d Base: avoid const_cast in FileInfo 2022-06-04 13:13:36 +02:00
wmayer
79f8798011 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
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
3b42d4afac Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05:00
Uwe
c1ba1545a7 [Base] a compile for for MSVC 2022-03-19 15:02:19 +01:00
wmayer
a817a68c17 Base: add method FileInfo::createDirectories() to also create parent directories of a given path 2022-03-19 13:56:06 +01:00
wmayer
e4435cdcba 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
f24fe8157a Base: [skip ci] fix build failure with MSYS/clang 2022-02-26 11:16:57 +01:00
Uwe
89b37a5110 [Base] Exception and FileInfo: remove unused includes 2022-02-23 19:13:13 +01:00
wmayer
4d87039635 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
410e65ce2f Coverity: Suppress false-positives 2020-07-20 17:34:28 +02:00
plgarcia
d222f7b55f 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
6f11ed298a 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
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
aa7d780f5d 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
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
16e6d887e7 implement FileInfo::completeExtension 2017-10-24 19:38:01 +02:00
wmayer
5f12a043fa fix several gcc warnings 2016-11-08 14:31:08 +01:00
wmayer
848a685c53 fx wrong cast 2016-09-03 14:58:03 +02:00
wmayer
3c88edd007 fix Coverity issues 2016-09-03 14:51:28 +02:00
wmayer
d7d347b2d6 + if getcwd fails then use '.' 2016-05-11 09:24:29 +02:00
wmayer
f3a5deec5e + 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
4ebb62be79 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
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
dd2b39ddd6 + fixes #0002075: Analysis of FreeCAD by PVS-Studio static analyzer 2015-05-01 16:56:31 +02:00
wmayer
708f6665e6 + fixes #0001831: FreeCAD can start only once 2015-04-12 02:02:30 +02:00
wmayer
4964628291 + check if file handle is valid in FileInfo::isFile 2014-12-04 16:44:22 +01:00
wmayer
5c269996b8 + restore lost changes, improve whitspaces, suppress useless MSVC warnings 2014-08-28 12:37:42 +02:00
jriegel
eb734eb6f4 Merge remote-tracking branch 'refs/remotes/origin/jriegel/NewWinBuild' into jriegel/review-NewLibPack 2014-08-27 22:25:35 +02:00
jriegel
f260a0f219 fix Win64 bug in FileInfo 2014-08-27 22:22:29 +02:00
wmayer
346e5c6a77 + fix more compiler warnings 2014-08-27 13:26:44 +02:00
wmayer
9a9510d9e3 Make file read-only once assigned to a PropertyFileIncluded instance 2013-05-07 22:42:58 +02:00