diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-04 19:42:46 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-04 19:42:46 +0200 |
commit | 5563bb3c94f9c001f95de44a5818d2f86631532b (patch) | |
tree | 2b9fe955e14b167c64251677533ee4d0f34006eb /src/mainwindow/widgets | |
parent | Update pkgbuild to use asciidoctor (diff) | |
download | smolbote-5563bb3c94f9c001f95de44a5818d2f86631532b.tar.xz |
clazy: fix warnings
Diffstat (limited to 'src/mainwindow/widgets')
-rw-r--r-- | src/mainwindow/widgets/navigationbar.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mainwindow/widgets/navigationbar.cpp b/src/mainwindow/widgets/navigationbar.cpp index e179565..b49680d 100644 --- a/src/mainwindow/widgets/navigationbar.cpp +++ b/src/mainwindow/widgets/navigationbar.cpp @@ -36,7 +36,8 @@ NavigationBar::NavigationBar(const QHash<QString, QString> &conf, QWidget *paren auto *backMenu = new QMenu(this); connect(backMenu, &QMenu::aboutToShow, this, [this, backMenu]() { backMenu->clear(); - for(const QWebEngineHistoryItem &item : m_view->history()->backItems(10)) { + const auto history = m_view->history()->backItems(10); + for(const QWebEngineHistoryItem &item : history) { auto *action = backMenu->addAction(item.title()); connect(action, &QAction::triggered, this, [item, this]() { m_view->history()->goToItem(item); @@ -66,7 +67,8 @@ NavigationBar::NavigationBar(const QHash<QString, QString> &conf, QWidget *paren auto *forwardMenu = new QMenu(this); connect(forwardMenu, &QMenu::aboutToShow, this, [this, forwardMenu]() { forwardMenu->clear(); - for(const QWebEngineHistoryItem &item : m_view->history()->forwardItems(10)) { + const auto history = m_view->history()->forwardItems(10); + for(const QWebEngineHistoryItem &item : history) { auto *action = forwardMenu->addAction(item.title()); connect(action, &QAction::triggered, this, [item, this]() { m_view->history()->goToItem(item); |