summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-02-20 13:39:04 -0500
committerAndrea Diamantini <adjam7@gmail.com>2013-02-24 11:18:37 +0100
commit192d816bce2ff277314d4b04566fbb098851d0a3 (patch)
treed5d132c60d08c4426d52a812159d5e8bff0aa89f /src
parentDelay 1 sec adblock settings load to boost startup performance (diff)
downloadrekonq-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>
Diffstat (limited to 'src')
-rw-r--r--src/urlbar/urlbar.cpp6
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())));
}