mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
2to3:
* add fixes * pyqt fixer: include some QtSql symbols and remove imports which only symbol was removed (eg. SIGNAL)
This commit is contained in:
parent
d161612bd2
commit
d25c253d87
@ -344,6 +344,18 @@ MAPPING = {
|
||||
"QSvgGenerator"
|
||||
]),
|
||||
],
|
||||
"PyQt4.QtSql": [
|
||||
("PyQt.QtSql", [
|
||||
"QSqlDatabase",
|
||||
"QSqlQuery",
|
||||
"QSqlField"
|
||||
]),
|
||||
],
|
||||
"PyQt4.uic": [
|
||||
("PyQt.uic", [
|
||||
"loadUiType",
|
||||
]),
|
||||
],
|
||||
"PyQt4": [
|
||||
("PyQt", [
|
||||
"QtCore",
|
||||
@ -451,6 +463,8 @@ class FixPyqt(FixImports):
|
||||
mod_member.replace(Name(new_name, prefix=pref))
|
||||
elif new_name == '':
|
||||
self.cannot_convert(node, "This is an invalid module element")
|
||||
else:
|
||||
node.remove()
|
||||
|
||||
# Multiple members being imported
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user