mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Support confirm-on-Quit on macOS.
This commit is contained in:
parent
6a3ad52aef
commit
b8f1cebeb6
2 changed files with 6 additions and 1 deletions
|
@ -261,7 +261,11 @@ void Sandbox::setupScreenScale() {
|
|||
Sandbox::~Sandbox() = default;
|
||||
|
||||
bool Sandbox::event(QEvent *e) {
|
||||
if (e->type() == QEvent::Close || e->type() == QEvent::Quit) {
|
||||
if (e->type() == QEvent::Quit && !App::quitting()) {
|
||||
App::quit();
|
||||
e->ignore();
|
||||
return false;
|
||||
} else if (e->type() == QEvent::Close) {
|
||||
App::quit();
|
||||
}
|
||||
return QApplication::event(e);
|
||||
|
|
|
@ -393,6 +393,7 @@ void Session::uploadsStopWithConfirmation(Fn<void()> done) {
|
|||
}
|
||||
});
|
||||
window->show(std::move(box));
|
||||
window->activate();
|
||||
}
|
||||
|
||||
void Session::uploadsStop() {
|
||||
|
|
Loading…
Add table
Reference in a new issue