From 72e0446fbc7017e7703102f733568a4f2e3c5195 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 16 Apr 2010 03:14:48 +0200 Subject: Fixing Lionel's merge request: - clean/fix APIs - removed no more used methods/signals from CompletionWidget - use item->url() (as it has been defined) - Change the "pointing out text" from underline to bold (better, IMO) - QString --> Q/K url, as needed - Restore UrlFromUserInput engine: why it has been deleted? - Comment out the isHttp() check. That way I cannot in any way connect to localhost or to my home server. Apart from typing their IPs.. - Partially fixed the switch search engine implementation. Btw, I have to say I really don't like rekonq switch my default engine just because one time I decided to give a try to another... Not sure about. - Something more coming.. But tomorrow! Now it's 3:20 am here. Good night! --- src/urlbar/urlbar.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/urlbar/urlbar.cpp') diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 4abd4622..4e7310bf 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -72,7 +72,9 @@ UrlBar::UrlBar(QWidget *parent) // suggestions installEventFilter(_box); connect(_box, SIGNAL(chosenUrl(const KUrl &, Rekonq::OpenType)), SLOT(activated(const KUrl &, Rekonq::OpenType))); - connect(_box, SIGNAL(loadTypedUrl()), this, SLOT(activated())); + + // load typed urls + connect(this, SIGNAL(returnPressed(const QString &)), this, SLOT(loadTyped(const QString &))); } @@ -104,16 +106,8 @@ void UrlBar::activated(const KUrl& url, Rekonq::OpenType type) disconnect(this, SIGNAL(textChanged(const QString &)), this, SLOT(suggestUrls(const QString &))); clearFocus(); - KUrl loadingUrl; - - if(url.isEmpty()) - loadingUrl = KUrl(text()); - else - loadingUrl = url; - - setUrl(loadingUrl); - - Application::instance()->loadUrl(loadingUrl, type); + setUrl(url); + Application::instance()->loadUrl(url, type); } @@ -278,3 +272,9 @@ void UrlBar::loadFinished() update(); } + + +void UrlBar::loadTyped(const QString &text) +{ + activated(KUrl(text)); +} -- cgit v1.2.1