summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-166-51/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QLocale: Add some more languages and scriptsKonstantin Ritt2013-03-052-4/+129
| | | | | Change-Id: Iab23128c1567974154cdcce7412b2e1468bb8462 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* OpenGL: Add code generator for OpenGL enabler classesSean Harmer2013-02-2522-0/+5261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a code generator that can be executed offline to generate a few classes for enhancing Qt's support for OpenGL. The generated code effectively provides all the benefits of GLEW in its multi-context form but for all platforms and even for ES2. The code generator takes as input the official Khronos gl.spec specification and gl.tm typemap files. These provide all of the information required to create the OpenGL Desktop related classes. The classes for ES2 are hand-crafted as no similar spec files have been published. The generated code supports all OpenGL extensions listed in the Khronos registry for both Desktop OpenGL and ES 2. There is a helper factory class generated which are used by QOpenGLContext::versionFunctions(). This allows code like the following to be written: QOpenGLFunctions_3_3_Core* m_funcs = 0; m_funcs = m_context->versionFunctions<QOpenGLFunctions_3_3_Core>(); if (!m_funcs) { qWarning() << "Could not obtain required OpenGL context version"; exit(1); } if (!m_funcs->initializeOpenGLFunctions()) { qWarning() << "Failed to resolve entry points"; exit(2); } // Get an extension object QOpenGLExtension_ARB_draw_buffers* ext = 0; if (m_context->hasExtension("GL_ARB_draw_buffers")) { ext = new QOpenGLExtension_ARB_draw_buffers(); ext->initializeOpenGLFunctions(m_context); } Such usage will allow much easier and rigorous use of features in modern OpenGL and extensions both in Qt itself and by users of Qt. Follow-up patches will import the generated files and then use these to reinstate OpenGL geometry shaders, add tessellation shaders, and other OpenGL constructs. Change-Id: Id0172e8aa1fd57eb4e6979a96d10fb5a34826426 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: James Turner <james.turner@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-142-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Nokia -> Qt ProjectFrederik Gladhorn2013-02-051-1/+1
| | | | | | | | | | Change-Id: Iadd29ee918dc181d2a468f5198e66351c7cb3548 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-281-1/+1
| | | | | | | | | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QUrl effective TLDs: update table and split into chunks of 64KPeter Hartmann2013-02-091-8/+26
| | | | | | | | | | | | | | | | | | | | | | The table is there to know which domains are allowed to set cookies and which are not. There are more than 2000 new entries since the list has last been generated. The split to 64K chunks was made because this is the hard limit for strings in Visual Studio. Change-Id: I511aec062af673555e9a69442c055f75bdcd1606 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2239-43/+43
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1839-43/+43
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-211-130/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Add QChar::Script enumKonstantin Ritt2012-12-201-11/+180
|/ | | | | | | | | | | | | | | ...where the values are not aliased to Common script. The old QUnicodeTables::Script enum was retained for compatibility reasons until Qt internals are updated to use QChar::script(). Using QChar::Script instead of QUnicodeTables::Script would improve both the text analysis (itemization, boundary finding) and the text shaping quality. This also a required step for switching to Hurfbuzz-NG. /* This adds 6668 more .rodata bytes */ Change-Id: I5aa3d12c550528d0052542436990f8d0779ea8e5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* More changes from Nokia to DigiaSergio Ahumada2012-11-302-4/+4
| | | | | | Change-Id: I8f2edd238e64c01d3ccb7c012b389d61435d7135 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Always use QAIM to get the default flags.Stephen Kelly2012-11-281-2/+2
| | | | | Change-Id: I801f5c8023e3e3672fde28139a7f34f640e650f5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update XKB data generator to use correct QLocale namesKonstantin Ritt2012-11-251-9/+9
| | | | | Change-Id: I55fd5f029d77950a9074d9c86a65499b48806ebe Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* [SIC] QLocale: Update some language names with their modern valuesKonstantin Ritt2012-11-242-8/+10
| | | | | | | | Some of them were incorrectly spelled (for a while) Change-Id: I871968e3bbdd2172f4c4dfb6e74729c05e7e8e01 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTBF: Fix issue with no splitting the words at "." (FULL STOP)Konstantin Ritt2012-11-231-0/+9
| | | | | | | | | | | | As of Unicode 5.1, some punctuation marks were mapped to MidLetter and MidNumLet for better URL and abbreviations handling which caused "hi.there" to be treated like if it were just a single word; until we have the Unicode Text Segmentation tailoring mechanism, retain the old behavior by remapping (some of) those characters back to their old values. Change-Id: I49dea6064f2ea40a82fc0b1bc3c4f0b4e803919f Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Qlocale data up to CLDR 22.1Konstantin Ritt2012-11-212-5/+15
| | | | | Change-Id: Ie6ddfec14cb052e0b89230dc93290ff79488fb25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Qlocale data up to CLDR 2.0.1Konstantin Ritt2012-11-212-6/+56
| | | | | Change-Id: I4279fac57436d7009a6d61dab5936b72fd39fc14 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use likelySubtags to instantiate a locale id from it's short formKonstantin Ritt2012-11-212-32/+120
| | | | | | | | | ...just like described in http://www.unicode.org/reports/tr35/#Likely_Subtags. This is much more effective than current "guessing" algorithm + makes it possible to instantiate a locale by the script or territory code only. Change-Id: I674f8476e65b01c56960b6e83a1a346df0715274 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [SIC/BIC] QLocale: update enums up to CLRD 1.9.1Konstantin Ritt2012-11-213-72/+117
| | | | | | | | | | This patch adds some missing codes (two-letter ones only), removes an outdated ones, and updates some names. The legacy language codes are handled in QLocalePrivate::codeToLanguage() (fortunately, there are only 4 of such codes). Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: replace hard-coded default country-for-language mapKonstantin Ritt2012-11-192-111/+98
| | | | | | | | | | ...with a generated one in a way similar to what http://www.unicode.org/reports/tr35/#Likely_Subtags suggests. The supplemental/likelySubtags.xml contains all the required data. This changes some default countries to a most-expected ones. Change-Id: I920a5623601d8661a943e78197d3bcc838191483 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Assign correct codes to QLocale::AnyCountry and AnyScriptKonstantin Ritt2012-11-152-11/+13
| | | | | | | as their meaning, in fact, is unknown (or default) country/script. Change-Id: Id75a70d4b33c2092de414f3ac357f6bcb627ba47 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a bunch of missed scriptsKonstantin Ritt2012-11-151-1/+26
| | | | | Change-Id: I078bf95cb50c7ef634f9f3133ab9f9d25439e4ef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add missing Bodo language introduced in CLDR 1.9.1Konstantin Ritt2012-11-151-1/+2
| | | | | Change-Id: I4feb6ba781299d65ff3bf2717f08a0ac7eae7928 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Misc fixes to the QLocale data parser/generatorKonstantin Ritt2012-11-154-31/+19
| | | | | Change-Id: I01589eae4e48bc1f484d54277de8f18262ca8f31 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* CONFIG+=uitools is deprecated. Use QT+=uitools insteadSergio Ahumada2012-10-311-1/+1
| | | | | Change-Id: I45105e5e1dde614d90b1fb392b6e01e698c27a7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update the Unicode Data and Algorithms up to Unicode 6.2Konstantin Ritt2012-10-0915-1004/+1034
| | | | | | | | | | | | | Version 6.2 of the Unicode Standard is a special release dedicated to the early publication of the newly encoded Turkish lira sign. In addition, there are some significant changes to the Unicode algorithms for text segmentation and line breaking to improve breaking for emoji symbols. For more details, see http://www.unicode.org/versions/Unicode6.2.0/ Change-Id: I21cfd4f307e41b41a19d36cce87f7a44c2661bc2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2239-1032/+1032
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make plugintest util work on Windows.Jason Barron2012-08-301-0/+1
| | | | | | | | Command line apps that use stdout need the CONSOLE subsystem. Change-Id: Ic220f45119ea70372e27b4a364f7264cc649726d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* QUnicodeTables: some internal API renamingsKonstantin Ritt2012-06-221-179/+179
| | | | | | | | | | | | enums GraphemeBreak, WordBreak, and SentenceBreak has been renamed to GraphemeBreakClass, WordBreakClass, and SentenceBreakClass respectively, their values has been renamed to contain a '_' as logical enum-value separator (just like many other nums in Qt, e.g. LineBreakClass); *BreakFormat has been replaced with *Break_Extend (some format characters are kind of subtype of the extender characters, not vice versa). Change-Id: I9ddbcf8848da87409736c2d6d1798a62fa28cab8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Clean-up the Unicode tables generator code and the generated headerKonstantin Ritt2012-06-221-432/+435
| | | | | | | | | | | | This fixes the blocks and memory consumption reports, the whitespace issues and makes the code a bit cleaner. Since I'm the only one who does change this code, such a no-op commit could not hurt anyone or even git blame ;) Change-Id: Ib069f925a3791c82e16c368c8392bcffbfd68c53 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Make QUnicodeTables::script() support SMP code pointsKonstantin Ritt2012-06-143-277/+145
| | | | | | | | | | | | | | | | | | | Instead of expanding the scripts table with script values for the code points >= 0x10000, it has been merged with the properties table in order to increase perfomance of the script itemization code (not affected yet). (Stats: the properties table grew up in 97428-89800 = 7628 bytes; the old scripts table was of size 7680 bytes) The outdated ScriptsInitial.txt and ScriptsCorrections.txt file has been removed (they were just empty, the "corrigendum" script corrections should be applied to Scripts.txt directly, *no customization allowed*!). More script testcases has been added - at least one per supported script. Task-number: QTBUG-6530 Change-Id: I40a9e76f681e2dd552fd4c61af0808d043962e79 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add the AGLFN tables generator, update the tables up to AGLFN 1.7Konstantin Ritt2012-06-144-0/+917
| | | | | | | Task-number: QTBUG-21727 Change-Id: Ib2cacc2a52b2853059d6c873a33dcde735fbe168 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Line Breaking Algorithm: handle the Object Replacement CharacterKonstantin Ritt2012-06-101-7/+6
| | | | | | | | See http://www.unicode.org/reports/tr14/#CB and http://www.unicode.org/reports/tr14/#LB20 for details Change-Id: Ice0aa2b2ce81f6e39839a353240420436eddd754 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update the Unicode data files up to v6.1.0Konstantin Ritt2012-06-1014-1317/+24169
| | | | | Change-Id: I20b94634b1f4ebff10757c2348cfdbbd906e8797 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update the qunicodetables generator to deal with UCD 6.1 filesKonstantin Ritt2012-06-101-34/+92
| | | | | Change-Id: If22018ff83cfc6b9c984f689648da038fce11d84 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move ScriptSentinel enum from header to .cppKonstantin Ritt2012-05-251-4/+4
| | | | | Change-Id: Ic74e8e2471e92aa2014735f6ab0bb4f3b88de206 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QChar: add isSurrogate() and isNonCharacter() to the public APIKonstantin Ritt2012-05-161-25/+6
| | | | | | | | + QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro replace uses of hardcoded values with the new API; remove leftovers Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* significant unicodetables generator performance optimizationKonstantin Ritt2012-05-111-41/+47
| | | | | | | | | | since the entire range of a valid unicode code points is in use, QHash is suboptimal and could be replaced with QList; taking the value by ref and not inserting it back to the map + not calculating the default value over and over gains us up to 60% performance boost! Change-Id: I48c54a8e88472cf76c79c0aac44e65eeefa44861 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add some useful methods to QUnicodeTables::Konstantin Ritt2012-05-101-1/+42
| | | | | | | in order to reduce code duplication and prepare the ground for upcoming changes Change-Id: I980244149f65384c9484bbec4682de8b7b848b08 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add support for non-BMP ligaturesKonstantin Ritt2012-05-041-14/+84
| | | | | | | | | | | | | | | | | | | | | > http://www.unicode.org/versions/Unicode5.2.0/ D. Character Additions: There are three new characters in the newly-encoded Kaithi script that will require changes in implementations which make hard-coded assumptions about composition during normalization. Most new characters added to the standard with decompositions cannot be generated by the operations toNFC() or toNFKC), but these three can. Implementers should check their code carefully to ensure that it handles these three characters correctly. U+1109A KAITHI LETTER DDDHA U+1109C KAITHI LETTER RHA U+110AB KAITHI LETTER VA UCD 6.1 adds two more of them: U+1112E CHAKMA VOWEL SIGN O U+1112F CHAKMA VOWEL SIGN AU Change-Id: I781a26848078d8b83a182b0fd4e681be2a6d9a27 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [other]Thiago Macieira2012-05-041-14/+14
| | | | | | | | | | 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: Ib1eaf42679ab5db4005192c3d00ba79e43edfcca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qunicodetables generator: improve the output and the generated codeKonstantin Ritt2012-04-241-90/+109
| | | | | | | | | | | better memory usage report; an additional asserts with conditions the implementation is depends on; a namespace for the internal static data; styling fixes Change-Id: Id4048ff6104c56b5f590f9ac6fbf7c0bce79ec47 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* workaround issue where casing diff overflows signed shortKonstantin Ritt2012-04-241-17/+41
| | | | | | | | | | | | | | | | | | | there are two such codepoints were added in the Unicode 5.1: U+1D79 LATIN SMALL LETTER INSULAR G U+A77D LATIN CAPITAL LETTER INSULAR G two more of them were added in the Unicode 6.0: U+0265 LATIN SMALL LETTER TURNED H U+A78D LATIN CAPITAL LETTER TURNED H and two more were added in the Unicode 6.1: U+0266 LATIN SMALL LETTER H WITH HOOK U+A7AA LATIN CAPITAL LETTER H WITH HOOK we map them like special cases with length == 1 (note: all are in BMP which is checked explicitly in the generator) Change-Id: I8a34164eb3ee2e575b7799cc12d4b96ad5bcd9c6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QLocale: Clean up QLocalePrivate implementationJohn Layt2012-04-241-1/+1
| | | | | | | | | | | | | | In Qt4 QLocalePrivate is a struct returned by a d() method. This will be unsuitable for the planned change to use ICU and may cause BIC issues. This change makes QLocalePrivate a class and creates a new struct QLocaleData to hold the data index. Further clean-ups are possible but are left for later. Change-Id: Ie316a07790f74674a3b520b735dff72695cc4060 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-163-37/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * UCD-5.0: apply Corrigendum #6Konstantin Ritt2012-04-152-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | http://unicode.org/versions/corrigendum6.html: > in Unicode 5.0, the list of characters with the Bidi_Mirrored property > was made consistent for brackets and quotation marks, in preparation for > new constraints on bidi mirroring. However, after publication of > Unicode 5.0.0 it was discovered that this change adversely affected > several quotation mark characters in deployed data. Task-number: QTBUG-25169 Change-Id: Id49caf401af2d5a1e6dbcc32b2f350aa20b7f901 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * replace hardcoded values with a surrogate handling methodsKonstantin Ritt2012-04-111-10/+10
| | | | | | | | | | | | Change-Id: Iba079953c46a29404232d2dacbe0c90170097d51 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * minor improvement for NormalizationCorrectionsKonstantin Ritt2012-04-111-2/+5
| | | | | | | | | | | | | | | | let's don't hardcode the latests affected version value and simply use the one parsed from NormalizationCorrections.txt Change-Id: I37021e8238d77deada4c5ba7a2d160c87186b9dd Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Stop relying on qHash always giving the same resultsGiuseppe D'Angelo2012-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the various qHash overloads offered by Qt can change at any time for any reason (speed, quality, security, ...). Therefore, relying on the fact that qHash will always give an identical result across Qt versions (... across different processes, etc.), given identical input, is wrong. Note that this also implies that one cannot rely on QHash having a stable ordering (even without the random qHash seed). For such use cases, one must use f.i. a private hash function that will never change outside his own control. This patch adds a private hash function for QStrings, which is identical to the Qt(4) qHash(QString) implementation. A couple of spots in Qt where the results of a qHash call were actually saved on disk are ported to use the new function, and a bit of documentation is added to QHash docs. Change-Id: Ia3731ea26ac68649b535b95e9f36fbec3df693c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>