diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index e8b7a341..0ccbc5c8 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -156,18 +156,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); -} - void MainWindow::restoreWindowSize() { diff --git a/src/MainWindow.h b/src/MainWindow.h index fd1e1174..a111b91b 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -81,8 +81,7 @@ public: #endif protected: - void closeEvent(QCloseEvent *event); - bool event(QEvent *event) override; + void closeEvent(QCloseEvent *event) override; private slots: //! Handle interaction with the tray icon.