diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp
index 44da224..d84dbc9 100644
--- a/src/corelib/io/qipaddress.cpp
+++ b/src/corelib/io/qipaddress.cpp
@@ -35,6 +35,7 @@
 #include "private/qlocale_tools_p.h"
 #include "qvarlengtharray.h"
 
+#include <QDebug>
 QT_BEGIN_NAMESPACE
 namespace QIPAddressUtils {
 
@@ -66,6 +67,7 @@ static const QChar *checkedToAscii(Buffer &buffer, const QChar *begin, const QCh
 static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero);
 bool parseIp4(IPv4Address &address, const QChar *begin, const QChar *end)
 {
+    qDebug() << __FUNCTION__;
     Q_ASSERT(begin != end);
     Buffer buffer;
     if (checkedToAscii(buffer, begin, end))
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index d4c5e03..29da851 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -1170,6 +1170,7 @@ inline void QUrlPrivate::appendHost(QString &appendTo, QUrl::FormattingOptions o
 // returns null if the parsing was successful, or the QChar of the first failure
 static const QChar *parseIpFuture(QString &host, const QChar *begin, const QChar *end, QUrl::ParsingMode mode)
 {
+    qDebug() << __FUNCTION__;
     //    IPvFuture     = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
     static const char acceptable[] =
             "!$&'()*+,;=" // sub-delims
@@ -1221,6 +1222,7 @@ static const QChar *parseIpFuture(QString &host, const QChar *begin, const QChar
 // ONLY the IPv6 address is parsed here, WITHOUT the brackets
 static const QChar *parseIp6(QString &host, const QChar *begin, const QChar *end, QUrl::ParsingMode mode)
 {
+    qDebug() << __FUNCTION__;
     QIPAddressUtils::IPv6Address address;
     const QChar *ret = QIPAddressUtils::parseIp6(address, begin, end);
     if (ret) {
@@ -1262,6 +1264,7 @@ inline bool QUrlPrivate::setHost(const QString &value, int from, int iend, QUrl:
         return true;
 
     if (begin[0].unicode() == '[') {
+        qDebug() << __FUNCTION__ << begin[0] << "IPv6Address or IPvFuture";
         // IPv6Address or IPvFuture
         // smallest IPv6 address is      "[::]"   (len = 4)
         // smallest IPvFuture address is "[v7.X]" (len = 6)
@@ -1292,6 +1295,7 @@ inline bool QUrlPrivate::setHost(const QString &value, int from, int iend, QUrl:
 
     // check if it's an IPv4 address
     QIPAddressUtils::IPv4Address ip4;
+    qDebug() << __FUNCTION__ << "check if it's an IPv4 address";
     if (QIPAddressUtils::parseIp4(ip4, begin, end)) {
         // yes, it was
         QIPAddressUtils::toString(host, ip4);
@@ -2296,13 +2300,16 @@ void QUrl::setHost(const QString &host, ParsingMode mode)
         parseDecodedComponent(data);
         mode = TolerantMode;
     }
+    qDebug() << __FUNCTION__ << "host=" << host;
 
     if (d->setHost(data, 0, data.length(), mode)) {
         if (host.isNull())
             d->sectionIsPresent &= ~QUrlPrivate::Host;
+        qDebug() << __FUNCTION__ << "host.isNull()" << host.isNull();
     } else if (!data.startsWith(QLatin1Char('['))) {
         // setHost failed, it might be IPv6 or IPvFuture in need of bracketing
         Q_ASSERT(d->error);
+        qDebug() << __FUNCTION__ << d->error->source << d->error->code;
 
         data.prepend(QLatin1Char('['));
         data.append(QLatin1Char(']'));
@@ -2314,6 +2321,7 @@ void QUrl::setHost(const QString &host, ParsingMode mode)
             }
         } else {
             // succeeded
+            qDebug() << __FUNCTION__ << "d->clearError();";
             d->clearError();
         }
     }
@@ -3740,19 +3748,27 @@ QUrl QUrl::fromLocalFile(const QString &localFile)
         return url;
     url.setScheme(fileScheme());
     QString deslashified = QDir::fromNativeSeparators(localFile);
+    qDebug() << __FUNCTION__ << "deslashified=" << deslashified;
 
     // magic for drives on windows
     if (deslashified.length() > 1 && deslashified.at(1) == QLatin1Char(':') && deslashified.at(0) != QLatin1Char('/')) {
         deslashified.prepend(QLatin1Char('/'));
+        qDebug() << __FUNCTION__ << "deslashified prepended:" << deslashified;
     } else if (deslashified.startsWith(QLatin1String("//"))) {
+
         // magic for shared drive on windows
         int indexOfPath = deslashified.indexOf(QLatin1Char('/'), 2);
-        url.setHost(deslashified.mid(2, indexOfPath - 2));
-        if (indexOfPath > 2)
+        const QString host = deslashified.mid(2, indexOfPath - 2);
+        qDebug() << __FUNCTION__ << "host=" << host;
+        url.setHost(host);
+        if (indexOfPath > 2) {
             deslashified = deslashified.right(deslashified.length() - indexOfPath);
+            qDebug() << __FUNCTION__ << "indexOfPath>=2" << deslashified;
+        }
         else
             deslashified.clear();
     }
+    qDebug() << __FUNCTION__ << "finally:" << deslashified;
 
     url.setPath(deslashified, DecodedMode);
     return url;
