-
Notifications
You must be signed in to change notification settings - Fork 84
Python qt3 qt56 support #43
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
…sed naming convetions
…s default like it's done in the qt based build system
PyObject_GetAttrString returns a new reference. PyDict_SetItemString does not steal a reference, so Py_DECREF should be called after PyDict_SetItemString.
This commit increments the refcount of the built-in PyInt_Type instance when creating an enum wrapper. This is necessary because PyTuple_SET_ITEM steals a reference to that instance. Fixing the refcount prevents a crash when calling Py_Finalize().
…anup() In certain situations the dealloc callback PythonQtInstanceWrapper_dealloc is called after PythonQt::cleanup() has been run. This can happen when Python destroys objects during Py_Finalize(). This commit adds a check that PythonQt is still initialized in the dealloc callback.
made name->objectName alias optional (off by default, add PYTHONQT_SUPPORT_NAME_PROPERTY to DEFINES if you need it) added py_delete() slot support for built-in delete() method git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@396 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
…king added removeSignalHandlers() git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@398 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@399 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@400 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@401 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@402 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
…clared in a base class git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@403 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
Prior to commit commontk@9c2e489, the "name" property was offered as an alias for the "objectName" property. Now, the alias is a compile-time option that is disabled by default. This commit enables the "name" property alias to maintain backwards compatibility with earlier versions.
This commit prevents crashes by handling scenarios such as: (a) object destruction after the Python interpreter has been finalized (b) object destruction after cleanup, i.e. the singleton no longer exists Any usage of a Qt enum demonstrates (a). One example that demonstrates (b) is a QTimer object which is created with a QApplication parent. PythonQt::cleanup() is called before the QApplication is completely destroyed, so the code that handles wrapping the QTimer object must handle the case when the PythonQt singleton no longer exists. Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
This commit fixes a link error building PythonQtCppTests on Windows: 1>PythonQtCppTests.obj : error LNK2001: unresolved external symbol "int __cdecl tests_PythonQtTestMain(int,char * * const)" (?tests_PythonQtTestMain@@YAHHQEAPEAD@Z) 1>C:\temp\PythonQt-build\Debug\PythonQtCppTests.exe : fatal error LNK1120: 1 unresolved externals
A sequence of calls like the following would crash in Python when reinitializing the interpreter the second time: PythonQt::init(0); ... Py_Finalize(); PythonQt::init(0); ... Py_Finalize();
This commit changes initialization of the global storage containers to be explicit instead of happening during static initialization. This makes the containers properly initialized if PythonQt is initialized and cleaned up more than once. The motivation for this change is to support testing cleanup and finalization.
Add tests that check for clean cleanup and finalization in different scenarios. Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]> Co-authored-by: Pat Marion <[email protected]>
This commit fixes a crash during PythonQt::cleanup(). While destroying the PythonQtPrivate instance, any remaining PythonQtSignalReceivers that are kept alive only by their parent object will be destroyed. The crash occurs when PythonQtSignalReceiver's destructor calls back into PythonQtPrivate::removeSignalEmitter() when the PythonQtPrivate instance is mostly destroyed. Includes test case that crashes without the fix.
Conflicts: CMakeLists.txt
@eric-h Thanks for the PR. Would it be possible to create a new branch named |
@jcfr I assume you mean patched-6 since there's no patched-7 branch in the repository. I will create a new pull request based on that branch. |
Good morning @eric-h , Since the commit was big, I wasn't sure of the original intent .. that is why I suggested Anyway, I saw you just submitted a new PR against patch-6, that is great. |
Added support for Qt >= 5.6 by removing Webkit dependency for higher QT versions. Changes for QT 5 builds in the CMakeLists.txt are still not integrated in the CTK patched-5 upstream and therefore builds with QT5 are not working.