summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qurl.cpp17
-rw-r--r--src/corelib/io/qurl_p.h2
2 files changed, 3 insertions, 16 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index ff1f7ba78c..bc92e943fc 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -656,7 +656,7 @@ inline void QUrlPrivate::appendQuery(QString &appendTo, QUrl::FormattingOptions
// setXXX functions
-bool QUrlPrivate::setScheme(const QString &value, int len, bool decoded)
+bool QUrlPrivate::setScheme(const QString &value, int len)
{
// schemes are strictly RFC-compliant:
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
@@ -687,19 +687,6 @@ bool QUrlPrivate::setScheme(const QString &value, int len, bool decoded)
if (p[i] == '+' || p[i] == '-' || p[i] == '.')
continue;
- if (p[i] == '%') {
- // found a percent-encoded sign
- // if we haven't decoded yet, decode and try again
- errorSupplement = '%';
- if (decoded)
- return false;
-
- QString decodedScheme;
- if (qt_urlRecode(decodedScheme, value.constData(), value.constData() + len, 0, 0) == 0)
- return false;
- return setScheme(decodedScheme, decodedScheme.length(), true);
- }
-
// found something else
errorSupplement = p[i];
return false;
@@ -1581,7 +1568,7 @@ void QUrl::setUrl(const QString &url, ParsingMode parsingMode)
/*!
Sets the scheme of the URL to \a scheme. As a scheme can only
- contain ASCII characters, no conversion or encoding is done on the
+ contain ASCII characters, no conversion or decoding is done on the
input. It must also start with an ASCII letter.
The scheme describes the type (or protocol) of the URL. It's
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h
index 3a0d80d7ef..95ccd221a2 100644
--- a/src/corelib/io/qurl_p.h
+++ b/src/corelib/io/qurl_p.h
@@ -122,7 +122,7 @@ public:
void appendFragment(QString &appendTo, QUrl::FormattingOptions options) const;
// the "end" parameters are like STL iterators: they point to one past the last valid element
- bool setScheme(const QString &value, int len, bool decoded = false);
+ bool setScheme(const QString &value, int len);
bool setAuthority(const QString &auth, int from, int end);
void setUserInfo(const QString &userInfo, int from, int end);
void setUserName(const QString &value, int from, int end);