Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
-
add66c6f9 (dev), b7d75f876 (dev), f6d11df94 (dev), 59665b29c (6.6), 7604b5080 (6.6), 113eaeff4 (6.6), 25a64e5ea (dev), 5e9d6b166 (6.6), 18ba7a9af (dev), bd67a7e8c (6.6), 738d19531 (dev), 9d3526714 (6.6)
Description
This is a request for the following features to be added to Qt for Python
print(ptr): returns something more understandable and appealing than the "ameopen_headless_direct_py.QSharedPointer_ameopen_API object at 0x0000011A7CEA3780>".
Something like "ameopen_headless_direct_py.QSharedPointer<ameopen.API> object at 0x000001A07D63FCC0", or be configurable in the typesystem to print what we want (with keywords to get each part of the pointer: pointed type (without mangling), pointer type, pointer address, etc.
dir() show the data() function of the shared pointer (at least because useful in some cases) + all the functions of the pointed instance (because it can be a derived type, it is important to show the functions of that derived type and not of the initial type of the shared pointer).
In summary, it should return: list(set(dir(ptr) + dir(ptr.data())))
Attachments
Gerrit Reviews
For Gerrit Dashboard: PYSIDE-2462 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
505445,2 | WIP: Repro for smartptr rep | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
511074,1 | WIP: Remove smartpointer getter call | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
505017,13 | shiboken6: Split out generator strings | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
505446,11 | shiboken6: Split out smart pointer code from CppGenerator | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
505447,14 | Add a __repr__ function for smart pointers | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
505568,9 | shiboken6: Refactor generation of the __copy__ function | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
505575,11 | Add a __dir__ function for smart pointers | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
507640,2 | shiboken6: Split out generator strings | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
507663,2 | shiboken6: Split out smart pointer code from CppGenerator | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
508177,2 | shiboken6: Refactor generation of the __copy__ function | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
508674,2 | Add a __repr__ function for smart pointers | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
509493,3 | Potential fix for a linker error on macOS Sonoma | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
509642,2 | Potential fix for a linker error on macOS Sonoma | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
509994,2 | Add a __dir__ function for smart pointers | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |