-
Notifications
You must be signed in to change notification settings - Fork 84
[patched-9] Backport recent changes from MeVisLab/pythonqt
#87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…es support for kwargs in slots. (cherry picked from commit MeVisLab/pythonqt@b6bc063)
…nd QFontMetrics These are needed when these types are returned by value (as for example from QWidget) (cherry picked from commit MeVisLab/pythonqt@04e2c1b)
(cherry picked from commit MeVisLab/pythonqt@e4cb206)
This prevents `file not found with <angled> include; use "quotes" instead` errors. (cherry picked from commit MeVisLab/pythonqt@b58b776)
With Python 3.8, python3-config --libs doesn't contain the python link target. To avoid link issues, we first test if the python config utility accepts the '--embed' parameter and use the output when possible. Fixes: issue#6 (cherry picked from commit MeVisLab/pythonqt@8ea8264)
The last element was not deleted even when it is the single one in the list. (cherry picked from commit MeVisLab/pythonqt@0158ffb)
The problem was that the "with" statement doesn't use the conventional __getattr__ access, but directly accesses the tp_dict of the type, which usually is empty in PythonQt, so we had to put the __enter__ and __exit__ methods there, too. And for binding the methods to the instance, tp_descr_get was used in this case, so we had to implement that for slots, too. Discussed with and reviewed by Florian Link (cherry picked from commit MeVisLab/pythonqt@d13b66c)
…r QMutexLocker, QReadLocker, and QWriteLocker (cherry picked from commit MeVisLab/pythonqt@0e6a9b1)
…tnote references. (cherry picked from commit MeVisLab/pythonqt@3f8a1d1)
… they can't be instantiated (cherry picked from commit MeVisLab/pythonqt@87362b4)
(adapted from commit MeVisLab/pythonqt@525ea41) Since the changes to "src/PythonQt.cpp" are reverted through e01fe14 (Revert "More potential leak fixes and build fix"), this commit only backports the changes to "build/python.prf".
… python.prf, add rpath (cherry picked from commit MeVisLab/pythonqt@383fb8e)
(cherry picked from commit MeVisLab/pythonqt@8230e72)
(cherry picked from commit MeVisLab/pythonqt@d0ca7a1)
This could happen if the signal target was removed in the callback, which could lead to an invalid signalId being returned. I guess this could lead to the signal receiver destroyed out of turn. (cherry picked from commit MeVisLab/pythonqt@b5a88e1)
…rk for Qt 5 QUrl::FormattingOptions has the peculiar situation that it actually consists of values from QUrl::UrlFormattingOption and QUrl::ComponentFormattingOption. It seems the moc doesn't support this situation, so at least support the UrlFormattingOption values. (I left the old entry in to support Qt 4, but I don't know if PythonQt even still works with Qt 5) (cherry picked from commit MeVisLab/pythonqt@58ccd53)
This fixes a warning in Visual Studio 2019 ≥16.6 in C++14/17 mode (and error in C++ 20 mode) (cherry picked from commit MeVisLab/pythonqt@fa274d2)
(cherry picked from commit MeVisLab/pythonqt@8137f1f)
for QVariant::ByteArray (cherry picked from commit MeVisLab/pythonqt@fb16d6e)
…balShouldAllowThreads() (commontk#65) (cherry picked from commit MeVisLab/pythonqt@b7c1512)
- trying with -std=c++98 failed with a lot of various errors (cherry picked from commit MeVisLab/pythonqt@2a24a2b)
…path (cherry picked from commit MeVisLab/pythonqt@8e69c65)
…ython (adapted from MeVisLab/pythonqt@c00ebf4d6 (Replace NULL with nullptr))
(cherry-picked and adapted from MeVisLab/pythonqt@c00ebf4) It replaces occurrences of NULL with nullptr, switches from usage of "0" to nullptr where a pointer is expected and fixes indentation of comments in type structure (e.g PythonQtSlotFunction_Type) It replaces comment "/* tp_print */" with "/* tp_vectorcall_offset */". Starting with Python 3.0, the slot was unused. Then it was renamed in Python 3.8 to support the new "vectorcall" protocol. See https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_vectorcall_offset and https://peps.python.org/pep-0590/#changes-to-the-pytypeobject-struct It resolves conflicts in PythonQt.cpp maintaining changes introduced in this fork.
- uses global includes where needed (cherry picked from commit MeVisLab/pythonqt@2a761ea)
- remove unused variable (cherry picked from commit MeVisLab/pythonqt@17cf766)
- add missing check (cherry picked from commit MeVisLab/pythonqt@8f02ebb)
- on async signal handlers (originally provided by @usiems) (cherry picked from commit MeVisLab/pythonqt@575c51f)
…re safe - patch as proposed by Florian Link (cherry picked from commit MeVisLab/pythonqt@92af018)
- provided by Florian Link (cherry picked from commit MeVisLab/pythonqt@89983a0)
(cherry picked from commit MeVisLab/pythonqt@eca4f5c)
…h "const" (cherry picked from commit MeVisLab/pythonqt@c0dcb99)
since that better matches the actual behavior (cherry picked from commit MeVisLab/pythonqt@61c6557)
(cherry picked from commit MeVisLab/pythonqt@b059614)
Since the enum values can be duplicates (they only need to be unique in the scope of the enum class) I opted to prefix them with the enum class name (and an underscore) in the generated wrapper. It would have been nice to use a Python Enum class instead, but after a quick look this seemed to be quite a lot of work. (cherry picked from commit MeVisLab/pythonqt@c707bcc)
(cherry picked from commit MeVisLab/pythonqt@f88bbbb)
The resulting enumValueRedirection was not used in the PythonQt generator. Perhaps it was a remnant of the original Java wrapper generator. (cherry picked from commit MeVisLab/pythonqt@4c61ee7)
… private obviously copying the object is explicitly prohibited (cherry picked from commit MeVisLab/pythonqt@f6f00fe)
…o handle this (cherry picked from commit MeVisLab/pythonqt@2b6f1ce)
(in this case assignment operators of QEvent-derived classes in Qt6) (cherry picked from commit MeVisLab/pythonqt@65f9210)
(cherry picked from commit MeVisLab/pythonqt@0eda5bf)
… the argument type (cherry picked from commit MeVisLab/pythonqt@051d222)
…for QPagedPaintDevice (cherry picked from commit MeVisLab/pythonqt@c421c83)
(cherry picked from commit MeVisLab/pythonqt@0ed126d)
(cherry picked from commit MeVisLab/pythonqt@652a1fa)
… classes, rather re-create enum class as a enum class, and later handle enum classes in PythonQt itself. (cherry picked from commit MeVisLab/pythonqt@19cc4c2)
…List<QString>* (cherry picked from commit MeVisLab/pythonqt@6f81c9a)
(cherry picked from commit MeVisLab/pythonqt@84976a0)
(cherry picked from commit MeVisLab/pythonqt@9674bee)
Related to: @jamesobutler this is complementary to the integration of the generated 5.15 wrappers. |
Is there a reason to backport all these commits onto the existing |
Few days ago, I was initially backporting selected commits and ended up integrating them all. It was also the opportunity to review all the ones updating PythonQt library and identify the one I still need to upstream. |
I can try this branch in the context of 3D Slicer. Have you done this already? One change I needed to do when I initially brought |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcfr I have tested this branch in the context of 3D Slicer and I am facing the same crash on exit that I was observing in my work. With jamesobutler@baca87f added onto this branch, 3D Slicer no longer crashes on exit.
This is a follow-up to commontk@4c8d5c1.
Meticulous backport of all recent changes introduced in https://github.com/MeVisLab/pythonqt/
Commit impacting only the PythonQt library are prefix with
[Backport]
the one impacting only the generator are prefixed with[Backport generator]
.Changes related to the GitHub workflow continuous integration have not been backported.