diff --git a/src/lib/gui/MainWindow.cpp b/src/lib/gui/MainWindow.cpp index 61dad10c5..8353f076e 100644 --- a/src/lib/gui/MainWindow.cpp +++ b/src/lib/gui/MainWindow.cpp @@ -961,8 +961,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) { if (obj != ui->lineEditName || event->type() != QEvent::KeyPress) return false; - const auto keyEvent = static_cast(event); - if (keyEvent->key() != Qt::Key_Escape) + if (const auto keyEvent = static_cast(event); keyEvent->key() != Qt::Key_Escape) return false; ui->lineEditName->hide(); ui->lblComputerName->show();