From 81639de005e218b14876530e0e309b6bb160fd50 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 4 Sep 2010 01:15:36 +0200 Subject: Restore autocomplete shortcuts. Or at least, I hope so :) BUG: 243902 --- src/urlbar/completionwidget.cpp | 5 +++++ src/urlbar/urlbar.cpp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/urlbar') diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index a2bf5dbc..be189001 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -273,6 +273,11 @@ bool CompletionWidget::eventFilter(QObject *obj, QEvent *ev) case Qt::Key_Enter: case Qt::Key_Return: + + // let urlbar handle Return + Modifiers + if(!(kev->modifiers() & Qt::NoModifier)) + return false; + w = qobject_cast(parent()); if( _currentIndex == -1) _currentIndex = 0; diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 25c7b748..7206b5e1 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -263,8 +263,10 @@ void UrlBar::keyPressEvent(QKeyEvent *event) { host += append; url.setHost(host); - setText(url.toString()); } + + // now, load it! + activated(url); } if (event->key() == Qt::Key_Escape) -- cgit v1.2.1