Feature description
pyqt5_to_pyqt6.py does return an error exit code if it alters (or would alter) files. This can be used as an indicator that the current code base is known to not be Qt6 compatible.
This is used by e.g. https://gitlab.com/Oslandia/qgis/pyqgis-4-checker to check merge requests in CI.
The script does have some more knowledge though, which currently is only logged as a warnings but not communicated as error exit code:
|
import_warnings = { |
|
"QRegExp": "QRegExp is removed in Qt6, please use QRegularExpression for Qt5/Qt6 compatibility" |
|
} |
|
if name.name in import_warnings: |
|
logging.warning(f"{filename}: {import_warnings[name.name]}") |
|
if name.name == "resources_rc": |
|
logging.warning( |
|
f"{filename}:{_node.lineno}:{_node.col_offset} - WARNING: support for compiled resources " |
|
"is removed in Qt6. Directly load icon resources by file path and load UI fields using " |
|
"uic.loadUiType by file path instead.\n" |
|
) |
It would be great if those too would result in error exit codes so that automatic testing could catch them more easily.
Additional context
No response
Feature description
pyqt5_to_pyqt6.py does return an error exit code if it alters (or would alter) files. This can be used as an indicator that the current code base is known to not be Qt6 compatible.
This is used by e.g. https://gitlab.com/Oslandia/qgis/pyqgis-4-checker to check merge requests in CI.
The script does have some more knowledge though, which currently is only logged as a warnings but not communicated as error exit code:
QGIS/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py
Lines 189 to 191 in 6de6436
QGIS/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py
Lines 435 to 442 in 6de6436
It would be great if those too would result in error exit codes so that automatic testing could catch them more easily.
Additional context
No response