diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 494caf60d5..2a439b3a7c 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3878,12 +3878,11 @@ QUrl QUrl::fromUserInput(const QString &userInput) QUrl url = QUrl(trimmedString, QUrl::TolerantMode); QUrl urlPrepended = QUrl(QStringLiteral("http://") + trimmedString, QUrl::TolerantMode); - // Check the most common case of a valid url with scheme and host + // Check the most common case of a valid url with a scheme // We check if the port would be valid by adding the scheme to handle the case host:port // where the host would be interpretted as the scheme if (url.isValid() && !url.scheme().isEmpty() - && (!url.host().isEmpty() || !url.path().isEmpty()) && urlPrepended.port() == -1) return adjustFtpPath(url); |