aboutsummaryrefslogtreecommitdiffstats
path: root/tools/snippets_translate/handlers.py
Commit message (Collapse)AuthorAgeFilesLines
* snippets_translate: Do not crash on multi-line emit statementsFriedemann Kleint2021-04-161-1/+8
| | | | | | | | | | | qtbase/0e69349f6f8e9445877ea5b2105973115ad79cf7 introduced a multi-line emit statement, causing snippets_translate to fail. Add a warning message which then shows: snippets_translate: Warning "emit renderedImage(result, resultSize," does not match function call Change-Id: Id27770eab1e60d7828e7d742e63d1de2d530ad02 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Long live snippets_translate!Cristian Maureira-Fredes2021-03-181-0/+519
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>