Commit Graph

750 Commits

Author SHA1 Message Date
luz paz
45eea3d9e7 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,./build/doc/SourceDocu
```
2021-02-03 14:08:57 +01:00
Mateusz Skowroński
2559f2d29c 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
wmayer
a152cd2d96 Py: [skip ci] replace PyList_Append with Py::List::append 2020-12-13 16:44:14 +01:00
donovaly
0baabcaa45 [TD] fix unit mismatch bug
- also make global decimal option italic since it only affects new dimensions
- also fix a typo in UnitsApi.h
2020-12-03 15:50:06 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
b7f9e351c5 Win: [skip ci] check if NOMINMAX is already defined before setting it 2020-11-11 13:34:42 +01:00
wmayer
0d27ad18ca Base: [skip ci] fix several -Wunused-parameter warnings 2020-11-06 08:15:44 +01:00
wmayer
36bece9925 Base: [skip ci] fix several -Wunused-parameter warnings 2020-11-06 08:14:00 +01:00
wmayer
0371a67dae Base: [skip ci] expose Type::createInstance and Type::createInstanceByName to Python 2020-10-29 17:18:10 +01:00
wmayer
8ffbabb605 Py3: suppress warnings about un-initialized/deprecated tp_print slot 2020-10-18 14:45:31 +02:00
wmayer
01af171a31 macOS: [skip ci] suppress some more Py3.8 warnings, suppress warnings about deprecated OpenGL API 2020-10-17 23:53:47 +02:00
wmayer
3430adda72 Py3: [skip ci] fix warning: missing field 'tp_print' initializer [-Wmissing-field-initializers]
This warning is only specific to Py3.8. See https://docs.python.org/3/c-api/typeobj.html
2020-10-15 15:25:42 +02:00
luz paz
b0d7850406 Fix various typos [skip-ci]
Found via `codespell v2.0.dev0`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,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-10-08 18:21:15 +02:00
wmayer
39cd29c0d7 Part: [skip ci] include OCC hesder to PCHs, fix compiler warning when trying to delete void pointer 2020-09-28 20:23:33 +02:00
wmayer
afd6f39197 Base: [skip ci] allow to replace twin object of PyObjectBase 2020-09-28 11:21:20 +02:00
wmayer
6199fbb25e Base: [skip ci] Coverity: Uncaught exception 2020-09-14 18:34:25 +02:00
wmayer
34c11fcc63 Base: Py2 related fix 2020-09-04 19:02:29 +02:00
wmayer
1c91c1287e Base: [skip ci] Various fixes in InterpreterSingleton::runStringWithKey:
+ fix memory leak (localDictionary) by replacing C API with PyCXX
+ don't write the whole code as error message if an error occurs. Python raises an exception with all relevant information for debugging
2020-09-04 09:58:21 +02:00
mwganson
df0204466e [CheckGeometry] fix segfault, reformat output with lower case, use try/except to check for runtime python errors and fall back on OCCT method if script failed. 2020-09-03 12:09:38 +02:00
mwganson
b553ebe48b [check geometry] decrement some pyobject references 2020-09-03 12:09:38 +02:00
mwganson
9bb3b0e046 [CheckGeometry] fix python2 build 2020-09-03 12:09:38 +02:00
mwganson
1b8a410d29 [CheckGeometry] fix py2 build failure 2020-09-03 12:09:38 +02:00
mwganson
dc3befbff3 [CheckGeometry] update a source code comment 2020-09-03 12:09:38 +02:00
mwganson
a4e38baeb3 [CheckGeometry] add new shapecontent builder instead of OCCT's to correct some errors in OCCT's values and to add for some more advanced information, e.g. volume or area, add new method to Base::Interpreter runStringWithKey() -- allows to run a python script and get a string return value 2020-09-03 12:09:38 +02:00
wandererfan
e989b5f7a4 [Base]use degree symbol in Imperial schemes 2020-08-29 11:13:35 -04:00
Bernd Hahnebach
7852957623 Base: add new unit schema for mm and N for use in FEM 2020-08-07 19:19:44 +02:00
wmayer
0dff8a6618 Base: [skip ci] add class ViewOrthoProjMatrix for orthogonal projections in 3d 2020-08-07 13:06:06 +02:00
wmayer
cd5341001e remove superfluous includes of iostream, use iosfwd instead 2020-07-28 15:22:23 +02:00
wmayer
767b2787c1 LGTM: [skip ci] remove some obsolete FIXME comments from source code 2020-07-28 09:49:20 +02:00
wmayer
5a2d0633b8 LGTM: [skip ci]: Ambiguously signed bit-field member
Until C++11 bit fields with integral types should have explicit signedness only.
It is implementation specific whether an -typed bit field is signed, so there could be unexpected sign extension or overflow.

This means that if depending on the compiler int32_t is not explicitly defined as signed the UnitSignature structure may not work
as expected. Since C++14 this has changed and an int of a bit-field is always signed:
https://stackoverflow.com/questions/33723631/signed-bit-field-in-c14
2020-07-27 16:00:47 +02:00
wmayer
3b0eeb63e8 LGTM: [skip ci] fix: Inconsistent definition of copy constructor and assignment ('Rule of Two')
Remove user-defined copy constructor of Exception classes without assignment operator
2020-07-27 13:47:41 +02:00
wmayer
eff0655d83 LGTM: [skip ci] fix: Wrong type of arguments to formatting function 2020-07-24 19:58:48 +02:00
wmayer
410e65ce2f Coverity: Suppress false-positives 2020-07-20 17:34:28 +02:00
wmayer
43d9e82f97 Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
12670655a9 Coverity: Uninitialized scalar variable 2020-07-20 17:34:23 +02:00
wmayer
ab8f06d9ab PVS: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. 2020-07-18 10:59:27 +02:00
Cyril Waechter
7b897e06fd Fix comment in Quantity.cpp 2020-07-11 19:37:47 +02:00
wmayer
2b5ef38a86 Base: fix build failure for Py2 2020-06-30 10:27:53 +02:00
wmayer
864555bc93 Base: let PyStreambuf figure out if String or Bytes object must be written to file 2020-06-29 18:04:32 +02:00
wmayer
daec778694 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
wmayer
c23a1f6edd Base: [skip ci] include sstream in swigpyrun source files 2020-06-20 11:28:48 +02:00
wmayer
70b2d49550 Gui: [skip ci] fix Gui.subgraphFromObject and improve error text if wrapping fails 2020-06-19 15:07:57 +02:00
wmayer
ce7c3a4213 replace use of deprecated function ftime with gettimeofday 2020-06-12 17:51:33 +02:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
3f212ad8ac Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
fdc07cb6c9 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-08 14:40:00 +02:00
wmayer
b0e92abcb5 Base: [skip ci] in XMLReader class replace assert(0) calls with throwing an XMLAttributeError exception 2020-06-07 14:24:46 +02:00
wmayer
ae641dc527 Python: [skip ci] tp_print slot has been replaced with tp_vectorcall_offset in Py3.8 2020-06-07 12:53:47 +02:00
wmayer
24bb210a0c Python: [skip ci] change order of supported arguments in UnitPy::PyInit 2020-05-27 22:03:05 +02:00
wmayer
ff3cdfaf74 Python: [skip ci] exception handling in PyInit to avoid to close application 2020-05-26 22:55:07 +02:00