2021-09-11 08:41:30 +12:00
|
|
|
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QPushButton
|
|
|
|
|
2022-09-02 09:31:10 +12:00
|
|
|
from rare.shared import GlobalSignalsSingleton
|
|
|
|
|
2021-09-11 08:41:30 +12:00
|
|
|
|
|
|
|
class DebugSettings(QWidget):
|
|
|
|
def __init__(self):
|
|
|
|
super(DebugSettings, self).__init__()
|
|
|
|
self.setLayout(QVBoxLayout())
|
|
|
|
|
|
|
|
self.raise_runtime_exception_button = QPushButton("Raise Exception")
|
|
|
|
self.layout().addWidget(self.raise_runtime_exception_button)
|
|
|
|
self.raise_runtime_exception_button.clicked.connect(self.raise_exception)
|
2022-09-02 09:31:10 +12:00
|
|
|
self.restart_button = QPushButton("Restart")
|
|
|
|
self.layout().addWidget(self.restart_button)
|
2022-12-29 06:55:15 +13:00
|
|
|
self.restart_button.clicked.connect(lambda: GlobalSignalsSingleton().application.quit.emit(-133742))
|
2021-09-11 08:41:30 +12:00
|
|
|
|
|
|
|
self.layout().addStretch(1)
|
|
|
|
|
|
|
|
def raise_exception(self):
|
|
|
|
raise RuntimeError("Debug Crash")
|