ENH: Update CTK to include new PythonQt C++/Python ownership tracking feature
This will allow to greatly simplify python code by avoiding the need to
explicitly keep reference to object that are expected to be own by cpp.
From updated Python Qt documentation:
8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----
Source: PythonQtDoc.h
Ownership Ownership management
In PythonQt, each wrapped C++ object is either owned by Python or C++.
When an object is created via a Python constructor,
it is owned by Python by default. When an object is returned from a
C++ API (e.g. a slot), it is owned by C++ by default.
Since the Qt API contains various APIs that pass the ownership from/to
other C++ objects, PythonQt needs to keep track of
such API calls. This is achieved by annotating arguments and return
values in wrapper slots with magic templates:
- PythonQtPassOwnershipToCPP
- PythonQtPassOwnershipToPython
-
PythonQtNewOwnerOfThis
These annotation templates work for since C++ pointer types. In addition
to that, they work for QList<AnyObject*>, to pass the ownership for each
object in the list.
8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----
$ git shortlog e771b4a..fd3a2b1 --no-merges
Jean-Christophe Fillion-Robin (1):
Update to PythonQt 3.0
Marco Nolden (1):
Make BuildUrl more robust for file urls
Sascha Zelzer (3):
Correctly rethrow exceptions and improve error messages.
Fix regression making sure the Qt4 moc considers target include paths.
Introduced another framework option for controlling the plugin start options.
git-svn-id: http://svn.slicer.org/Slicer4/trunk@24228 3bd1e089-480b-0410-8dfb-8563597acbee |