diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-30 02:07:25 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-30 02:07:25 +0200 |
commit | 428bf09a4e7ae01b40d24c74f8abe6b735e1c62b (patch) | |
tree | 4684dd80273dbea84e135805b1befbf89f28e2ef /src/urlbar/completionwidget.cpp | |
parent | add title for bookmarks in the list (diff) | |
parent | Add mid click support for the completition widget of the url bar (diff) | |
download | rekonq-428bf09a4e7ae01b40d24c74f8abe6b735e1c62b.tar.xz |
Merge commit 'refs/merge-requests/110' of git://gitorious.org/rekonq/mainline into m110
Diffstat (limited to 'src/urlbar/completionwidget.cpp')
-rw-r--r-- | src/urlbar/completionwidget.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index 42abcb73..3ea35a0b 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -72,7 +72,7 @@ void CompletionWidget::insertSearchList(const UrlSearchList &list) { UrlSearchItem item = list.at(i); ListItem *suggestion = new ListItem(item); - connect(suggestion, SIGNAL(itemClicked(ListItem *)), this, SLOT(itemChosen(ListItem *))); + connect(suggestion, SIGNAL(itemClicked(ListItem *, Qt::MouseButton)), this, SLOT(itemChosen(ListItem *, Qt::MouseButton))); suggestion->setObjectName( QString::number(i) ); layout()->addWidget( suggestion ); } @@ -208,7 +208,7 @@ bool CompletionWidget::eventFilter( QObject *o, QEvent *e ) case Qt::Key_Return: hide(); - emit chosenUrl(currentUrl().url()); + emit chosenUrl(currentUrl().url(), Rekonq::CurrentTab); ev->accept(); return true; break; @@ -235,8 +235,11 @@ void CompletionWidget::setVisible( bool visible ) } -void CompletionWidget::itemChosen(ListItem *item) +void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button) { - emit chosenUrl(_list.at(layout()->indexOf(item)).url); + if(button == Qt::MidButton) + emit chosenUrl(_list.at(layout()->indexOf(item)).url, Rekonq::NewCurrentTab); + else + emit chosenUrl(_list.at(layout()->indexOf(item)).url, Rekonq::CurrentTab); hide(); -}
\ No newline at end of file +} |