summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r--src/corelib/io/qurl.cpp40
1 files changed, 5 insertions, 35 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index fd2127bce3..71a0228eeb 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -413,9 +413,6 @@
#include "qtldurl_p.h"
#include "private/qipaddress_p.h"
#include "qurlquery.h"
-#if defined(Q_OS_WINCE_WM)
-#pragma optimize("g", off)
-#endif
QT_BEGIN_NAMESPACE
extern QString qt_normalizePathSegments(const QString &name, bool allowUncPaths); // qdir.cpp
@@ -3456,33 +3453,6 @@ QByteArray QUrl::toPercentEncoding(const QString &input, const QByteArray &exclu
return input.toUtf8().toPercentEncoding(exclude, include);
}
-/*! \fn QUrl QUrl::fromCFURL(CFURLRef url)
- \since 5.2
-
- Constructs a QUrl containing a copy of the CFURL \a url.
-*/
-
-/*! \fn CFURLRef QUrl::toCFURL() const
- \since 5.2
-
- Creates a CFURL from a QUrl. The caller owns the CFURL and is
- responsible for releasing it.
-*/
-
-/*!
- \fn QUrl QUrl::fromNSURL(const NSURL *url)
- \since 5.2
-
- Constructs a QUrl containing a copy of the NSURL \a url.
-*/
-
-/*!
- \fn NSURL* QUrl::toNSURL() const
- \since 5.2
-
- Creates a NSURL from a QUrl. The NSURL is autoreleased.
-*/
-
/*!
\internal
\since 5.0
@@ -3816,13 +3786,13 @@ QUrl QUrl::fromLocalFile(const QString &localFile)
} else if (deslashified.startsWith(QLatin1String("//"))) {
// magic for shared drive on windows
int indexOfPath = deslashified.indexOf(QLatin1Char('/'), 2);
- QString hostSpec = deslashified.mid(2, indexOfPath - 2);
+ QStringRef hostSpec = deslashified.midRef(2, indexOfPath - 2);
// Check for Windows-specific WebDAV specification: "//host@SSL/path".
if (hostSpec.endsWith(webDavSslTag(), Qt::CaseInsensitive)) {
- hostSpec.chop(4);
+ hostSpec.truncate(hostSpec.size() - 4);
scheme = webDavScheme();
}
- url.setHost(hostSpec);
+ url.setHost(hostSpec.toString());
if (indexOfPath > 2)
deslashified = deslashified.right(deslashified.length() - indexOfPath);
@@ -4287,8 +4257,8 @@ QUrl QUrl::fromUserInput(const QString &userInput)
if (urlPrepended.isValid() && (!urlPrepended.host().isEmpty() || !urlPrepended.path().isEmpty()))
{
int dotIndex = trimmedString.indexOf(QLatin1Char('.'));
- const QString hostscheme = trimmedString.left(dotIndex).toLower();
- if (hostscheme == ftpScheme())
+ const QStringRef hostscheme = trimmedString.leftRef(dotIndex);
+ if (hostscheme.compare(ftpScheme(), Qt::CaseInsensitive) == 0)
urlPrepended.setScheme(ftpScheme());
return adjustFtpPath(urlPrepended);
}