Description
I went through the typesystem XML files and extract
the code inside "inject-code" tags which is not
stored on templates, and put them on a main directory
called glue on the top of the modules sources.
Having all these pieces of code on cpp files allows us
to not have to modifying C++ code inside XML files,
which is quite tedious considering that one need to escape
some symbols.
The following typesystems were reviewed:
- QtCore
- QtGui
- QtWidgets
Besides looking into the typesystem of the other modules
we can consider transforming some templates into a separate
file.
We need to take care that in some cases we use templates
modifying their parameters, so I don't know if that is
possible having the source of the template on a separate
cpp file.
Pending tasks:
- Review missing modules
- Analyze how convenient it's to extract some static templates too
Attachments
For Gerrit Dashboard: PYSIDE-834 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
242557,18 | Move inject-code snippets to separate files | 5.12 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
243101,6 | Add snippet extraction to shiboken | 5.12 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
243216,4 | shiboken: Use class FileOut for the module source file as well | 5.12 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
243248,2 | shiboken/ApiExtractor tests: Use qrc files for test resources | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
246355,3 | shiboken: Add debug output for function modifications | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
246357,5 | shiboken: Fix file snippet code missing for derived classes | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
246419,3 | shiboken: Add file snippet handling to native-to-target and add-conversion | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
246876,4 | Move add-conversion and native-to-target code | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
246881,8 | Move old glue code to snippets files | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
247041,2 | Move code to snippets and templates | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |