diff options
Diffstat (limited to 'src/mainwindow/widgets')
-rw-r--r-- | src/mainwindow/widgets/completer.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow/widgets/navigationbar.cpp | 8 | ||||
-rw-r--r-- | src/mainwindow/widgets/urllineedit.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mainwindow/widgets/completer.cpp b/src/mainwindow/widgets/completer.cpp index 1295fa3..15cc8b1 100644 --- a/src/mainwindow/widgets/completer.cpp +++ b/src/mainwindow/widgets/completer.cpp @@ -16,7 +16,7 @@ Completer::Completer(QWidget *parent) setWindowFlags(Qt::ToolTip); setEditTriggers(QAbstractItemView::NoEditTriggers); - connect(this, &Completer::activated, [=](const QModelIndex &index) { + connect(this, &Completer::activated, [this](const QModelIndex &index) { hide(); emit completionActivated(index.data().toString()); }); diff --git a/src/mainwindow/widgets/navigationbar.cpp b/src/mainwindow/widgets/navigationbar.cpp index 725003d..799ebec 100644 --- a/src/mainwindow/widgets/navigationbar.cpp +++ b/src/mainwindow/widgets/navigationbar.cpp @@ -29,7 +29,7 @@ NavigationBar::NavigationBar(QWidget *parent) // Back button backAction = addAction(Util::icon(QStyle::SP_ArrowBack), tr("Back")); - setShortcut(backAction, "shortcuts.navigation.back"); + config.shortcut<QAction>(*backAction, "shortcuts.navigation.back"); connect(backAction, &QAction::triggered, this, [this]() { m_view->history()->back(); }); @@ -57,7 +57,7 @@ NavigationBar::NavigationBar(QWidget *parent) // Forward button forwardAction = addAction(Util::icon(QStyle::SP_ArrowForward), tr("Forward")); - setShortcut(forwardAction, "shortcuts.navigation.forward"); + config.shortcut<QAction>(*forwardAction, "shortcuts.navigation.forward"); connect(forwardAction, &QAction::triggered, this, [this]() { m_view->history()->forward(); }); @@ -85,7 +85,7 @@ NavigationBar::NavigationBar(QWidget *parent) // Stop/Refresh button stopReloadAction = addAction(Util::icon(QStyle::SP_BrowserReload), tr("Refresh")); - setShortcut(stopReloadAction, "shortcuts.navigation.refresh"); + config.shortcut<QAction>(*stopReloadAction, "shortcuts.navigation.refresh"); connect(stopReloadAction, &QAction::triggered, this, [this]() { if(m_view->isLoaded()) m_view->reload(); @@ -100,7 +100,7 @@ NavigationBar::NavigationBar(QWidget *parent) // Home button homeAction = addAction(Util::icon(QStyle::SP_DirHomeIcon), tr("Home")); - setShortcut(homeAction, "shortcuts.navigation.home"); + config.shortcut<QAction>(*homeAction, "shortcuts.navigation.home"); connect(homeAction, &QAction::triggered, this, [this]() { m_view->load(m_view->profile()->homepage()); }); diff --git a/src/mainwindow/widgets/urllineedit.cpp b/src/mainwindow/widgets/urllineedit.cpp index 378945f..5216f31 100644 --- a/src/mainwindow/widgets/urllineedit.cpp +++ b/src/mainwindow/widgets/urllineedit.cpp @@ -40,13 +40,13 @@ UrlLineEdit::UrlLineEdit(QWidget *parent) actions.append(pasteAction); auto *loadAction = new QAction(tr("Paste and load"), this); - connect(loadAction, &QAction::triggered, this, [=]() { + connect(loadAction, &QAction::triggered, this, [this]() { emit addressbar->load(QUrl::fromUserInput(qApp->clipboard()->text())); }); actions.append(loadAction); auto *searchAction = new QAction(tr("Paste and search"), this); - connect(searchAction, &QAction::triggered, this, [=]() { + connect(searchAction, &QAction::triggered, this, [this]() { emit addressbar->search(qApp->clipboard()->text()); }); actions.append(searchAction); |