RareException: Use quit()
instead of exit()
This commit is contained in:
parent
2cbe6cadd9
commit
456050c91c
|
@ -31,7 +31,7 @@ class RareException(RareAppException):
|
|||
except Exception as e:
|
||||
self.logger.fatal(str(e))
|
||||
QMessageBox.warning(None, "Error", self.tr("Failed to login"))
|
||||
QApplication.exit(1)
|
||||
QApplication.quit()
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
@ -39,11 +39,11 @@ class RareAppException(QObject):
|
|||
self.logger.fatal(message)
|
||||
action = QMessageBox.warning(
|
||||
None, exc_type.__name__, message,
|
||||
buttons=QMessageBox.Ignore | QMessageBox.Close,
|
||||
defaultButton=QMessageBox.Ignore
|
||||
buttons=QMessageBox.Ignore | QMessageBox.Abort,
|
||||
defaultButton=QMessageBox.Abort
|
||||
)
|
||||
if action == QMessageBox.RejectRole:
|
||||
QApplication.exit(1)
|
||||
if action == QMessageBox.Abort:
|
||||
QApplication.quit()
|
||||
|
||||
|
||||
class RareApp(QApplication):
|
||||
|
|
Loading…
Reference in a new issue