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:
|
except Exception as e:
|
||||||
self.logger.fatal(str(e))
|
self.logger.fatal(str(e))
|
||||||
QMessageBox.warning(None, "Error", self.tr("Failed to login"))
|
QMessageBox.warning(None, "Error", self.tr("Failed to login"))
|
||||||
QApplication.exit(1)
|
QApplication.quit()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,11 @@ class RareAppException(QObject):
|
||||||
self.logger.fatal(message)
|
self.logger.fatal(message)
|
||||||
action = QMessageBox.warning(
|
action = QMessageBox.warning(
|
||||||
None, exc_type.__name__, message,
|
None, exc_type.__name__, message,
|
||||||
buttons=QMessageBox.Ignore | QMessageBox.Close,
|
buttons=QMessageBox.Ignore | QMessageBox.Abort,
|
||||||
defaultButton=QMessageBox.Ignore
|
defaultButton=QMessageBox.Abort
|
||||||
)
|
)
|
||||||
if action == QMessageBox.RejectRole:
|
if action == QMessageBox.Abort:
|
||||||
QApplication.exit(1)
|
QApplication.quit()
|
||||||
|
|
||||||
|
|
||||||
class RareApp(QApplication):
|
class RareApp(QApplication):
|
||||||
|
|
Loading…
Reference in a new issue