From 1e636eaba260d579cf1d3270451425df9dc238cb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 27 Jan 2014 23:19:03 +0100 Subject: [PATCH] Add missing utils module --- qutebrowser/utils/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 qutebrowser/utils/__init__.py diff --git a/qutebrowser/utils/__init__.py b/qutebrowser/utils/__init__.py new file mode 100644 index 000000000..1adb8dbe5 --- /dev/null +++ b/qutebrowser/utils/__init__.py @@ -0,0 +1,8 @@ +from PyQt5.QtCore import QUrl + +def qurl(url): + if isinstance(url, QUrl): + return url + if not url.startswith('http://'): + url = 'http://' + url + return QUrl(url)