diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/navigation/urllineedit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/navigation/urllineedit.cpp b/src/lib/navigation/urllineedit.cpp index 5ba0701..5e47223 100644 --- a/src/lib/navigation/urllineedit.cpp +++ b/src/lib/navigation/urllineedit.cpp @@ -56,12 +56,12 @@ UrlLineEdit::UrlLineEdit(QWidget *parent) : listWidget->addItem("start.duckduckgo.com"); listWidget->addItem("neueland.iserlohn-fortress.net"); - connect(listWidget, &QListWidget::itemSelectionChanged, [this]() { + connect(listWidget, &QListWidget::itemSelectionChanged, this, [&]() { setText(listWidget->currentItem()->text()); }); - connect(listWidget, &QListWidget::itemActivated, [this](QListWidgetItem *item) { - setText(listWidget->currentItem()->text());; - this->m_menu->hide(); + connect(listWidget, &QListWidget::itemActivated, this, [&](QListWidgetItem *item) { + setText(item->text());; + m_menu->hide(); }); QWidgetAction *listAction = new QWidgetAction(m_menu); |