diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-09-19 23:22:13 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:05 +0100 |
commit | e315ff15daf26cbc70b6f2da50e6ca18081fc7c4 (patch) | |
tree | 6da0556f2c5c7efb13d8e8b03ba0092e7a5838d3 /src/urlbar | |
parent | Implement RekonqWindow (diff) | |
download | rekonq-e315ff15daf26cbc70b6f2da50e6ca18081fc7c4.tar.xz |
Integrated spell checking for rekonq2 (lindsay's work imported)
- inline spell highlighter. This requires WebKit 2.3 to work.
- Addition of a suggested replacement word list to the context menu,
for the word right clicked on
- A standard modeless spell check dialog that works on the current
editable text (or selection).
Heavily cribbed from Dawit's work on kdewebkitpart.
oops... also a codingstyle script round here... :)
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/listitem.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 6 | ||||
-rw-r--r-- | src/urlbar/urlsuggester.cpp | 10 | ||||
-rw-r--r-- | src/urlbar/urlsuggester.h | 16 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index 86bd9101..f001c47b 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -486,7 +486,7 @@ EngineBar::EngineBar(KService::Ptr selectedEngine, QWidget *parent) if (SearchEngine::defaultEngine().isNull()) return; - + m_engineGroup->addAction(newEngineAction(SearchEngine::defaultEngine(), selectedEngine)); Q_FOREACH(const KService::Ptr & engine, SearchEngine::favorites()) { diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index a994ea95..db24188b 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -643,7 +643,7 @@ void UrlBar::detectTypedString(const QString &typed) void UrlBar::suggest() { - kDebug() << "SUGGEST ABOUT DIGITED: " << text(); + kDebug() << "SUGGEST ABOUT DIGITED: " << text(); if (!_box.isNull()) _box.data()->suggestUrls(text()); } @@ -663,7 +663,7 @@ void UrlBar::refreshFavicon() _icon->setIcon(KIcon("arrow-right")); return; } - + _icon->setIcon(IconManager::self()->iconForUrl(u)); } @@ -746,7 +746,7 @@ void UrlBar::manageFavorites(QPoint pos) // also, save a site snapshot WebSnap *snap = new WebSnap(_tab->url(), this); Q_UNUSED(snap); - + updateRightIcons(); } diff --git a/src/urlbar/urlsuggester.cpp b/src/urlbar/urlsuggester.cpp index 83108a36..90ff2320 100644 --- a/src/urlbar/urlsuggester.cpp +++ b/src/urlbar/urlsuggester.cpp @@ -294,7 +294,7 @@ void UrlSuggester::computeWebSearches() { QString query = _typedString; - // this result is generated when an user types something like gg:kde + // this result is generated when an user types something like gg:kde KService::Ptr engine = SearchEngine::fromString(_typedString); if (engine) { @@ -305,7 +305,7 @@ void UrlSuggester::computeWebSearches() { engine = SearchEngine::defaultEngine(); } - + UrlSuggestionItem item = UrlSuggestionItem(UrlSuggestionItem::Search, SearchEngine::buildQuery(engine, query), query, engine->name()); UrlSuggestionList list; list << item; @@ -382,20 +382,20 @@ void UrlSuggester::computeSuggestions() // { // if (text != _typedString) // return; -// +// // UrlSuggestionList sugList; // QString urlString; // Q_FOREACH(const Response & i, suggestions) // { // if (text == i.title) // continue; -// +// // urlString = i.url; // if (urlString.isEmpty()) // { // urlString = SearchEngine::buildQuery(UrlSuggester::searchEngine(), i.title); // } -// +// // UrlSuggestionItem gItem(UrlSuggestionItem::Suggestion, urlString, i.title, i.description, i.image, i.image_width, i.image_height); // sugList << gItem; // } diff --git a/src/urlbar/urlsuggester.h b/src/urlbar/urlsuggester.h index d7673c3a..edbe116a 100644 --- a/src/urlbar/urlsuggester.h +++ b/src/urlbar/urlsuggester.h @@ -84,13 +84,13 @@ public: {}; UrlSuggestionItem(const int &_type, - const QString &_url, - const QString &_title = QString(), - const QString &_description = QString(), - const QString &_image = QString(), - const int &_image_width = 0, - const int &_image_height = 0 - ) + const QString &_url, + const QString &_title = QString(), + const QString &_description = QString(), + const QString &_image = QString(), + const int &_image_width = 0, + const int &_image_height = 0 + ) : type(_type) , url(_url) , title(_title) @@ -147,7 +147,7 @@ private: UrlSuggestionList _suggestions; bool _webSearchFirst; - + static QRegExp _browseRegexp; static QRegExp _searchEnginesRegexp; }; |