summaryrefslogtreecommitdiff
path: root/src/urlbar/urlbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r--src/urlbar/urlbar.cpp22
1 files changed, 11 insertions, 11 deletions
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));
+}