mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Support confirm-on-Quit on macOS.
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user