X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mainwindow.cpp;h=d3d298100dd5c9f492dc4c4edacbab0d62581df5;hb=70e175fb0deb01e4664213686491c49bff85faf6;hp=d46c87c38e7766b667230057482814f8879646ca;hpb=6b1a2547dc1bb2202988f78cdbd4fd3807b760b5;p=nageru diff --git a/mainwindow.cpp b/mainwindow.cpp index d46c87c..d3d2981 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1330,6 +1330,16 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event) void MainWindow::closeEvent(QCloseEvent *event) { + if (global_mixer->get_num_connected_clients() > 0) { + QMessageBox::StandardButton reply = + QMessageBox::question(this, "Nageru", "There are clients connected. Do you really want to quit?", + QMessageBox::Yes | QMessageBox::No); + if (reply != QMessageBox::Yes) { + event->ignore(); + return; + } + } + analyzer->hide(); event->accept(); }