summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-3/+6
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-3/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| | * Fix utf8->utf16 BOM/ZWNBSP decoding.Erik Verbruggen2015-12-211-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the byte sequence for a BOM occurs in the middle of a utf8 stream, it is a ZWNBSP. When a ZWNBSP occurs in the middle of a utf8 character sequence, and the SIMD conversion does some work (meaning: the length is at least 16 characters long), it would not recognize the fact some charactes were already decoded. So the conversion would then strip the ZWNBSP out, thinking it's a BOM. The non-SIMD conversion did not have this problem: the very first character conversion would already set the headerdone flag. Change-Id: I39aacf607e2e068107106254021a8042d164f628 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Updated license headersJani Heikkinen2016-01-1534-476/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Add a QUtf8::convertToUnicode() overload that operates on an existing bufferMarc Mutz2015-11-192-3/+27
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and therefore doesn't need to allocate and thus can be marked as nothrow. Technically, the function doesn't have a wide contract, because it has the precondition that the buffer pointed to by the first argument needs to be large enough to hold the result. But that precondition can't be checked from within the function, so no failure can be generated for it and thus the nothrow guarantee is acceptable (and desireable). Change-Id: Iaf6ea6788ef6b4bbb6d8de59a3d0b14d66582307 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mark qt_from_latin1() as nothrowMarc Mutz2015-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's used from a different TU, too, so we can't rely on the compiler to inspect it to draw this conclusion itself. This function has technically not a wide contract, because the output buffer needs to be large enough to hold the result. However, this precondition cannot be checked from within the function, therefore no assertion can ever be added and the nothrow marker becomes acceptable (even desireable). Change-Id: I2dc6c4f3d9d8147c6483865c5c4bbc8e9af291b7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QUtf8: remove an unused variableMarc Mutz2015-11-051-2/+1
| | | | | | | | | | | | | | | | 'need' was never anything but zero, so drop it. Change-Id: I4b52107afc7ed47c19ae1942cef0c92cbd0e1a36 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | QUtf8Codec: Remove dead codeThiago Macieira2015-10-061-2/+0
| | | | | | | | | | | | | | | | | | | | The maximum value for charsNeeded is 4, so if bytesAvailable is less than charsNeeded - 1, the it's at most 2. It can't be larger than 2. Found by Coverity, CID 11000. Change-Id: I42e7ef1a481840699a8dffff1407ef9221a4fd80 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix some -Wcast-qual warningsThiago Macieira2015-09-226-11/+11
| | | | | | | | | | | | | | | | | | | | | | This is happening in code I don't usually test (32-bit, non-ICU, etc.) KeccakF-1600-opt32.c:481:22: error: cast from type 'const unsigned char*' to type 'UINT32* {aka unsigned int*}' casts away qualifiers [-Werror=cast-qual] KeccakF-1600-opt32.c:217:62: note: in definition of macro 'extractLanes' Change-Id: I42e7ef1a481840699a8dffff140209823301a07a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Doc:added doc to undocumented functionsNico Vertriest2015-07-221-9/+0
| | | | | | | | | | | | Task-number: QTBUG-36985 Change-Id: Ic358682b276d67ef804f727bcf14191718613469 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * QtCore: Fix const correctness in old style castsThiago Macieira2015-07-201-6/+6
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c8d4b2920a11fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove documentation of QTextCodec::setCodecForTr().Friedemann Kleint2015-07-101-10/+0
| | | | | | | | | | | | | | | | | | This function has been removed. Fixes documentation warning: qtbase/src/corelib/codecs/qtextcodec.cpp:1160: warning: Cannot find 'setCodecForTr(...)' in '\fn' QTextCodec::setCodecForTr ( QTextCodec * c ) Change-Id: I8d17705291b414d9c27827af4248bbf9e090962e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-011-3/+3
|/ | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning on WinRT armMaurice Kalinowski2015-05-191-1/+1
| | | | | Change-Id: Ibc6a34553bb42319a6937e06ef54cf92847da53c Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT/Winphone: Fix warnings in qtbaseOliver Wolff2015-05-181-1/+1
| | | | | | Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Doc: added doc to undocumented functionsNico Vertriest2015-05-181-3/+20
| | | | | | | Task-number: QTBUG-36985 Change-Id: Ia98654f88cf5da77245b3fcd903b860d12862fc2 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Make data tables const.Volker Krause2015-05-051-1/+1
| | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QIconvCodec: fix compilation when NO_BOM is defined.Thiago Macieira2015-04-091-0/+2
| | | | | | | qiconvcodec.cpp:305:34: error: unused parameter 'cd' [-Werror,-Wunused-parameter] Change-Id: I27eaacb532114dd188c4ffff13d330b64b4feaa6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix invalid characters count in QBig5hkscsCodec::convertFromUnicode()Maks Naumov2015-03-301-0/+1
| | | | | | | Change-Id: I3b06361f93e7ab6a3336b2c432e0a163a34ccb43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix support for iso8859-16 when compiling with ICULars Knoll2015-03-182-2/+5
| | | | | | | | | ICU doesn't support iso8859-16, so we need to fall back to the Qt codec for this encoding. Task-number: QTBUG-45053 Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-1/+1
|\ | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Specific the correct mibEnum value for the 'macintosh' codecAndy Shaw2015-02-261-1/+1
| | | | | | | | | | Change-Id: Ib57dd3c98a2ae3994898d7ea40baa0fed482c99a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QTextCodec: micro-optimize loops.Friedemann Kleint2015-02-122-16/+23
| | | | | | | | | | | | | | | | Don't use index-based iteration, but use iterators. Change-Id: If8dabd56ff880191bb53861e31bfa6a007802c9c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update copyright headersJani Heikkinen2015-02-1135-244/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | QIsciiCodec: add an assert to silence CoverityGiuseppe D'Angelo2015-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity (not rightfully) complains that the code is using "iscii", a uchar obtained by looking up into a table, as an index into the "uni_to_iscii_pairs" array. Since the array is only 18 elements long, there's the theoretic risk of accessing it past its end. However, the lookup of "iscii" never returns values that may actually go out of bounds. Coverity may be smart enough to see the values that "iscii" can get and not raise the warning, but since it does, make the code more robust and add an assert. Task-number: QTBUG-43642 Change-Id: Id75ca105758b343102ca94137d0379c10e55581a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-2/+2
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Doc: corrected autolink errors corelib/ioNico Vertriest2014-11-261-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: I1cdbde1f6b003556ba4b5e97a49c6d918518da0d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-035-49/+49
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Load default codecs even if custom QTextCodec has been registeredKai Koehne2014-10-301-3/+8
| | | | | | Task-number: QTBUG-40378 Change-Id: I33f1e92127972e1346993aa4e07731bf4b697667 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QTextCodec: Fix source code indentationKai Koehne2014-10-291-1/+1
| | | | | Change-Id: Ia9a79e659e028eb6173a7adef12d4973f78c32e9 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Hardcode UTF-8 for "unicode" in QTextCodec::codecForHtml().Friedemann Kleint2014-10-281-1/+4
| | | | | | | | | | ICU would return a utf-16 (endian dependent) codec for unicode which is very rarely what people want. In most cases, unicode is encoded in utf8 these days, so return a utf8 codec for it. Task-number: QTBUG-41998 Change-Id: I51ee758d520702b263a8b2011787eb1f3455ed96 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: link to MIBenumNico Vertriest2014-10-271-4/+4
| | | | | | Task-number: QTBUG- 40362 Change-Id: I0261117d8aef8383ef77887a201d61ed0bd0ba52 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix doc about the list of supported codecsAlexander Volkov2014-10-241-4/+3
| | | | | | | | | | | | | Replace "Apple Roman" by "Macintosh" which is registered by IANA: http://tools.ietf.org/html/rfc1345. Replace unsupported "GB18030-0" by "GB18030". Remove "JIS X 0201" and "JIS X 0208" as they are supported as parts of other Japanese encodings but not directly. Add "HP-ROMAN8" which is supported by both Qt and ICU. Also clean the codecs test. Change-Id: Iaf8e8ff1900d3f92ea0e0df75c60fe1534de23ac Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for "Apple Roman" encodingAlexander Volkov2014-10-241-0/+2
| | | | | | | | Substitute this encoding by "macintosh" when Qt is built with ICU. It is for compatibility with Qt 4.x. Change-Id: I70c51cba7d473ac81e25862736cb71a2f6894055 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-2434-646/+374
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QTextCodec::codecForHtml looks at the first 1024 bytesShawn Rutledge2014-08-211-1/+1
| | | | | | | | The HTML 5 spec requires it, instead of only looking at the first 512. Task-number: QTBUG-40383 Change-Id: Ie10cf8c745ed1a3402914e126a02bc43d5035fff Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-11/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * UTF-8: always store the SIMD result, even if invalidThiago Macieira2014-05-271-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For ASCII content, this improves the throughput because the conditional is no longer on the codepath to storing, so the processor can perform the store at the same time as it's doing the movemask operation. However, the gain is mostly theoretical: benchmarking with mostly ASCII content shows the algorithm running within 0.5% of the previous result (which is noise). For non-ASCII content, we're comparing the cost of doing a 16-byte store (which may be completely overwritten) with the loop copying and shifting left. Benchmarking shows a slight gain of a few percent. Change-Id: I28ef0021dffc725a922c539cc5976db367f36e78 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-8/+36
|\| | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Fix stateful handling of invalid UTF-8 straddling buffer bordersThiago Macieira2014-05-131-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a UTF-8 sequences is too short, QUtf8Functions::fromUtf8 returns EndOfString. If the decoder is stateful, we must save the state and then restart it when more data is supplied. The new stateful decoder (8dd47e34b9b96ac27a99cdcf10b8aec506882fc2) mishandled the Error case by advancing the src pointer by a negative number, thus causing a buffer overflow (the issue of the task). And it also did not handle the len == 0 case properly, though neither did the older decoder. Task-number: QTBUG-38939 Change-Id: Ie03d7c55a04e51ee838ccdb3a01e5b989d8e67aa Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Improve a few string operations with AVX2Thiago Macieira2014-05-211-15/+32
|/ | | | | | | | | | | | | | AVX2 brings the new PMOVZXBW instruction that extends from one 128-bit SSE register to an 256-bit AVX register. With that, the main decoding code is just two instructions (the loop requires a couple more to maintain the offset counter and do the end-of-loop check). This buys us another 4% performance improvement in the fromLatin1 code, calculated on top of the VEX-encoded SSE2 code (which is already a little better than plain SSE2). Change-Id: I675fa24de4fa97683b662f19d146047251f77359 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Restore handling of BOMs in QString::fromUtf8Thiago Macieira2014-04-241-15/+29
| | | | | | | | | | | 8dd47e34b9b96ac27a99cdcf10b8aec506882fc2 removed the handling of the BOMs but did not document it. This brings the behavior back and adds a unit test so we don't break it again. Discussed-on: http://lists.qt-project.org/pipermail/development/2014-April/016532.html Change-Id: Ifb7a9a6e5a494622f46b8ab435e1d168b862d952 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix off-by-one error: the next ASCII character is next oneThiago Macieira2014-02-221-2/+2
| | | | | | | | | The bit scan function returns the index of the last non-ASCII character. The next ASCII is the one after this. This means all the benchmarks were made while reentering the SIMD loop uselessly... Change-Id: If7de485a63428bfa36d413049d9239ddda1986aa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QTextDecoder use our qt_from_latin1 codeThiago Macieira2014-02-221-5/+5
| | | | | | | | | | | | Disassembly shows the Intel compiler does expand to SIMD, but a much worse code than ours. Clang 3.4 does generate a compact SIMD version, probably of the same quality as our hand-written code. And GCC 4.7 through 4.9 don't generate SIMD at all. So let's use the most efficient version. Change-Id: I418e201a774ac0df1fb2b7a7d9589df7c9b655db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QUtfCodec: don't encode invalid UCS-4 codepointsGiuseppe D'Angelo2014-02-071-8/+9
| | | | | | | | | | | | | | | | | | | The code didn't check for malformed surrogate pairs. That means that - high surrogates followed by *anything* were decoded as they formed a valid surrogate pair; - stray low surrogates were returned as-is. We can't return surrogate values in UCS-4, so properly detect these cases and return U+FFFD instead. [ChangeLog][QtCore][QTextCodec] Encoding a QString in UTF-32 will now replace malformed UTF-16 subsequences in the string with the Unicode replacement character (U+FFFD). Change-Id: I5cd771d6aa21ffeff4dd9d9e5a7961cf692dc457 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Add support for UTF-8 encoding/decoding with SIMDThiago Macieira2014-01-311-15/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoding from UTF-8 is easy: if the high bit is set, we fall back to the byte-by-byte decoding. Encoding to UTF-8 requires a little bit more work: to detect anything between 0x0080 and 0xffff, we have several options but none as easy as above. Multiple alternatives are in the benchmark code. In both loops, we do two things once we run into a non-ASCII character: first, we continue the loop for the remainder of ASCII characters in the buffer (which we can tell by checking the bits set in the mask), then we find the last non-ASCII character in that 16-character group, so we don't reenter the SSE code too soon. For the UTF-8 encoding, I have chosen the alternative that results in the best performance. It's closely tied to the alternative running the PMIN instruction, but that requires SSE 4.1. It's not worth the complexity. And quite counter-intuitively, the dedicated string instruction from SSE 4.2 performs most poorly of all solutions. This begs re-visiting the performance of the toLatin1 encoder. The best of 10 benchmark runs of this code were measured on my SandyBridge CPU @ 2.66 GHz (turbo @ 3.3 GHz), both as CPU cycles and as CPU ticks: Compared to: ICU Qt 4.7 non-SSE Qt 5.3 Data set fromUtf8 toUtf8 fromUtf8 toUtf8 fromUtf8 toUtf8 ASCII only 7.50x 6.22x 6.94x 7.60x 4.45x 4.90x 2-char UTF-8 1.17x 1.33x 1.64x 1.56x 1.01x 1.02x 3-char UTF-8 1.08x 1.18x 1.48x 1.33x 0.97x 0.92x 4-char UTF-8 1.05x 1.19x 1.20x 1.21x 0.97x 0.97x Creator data 3.62x 2.16x 2.60x 1.25x 1.78x 1.23x As shown by the numbers, the SSE-based code is slightly worse than the non-SSE code for dense non-ASCII strings. However, as evident in the Qt Creator data, most strings manipulated by applications are either pure ASCII or mostly so, so there's a net gain. Done-with: H. Peter Anvin <hpa@linux.intel.com> Change-Id: Ia74fbdfdcd7b088f6cba5048c03a153c01f5dbc1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-101-2/+2
|\ | | | | | | Change-Id: I99af0bef7f1c931533a324ebcfb27c40ee871a5e
| * Fix include guard typo.Sérgio Martins2014-01-061-2/+2
| | | | | | | | | | Change-Id: If9400eb5965c739334b3638731e7c80834de72b8 Reviewed-by: David Faure <david.faure@kdab.com>
* | Use the new UTF-8 codec in QJsonDocumentThiago Macieira2014-01-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The encoder is in qjsonwriter.cpp, which requires special handling for ASCII due to the use of escape sequences. The decoder is in qjsonparser.cpp, which only scan one character at a time. As a side-effect, the JSON parser now reports the UTF-8 error in the first character with error, instead of the last. This is probably what should have been expected. Change-Id: I52e5bc30d71466b6a36098b4150c61b2e385d8e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>