mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Support confirm-on-Quit on macOS.
This commit is contained in:
@@ -261,7 +261,11 @@ void Sandbox::setupScreenScale() {
|
|||||||
Sandbox::~Sandbox() = default;
|
Sandbox::~Sandbox() = default;
|
||||||
|
|
||||||
bool Sandbox::event(QEvent *e) {
|
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();
|
App::quit();
|
||||||
}
|
}
|
||||||
return QApplication::event(e);
|
return QApplication::event(e);
|
||||||
|
@@ -393,6 +393,7 @@ void Session::uploadsStopWithConfirmation(Fn<void()> done) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
window->show(std::move(box));
|
window->show(std::move(box));
|
||||||
|
window->activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::uploadsStop() {
|
void Session::uploadsStop() {
|
||||||
|
Reference in New Issue
Block a user