From f3f8cca628a40be8c2bd0b133ea05923eecabc98 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 2 May 2020 22:07:08 -0400 Subject: [PATCH] Use auto when initializing with a template cast to avoid duplicating the type --- src/Application.cpp | 2 +- src/BookmarkHandler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 993c6fc66..9663d1b53 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -183,7 +183,7 @@ void Application::createWindow(const Profile::Ptr &profile, const QString &direc void Application::detachTerminals(ViewSplitter *splitter,const QHash& sessionsMap) { - MainWindow *currentWindow = qobject_cast(sender()); + auto *currentWindow = qobject_cast(sender()); MainWindow *window = newMainWindow(); ViewManager *manager = window->viewManager(); diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp index a67e4ac9c..fc63909e3 100644 --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -65,7 +65,7 @@ BookmarkHandler::BookmarkHandler(KActionCollection *collection, QMenu *menu, boo KBookmarkManager *manager = KBookmarkManager::managerForFile(_file, QStringLiteral("konsole")); manager->setUpdate(true); - BookmarkMenu *bookmarkMenu = new BookmarkMenu(manager, this, _menu, toplevel ? collection : nullptr); + auto *bookmarkMenu = new BookmarkMenu(manager, this, _menu, toplevel ? collection : nullptr); bookmarkMenu->setParent(this); }