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:
committed by
GitHub
parent
c24ace7f73
commit
9759da82e4
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user