Commit Graph

35 Commits

Author SHA1 Message Date
wmayer
38e02e6f36 App: support of method unsetupObject in Python feature classes 2023-02-12 20:01:09 +01:00
berniev
b40de7a509 remove redundant void 2022-07-31 10:27:44 +02:00
Uwe
fa36a57724 [App] remove superfluous nullptr checks 2022-07-18 03:12:01 +02:00
wmayer
749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer
68b92c504f Fix several coverity issues:
* CID 350617: Dereference after null check
* CID 350585: Out-of-bounds read
* CID 350624: Resource leak
* CID 332701: Uncaught exception
* CID 350642: Uninitialized scalar field
* CID 350590: Uninitialized scalar field
* CID 350629: Uninitialized scalar variable
* CID 350602: Uninitialized scalar variable
* CID 350564: Uninitialized scalar variable
* CID 350548: Uninitialized scalar variable
2022-03-13 12:12:49 +01:00
wmayer
9955c64752 Mod: add string header to dxf.h 2022-03-01 17:18:29 +01:00
Uwe
8bedc25344 [App] Feature: remove unused includes 2022-02-27 16:37:29 +01:00
wmayer
81267fc284 App/Gui: fix possible crash when destroying Python feature or its view provider 2021-02-17 12:00:38 +01:00
wmayer
6b2b6a4868 PyCXX: [skip ci] fix compiler warnings due to changes on PyCXX 2020-11-25 16:52:46 +01:00
luz paz
bfdffb50be App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
Zheng, Lei
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
Zheng, Lei
6663d625a9 Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
wmayer
1a2370cd91 do not use an int but an enum to handle different modes 2019-09-27 22:00:25 +02:00
Zheng, Lei
b450f5a5c8 App: improve exception handling in FeaturePython 2019-09-27 18:02:20 +02:00
Zheng, Lei
0f29155502 App/Gui: unify NotImplementedError handling in python features
Recognize NotImplementedError as an indication to call the C++
implementation.
2019-09-27 18:01:54 +02:00
wmayer
503f987cf6 Add virtual method allowOverrideViewProviderName to DocumentObject to indicate if a DocumentObject's view provider type can be overriden.
For most object types this is not allowed to avoid to create incompatible combinations via Python or manipulated project files and possibly provoke crashes.

For more details see also: https://forum.freecadweb.org/viewtopic.php?f=10&t=38970&p=333951#p333951
2019-09-14 00:52:09 +02:00
Zheng, Lei
08f0511b1f Python feature/observer related changes
* Add new API and signal handler in document observer

* Pre initialize python handler function to improve performance. In
  case Python code use dynamic patching, i.e. add class method at
  runtime (which is rare and should be discouraged), the python feature
  can be re-initialized by simply assign proeprty Proxy again.

* Add property tracking in DocumentObjectT

* WidgetFactory adds support for accepting python QIcon, which is used
  by ViewProviderPythonFeature
2019-08-17 15:08:34 +02:00
wmayer
aa0f6b54d4 fixes #0003424: 'basic_string::_M_construct null not valid' when opening a v0.16 project with v0.17 2018-04-10 10:51:34 +02:00
Eivind Kvedalen
2ae1313975 Moved ObjectStatusLocker template class to Base/Tools.h 2017-11-30 16:28:41 +01:00
wmayer
3b957a12b5 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
033242ead8 protect document against nested recomputes
+ convert ObjectStatusLocker into a template class to make its usage more flexible
+ add status flag 'Recomputing' and set in Document::recompute to detect and avoid nested calls of recompute
2017-07-17 18:24:10 +02:00
wmayer
2a145a12e1 expose recompute() of document object to Python 2016-11-19 16:24:11 +01:00
wmayer
76279882da move handling of dynamic properties from FeaturePythonPyT to DocumentObjectPy 2016-11-09 16:09:21 +01:00
wmayer
061c67cbf8 + expose onDocumentRestored to Python feature classes 2016-01-05 19:05:48 +01:00
wmayer
e7a3dc48e8 + support of Python feature classes without an execute() method
+ if execute() method of Python feature is missing or if it returns false call the execute() method of the C++ feature
+ fix SketchObjectPython
2015-10-21 00:22: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
73859191f3 + exposing onBeforeChange to Python 2014-12-01 10:58:25 +01:00
wmayer
5c269996b8 + restore lost changes, improve whitspaces, suppress useless MSVC warnings 2014-08-28 12:37:42 +02:00
jriegel
c1f0f70b88 Merge remote-tracking branch 'refs/remotes/origin/jriegel/NewWinBuild' into jriegel/review-NewLibPack
Conflicts:
	src/3rdParty/salomesmesh/CMakeLists.txt
2014-08-27 15:39:00 +02:00
wmayer
cc775f9254 + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
jriegel
d65a4e4ed7 some type clearification 2014-08-21 17:59:33 +02:00
wmayer
946bd02df4 Improve reporting of Python exceptions 2013-05-04 14:23:53 +02:00
wmayer
ce0e6e5cef Make FeaturePython Python binding a template class to avoid code duplication 2013-03-22 00:34:18 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00