mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
[pyqt5toqt6] Warn on compiled resource usage
This commit is contained in:
parent
b369f1e1b0
commit
c4342425eb
@ -327,6 +327,11 @@ def fix_file(filename: str, qgis3_compat: bool) -> int:
|
|||||||
for name in node.names:
|
for name in node.names:
|
||||||
if name.name in import_warnings:
|
if name.name in import_warnings:
|
||||||
print(f'{filename}: {import_warnings[name.name]}')
|
print(f'{filename}: {import_warnings[name.name]}')
|
||||||
|
if name.name == 'resources_rc':
|
||||||
|
sys.stderr.write(
|
||||||
|
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')
|
||||||
if _node.module == 'qgis.PyQt.Qt':
|
if _node.module == 'qgis.PyQt.Qt':
|
||||||
extra_imports['qgis.PyQt.QtCore'].update({'Qt'})
|
extra_imports['qgis.PyQt.QtCore'].update({'Qt'})
|
||||||
removed_imports['qgis.PyQt.Qt'].update({'Qt'})
|
removed_imports['qgis.PyQt.Qt'].update({'Qt'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user