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.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index e20a98fbf1..71a0228eeb 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -816,7 +816,7 @@ static const ushort * const fragmentInUrl = userNameInUrl + 6;
static inline void parseDecodedComponent(QString &data)
{
- data.replace(QLatin1Char('%'), QStringLiteral("%25"));
+ data.replace(QLatin1Char('%'), QLatin1String("%25"));
}
static inline QString
@@ -981,10 +981,12 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro
needsLowercasing = i;
continue;
}
- if (p[i] >= '0' && p[i] <= '9' && i > 0)
- continue;
- if (p[i] == '+' || p[i] == '-' || p[i] == '.')
- continue;
+ if (i) {
+ if (p[i] >= '0' && p[i] <= '9')
+ continue;
+ if (p[i] == '+' || p[i] == '-' || p[i] == '.')
+ continue;
+ }
// found something else
// don't call setError needlessly:
@@ -1472,7 +1474,7 @@ QString QUrlPrivate::toLocalFile(QUrl::FormattingOptions options) const
// magic for shared drive on windows
if (!host.isEmpty()) {
- tmp = QStringLiteral("//") + host;
+ tmp = QLatin1String("//") + host;
#ifdef Q_OS_WIN // QTBUG-42346, WebDAV is visible as local file on Windows only.
if (scheme == webDavScheme())
tmp += webDavSslTag();