mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-19 20:29:40 +08:00
Qt5->Qt6: Make CrashHandler window show up again.
part of CURA-8591
This commit is contained in:
parent
6586bcc762
commit
9d7b1e49ee
@ -136,8 +136,8 @@ class CrashHandler:
|
|||||||
|
|
||||||
# "backup and start clean" and "close" buttons
|
# "backup and start clean" and "close" buttons
|
||||||
buttons = QDialogButtonBox()
|
buttons = QDialogButtonBox()
|
||||||
buttons.addButton(QDialogButtonBox.Close)
|
buttons.addButton(QDialogButtonBox.StandardButton.Close)
|
||||||
buttons.addButton(catalog.i18nc("@action:button", "Backup and Reset Configuration"), QDialogButtonBox.AcceptRole)
|
buttons.addButton(catalog.i18nc("@action:button", "Backup and Reset Configuration"), QDialogButtonBox.ButtonRole.AcceptRole)
|
||||||
buttons.rejected.connect(self._closeEarlyCrashDialog)
|
buttons.rejected.connect(self._closeEarlyCrashDialog)
|
||||||
buttons.accepted.connect(self._backupAndStartClean)
|
buttons.accepted.connect(self._backupAndStartClean)
|
||||||
|
|
||||||
@ -409,12 +409,12 @@ class CrashHandler:
|
|||||||
|
|
||||||
def _buttonsWidget(self):
|
def _buttonsWidget(self):
|
||||||
buttons = QDialogButtonBox()
|
buttons = QDialogButtonBox()
|
||||||
buttons.addButton(QDialogButtonBox.Close)
|
buttons.addButton(QDialogButtonBox.StandardButton.Close)
|
||||||
# Like above, this will be served as a separate detailed report dialog if the application has not yet been
|
# Like above, this will be served as a separate detailed report dialog if the application has not yet been
|
||||||
# fully loaded. In this case, "send report" will be a check box in the early crash dialog, so there is no
|
# fully loaded. In this case, "send report" will be a check box in the early crash dialog, so there is no
|
||||||
# need for this extra button.
|
# need for this extra button.
|
||||||
if self.has_started:
|
if self.has_started:
|
||||||
buttons.addButton(catalog.i18nc("@action:button", "Send report"), QDialogButtonBox.AcceptRole)
|
buttons.addButton(catalog.i18nc("@action:button", "Send report"), QDialogButtonBox.ButtonRole.AcceptRole)
|
||||||
buttons.accepted.connect(self._sendCrashReport)
|
buttons.accepted.connect(self._sendCrashReport)
|
||||||
buttons.rejected.connect(self.dialog.close)
|
buttons.rejected.connect(self.dialog.close)
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ def exceptHook(hook_type, value, traceback):
|
|||||||
if CuraApplication.splash is not None:
|
if CuraApplication.splash is not None:
|
||||||
CuraApplication.splash.close()
|
CuraApplication.splash.close()
|
||||||
_crash_handler.early_crash_dialog.show()
|
_crash_handler.early_crash_dialog.show()
|
||||||
sys.exit(application.exec_())
|
sys.exit(application.exec())
|
||||||
|
|
||||||
|
|
||||||
# Set exception hook to use the crash dialog handler
|
# Set exception hook to use the crash dialog handler
|
||||||
|
Loading…
x
Reference in New Issue
Block a user