Fix a few clazy warnings

This commit is contained in:
Nicolas Werner 2023-06-03 01:43:48 +02:00
parent 6a53944805
commit 23d9decbce
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 11 additions and 21 deletions

View file

@ -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<QCloseEvent *>(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;
}
}