From 1abe5bb570f5431238fb8c50889657d33ca3e934 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 12 Nov 2012 23:17:53 +0100 Subject: Fix crash on control click on suggestions list Courtesy patch by Mathias Kraus. Thanks :) CCMAIL: k.hias@gmx.de --- src/urlbar/completionwidget.cpp | 2 +- src/urlbar/listitem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index cf00a77c..e76c598d 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -351,6 +351,7 @@ void CompletionWidget::setVisible(bool visible) void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::KeyboardModifiers modifier) { + hide(); if (button == Qt::MidButton || modifier == Qt::ControlModifier) { @@ -360,7 +361,6 @@ void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::Ke { emit chosenUrl(item->url(), Rekonq::CurrentTab); } - hide(); } diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index f001c47b..52f05f1b 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -134,7 +134,7 @@ void ListItem::leaveEvent(QEvent *e) void ListItem::mousePressEvent(QMouseEvent *e) { emit itemClicked(this, e->button(), e->modifiers()); - QWidget::mousePressEvent(e); + e->accept(); } -- cgit v1.2.1