Commit Graph

1504 Commits

Author SHA1 Message Date
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
Benjamin Alterauge
086547c490 List all available test units, if none is selected.
From the command line (FreeCADCmd) only which not need the GUI.

A better description

Grammatically improvement

Use PrintMessage
2022-05-31 02:03:11 +02:00
wmayer
53cfca61a0 App: simplify code in Application::getResourceDir() and Application::getHelpDir() 2022-05-18 10:27:27 +02:00
wmayer
d0920c5ca8 App: inside Application::getLibraryDir() check if an absolute path name is set for LIBRARYDIR 2022-05-18 10:20:37 +02:00
Zheng, Lei
a506827d39 App: Fix Origin::extensionGetSubObject() 2022-05-16 11:27:35 +02:00
wmayer
8353338db5 App: fix DocumentObjectPy::getSubObject:
* do not set pyMat to Py_None by default but nullptr and do type check in PyArg_ParseTupleAndKeywords
* if refType is out of range raise a ValueError instead of TypeError
* replace (undocumented) magic numbers with an enum class
* implement a lambda function to avoid code duplication
* fix bug for retType=3 or retType=4 if subname is a list of strings
2022-05-14 15:54:27 +02:00
Zheng, Lei
9a393e2b70 App: fix Origin getSubObject() 2022-05-14 14:02:21 +02:00
wmayer
4b483807c7 Base: replace several reinterpret_cast 2022-05-11 20:01:40 +02:00
wmayer
f7b2421df2 App: fix regression in Expression::getDepObjects
Avoid to add labels muliple times as reported here: https://forum.freecadweb.org/viewtopic.php?p=593994#p593994
2022-05-09 10:53:21 +02:00
wmayer
2c7fce704f App: implement DocumentP::clearDocument() to reduce code duplication 2022-05-08 21:32:34 +02:00
Zheng, Lei
8b5b4f1fbe App: fix crash on removing dynamic property
Related FreeCAD/FreeCAD#6840
2022-05-08 21:24:47 +02:00
Zheng, Lei
6530d2e1a6 Fix mixed line ending 2022-05-08 21:24:47 +02:00
wmayer
caecc921f0 App: fixes #6844: Crash in PropertyXLinkContainer::updateDeps 2022-05-08 18:22:29 +02:00
wmayer
531b354229 App: fixes #6840: Crash in ObjectIdentifier::resolveProperty 2022-05-06 20:34:08 +02:00
wmayer
1aef8e0246 App: cannot assign a null pointer to a std::string
Depending on the compiler an exception is raised or a crash occurs
2022-05-06 15:14:37 +02:00
Zheng, Lei
22d6e5a030 App: handle exception on change Link CopyOnChange 2022-05-05 11:37:38 -05:00
wmayer
d0f47f2afa App: fix restoring the attributes of a dynamic property
For more details see: https://forum.freecadweb.org/viewtopic.php?p=591465#p591465
2022-05-03 16:52:54 +02:00
wmayer
79578ea191 App: handle 'NoPersists' property type in PropertyContainerPy::getTypeOfProperty 2022-05-03 14:10:42 +02:00
wmayer
108810b57b App: expose PropertyType enum to Python 2022-05-03 11:24:23 +02:00
Zheng, Lei
bca24ac6b4 App: fix property conflict in App::Link restore
The conflict happens if the App::Link has dynamic property having the
same name as the linked object
2022-04-25 00:49:16 +02:00
wmayer
d98aaecbfe Mod: issue #6274: Source code installation failed 2022-04-18 12:27:09 +02:00
marioalexis
97e0d63750 App: Use regex to match names in ComplexGeoData::getSubElementByName 2022-04-15 17:38:17 +02:00
wmayer
2040b66f17 App: [skip ci] fix bug in ComplexGeoDataPy::getPoints
The normals were added to the wrong list
2022-04-13 11:23:15 +02:00
0penBrain
6182059a0f Core: partially revert 83233a7 that introduced composed units
Parser shall only deal with atomic units or it breaks other composed units
 Fixes #6735
2022-04-13 03:45:39 +02:00
Zheng, Lei
f0e46ff71c App/Gui: Fix auto checking 'Sync sub object' if property link editor
Related FreeCAD/FreeCAD#6672 case C
2022-04-10 14:31:25 +02:00