Commit Graph

1528 Commits

Author SHA1 Message Date
berniev
85170b2879 remove redundant void 2022-07-31 10:27:44 +02:00
Uwe
8d41fdb1c4 [App] Application: add a comment
- also some style fixes by MSVC
2022-07-30 19:09:32 +02:00
Uwe
0fc5e7405e [App] Application: revert init sorting
- apparently the order of initialization matters.
2022-07-30 18:59:51 +02:00
Uwe
35e50597f4 [App] sort properties
- to quickly get an overview
2022-07-30 17:34:36 +02:00
wmayer
7628569b43 Base: add Precision class
and move the Python binding from Part to Base module
2022-07-30 17:10:56 +02:00
wmayer
fb49e0da89 App: fixes #7277: Write to network drive fails on Windows 2022-07-30 12:11:14 +02:00
wmayer
c5a0f64f19 App: fixes #7112: Addon manager does not work on windows with special characters in the username 2022-07-29 12:43:05 +02:00
wmayer
f9bdc3aca7 App: use namespace prefix for classes in Base 2022-07-28 14:18:12 +02:00
marioalexis
c38a6759d9 Base: Clean up code and improve docstrings in Python Console module 2022-07-28 13:30:01 +02:00
andrea
513661772a Remove 2 deprecate PyCFunction 2022-07-28 01:50:15 +02:00
Chris Hennes
3ea737b31b Switch to Boost regex
In some circumstances Boost regex is substantially faster than std::regex, so we currently standardize on using Boost. This also fixes a compilation error on Windows, since std::regex is not included in our precompiled headers.
2022-07-27 09:59:25 -05:00
berniev
ba06e203be Fix column number calc
(cherry picked from commit 0a8b875751c9469a52548730539dfd4b4fc51acc)
2022-07-27 13:45:33 +02:00
wmayer
f3b02a487f App/Test: implement unit test for PR #7250 2022-07-27 13:22:00 +02:00
Uwe
1f0181cdcc [App] remove check for Python 2 2022-07-27 01:55:52 +02:00
andrea
e3adea272c Remove deprecated function 2022-07-26 08:52:04 -04: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
wmayer
9b30f9328b Fix several clazy issue:
* Suppress non-POD static [-Wclazy-non-pod-global-static]
* Call to temporary is a no-op: [-Wclazy-writing-to-temporary]
* Unused QString [-Wclazy-unused-non-trivial-variable]
2022-07-24 21:39:59 +02:00
andrea
187772de7c fix warning :unused variables 2022-07-23 14:27:50 +02:00
andrea
61a5551940 Remove unused code into App 2022-07-23 14:27:50 +02:00
Uwe
61303b0a01 [Base] remove some more superfluous nullptr checks 2022-07-18 13:07:16 +02:00
Uwe
32ffcc7eda [App] code style fixes by MSVC
- automatic .clang fixes while checking for nullptr, no actual code change
2022-07-18 13:03:42 +02:00
Uwe
e69a920f18 [App] remove superfluous nullptr checks 2022-07-18 03:12:01 +02:00
wmayer
ab6c75fad9 Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
wmayer
a8ac45b090 Replace std::ignore with boost::ignore_unused()
According to https://isocpp.org/blog/2016/09/quick-q-stdignore-for-ignoring-unused-variable std::ignore is not supposed to be used for this
2022-07-15 13:15:47 +02:00
wmayer
b89324bc78 App: fix build failure on Windows caused by PR #7034 2022-07-04 00:54:49 +02:00
flachyjoe
511b38ce24 [App] Fix file not found error with canonical filename
boost::filesystem::canonical doesn't resolve non existent file where
boost::filesystem::weakly_canonical does.

Notice boost::filesystem::weakly_canonical only resolve absolute path.
2022-07-04 00:50:43 +02:00
flachyjoe
8fba6b034d [App] Fix #5592 : Respect symbolic links
Use the real path to the file when saving the document.
2022-07-04 00:50:43 +02:00
Uwe
9fc13f6090 [App] [skip CI] fix minor code style issue
was introduced by commit d993e9ed
2022-07-02 18:10:26 +02:00
wmayer
0f5725b34a modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
wmayer
97f9320bb3 Core: fix minor issues:
+ fix issues found by clang's clazy tool
+ fix cppcoreguidelines-pro-type-member-init
  * Make sure that all class members are initialized in the constructor
2022-06-30 16:31:16 +02:00
wmayer
82a6241fc5 fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
f0443dbb92 App: issue #7112: Addon manager does not work on windows with special characters in the username 2022-06-29 11:25:06 +02:00
wmayer
64a7fe5b71 App: fixes #7102: Undo/Redo of PropertyEnumeration fails with MSVC 2022-06-29 09:59:18 +02:00
wmayer
2628fb0350 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
wmayer
1459fd61a4 cppcoreguidelines-special-member-functions
* disable move constructor and move assignment for several core classes
2022-06-25 17:46:48 +02:00
wmayer
8b9484c82f App: add pure virtual methods to PropertyGeometry to delegate it to the geometry of sub-classes
Following the law of Demeter add some wrapper methods to PropertyGeometry and implement them in sub-classes. As a side-effect this makes some const_cast obsolete
2022-06-24 16:15:02 +02:00
mosfet80
c48a569696 Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
marioalexis
1bc43b8606 App: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
Christoph Moench-Tegeder
ecc3fb7218 fix Expressions assignment for FreeBSD
Just like Apple, FreeBSD uses clang as it's main compiler, and thus
runs afoul of the same problem in src/App/PropertyExpressionEngine.cpp
like Apple (issue #5281): "error: no viable overloaded '='".
Extend the fix from #5281 for the BSDs (check macro FC_OS_BSD) -
at least OpenBSD uses clang, too (maybe this check should be reworked
to test for clang, but I can't test on Apple, so let's keep this fix
minimalistic).

References: #5281
2022-06-19 16:14:10 +02:00
Uwe
881b168beb [App] remove unnecessary Boolean comparisons 2022-06-19 15:18:34 +02:00
wmayer
1f606e40e1 App: implement '*' operator for weak pointer classes 2022-06-13 13:52:21 +02:00
0penBrain
d96a7ac9d8 [Bugfix] Expression: fix precedence+associativity management in parenthesis removal
Fixes #6948
2022-06-11 15:59:06 +02:00
marioalexis
1ce36f6d1b App: Clean up code in PropertyContainerPyImp.cpp 2022-06-09 18:46:41 -04:00
marioalexis
c88e7c1ae5 App: Improve docstrings in PropertyContainerPy.xml 2022-06-09 18:46:41 -04:00
marioalexis
178eaadfc8 App: Improve docstrings in MetadataPy.xml and fix memory leak 2022-06-09 17:48:45 -04:00
wmayer
6c0a610fb1 App: issue #6892: FreeCAD fails to start 2022-06-09 15:40:37 +02:00
Zheng Lei
fb457594fd Spreadsheet: fix range checking (#6997)
* App: add option to normalize a Range

- To make sure the range starts from top left and ends with bottom right
corner.
- Default is to not normalize on construction for backward compatibility.
-  fix range checking in range binding
2022-06-09 12:20:08 +02:00
marioalexis
abacd5741c App: Improve docstrings in GeoFeaturePy.xml 2022-06-08 19:20:04 +02:00
luz paz
a526451afd Fix various typos 2022-06-01 18:03:40 -04:00
wmayer
1bf56a9999 App: add default macro directory to sys.path 2022-06-01 11:21:51 +02:00