From 23d9decbce1b0c757c2e3c246d3ad0cc661ad3f8 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 3 Jun 2023 01:43:48 +0200 Subject: Fix a few clazy warnings --- src/MainWindow.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index ecb5ffd0..63f20752 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -318,18 +318,6 @@ MainWindow::setWindowTitle(int notificationCount) QQuickView::setTitle(name); } -bool -MainWindow::event(QEvent *event) -{ - auto type = event->type(); - - if (type == QEvent::Close) { - closeEvent(static_cast(event)); - } - - return QQuickView::event(event); -} - // HACK: https://bugreports.qt.io/browse/QTBUG-83972, qtwayland cannot auto hide menu void MainWindow::mousePressEvent(QMouseEvent *event) @@ -403,6 +391,7 @@ MainWindow::closeEvent(QCloseEvent *event) if (!qApp->isSavingSession() && isVisible() && pageSupportsTray() && userSettings_->tray()) { event->ignore(); hide(); + return; } } -- cgit 1.5.1