summaryrefslogtreecommitdiff
path: root/src/urlbar/completionwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-09-02 11:10:28 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-09-02 11:10:28 +0200
commit3d51652105662cc4ebf0707aa1e52d790f01c480 (patch)
tree74a89f8a50727060456048dfe40dcd7bd82ce6a1 /src/urlbar/completionwidget.cpp
parenttrivials: (diff)
downloadrekonq-3d51652105662cc4ebf0707aa1e52d790f01c480.tar.xz
don't calculate suggestions on fast typing resolution or when user
types a local url (something starting with /)
Diffstat (limited to 'src/urlbar/completionwidget.cpp')
-rw-r--r--src/urlbar/completionwidget.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 1b931535..a2bf5dbc 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -320,10 +320,15 @@ void CompletionWidget::setVisible(bool visible)
void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::KeyboardModifiers modifier)
{
- if (button == Qt::MidButton || modifier == Qt::ControlModifier)
+ if (button == Qt::MidButton
+ || modifier == Qt::ControlModifier)
+ {
emit chosenUrl(item->url(), Rekonq::NewFocusedTab);
+ }
else
+ {
emit chosenUrl(item->url(), Rekonq::CurrentTab);
+ }
hide();
}
@@ -344,6 +349,6 @@ void CompletionWidget::suggestUrls(const QString &text)
UrlResolver *res = new UrlResolver(text);
connect(res, SIGNAL(suggestionsReady(const UrlSearchList &, const QString &)), this, SLOT(updateSearchList(const UrlSearchList &, const QString &)));
+ res->computeSuggestions();
_resList = res->orderedSearchItems();
-
}