summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorPanagiotis Papadopoulos <pano_90@gmx.net>2010-12-17 15:17:07 +0100
committerPanagiotis Papadopoulos <pano_90@gmx.net>2010-12-17 15:17:07 +0100
commit3a3a8b20acf2970e0718f9f05aeff21074c63bc3 (patch)
tree51d461c9d24555286da4465f58fa71d718329c0d /src/urlbar
parentfix opening of URL-like selections in new tab (diff)
downloadrekonq-3a3a8b20acf2970e0718f9f05aeff21074c63bc3.tar.xz
When using Alt+Enter open website in new tab
GCI Task by Furkan, thanks! :-) RB: 100210 BUG: 254372
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/completionwidget.cpp7
-rw-r--r--src/urlbar/urlbar.cpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index fdfd3107..087a10a6 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -274,6 +274,13 @@ bool CompletionWidget::eventFilter(QObject *obj, QEvent *ev)
case Qt::Key_Enter:
case Qt::Key_Return:
w = qobject_cast<UrlBar *>(parent());
+ if(kev->modifiers() == Qt::AltModifier)
+ {
+ if(kev->key() == Qt::Key_Return || kev->key() == Qt::Key_Enter)
+ {
+ emit chosenUrl(w->text(), Rekonq::NewFocusedTab);
+ }
+ }
if (!w->text().startsWith(QL1S("http://"), Qt::CaseInsensitive))
{
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 1f4a0367..d93aeb75 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -231,6 +231,13 @@ void UrlBar::keyPressEvent(QKeyEvent *event)
{
// this handles the Modifiers + Return key combinations
QString currentText = text().trimmed();
+ if(event->modifiers() == Qt::AltModifier)
+ {
+ if(event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
+ {
+ activated(currentText, Rekonq::NewFocusedTab);
+ }
+ }
if ((event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
&& !currentText.startsWith(QL1S("http://"), Qt::CaseInsensitive)
&& event->modifiers() != Qt::NoModifier)