summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Change coreservices -> iosIan Dean2012-04-1911-26/+26
| | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Do not assert when QVariant is constructed from an invalid type idJędrzej Nowacki2012-04-192-3/+4
| | | | | | | | | | That change also fix moduleForType() which was wrongly recognizing negative ids as belonging to Core. New tests were added. Change-Id: I40a5819effb32489a45937011980457387c9f8be Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix some unused variable warnings.Stephen Kelly2012-04-181-0/+3
| | | | | | Change-Id: I3ffbb155c0efa65bb33a0e2ce80dbd75dc56f3fc Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QThreadPool: unify waitForDone() overloadsKonstantin Ritt2012-04-173-19/+5
| | | | | Change-Id: I1515a65fab37588372794422a43ed09ac076e108 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QThreadPool: optimize enqueueTask() for common caseKonstantin Ritt2012-04-171-12/+10
| | | | | | | | | | | the most-common case is: queue is empty or filled with tasks of the same priority; so the runnable would be put at the end of queue. both checks are cheap for us. also avoid detach()'ing by using const iterators Change-Id: Iab2255f852211f9accc8d717f778671661210ef3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* fix QChar::decompositionTag() returns wrong result for Hangul syllablesKonstantin Ritt2012-04-171-0/+2
| | | | | Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QChar::isPrint() returns an incorrect result.Konstantin Ritt2012-04-171-4/+12
| | | | | | | | results are now equals to results of ICU's u_isprint() for the entire set of the Unicode code points Change-Id: I763f4b37cccd285eb01543d486f25bd7ea011241 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-17144-12510/+15760
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge "Merge remote-tracking branch 'origin/master' into api_changes" into ↵Sergio Ahumada2012-04-1731-959/+1175
| |\ | | | | | | | | | refs/staging/api_changes
| | * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-1631-959/+1175
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Make reallocData use QArrayData::AllocationOptionsJoão Abecasis2012-04-162-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Growth computations are deferred to QArrayData::allocate, except in the case of realloc as that functionality is currently lacking in QArrayData. Since that sits in library code, anyway, it can be changed later to use a future QArrayData::reallocate. As it is, reallocData is becoming a model for QArrayData::reallocate and what it can offer to containers of POD/movable types. Change-Id: I045483f729114be43e4818149d1be1b333bcbe13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Drop unnecessary assignmentJoão Abecasis2012-04-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this branch, !IS_RAW_DATA has already established that offset is sizeof(QByteArrayData) and realloc maintains the assumption. Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Migrate QByteArray over QArrayData.Jędrzej Nowacki2012-04-162-60/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the time being QByteArrayData keeps its independent existence, for the sake of other modules. Once they have been ported to use the new initializer macros it can be changed to: struct QByteArrayData { QArrayData array; }; Extra braces can then be added to the macros. With respect to source compatibility, the only concern is with other modules, as QByteArrayData has already changed in incompatible ways with Qt 4.x Done-with: João Abecasis Change-Id: I044e2a680317431777a098feec8839a90a3d3da3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Remove explicit checks for shared_null/emptyJoão Abecasis2012-04-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This eases porting to QArrayData and retains semantics. In append() and prepend() a conditional was generalized so that no work is done if there is nothing to add. Done-with: Jędrzej Nowacki Change-Id: Ib9e7bb572801b2434fa040cde2bf66dacf595f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Make QByteArray and QString keep track of terminating nullJoão Abecasis2012-04-164-46/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In conceptual terms, this change increments the Data::alloc member by one for all strings allocated and maintained by these classes. Instances initialized with fromRawData retain 0 as the member value, so they are treated as immutable. This brings QByteArray and QString closer to QVector, making it possible for them to reference and share the same data in memory, in the future. It also brings them closer to QArrayData. In practical terms all comparisons to the alloc member were changed to take into account that it also tracks the terminating null character. Aside from the increment in the alloc member, there should be no user visible changes. Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Show the type and address of QObjects in debug output.Stephen Kelly2012-04-161-1/+7
| |/ / | | | | | | | | | | | | Change-Id: I9f44ab80a6fb763adc9cbaf47de8e1b97212332d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | QHash security fix (2/2): enable QHash random seedGiuseppe D'Angelo2012-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Algorithmic complexity attacks against hash tables have been known since 2003 (cf. [1, 2]), and they have been left unpatched for years until the 2011 attacks [3] against many libraries / (reference) implementations of programming languages. This patch makes qHash use the QHash seed introduced in the previous commits, thus truly randomizing bucketing in QHash. [1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf [2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks [3] http://www.ocert.org/advisories/ocert-2011-003.html Task-number: QTBUG-23529 Change-Id: Ibee9cf6aa820af5d777fcde478647665c728052a Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| * | QHash: remove optimization for QHash<int, T>Giuseppe D'Angelo2012-04-141-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHash employs an optimization for int/uints, squashing the hash value and the key value inside an union. This obviously works iff qHash(int k) = k. If the hash value gets salted, the hash table is corrupted. This patch removes that optimization by means of a #if 0, so if further research finds out that we want those 4 bytes back it's pretty simple to revert. Change-Id: If273f0bf2ff007f4f2f7c46d2aab364a3b455cf1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | qHash: qHash(T*) two arguments supportGiuseppe D'Angelo2012-04-141-2/+2
| | | | | | | | | | | | | | | Change-Id: I1b78914fe9c6ee9251d68af1f2e95f1e3e0f1db5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | qHash: two arguments support for simple integer types (and QChar)Giuseppe D'Angelo2012-04-141-16/+16
| | | | | | | | | | | | | | | | | | Change-Id: I24bed73422fb1d2e90cf3dd4e5375e249b3dcac4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | Removed QXmlStreamReader::readElementText overloadThorbjørn Lindeijer2012-04-142-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The version without argument was kept for binary compatibility when the configurable ReadElementTextBehaviour was introduced. It is now dropped in favour of using a default argument value. Change-Id: Ic08c41d5a5aad9f22df7fc37a2d53ffbc6df1fe9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QSharedPointer: qHash two arguments supportGiuseppe D'Angelo2012-04-131-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I800de3fd9769e4829018360c25a8cf2ee2e2e08b Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Style: Don't put an else after a return.Stephen Kelly2012-04-131-2/+1
| | | | | | | | | | | | | | | Change-Id: I41d031d92489e5539f293c30a6257310f2a1c657 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | Re-add the Qt 4 compatibility methods for QUrl encoded query itemsThiago Macieira2012-04-122-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | I forgot to re-add those when I re-added the non-encoded (QString) forms. Change-Id: I9d635d40106273177df2c332f09d66415efc15a3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Ensure proper handling of empty-but-present URL componentsThiago Macieira2012-04-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | make QStringList::sort() to take a Qt::CaseSensitivity paramKonstantin Ritt2012-04-122-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12892 Change-Id: I402e6fb12ff24ac26c5a8103bf81547946f9cc58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Fix warning introduced in "Adjust a double leading slash..."Thiago Macieira2012-04-121-1/+1
| | | | | | | | | | | | | | | Change-Id: Id89fd3983123c0ba302c493b54437dd75e419e01 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * | Change the component formatting enum values so the default is zeroThiago Macieira2012-04-114-47/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Allow {} to remain decoded in URLs in the path and queryThiago Macieira2012-04-112-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Introduce QUrl::DecodeReserved and reorder the enumsThiago Macieira2012-04-112-4/+126
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge QUrl::DecodeAllDelimiters and QUrl::DecodeUnambiguousDelimitersThiago Macieira2012-04-114-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Fix the handling of ambiguous delimiters in the query part of a URLThiago Macieira2012-04-113-43/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Make QUrl handle ambiguous delimiters correctlyThiago Macieira2012-04-112-84/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | unite QString::normalized() overloadsKonstantin Ritt2012-04-112-26/+12
| | | | | | | | | | | | | | | Change-Id: I27545e599a1831728e491a9fad1e52fa255535fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-1110-29/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Mark QObject::disconnect overload constOlivier Goffart2012-04-112-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Consistency with the non-static connect overload Task-number: QTBUG-23622 Task-number: QTBUG-1772 Change-Id: Ic09df9cca1feaabb6b5cf335f04a0d6d4bbf011f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Make reallocData() take (unsigned) size, including nullJoão Abecasis2012-04-114-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter represents an allocation size and unsigned matches the Q*Data::alloc member it ultimately represents (even if they currently differ in accounting for the null). There's still work up for grabs to ensure we avoid integer overflows when growing. Change-Id: Ib092fec37ec2ceed37bebfdc52e2de27b336328f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Adjust a double leading slash in the path for FTP to /%2FThiago Macieira2012-04-101-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Add early-clobbers to the output variables in CPUIDThiago Macieira2012-04-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without those early-clobbers, the compiler might decide to schedule a register that is also used as output. The existing early clobber in the tmp variable was there so the compiler wouldn't use a register scheduled as input (especially EAX). To be honest, I'm not convinced that the compiler should be allowed to do this. That means that two output variables are scheduled to the same register... still, this fixes a problem found with GCC 4.2 (at least the Mac one). Change-Id: I6cd4676284e9a83d6aac4b439c6e58e347c40106 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-1046-318/+476
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | New qHash algorithm for uchar/ushort arrays (QString, QByteArray, etc.)Giuseppe D'Angelo2012-04-091-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port of Robin's work from I0a53aa4581e25b351b9cb5033415b5163d05fe71 on top of the new qHash patches (the original commit just introduced lots of conflicts, so I redid it from scratch). This is based on the work done in the QHash benchmark over the past few months experimenting with the performance of the string hashing algorithm used by Java. The Java algorithm, in turn, appears to have been based off a variant of djb's work at http://cr.yp.to/cdb/cdb.txt. This commit provides a performance boost of ~12-33% on the QHash benchmark. Unfortunately, the rcc test depends on QHash ordering. Randomizing QHash or changing qHash will cause the test to fail (see QTBUG-25078), so for now the testdata is changed as well. Done-with: Robin Burchell Change-Id: Ie05d8e21588d1b2d4bd555ef254e1eb101864b75 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * | | Stop relying on qHash always giving the same resultsGiuseppe D'Angelo2012-04-084-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | QUrl: added two-arguments qHash supportGiuseppe D'Angelo2012-04-083-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An unnecessary #include <QHash> was also removed, and other includes refactored. Change-Id: Ifcd3e37d75029c142a2e55ab492b88624505670a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | More qHash(T, uint) overloads for Qt typesGiuseppe D'Angelo2012-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The more we get in 5.0, the better. Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Remove references to QT_NO_STL from QtCoreThiago Macieira2012-04-0711-55/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_NO_STL is now no longer defined, so remove the conditionals and select the STL side. Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | qHash: always use the seed in the catch-all templateGiuseppe D'Angelo2012-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pertubates the results of the calls to the one-argument version of qHash through the catch-all template. Change-Id: I7037b25d545e6f1360384a83ff895f4bb62ed195 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | Fix compilation with MinGW.Marcel Krems2012-04-052-2/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I494c84e8e6889a7d7bb3b29669337483732d02c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QLatin1String: add qHash overloadGiuseppe D'Angelo2012-04-052-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was never introduced in Qt 4, probably because of the implicit conversion to QString (that is, adding the qHash overload for QLatin1String in Qt 4 would have been a BIC). Change-Id: I2ebc8e73a85be497866820e0ca416dd11167bb53 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * | | Enable variadic macros for MSVC >= 2005João Abecasis2012-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I8793ea0f6e3a640276b073321d29373b2ed18d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * | | Add zero-termination checks to QString and QByteArray testsJoão Abecasis2012-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses an alternative approach to the testing formerly introduced in 4ef5a626. Zero-termination tests are injected into all QCOMPARE/QTEST invocations. This makes such testing more thorough and widespread, and gets seamlessly extended by future tests. It also fixes an issue uncovered by the test where using a past-the-end position with QString::insert(pos, char), could move uninitialized data and clobber the null-terminator. Change-Id: I7392580245b419ee65c3ae6f261b6e851d66dd4f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>