summaryrefslogtreecommitdiff
path: root/src/urlbar/urlbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-12 02:00:13 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-12 02:00:13 +0200
commitd2b1a62a0ecdd286b9d83275170a3322ffafd32c (patch)
tree7ab453799004d0caa7fc3a3106c1c0374f3d9b6f /src/urlbar/urlbar.cpp
parentfix strings (diff)
downloadrekonq-d2b1a62a0ecdd286b9d83275170a3322ffafd32c.tar.xz
URLBAR ANIMATION: implementation fix
This commit follows the logic explained somewhere else, moving rekonq to a better management for urls from user input. 1) users type strings --> we store them in QStrings 2) app load urls --> we should ever work with KUrls, trying to guess users needs Here I also removed the unuseful QString icon from UrlSearchItem definition, as we just have a type (Search, Browse, History, Books..), a (k)url and an Application::icon method :)
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r--src/urlbar/urlbar.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 6f916482..3b79b06b 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -73,7 +73,7 @@ UrlBar::UrlBar(QWidget *parent)
// suggestions
installEventFilter(_box);
- connect(_box, SIGNAL(chosenUrl(const QString&, Rekonq::OpenType)), SLOT(activated(const QString&, Rekonq::OpenType)));
+ connect(_box, SIGNAL(chosenUrl(const KUrl &, Rekonq::OpenType)), SLOT(activated(const KUrl &, Rekonq::OpenType)));
}
@@ -103,16 +103,13 @@ void UrlBar::setQUrl(const QUrl& url)
}
-void UrlBar::activated(const QString& urlString, Rekonq::OpenType type)
+void UrlBar::activated(const KUrl& url, Rekonq::OpenType type)
{
disconnect(this, SIGNAL(textChanged(const QString &)), this, SLOT(suggestUrls(const QString &)));
- if (urlString.isEmpty())
- return;
-
clearFocus();
- setText(urlString);
- Application::instance()->loadUrl(urlString.trimmed(), type);
+ setUrl(url);
+ Application::instance()->loadUrl(url, type);
}