Commit Graph

1244 Commits

Author SHA1 Message Date
0penBrain
1061773d56 [Core] exit() can prevent core dumping, use abort() instead on debug mode 2021-08-18 18:12:31 +02:00
Yorik van Havre
5ff2d7e981 Merge pull request #4963 from Helios113/stiffness
Base: Adding stiffness units
2021-08-18 10:04:46 +02:00
Preslav
5030d8bb6d Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
Zheng, Lei
fc0860db1c App: fix LinkMode enforcement in Link on restore 2021-08-01 16:36:12 +08:00
wmayer
a6e7bdf849 allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
wmayer
e92325c9c9 App: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:55:56 +02:00
wmayer
5626bab055 App: [skip ci] fix memory leaks:
Found two memory leaks in class Enumeration
* method tearDown() always ignored to free the memory of the first element
* assignment operator didn't call tearDown() when needed
2021-04-25 21:58:24 +02:00
luz paz
a1fc733ddf App: remove Py2 code from several src/App .cpp files 2021-04-19 15:27:06 +02:00
wmayer
f9a54c3385 Py3: fixes #0004081: Abillity to show console output when running under Python 2021-04-01 17:51:10 +02:00
wmayer
acbb604a16 App: use std::wstring_convert instead of QString to encode/decode unicode/utf-8 2021-03-29 16:19:13 +02:00
wmayer
6c01302a19 Gui: fix unicode handling of path names on Windows 2021-03-29 15:41:13 +02:00
Benjamin Nauck
dbc4611bb2 App: Refactor win appData setup with boost::filesystem 2021-03-29 15:03:41 +02:00
Benjamin Nauck
a7e6171e49 App: Refactor *nix appData setup with boost::filesystem 2021-03-29 15:02:49 +02:00
Benjamin Nauck
c431672e87 App: Refactor mac appData setup with boost::filesystem
This will make it easier to add support for migration when moving
appData from `Library/Preferences` to `Library/Application Support`.
2021-03-29 15:02:36 +02:00
wmayer
6fb9ec1b25 App: [skip ci] rename class to PropertyLinkT 2021-03-29 01:16:04 +02:00
wmayer
53de0c4720 App: [skip ci] add class PropertyListT 2021-03-29 00:47:38 +02:00
wmayer
7eaf08063e App: add system32 to Python's search paths 2021-03-27 13:05:03 +01:00
donovaly
6c67300d62 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
Chris Hennes
3788105210 [Core] Remove deprecated code for 0.20 2021-03-07 08:44:57 +01:00
Benjamin Nauck
079ffa5b0f [App] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
Benjamin Nauck
358cb01a9c [App] Switch from boost::tuple to std::tuple
It's better to use the standard lib when possible
2021-03-06 19:31:06 +01:00
wmayer
9e39b41ca6 App: in document observer classes replace boost::bind with std::bind to fix build failure with C++17 2021-03-05 13:26:26 +01:00
wmayer
30e9ba9609 App: add convenience methods to get minimum, maximum and step size of property constraints 2021-03-03 08:12:03 +01:00
wmayer
c243741296 Gui: [skip ci] re-add removed Py_INCREF of module 2021-02-27 11:13:30 +01:00
wmayer
dd4dd204d0 App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
6584c6e2ac App: [skip ci] AddressSanitizer: heap-use-after-free
When removing a dynamic property its myName member must be nullified as the memory has been de-allocated
2021-02-27 02:21:14 +01:00
wmayer
f0740edd20 App: [skip ci] AddressSanitizer: heap-use-after-free
In Document::removeObject() do not access object after it has been possibly deleted
2021-02-23 14:30:00 +01:00
wmayer
d17b061fea App: [skip ci] check object status before accessing back links 2021-02-22 17:31:25 +01:00
wmayer
5cc3dde57b App: [skip ci] replace plain C API with PyCXX to avoid memory leaks 2021-02-19 17:26:33 +01:00
vosk
9ad15a0a3d [App] [skip ci] - Fix python new references leaking 2021-02-19 17:25:25 +01:00
wmayer
bb73b571f7 App/Gui: fix possible crash when destroying Python feature or its view provider 2021-02-17 12:00:38 +01:00
Chris Hennes
0a4ff764e9 LGTM: Move seq->next out of loop control
LGTM points out that the construct use in the loop here "does
nothing" -- that is, it is a conditional whose result is never used.
It is apparently being used simply to ensure that the next() function is
called on each loop iteration, but because sequence may be null, it is
shoehorned into a trinary :? operator. To clarify the intent and ensure
that later readers (including LGTM) do not misunderstand it,
this code is broken out into a more standard conditional construct at
the end of each loop iteration.
2021-02-11 12:31:25 +01:00
Chris Hennes
6b11d45e7a LGTM: Minor fixes to FreeCADApp.py
LGTM flagged several redundant imports, and was confused by the else
clause of one loop. This commit removes those imports, and because of
the loop's construction, removes the else entirely and lets the loop
fall through to the error state if it fails to find what it's looking
for.
2021-02-11 11:54:24 +01:00
wmayer
5023a35c48 App: make sure to also call a feature's extensions when recomputing it 2021-02-07 17:43:36 +01:00
Zheng, Lei
813b6b4df7 App: fix Link extensionGetPropertyByName()
Do not query linked object if the owner object has property with the
given name.
2021-02-07 14:49:49 +01:00
wmayer
0d5b38385c [skip ci] Do not throw plain C string as exception 2021-02-06 15:52:21 +01:00
wmayer
ff28b5212f App: [skip ci] use better deprecation warning as used in PR 4335 2021-01-30 17:27:08 +01:00
wmayer
54a7ce43a0 App: [skip ci] print deprecation warning if addExtension() has two arguments 2021-01-30 17:20:43 +01:00
Stefan Tröger
ec5ac30756 Remove ExtensionProxy and rely on default Python proxy for extensions. fixes #0004534 2021-01-30 16:00:48 +01:00
Abdullah Tahiri
05ccc95cde App/Gui: New restoreError Document status and Gui pop-up
========================================================

If the restore of Document.xml results in invalid Document.xml (because unhandled exceptions occurred), the
document status Document::restoreError is set. The GUI or Mod/Web if a link was clicked, show a pop-up indicating
this situation.

This commit also shows an appropriate pop-up for the partialRestore when opening from the menu, that before only
appeared when opening by clicking a link.
2021-01-24 16:43:20 +01:00
Zheng, Lei
aa88c10465 App: auto create Origin in OriginGroup if copied without dependency 2021-01-24 11:56:10 +01:00
Yorik van Havre
5e800499af Merge pull request #4275 from realthunder/FixGetPartOf
App: fix Part::getPartOfObject()
2021-01-14 12:53:20 +01:00
Zheng, Lei
6b527baf6a App: fix Part::getPartOfObject()
Exclude link broght in by expressions
2021-01-12 09:45:59 +08:00
Markus Lampert
5ba83fc393 Expose PropertyEnumeration values list to python. 2020-12-31 20:06:02 -08:00
wmayer
eac4062b3f Boost: [skip ci] Fix build warnings from deprecated Boost headers (v1.75) 2020-12-29 15:34:25 +01:00
Mateusz Skowroński
98f63ba60f Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
luz paz
f497f09238 Fix typos [skip ci]
Typos ffound via `codespell v2.1.dev0`  
Also includes fixes in deprecated code of `src/Mod/Assembly`
2020-12-28 23:14:04 +01:00
luz paz
a8c3b239b8 Fix various typos [skip ci]
Found via `codespell v2.1.dev0`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-12-12 08:07:47 +01:00
wmayer
628fcedb11 App: [skip ci] in addition to PR4104 pop the diagnostic 2020-12-04 17:11:22 +01:00
Mark O'Donovan
976c7f5346 Suppress gcc warnings also in FeaturePythonPyImp.h
Clang warnings are already disabled.
2020-12-04 17:09:06 +01:00