summaryrefslogtreecommitdiff
path: root/src/urlbar/urlresolver.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:30:26 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:30:26 +0200
commitaa05bd3973a2f39f50c14314840f0fe078f16444 (patch)
treedd21ae094321ca9f0b803379ad7e93a6b065ec10 /src/urlbar/urlresolver.h
parentbk toolbar by default for the next rekonq. (diff)
parentChange from QByteArray to QString in the right way (diff)
downloadrekonq-aa05bd3973a2f39f50c14314840f0fe078f16444.tar.xz
Merge branch 'opensearch'
Conflicts: src/CMakeLists.txt src/urlbar/urlresolver.cpp
Diffstat (limited to 'src/urlbar/urlresolver.h')
-rw-r--r--src/urlbar/urlresolver.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h
index c79ce184..f72d6731 100644
--- a/src/urlbar/urlresolver.h
+++ b/src/urlbar/urlresolver.h
@@ -38,6 +38,7 @@
// Qt Includes
#include <QString>
#include <QList>
+#include <QStringList>
class UrlSearchItem
{
@@ -50,6 +51,7 @@ public:
Browse = 0x00000010,
History = 0x00000100,
Bookmark = 0x00001000,
+ Suggestion = 0x00010000,
};
int type;
@@ -93,8 +95,10 @@ typedef QList <UrlSearchItem> UrlSearchList;
// ----------------------------------------------------------------------
-class UrlResolver
+class UrlResolver : public QObject
{
+ Q_OBJECT
+
public:
UrlResolver(const QString &typedUrl);
@@ -103,14 +107,29 @@ public:
private:
QString _typedString;
- UrlSearchList webSearchesResolution();
- UrlSearchList historyResolution();
- UrlSearchList qurlFromUserInputResolution();
- UrlSearchList bookmarksResolution();
+ UrlSearchList _webSearches;
+ UrlSearchList _qurlFromUserInput;
+ UrlSearchList _history;
+ UrlSearchList _bookmarks;
+ UrlSearchList _suggestions;
+
+ void computeWebSearches();
+ void computeHistory();
+ void computeQurlFromUserInput();
+ void computeBookmarks();
+ void computeSuggestions();
+
+ int _computedListsCount;
+
UrlSearchItem privilegedItem(UrlSearchList* list);
-
+ UrlSearchList orderLists();
+
static QRegExp _browseRegexp;
static QRegExp _searchEnginesRegexp;
+
+private slots:
+ void suggestionsReceived(const QStringList &suggestion);
+
};
// ------------------------------------------------------------------------------