summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/completionwidget.cpp6
-rw-r--r--src/urlbar/completionwidget.h2
-rw-r--r--src/urlbar/listitem.cpp2
-rw-r--r--src/urlbar/listitem.h2
-rw-r--r--src/urlbar/urlresolver.cpp4
5 files changed, 8 insertions, 8 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 9a5c9432..af9bdc45 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -74,7 +74,7 @@ void CompletionWidget::insertSearchList(const UrlSearchList &list, const QString
{
ListItem *suggestion = ListItemFactory::create(item, text, this);
suggestion->setBackgroundRole(i % 2 ? QPalette::AlternateBase : QPalette::Base);
- connect(suggestion, SIGNAL(itemClicked(ListItem *, Qt::MouseButton)), this, SLOT(itemChosen(ListItem *, Qt::MouseButton)));
+ connect(suggestion, SIGNAL(itemClicked(ListItem *, Qt::MouseButton, Qt::KeyboardModifiers)), this, SLOT(itemChosen(ListItem *, Qt::MouseButton, Qt::KeyboardModifiers)));
connect(this, SIGNAL(nextItemSubChoice()), suggestion, SLOT(nextItemSubChoice()));
suggestion->setObjectName(QString::number(i++));
layout()->addWidget(suggestion);
@@ -265,9 +265,9 @@ void CompletionWidget::setVisible(bool visible)
}
-void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button)
+void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::KeyboardModifiers modifier)
{
- if (button == Qt::MidButton)
+ if (button == Qt::MidButton || modifier == Qt::ControlModifier)
emit chosenUrl(item->url(), Rekonq::NewCurrentTab);
else
emit chosenUrl(item->url(), Rekonq::CurrentTab);
diff --git a/src/urlbar/completionwidget.h b/src/urlbar/completionwidget.h
index 2d33b59f..423499fe 100644
--- a/src/urlbar/completionwidget.h
+++ b/src/urlbar/completionwidget.h
@@ -64,7 +64,7 @@ public:
void suggestUrls(const QString &text);
private slots:
- void itemChosen(ListItem *item, Qt::MouseButton = Qt::LeftButton);
+ void itemChosen(ListItem *item, Qt::MouseButton = Qt::LeftButton, Qt::KeyboardModifiers = Qt::NoModifier);
signals:
void chosenUrl(const KUrl &, Rekonq::OpenType);
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index 5254c7dc..3114c16a 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -129,7 +129,7 @@ void ListItem::leaveEvent(QEvent *e)
void ListItem::mousePressEvent(QMouseEvent *e)
{
- emit itemClicked(this, e->button());
+ emit itemClicked(this, e->button(), e->modifiers());
QWidget::mousePressEvent(e);
}
diff --git a/src/urlbar/listitem.h b/src/urlbar/listitem.h
index c26a1893..dcb4f76d 100644
--- a/src/urlbar/listitem.h
+++ b/src/urlbar/listitem.h
@@ -66,7 +66,7 @@ public slots:
virtual void nextItemSubChoice();
signals:
- void itemClicked(ListItem *item, Qt::MouseButton);
+ void itemClicked(ListItem *item, Qt::MouseButton, Qt::KeyboardModifiers);
protected:
virtual void paintEvent(QPaintEvent *event);
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index 07b40bac..7333e305 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -74,7 +74,7 @@ UrlResolver::UrlResolver(const QString &typedUrl)
{
kDebug() << "browse regexp empty. Setting value..";
- QString protocol = "^(http://|https://|file://|ftp://)";
+ QString protocol = "^(http://|https://|file://|ftp://|man:|info:)";
QString local = "^/";
@@ -91,7 +91,7 @@ UrlResolver::UrlResolver(const QString &typedUrl)
"y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|"\
"pro)";
- _browseRegexp = QRegExp("(" + protocol + ")|(" + local + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +")");
+ _browseRegexp = QRegExp('(' + protocol + ")|(" + local + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +')');
}
}