mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-06 18:34:49 +01:00
In Qt 6 QApplication::exit now behaves like QApplication::quit in Qt 5
This commit is contained in:
parent
09113b462c
commit
5c9d398e7b
3 changed files with 4 additions and 4 deletions
|
|
@ -113,7 +113,7 @@ def keyPressEvent(self, ev):
|
||||||
if not self.develop:
|
if not self.develop:
|
||||||
return QSplashScreen.keyPressEvent(self, ev)
|
return QSplashScreen.keyPressEvent(self, ev)
|
||||||
ev.accept()
|
ev.accept()
|
||||||
QApplication.instance().quit()
|
QApplication.instance().exit()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1882,7 +1882,7 @@ def quit(self):
|
||||||
if not self.confirm_quit():
|
if not self.confirm_quit():
|
||||||
return False
|
return False
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
QApplication.instance().quit()
|
QApplication.instance().exit()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def confirm_quit(self):
|
def confirm_quit(self):
|
||||||
|
|
@ -1935,7 +1935,7 @@ def abort_terminal_save(self):
|
||||||
def check_terminal_save(self):
|
def check_terminal_save(self):
|
||||||
if self.doing_terminal_save and not self.save_manager.has_tasks: # terminal save could have been aborted
|
if self.doing_terminal_save and not self.save_manager.has_tasks: # terminal save could have been aborted
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
QApplication.instance().quit()
|
QApplication.instance().exit()
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.save_state()
|
self.save_state()
|
||||||
|
|
|
||||||
|
|
@ -1075,7 +1075,7 @@ def quit(self, checked=True, restart=False, debug_on_restart=False,
|
||||||
if self.system_tray_icon is not None and self.restart_after_quit:
|
if self.system_tray_icon is not None and self.restart_after_quit:
|
||||||
# Needed on windows to prevent multiple systray icons
|
# Needed on windows to prevent multiple systray icons
|
||||||
self.system_tray_icon.setVisible(False)
|
self.system_tray_icon.setVisible(False)
|
||||||
QApplication.instance().quit()
|
QApplication.instance().exit()
|
||||||
|
|
||||||
def donate(self, *args):
|
def donate(self, *args):
|
||||||
from calibre.utils.localization import localize_website_link
|
from calibre.utils.localization import localize_website_link
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue