aboutsummaryrefslogtreecommitdiffstats
path: root/tools/snippets_translate/snippets_translate.pyproject
Commit message (Collapse)AuthorAgeFilesLines
* snippets_translate: Fix the testsFriedemann Kleint2022-08-151-1/+2
| | | | | | | | | | | | Change c4a266e38fe5bdce707ad6b123fa88bb4f10dff3 broke the test by changing the function values and signature. Pick-to: 6.3 6.2 Task-number: PYSIDE-1984 Task-number: PYSIDE-2030 Change-Id: I88412f3f4398aa7fd0748d9ad3b7ba2a75cf9ff0 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* snippets_translate: Add a way of using snippets from PythonFriedemann Kleint2022-08-111-1/+1
| | | | | | | | | | | | | | Split a helper off the snippet extraction function taking the comment pattern and let it return a dict by id to make it possible to replace snippets by id. Prototypically use it for the modelview tutorial. Fixes: PYSIDE-1984 Task-number: PYSIDE-1952 Pick-to: 6.3 6.2 Change-Id: I05dbc3e36825761fe2968d6507880cd6f588682d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Long live snippets_translate!Cristian Maureira-Fredes2021-03-181-0/+3
This is not a C++ -> Python translator, but a line-by-line conversion tool. This scripts requires two arguments to identify a Qt and PySide directory including the sources. There is a set of file extensions that are currently omitted from the process, and for the ones that will be copied, there will be messages related if the file already exists or if it's new. If you use the '-v' option, you will see the C++ code and the converted Python code, so it's easy to check for issues and missing features. Also, two command line options were added to have a different behavior '--filter' to include a word to filter the full paths of all the snippets found (for example the name of a directory), and '-s/--single' to translate only a specific C++ file to be translated. Including test cases for transformations related to the C++ snippets. Fixes: PYSIDE-691 Pick-to: 6.0 Change-Id: I208e3a9139c7e84fe369a7c2ea93af240d83fa83 Reviewed-by: Christian Tismer <tismer@stackless.com>