From dbdc8ce973dc27d673b6b8551bb71660251f52e5 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 27 Oct 2018 23:00:49 -0400 Subject: [PATCH] modernize use auto --- src/IncrementalSearchBar.cpp | 2 +- src/KeyBindingEditor.cpp | 2 +- src/MainWindow.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IncrementalSearchBar.cpp b/src/IncrementalSearchBar.cpp index 5c4f9068d..6529063aa 100644 --- a/src/IncrementalSearchBar.cpp +++ b/src/IncrementalSearchBar.cpp @@ -211,7 +211,7 @@ bool IncrementalSearchBar::eventFilter(QObject *watched, QEvent *event) return QWidget::eventFilter(watched, event); } - QKeyEvent *keyEvent = static_cast(event); + auto *keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Escape) { emit closeClicked(); return true; diff --git a/src/KeyBindingEditor.cpp b/src/KeyBindingEditor.cpp index 69fb14129..979d5c48e 100644 --- a/src/KeyBindingEditor.cpp +++ b/src/KeyBindingEditor.cpp @@ -168,7 +168,7 @@ bool KeyBindingEditor::eventFilter(QObject *watched, QEvent *event) { if (watched == _ui->testAreaInputEdit) { if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); + auto *keyEvent = static_cast(event); // The state here is currently set to the state that a newly started // terminal in Konsole will be in ( which is also the same as the diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 30df398d4..f1d90b283 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -695,7 +695,7 @@ void MainWindow::showShortcutsDialog() if (dialog.configure()) { // sync shortcuts for non-session actions (defined in "konsoleui.rc") in other main windows foreach (QWidget *mainWindowWidget, QApplication::topLevelWidgets()) { - MainWindow *mainWindow = qobject_cast(mainWindowWidget); + auto *mainWindow = qobject_cast(mainWindowWidget); if ((mainWindow != nullptr) && mainWindow != this) { syncActiveShortcuts(mainWindow->actionCollection(), actionCollection()); }