Commit Graph

220 Commits

Author SHA1 Message Date
Shane Kearns
2380765a2b Fix QFile::permissions for long filenames
When qt_ntfs_permission_lookup is used, QFile::permissions failed
for files with long filenames.
Also created a test case for this API, which revealed another bug.

Task-number: QTBUG-25629
Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-05-16 04:24:43 +02:00
Andy Shaw
cfb44c6528 Fix cases where functions are called with a drive and no slash
When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path().  Tests are also added for these three cases and some
others too.

Task-number: QTBUG-25353

Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-16 04:24:29 +02:00
kb
cff6e39cd1 Remove capitalization when specifying include-libraries.
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.

Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 21:34:08 +02:00
David Faure
5764f5e6ea QUrl: using sectionIsPresent in operator== broke for local files.
QUrl::fromLocalFile("/foo") doesn't set Host, but QUrl("file:///foo")
does (to remember that it saw a Host section, even if empty, which is
useful for urls like "remote://"). So ignore the Host flag in operator==.

Change-Id: I4322b4a75420c4e42766c0d65c1b121f28028a76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-14 17:36:57 +02:00
David Faure
feb212e1e5 QUrl: a url with a fragment or query, and one without, are different.
Fix operator== and operator< so that a URL with an empty fragment
or query, is not treated as equal to a URL without any fragment or query.
This restores the Qt4 behavior on this particular issue.

Change-Id: Ie989f37353fb13c791b1d558d638d2e8a5b5d1b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-14 17:36:50 +02:00
David Faure
5ab700f639 Restore QUrl::setEncodedQuery(QByteArray()) to the Qt4 behavior.
Null bytearray means no query, and QString::fromLatin1(QByteArray())
doesn't give a null string, but an empty string.

Same for setEncodedFragment(QByteArray()).

Change-Id: I992e9253e35941d66886456872ea06aa2ae92450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-13 11:06:18 +02:00
Thiago Macieira
75552c8f62 Fix a crash when parsing a URL with username and port, but no password
This was crashing because the ':' was found past the end of the
username, causing the recoder to run from position 22 to 11, via the
long way around the memory.

Change-Id: Ic1ae596f34f7db857fb4210294974fb5a6adf691
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-10 02:39:30 +02:00
Alexis Menard
92d4e843bd Fix qDecodeDataUrl for already percentage encoded content.
If the url we pass as parameter already have percentage encoded data,
we don't want to decode it and call fromPercentEncoding. The test
coverage is not complete for qdataurl.cpp file but it is better than
previously and it will also protect us from future regressions.

Change-Id: I79f709f44bed1b7f274a3de639c7e291fa91a193
Reviewed-by: Thiago Macieira
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-09 20:10:44 +02:00
David Faure
677858ad9e Fix QUrl::StripTrailingSlash for the case of no path at all.
Change-Id: I1fd0fe4b9b67996732c85c1792415e371e865595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-09 12:07:33 +02:00
Thiago Macieira
26e47c0353 Slightly improve the query encode/decode test in QUrl
Show that nothing is changed either way, regardless of the encoding
flags used.

Change-Id: I31fba5f87eae777d4b708ab789b32169004bcbcc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-04 15:24:52 +02:00
David Faure
7c717e56f5 Fix QUrl::toString(StripTrailingSlash) to not turn file:/// into file:
It should only strip one slash (as the name indicates), and not if the
path is just "/".

Change-Id: I133a81977241de77a49d1d1559143d30e0bd52f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-04 13:03:35 +02:00
Thiago Macieira
712ca9d95a Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-04 12:45:47 +02:00
Lars Knoll
1e49914fee Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/gui/kernel/qguiapplication.h
	src/gui/kernel/qwindow.cpp
	src/gui/kernel/qwindow.h
	tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp

Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
2012-05-03 12:26:09 +02:00
Debao Zhang
ade8888603 Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.

qVariantFromValue and qVariantSetValue are Obsolete members.

Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 08:30:59 +02:00
Thiago Macieira
4a6d3fcab6 Wrap all Latin 1 strings with QString::fromLatin1 or QLatin1Strings
Change-Id: I1a1891b9126a2546c1872ec25aba9581cc84bb2f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 22:52:01 +02:00
Thiago Macieira
f6aef23ff1 Ensure that QUrl::{to,from}LocalPath encode/decode properly
Unlike path(), toLocalFile() isn't reporting a URL component, so it
should decode the percent-encoded characters fully. This extra
decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent
sign itself).

It also catches %80 to %FF, which aren't decoded because they don't
form UTF-8 sequences. That means QUrl::toLocalFile() has undefined
behaviour if the path contained non-UTF8 sequences.

Task-number: QTBUG-25459
Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-26 03:15:22 +02:00
Thiago Macieira
6159870348 Revert QUrl::isRelative to its Qt 4 behaviour
Instead of trying to return whether the URL is relative to something
undefined, let's instead follow what the documentation was saying all
along and what the RFC says about "Relative References".

Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 14:58:36 +02:00
Jason McDonald
3de77c3daa Mark known test failures in Windows developer build.
Previously, the CI system has not been testing on Windows with the
-developer-build configure flag. Mark known failures for this
configuration so that tests can be run in enforcing mode.

Change-Id: I5fbbbe09a7b400d626107c66dcbd5c5469a45b20
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-04-25 10:29:56 +02:00
Thiago Macieira
77a816c00d Ensure that QUrl::toLocalFile returns decoded paths
QUrl::path() already decodes almost everything, but let's pass the
formatting flag to be sure.

Note: decoding of control characters from U+0001 to U+001F is not
implemented. Non-UTF8 sequences are also not representable.

Change-Id: I9a0ae2282ec3d48cc0e70e5b2d3824fb120709ed
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
fd7e1cef9c Don't strip the leading slash of letter+colon paths on Unix
It's perfectly valid to have a path of /c:/a.txt on Unix, so don't
strip the leading slash unless we're on Windows.

Task-number: QTBUG-20322
Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Kai Koehne
d9a1c2dff8 Logging: Change arguments of message handler to avoid conversions
Introduce a new QtMessageHandler that takes QString instead of
char *: This avoids converting to local8bit , only to convert it back
to utf16 for Windows.

The old QMessageHandler is kept for a transition period, but will
be removed before Qt 5.0.

Also fix qEmergencyOut (that is called in OOM situations) to not rely
on the default message handler.

Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 08:37:06 +02:00
Rohan McGovern
1464081dfb Really marked tst_QProcess as insignificant on Windows.
This test hangs ~2.6% of the time in CI.

The previous commit which attempted to mark this test as insignificant
did not work due to this .pro file doing a load(testcase) prior to the
line which set CONFIG += insignificant_test.  testcase.prf must be
loaded _after_ insignificant_test is set.

Task-number: QTBUG-25342
Change-Id: I20470337fda8235e2fd0b6e8d5f564c8c57d167e
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-04-19 01:57:58 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Rohan McGovern
4e282e3ea2 Marked tst_QProcess as insignificant on Windows.
This test hangs ~2.6% of the time in CI.

Task-number: QTBUG-25342
Change-Id: I2c3531140e15edfe2dc2524e101b84e3206a4e61
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-04-17 07:36:35 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Thiago Macieira
4d79312f1c Ensure proper handling of empty-but-present URL components
The new QUrl is able to distinguish a URL component that is empty from
one that is absent. The previous one already had that capability for
the port, fragment and query, and the new one extends that to the username,
password and path. The path did not need this handling because its
delimiter from the authority it part of the path.

For example, a URL with no username is one where it's set to QString()
(null). A URL like "http://:kde@kde.org" is understood as an
empty-but-present username, for which toString(RemovePassword) will
return "http://@kde.org", keeping the empty-but-present username.

Change-Id: I2d97a7656f3f1099e3cf400b199e68e4c480d924
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-12 23:01:37 +02:00
Bradley T. Hughes
a387fd8ee3 Do not ignore tests/auto/corelib/io/qtextstream on Mac OS X
This test no longer fails, so we can remove CONFIG+=insignificant_test

Task-number: QTBUG-22767
Change-Id: If3ca194fc982ad8fdc3e9a7f62fc346190ff01ea
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-12 21:26:42 +02:00
Bradley T. Hughes
20a36364eb Do not ignore tests/auto/corelib/io/qiodevice on Mac OS X
This test no longer fails, so we can remove CONFIG+=insignificant_test

Task-number: QTBUG-22766
Change-Id: I379873d5c483157e414201e5f8a13c3f4407f9fd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-12 21:26:42 +02:00
Bradley T. Hughes
4b668da750 Do not ignore tests/auto/corelib/io/qfile on Mac OS X
This does not fail anymore, remove CONFIG+=insignificant_test

Change-Id: I4f98cfad563adfa460910976317c91e852db6872
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-12 21:26:42 +02:00
Thiago Macieira
bb03f8e812 Readd a bunch of tests that had got removed in the QUrl porting
Most of the tests were removed while QUrl::toEncoded or fromEncoded
were deprecated in the development process. Since they aren't
deprecated in the end, bring them back.

Change-Id: Ibdb6cd3c4b83869150724a8e327a03a2cd22580d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:32 +02:00
Thiago Macieira
1b7e9dba75 Change the component formatting enum values so the default is zero
By having the default value equal to zero, we follow the principle of
least surprise. For example, if we had
      url.path()
and we refactored to
      url.path(QUrl::DecodeSpaces)

Then instead of ensuring spaces are decoded, we make spaces the only
thing encoded (unicode, delimiters and reserved characters are
encoded).

Besides, modifying the default can only be used to encode something
that wasn't encoded previously, so having the enums as Encode makes
more sense.

As a side-effect, toEncoded() does not support any extra encoding
options.

Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:26 +02:00
Thiago Macieira
997ac954ab Allow {} to remain decoded in URLs in the path and query
This allows things like http://example.com/{1234-5678}?id={abcd-ef01}.
But do not allow it in other parts of the URL. I could allow it in the
fragment, but in the username and password it would be too ugly.

In order to do that, make DecodeReserved use two bits and have
PrettyDecoded set only one of them. That way, toString(PrettyDecoded)
can be distinguished from toString(PrettyDecoded | DecodeReserved),
just as path(PrettyDecoded) can be distinguished from
path(PrettyDecoded & ~DecodeDelimiters).

Also, take the opportunity to avoid decoding the reserved characters
in the query. Keep them encoded as they should be.

Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:18 +02:00
Thiago Macieira
a01c662d37 Introduce QUrl::DecodeReserved and reorder the enums
DecodeReserved applies to all characters between 0x21 and 0x7E that
aren't unreserved, a delimiter, or the percent sign itself.

Change-Id: Ie64bddb6b814dfa3bb8380e3aa24de1bb3645a65
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:04 +02:00
Thiago Macieira
0441b2d4c3 Merge QUrl::DecodeAllDelimiters and QUrl::DecodeUnambiguousDelimiters
There's little value in having the DecodeUnambiguousDelimiters option
since neither QUrl nor QUrlQuery can return values that are ambiguous
in that particular context, ever.

This option could be used to encode a character if, when placed
in a URL, it would need to be encoded. Such cases are hash (#) or
question marks (?) in the path component, or slashes (/) and at signs
(@) in the userinfo.

However, we don't need two enums for that, since there are no
other characters that can appear in either form. Still, leave two bits
for this enum. In the future, if we want to split the gen-delims from
the sub-delims, we are able to.

Change-Id: If5416b524680eb67dd4abbe7d072ca0ef7218506
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:59 +02:00
Thiago Macieira
9af551f7ab Add a big test for QUrl encoding principles
This tests how QUrl encodes and decodes certain characters and leaves
some other ones alone. It also tests that the output of toString() (in
whichever encoding was being tested) is also parsed again to be
exactly the same as the previously decoded form.

Change-Id: Ie358d001f8b903409db61db48bde1ea679241a60
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:52 +02:00
Thiago Macieira
ef288340da Fix the handling of ambiguous delimiters in the query part of a URL
This is the same fix as the previous commit did for the other
components of the URL. But we're also changing how we handle the "[]"
characters in a query: previously the handling was like for other
sub-delims; now, they're always decoded, assuming that the RFC had a
mistake and they were meant to be decoded.

Change-Id: If4b1c3df8f341cb114f2cc4860de22f8bf0be743
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:46 +02:00
Thiago Macieira
8d3cb11261 Make QUrl handle ambiguous delimiters correctly
Refactor the way that QUrl stores and returns the components of the
URL so that ambiguous delimiters (gen-delims that could change the
meaning of the parsing) are interpreted correctly. Previously, QUrl
called "unambiguous" the form found in a full URL, even though each
item in isolation could have more characters decoded.

Now, instead, store only the fully decoded form. To recreate the
compound forms (the full URL, as well as the user info and the
authority), we need to do more processing.

This commit applies to the user name, password, path and fragment
only. The scheme, host and port do not need this work because they are
special; the query is handled separately.

Change-Id: I5907ba9b8fe048fff23c128be95668c22820663a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:41 +02:00
Robin Burchell
7be255156f Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 10:46:19 +02:00
Thiago Macieira
d4f3052a1b Adjust a double leading slash in the path for FTP to /%2F
Some FTP implementations (currently not including QNAM) strip the first
slash off the path in an FTP URL so that the path in the URL is relative
to the login path (the user's home directory). To reach the root
directory, another slash is necessary, hence the double slash.

In anticipation of future URL normalisation, which Qt 4 could do, "//"
could be rendered to "/", so this extra slash should be "%2F".

This operation is done only in QUrl::fromUserInput.

Change-Id: If9619ef6b546a3f4026cb26b74a7a5a865123609
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-10 22:54:37 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Rafael Roquetto
00f3299e8b Blackberry OS implementation of QStandardPaths
Change-Id: I31427b896ca691de7071da17af4863d16348df7b
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-10 10:38:10 +02:00
David Faure
4a11611c8a Fix unittest for QStandardPaths::enableTestMode
It was confusing DataLocation and GenericDataLocation, and the same
for CacheLocation and GenericCacheLocation. The test was passing in
the api_changes branch because these were giving the same result
(empty app name), but the QCoreApplication::applicationName fix in master
makes these different, so the bug in the test showed up after merging.

Change-Id: I80ef6883c96cfd02b8c277d9d686717028d396bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-05 10:15:21 +02:00
Friedemann Kleint
8f2a088028 Fix MSVC warnings in tests.
- Unused variables
- conversion truncations
- Overflow in expressions like '-1 + sizeof()'

Change-Id: Ibbd18497951e9e7e9dccaf596cb4e864b69ec02c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-02 16:56:48 +02:00
Thiago Macieira
ffd20af339 Revert to Qt4 behaviour that QUrl().isValid() == false
There are probably lots of places that rely on that behaviour, so go
back to what it was.

Change-Id: I4d1503a0ee105a50cdfaab52d9a5862a02c70757
Reviewed-by: David Faure <faure@kde.org>
2012-03-30 01:19:59 +02:00
Thiago Macieira
7f20dce264 Move the #include "tst_qurlinternal.moc" up to workaround a bug
I don't know if the bug is in moc or in qmake. But it bails out trying
to parse the .cpp file after the
tst_QUrlInternal::nameprep_testsuite_data function. If the #include is
placed above, it works. If it's placed below, it doesn't.

Change-Id: Ide554aa5aa3f1999e29604ba6d25ccdb09f6ef28
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
c9b78026f5 Fix the license headers for the files in the new-qurl branch
Change-Id: I469fed8b72111905e31553d0c82e62ced4009d75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
66df11f4d1 Fix QUrl operator== and operator<
Don't crash when either side is null but not both sides.

Also make sure operator< is working properly and satisfies the basic
conditions of a type (such as that if A < B, then !(B < A)).

Change-Id: Idd9e9fc593e1a7781d9f4f2b13a1024b643926fd
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
64a10879cb Disallow spaces in URLs when parsing in StrictMode.
Change-Id: I16de68aff2b9e84cc800734c5875aaee9a2ea565
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
329ee8cedc Reimplement the StrictMode URL parsing
The strict mode check is now implemented after the tolerant parser has
finished, and only if the tolerant parser has not found any errors. We
catch the use of disallowed characters (control characters plus a few
not permitted anywhere) and broken percent encodings.

We do not catch the use of Unicode characters, as they are permitted
in IRIs.

In the tests, remove the old errorString test since it makes little
sense.

Change-Id: I8261a2ccad031ad68fc6377a206e59c9db89fb38
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
cff38329aa Re-introduce support for QUrl::errorString()
Note that QUrl can only remember one error. If the URL contains more
than one error condition, only the latest (in whichever parsing order
URL decides to use) will be reported.

I don't want too keep too much data in QUrlPrivate for validation, so
let's use 4 bytes only.

Change-Id: I2afbf80734d3633f41f779984ab76b3a5ba293a2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00