Fixups with Qt6 enums (#13611)

* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
This commit is contained in:
Martin Rodriguez Reboredo
2024-05-06 13:02:18 -03:00
committed by GitHub
parent c24ace7f73
commit 9759da82e4
27 changed files with 64 additions and 52 deletions

View File

@@ -156,7 +156,7 @@ class ControlTaskPanel(QtCore.QObject):
femsolver.report.display(machine.report, _REPORT_TITLE, text)
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Close)
return QtGui.QDialogButtonBox.Close
def reject(self):
Gui.ActiveDocument.resetEdit()

View File

@@ -107,9 +107,7 @@ class _TaskPanel:
self.update()
def getStandardButtons(self):
button_value = int(
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Apply | QtGui.QDialogButtonBox.Cancel
)
button_value = QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Apply | QtGui.QDialogButtonBox.Cancel
return button_value
# show a OK, a apply and a Cancel button
# def reject() is called on Cancel button

View File

@@ -265,7 +265,7 @@ class _TaskPanel:
self.result_widget.sb_displacement_factor_max.setValue(100.) # init non standard values
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Close)
return QtGui.QDialogButtonBox.Close
def get_result_stats(self, type_name):
return resulttools.get_stats(self.result_obj, type_name)

View File

@@ -167,7 +167,7 @@ class _TaskPanel:
def getStandardButtons(self):
# only show a close button
# def accept() in no longer needed, since there is no OK button
return int(QtGui.QDialogButtonBox.Close)
return QtGui.QDialogButtonBox.Close
def reject(self):
FreeCADGui.ActiveDocument.resetEdit()