mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] use cmp_to_key to ensure Python3 compatibility
Conflicts: python/plugins/processing/gui/wrappers.py
This commit is contained in:
parent
e04780a279
commit
b2fd1a4560
@ -30,6 +30,7 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import locale
|
||||
import os
|
||||
from functools import cmp_to_key
|
||||
|
||||
from qgis.core import QgsCoordinateReferenceSystem, QgsVectorLayer
|
||||
from qgis.PyQt.QtWidgets import QCheckBox, QComboBox, QLineEdit, QPlainTextEdit
|
||||
@ -813,7 +814,7 @@ class TableFieldWidgetWrapper(WidgetWrapper):
|
||||
for field in self._layer.fields():
|
||||
if not fieldTypes or field.type() in fieldTypes:
|
||||
fieldNames.add(unicode(field.name()))
|
||||
return sorted(list(fieldNames), cmp=locale.strcoll)
|
||||
return sorted(list(fieldNames), key=cmp_to_key(locale.strcoll))
|
||||
|
||||
def setValue(self, value):
|
||||
if self.param.multiple:
|
||||
|
Loading…
x
Reference in New Issue
Block a user