Commit Graph

71 Commits

Author SHA1 Message Date
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
Christian Cornelssen
299368b1b2 Workaround for messy SHIBOKEN_MICRO_VERSION definition.
I recently upgraded to `shiboken2-5.14.2.1`, and this broke preprocessing of
`src/Gui/WidgetFactory.cpp` because `SHIBOKEN_MICRO_VERSION` is now defined as
`2.1` (WTF?!), making it a floating-point literal which the preprocessor does
not like. It is only used for version comparison with `5.12.0`, so replacing
`SHIBOKEN_MICRO_VERSION` with `0` should be OK.
2020-04-28 18:50:13 +02:00
wandererfan
5823fdaf8e [GUI]Add PySide unwrapper for QGraphicsItem 2020-03-12 07:58:38 -04:00
wmayer
71dae0e639 handle some more warnings: -Wkeyword-macro -Wdeprecated-declarations -Wextra-semi 2019-11-18 11:56:08 +01:00
wmayer
44dc1e2c46 make PySideUicModule working independent of linking PySide or loading it at runtime 2019-09-07 13:40:04 +02:00
Zheng, Lei
732a2ee55a Gui: fix PythonWrapper::fromQIcon() 2019-08-30 15:47:39 +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
b3e5fe56ce use shiboken version number to check for existence of Shiboken::ObjectType::typeForTypeName 2019-08-02 16:31:13 +02:00
wmayer
6ab7d261cc fix regression of previous commit and implement an alternative way to avoid MSVC compiler bug 2019-08-02 00:25:32 +02:00
wmayer
b23589d6af avoid including bitset header and Qt 5.12's qfloat16.h in the same compilation unit
Hints: qfloat16.h is included through PySide2 headers
       There is a compiler bug in VS 2017 so that the build stops (https://bugreports.qt.io/browse/QTBUG-72073)
2019-08-01 20:01:33 +02:00
wmayer
933ed45e1a code simplification in PythonWrapper 2019-06-22 14:32:50 +02:00
wmayer
cabb733968 issue #0003984: Creating a Path Job object fails with 'PySide2.QtWidgets.QDialog' object has no attribute 'templateGroup' 2019-06-22 12:32:36 +02:00
wmayer
cd74f2e929 py3/py2: use exec as function 2019-05-10 17:15:33 +02:00
Mateusz Skowroński
317bcd59c9 Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
wmayer
2004653fe4 check for existence of PySide stuff when defining convertWrapperToQuantity 2018-10-24 23:12:59 +02:00
wmayer
36029e96d6 restore shiboken wrapper for Base::Quantity 2018-10-24 22:27:59 +02:00
wmayer
0c63ab4234 remove unused shiboken wrapper for Base::Quantity 2018-10-16 19:31:33 +02:00
Michal Ulianko
faf8834484 py3.7 fix
PyUnicode_AsUTF8() returns const char* in py3.7 instead of char*. Making
changes to reflect that which should also be safe in
other Python versions.
2018-09-01 22:44:39 +02:00
wmayer
e701f75c25 generic wrapper/unwrapper for PySide and PyQt classes 2018-08-18 22:12:00 +02:00
luz.paz
420c2d7c03 Source typos fixes 2018-05-11 10:02:56 -03:00
wmayer
840c9e8b3c prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
Daniel Rogers
2b1012f706 Add missing const_cast
I missed a const_cast and a pointer dereference when inlining the
code from shiboken2
2018-01-24 17:51:42 +01:00
Daniel Rogers
6ce8e1a0ae Fix compliation against shiboken2 head
shiboken2 changed type conversion and removed a wrapper.
This just deleted the class definition that is not longer valid and inlines
code in a few places.

fixes #3287
2018-01-24 17:51:42 +01:00
Unknown
a8ecffb652 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
3b957a12b5 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
5f54fc0298 py3: fix several crashes 2017-06-04 11:12:53 +02:00
Yorik van Havre
4f044dcbe4 py3: Gui: files P-Z ported to python3 2017-05-06 20:11:31 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
2f66ff6929 wrapper for QVariant <> Base::Quantity <> PyObjectWrapper 2017-01-15 15:24:04 +01:00
wmayer
816336ce65 register Quantity type for shiboken2, handle exception to fix abort when setting quantity property of InputField via Python 2016-12-30 22:51:17 +01:00
wmayer
b16fbcd4ee implement getWrapperName to get class name with shiboken wrapper 2016-12-30 16:52:59 +01:00
wmayer
e770b0c146 comment out unused global functions, fix -Wconstant-logical-operand 2016-12-30 14:38:49 +01:00
wmayer
efe14610b7 fix & suppress warnings of generated code 2016-12-30 13:31:31 +01:00
wmayer
239e824334 make some PySide2 specific changes 2016-12-24 17:55:00 +01:00
wmayer
0c3f52303d switch to PySide2 for Qt5 2016-12-24 15:33:15 +01:00
maurerpe
657ac1f569 Update for PyQt5.
This change is Qt5 specific.
2016-12-24 15:33:15 +01:00
wmayer
87f2866884 Linux specific Qt5 port 2016-12-13 19:47:32 +01:00
wmayer
d259aa0784 issue #0002744: FR: check box to export STEP w/without pcurves 2016-10-22 19:44:11 +02:00
wmayer
21260aea61 extend creation of preferences pages from Python 2016-10-22 16:48:02 +02:00
wmayer
27cf73acab suppress warning caused by shiboken header file with gcc 2016-10-02 20:13:02 +02:00
wmayer
c48a9bfead fix -Wunused-parameter 2016-09-23 16:37:12 +02:00
wmayer
40c79f18e4 fix msvc problems 2016-09-21 22:14:09 +02:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
ab525189bf Coverity issues:
129097
129098
129099
129101
129102
129132
129134
129203
2016-08-16 16:34:51 +02:00
Mateusz Skowroński
4ef8c9707f Qt5 compatibility changes.
QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
QChar::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().

This change is Qt4/Qt5 neutral.
2016-02-14 08:23:00 +01:00
wmayer
173f19eff4 + move handwritten Python classes to PyCXX 2016-01-27 18:07:48 +01:00
Mateusz Skowroński
7d0e892d36 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
d5c074f80d QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
wmayer
36dd6946a9 + fix clang warnings 2015-10-02 23:32:01 +02:00