From 802d8d468189308394e06cf25fe9c74699aa96ec Mon Sep 17 00:00:00 2001 From: megabigbug Date: Thu, 19 Aug 2010 21:34:46 +0200 Subject: fix suggestion item: use the correct search engine --- src/urlbar/completionwidget.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/urlbar/completionwidget.cpp') diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index 8e72b26b..2afc44b2 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -153,13 +153,10 @@ void CompletionWidget::activateCurrentListItem() //update text of the url bar bar->blockSignals(true); //without compute suggestions - if (!widget->inherits("SearchListItem")) - bar->setQUrl( widget->url() ); - else - bar->setQUrl( _typedString ); + bar->setQUrl(widget->text()); bar->blockSignals(false); bar->setFocus(); - bar->setCursorPosition( bar->text().length() ); + bar->setCursorPosition(bar->text().length()); } @@ -240,7 +237,7 @@ bool CompletionWidget::eventFilter(QObject *obj, QEvent *ev) if( _currentIndex == -1) _currentIndex = 0; child = findChild(QString::number(_currentIndex)); - if(child && _typedString == w->text()) + if(child) { emit chosenUrl(child->url(), Rekonq::CurrentTab); } -- cgit v1.2.1