Commit Graph

734 Commits

Author SHA1 Message Date
wmayer
a51d2bab99 Base: Py2 related fix 2020-09-04 19:02:29 +02:00
wmayer
6f7118850b 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
69f43d7bf3 [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
720668a7a5 [check geometry] decrement some pyobject references 2020-09-03 12:09:38 +02:00
mwganson
cf9118d249 [CheckGeometry] fix python2 build 2020-09-03 12:09:38 +02:00
mwganson
179d687f0e [CheckGeometry] fix py2 build failure 2020-09-03 12:09:38 +02:00
mwganson
3c19765c37 [CheckGeometry] update a source code comment 2020-09-03 12:09:38 +02:00
mwganson
ed3ff7db5e [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
4c233cd9e9 [Base]use degree symbol in Imperial schemes 2020-08-29 11:13:35 -04:00
Bernd Hahnebach
0c9e6c6158 Base: add new unit schema for mm and N for use in FEM 2020-08-07 19:19:44 +02:00
wmayer
6f2b33381e Base: [skip ci] add class ViewOrthoProjMatrix for orthogonal projections in 3d 2020-08-07 13:06:06 +02:00
wmayer
adf662b13d remove superfluous includes of iostream, use iosfwd instead 2020-07-28 15:22:23 +02:00
wmayer
41ca54de70 LGTM: [skip ci] remove some obsolete FIXME comments from source code 2020-07-28 09:49:20 +02:00
wmayer
826de6beff 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
9367e73e92 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
57d23463b1 LGTM: [skip ci] fix: Wrong type of arguments to formatting function 2020-07-24 19:58:48 +02:00
wmayer
5f0b6714b4 Coverity: Suppress false-positives 2020-07-20 17:34:28 +02:00
wmayer
1a34d3da1f Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
5a45efd5f9 Coverity: Uninitialized scalar variable 2020-07-20 17:34:23 +02:00
wmayer
94dbcc83ce PVS: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. 2020-07-18 10:59:27 +02:00
Cyril Waechter
b926149363 Fix comment in Quantity.cpp 2020-07-11 19:37:47 +02:00
wmayer
d2fd870e44 Base: fix build failure for Py2 2020-06-30 10:27:53 +02:00
wmayer
9eb5a90d94 Base: let PyStreambuf figure out if String or Bytes object must be written to file 2020-06-29 18:04:32 +02:00
wmayer
4b8cf63c14 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
wmayer
9f9ee6d89e Base: [skip ci] include sstream in swigpyrun source files 2020-06-20 11:28:48 +02:00
wmayer
3ca859acf7 Gui: [skip ci] fix Gui.subgraphFromObject and improve error text if wrapping fails 2020-06-19 15:07:57 +02:00
wmayer
29fb43110b replace use of deprecated function ftime with gettimeofday 2020-06-12 17:51:33 +02:00
wmayer
c8dae9eb85 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
88fd77b31d 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
9d62da9c8f Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-08 14:40:00 +02:00
wmayer
21ca6c862d Base: [skip ci] in XMLReader class replace assert(0) calls with throwing an XMLAttributeError exception 2020-06-07 14:24:46 +02:00
wmayer
4742d035f0 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
4538963192 Python: [skip ci] change order of supported arguments in UnitPy::PyInit 2020-05-27 22:03:05 +02:00
wmayer
147b8404b4 Python: [skip ci] exception handling in PyInit to avoid to close application 2020-05-26 22:55:07 +02:00
qingfengxia
c6364c823a Base: add VolExpansionCoeff and complete KinematicViscosity unit 2020-05-23 00:03:09 +02:00
wmayer
5ece278c94 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
wmayer
3f9e53b9a5 Gui: [skip ci] implement function to rename parameter group 2020-05-01 22:47:30 +02:00
wmayer
70f9ab83ad Base: [skip ci] Parameter Editor: Rename group creates new group 2020-05-01 20:08:43 +02:00
wmayer
a5fbf61dea Base: [skip ci] support of spheres in InventorBuilder 2020-04-08 18:01:13 +02:00
Eric Trombly
56769f1a27 change isOnLine to isOnLineSegment 2020-04-06 06:34:53 -05:00
Eric Trombly
f210d71f18 remove sleep calls, change some for loops to list comp, move isPointOnLine to base vector 2020-04-06 06:34:53 -05:00
luz.paz
ae72e2c762 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
e14e5b845e [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
wmayer
8451cb332a Part: [skip ci] support of expressions of Euler angles in attachment dialog 2020-03-21 14:27:53 +01:00
wmayer
5bfef75696 Base: [skip ci] add method to more easily set the Python error indicator from a Base::Exception 2020-03-18 17:53:13 +01:00
wmayer
18e3be01eb CMake: use XercesC_LIBRARIES to store debug and release version of xerces 2020-03-16 12:24:40 +01:00
wmayer
9415e7b6da Base: [skip ci] implement method Quantity.toStr() to control string representation 2020-02-29 22:51:55 +01:00
wmayer
ea6ed77b3e Base: [skip ci] improve repr() for quantity
https://forum.freecadweb.org/viewtopic.php?f=10&t=43718
https://forum.freecadweb.org/viewtopic.php?f=10&t=43431&p=369556#p369575
2020-02-29 00:20:21 +01:00
plgarcia
59269207b4 Change backup policy
1 - Reports the error to the user in a popup.
2 - Names of the backups include the timstamp instead of a number. Names have more sense and the files can be sorted by names what is also the age order.
3 - Behaviors when changing configuration improved, the number of files present on the system was not reduced when reducing the number of backups or backups deactivated.
2020-02-24 23:06:26 +01:00
wmayer
f9cc8b143a Base: [skip ci] support of __round__ of QuantityPy 2020-02-16 21:50:06 +01:00