summaryrefslogtreecommitdiff
path: root/src/urlbar/urlresolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/urlresolver.h')
-rw-r--r--src/urlbar/urlresolver.h46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h
index 4e85e917..f16c44f8 100644
--- a/src/urlbar/urlresolver.h
+++ b/src/urlbar/urlresolver.h
@@ -33,13 +33,14 @@
// KDE Includes
#include <KUrl>
-
+#include <KService>
// Qt Includes
#include <QString>
#include <QList>
#include <QStringList>
+
class UrlSearchItem
{
public:
@@ -104,33 +105,46 @@ public:
UrlSearchList orderedSearchItems();
-private:
- QString _typedString;
+ static KService::Ptr searchEngine()
+ {
+ return _searchEngine;
+ };
- UrlSearchList _webSearches;
- UrlSearchList _qurlFromUserInput;
- UrlSearchList _history;
- UrlSearchList _bookmarks;
- UrlSearchList _suggestions;
-
+ static void setSearchEngine(KService::Ptr engine)
+ {
+ _searchEngine = engine;
+ };
+
+ void computeSuggestions();
+
+private Q_SLOTS:
+ void suggestionsReceived(const QString &text, const QStringList &suggestions);
+
+Q_SIGNALS:
+ void suggestionsReady(const UrlSearchList &, const QString &);
+
+private:
void computeWebSearches();
void computeHistory();
void computeQurlFromUserInput();
void computeBookmarks();
- void computeSuggestions();
UrlSearchItem privilegedItem(UrlSearchList* list);
UrlSearchList orderLists();
- static QRegExp _browseRegexp;
- static QRegExp _searchEnginesRegexp;
-private slots:
- void suggestionsReceived(const QString &text, const QStringList &suggestions);
+ QString _typedString;
-Q_SIGNALS:
- void suggestionsReady(const UrlSearchList &, const QString &);
+ UrlSearchList _webSearches;
+ UrlSearchList _qurlFromUserInput;
+ UrlSearchList _history;
+ UrlSearchList _bookmarks;
+ UrlSearchList _suggestions;
+ static QRegExp _browseRegexp;
+ static QRegExp _searchEnginesRegexp;
+
+ static KService::Ptr _searchEngine;
};
// ------------------------------------------------------------------------------