diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-24 16:26:51 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-24 16:26:51 +0200 |
commit | 14ba17fa06be74409e0697a2dea6129428a62add (patch) | |
tree | 9fd7c78ecc3c025c1b216dc6bfd62f5c98db0d5d /src/urlbar/completionwidget.cpp | |
parent | Merge branch 'DETACH_TAB' (diff) | |
parent | update SearchEngine data when settings are changed (diff) | |
download | rekonq-14ba17fa06be74409e0697a2dea6129428a62add.tar.xz |
Merge commit 'refs/merge-requests/2250' of git://gitorious.org/rekonq/mainline into m2250
Diffstat (limited to 'src/urlbar/completionwidget.cpp')
-rw-r--r-- | src/urlbar/completionwidget.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index 8307940b..e0027a92 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -34,6 +34,7 @@ // Local Includes #include "application.h" #include "urlresolver.h" +#include "searchengine.h" // KDE Includes #include <KGlobalSettings> @@ -48,15 +49,12 @@ #include <QEvent> #include <QKeyEvent> -// Defines -#define QL1S(x) QLatin1String(x) - CompletionWidget::CompletionWidget(QWidget *parent) : QFrame(parent, Qt::ToolTip) , _parent(parent) , _currentIndex(-1) - , _searchEngine( defaultSearchEngine() ) + , _searchEngine( SearchEngine::defaultEngine() ) { setFrameStyle(QFrame::Panel); setLayoutDirection(Qt::LeftToRight); @@ -259,8 +257,6 @@ void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button) } - - void CompletionWidget::suggestUrls(const QString &text) { QWidget *w = qobject_cast<QWidget *>(parent()); @@ -284,31 +280,3 @@ void CompletionWidget::suggestUrls(const QString &text) } -QString CompletionWidget::defaultSearchEngine() -{ - int n = ReKonfig::searchEngine(); - QString engine; - switch(n) - { - case 0: - engine = QL1S("google"); - break; - case 1: - engine = QL1S("altavista"); - break; - case 2: - engine = QL1S("lycos"); - break; - case 3: - engine = QL1S("wikipedia"); - break; - case 4: - engine = QL1S("wolfram"); - break; - default: - engine = QL1S("google"); - break; - } - - return engine; -} |