diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-20 13:39:04 -0500 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-02-24 11:18:37 +0100 |
commit | 192d816bce2ff277314d4b04566fbb098851d0a3 (patch) | |
tree | d5d132c60d08c4426d52a812159d5e8bff0aa89f | |
parent | Delay 1 sec adblock settings load to boost startup performance (diff) | |
download | rekonq-192d816bce2ff277314d4b04566fbb098851d0a3.tar.xz |
Trim whitespace from urls
Whitespace from the start and end of the urls
was not being removed.
This caused no suggestions to show up or an
incorrect path for Paste & Go.
REVIEW: 109059
Signed-off-by: Andrea Diamantini <adjam7@gmail.com>
-rw-r--r-- | src/urlbar/urlbar.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index f8d9f2ff..17be6fa0 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -641,7 +641,7 @@ void UrlBar::suggest() { if (!_box.isNull()) { - _box.data()->suggestUrls(text()); + _box.data()->suggestUrls(text().trimmed()); } } @@ -667,7 +667,7 @@ void UrlBar::refreshFavicon() void UrlBar::pasteAndGo() { - loadRequestedUrl(rApp->clipboard()->text()); + loadRequestedUrl(rApp->clipboard()->text().trimmed()); } @@ -675,7 +675,7 @@ void UrlBar::pasteAndSearch() { KService::Ptr defaultEngine = SearchEngine::defaultEngine(); if (defaultEngine) - loadRequestedUrl(KUrl(SearchEngine::buildQuery(defaultEngine, QApplication::clipboard()->text()))); + loadRequestedUrl(KUrl(SearchEngine::buildQuery(defaultEngine, QApplication::clipboard()->text().trimmed()))); } |