summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* fix QString::isRightToLeft() for SMP code pointsKonstantin Ritt2012-05-111-0/+35
| | | | | | Change-Id: Ib8afc932d9566df1a8922da9a75b9f9cbbdd321d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* move the default text breaking algorithm impl from HarfBuzz to QtKonstantin Ritt2012-05-101-0/+90
| | | | | | | | | | | there are several reasons to do this: * text breaking is not a shaper's job; * since the text breaking rules are bound to a specific Unicode version, updating Qt's internal unicode data would require updating the data in HB as well; * makes porting to HurfBuzz-NG some easier Change-Id: I0bbf8e8a343bc074696f4ddf2ae4e7fa32a61629 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Ensure qstring.h compiles with QT_NO_CAST_FROM_BYTEARRAYDavid Faure2012-05-093-0/+66
| | | | | | | | | | | 19d160b72ba broke it temporarily, and this wasn't detected by tst_headersclean, because it sets QT_NO_CAST_FROM_ASCII too, which disabled the faulty code. So this adds a new unittest for QT_NO_CAST_FROM_BYTEARRAY alone. Change-Id: Iaf7a36a1378e77188bcc636e5dc9a1f9b84f70a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add some extra tests to tst_QString to ensure the encoding is correctThiago Macieira2012-05-071-3/+193
| | | | | | | | | | | This also tests by consequence that the behaviour of QByteArrays containing NULs is consistent. Right now, that means the QByteArray processing stops at the NUL, which is the same behaviour as if a pointer to the byte array's data were used. (it's what happens if there's no QByteArray overload and the const char* one is called) Change-Id: If56a822f95866e8cb5b153d07b48198bb83fb386 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change QStringBuilder to use UTF-8 tooThiago Macieira2012-05-071-16/+1
| | | | | | | | | | | | | This commit completes the previous commit so that both QString and QStringBuilder now operate on UTF-8 input. A small fix was required in QStringBuilder: an if clause isn't enough to separate the two append versions. Since there are no QString functions that append to char*, if we're converting to a QByteArray, we need to go through a QString first in a separate function. Change-Id: Ic503340c5d0c32d420c90c91cc2e0fc1ae9230f3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add support for non-BMP ligaturesKonstantin Ritt2012-05-041-0/+12
| | | | | | | | | | | | | | | | | | | | | > 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 [QtCore]Thiago Macieira2012-05-043-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: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-30/+0
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * Make QStringLiteral and QByteArrayLiteral always return the real typesThiago Macieira2012-04-231-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the macros would return an internal type that contained the pointer to the data. This breaks code that tried to use the macros with operators, like QStringBuilder but also when writing: QStringList() << QStringLiteral("a") << QStringLiteral("b"); This change seems to work fine now and I can also verify that this works: const auto str = QStringLiteral("Hello"); Even though it creates a QString, which is non-POD and non-constexpr. Change-Id: Iaf82af9bea4245513a1128ea54f9d2d3d785fb09 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Define P in stringbuilder.cpp, just to help in editing in the editorThiago Macieira2012-05-031-0/+5
| | | | | | | | | | | | | | Otherwise it keeps thinking that we have an error. Change-Id: I8175e34dc6421884b89de9165193e32b6cdf1b62 Reviewed-by: hjk <qthjk@ovi.com>
* | Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | Re-enable casting to and from "ASCII" on tst_qstring.cppThiago Macieira2012-04-281-33/+13
| | | | | | | | | | | | | | | | | | | | Turns out that we've had some old unit tests commented out that did not compile. QString does not have a std::string constructor nor overloads to many other methods. And std::string does not cast to char* on its own. So these tests need to be removed. Change-Id: I22df66fc3ccc68bc2840f2d83747234418e480f5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Force tst_qstring to use fromLatin1 where it has Latin 1 literalsThiago Macieira2012-04-271-37/+39
| | | | | | | | | | Change-Id: I941d20733da2987ca7ced14c314adebaf6a431f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Make QTimeLine test significant.Jason McDonald2012-04-261-1/+0
| | | | | | | | | | | | | | | | Known failures in this test are now handled by QEXPECT_FAIL. Task-number: QTBUG-24796 Change-Id: I12ba57370cf3df1a85a108fbbcdc9db2222491c1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Use macro for QByteArrayData initialization.Jędrzej Nowacki2012-04-251-4/+4
| | | | | | | | | | Change-Id: Ib3f906dc5f313c7f9669efda26a93a76af7d7f80 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Using QLatin1String instead of QLatin1LiteralDebao Zhang2012-04-251-5/+0
| | | | | | | | | | | | | | | | QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | fix QChar::decompositionTag() returns wrong result for Hangul syllablesKonstantin Ritt2012-04-171-0/+27
| | | | | | | | | | Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | fix QChar::isPrint() returns an incorrect result.Konstantin Ritt2012-04-171-1/+58
| | | | | | | | | | | | | | | | 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-1714-94/+3240
|\| | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-163-10/+144
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | QHash: fix key() testGiuseppe D'Angelo2012-04-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The key returned by QHash::key is an arbitrary one that maps to the given value. The test instead relied on it being a specific one. Change-Id: I090351797e8b52036d78160fd810518a11e8107d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QSharedPointer: hash autotest fixGiuseppe D'Angelo2012-04-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash autotest is wrong: it assumed that the iterator on the hash would reach the end after iterating on two elements with identical key. But three elements were added to that hash, and the third one can appear after the other two. That code path is left for the map test only. Change-Id: I51de7987e2b132b6caff7bb4bac6a57fb7fcb530 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | make QStringList::sort() to take a Qt::CaseSensitivity paramKonstantin Ritt2012-04-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12892 Change-Id: I402e6fb12ff24ac26c5a8103bf81547946f9cc58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Prefer QCOMPARE to QVERIFY, as it gives better outputJoão Abecasis2012-04-121-1/+1
| | | | | | | | | | | | | | | | | | Done-by: Jędrzej Nowacki Change-Id: Ic1c8fd5b8acede52b45e5ea16b14fb5bae78f171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-0/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Remove references to QT_NO_STL from QtCoreThiago Macieira2012-04-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Add test for qHash(QByteArray)Giuseppe D'Angelo2012-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Two equal QByteArrays must return the same hash. Change-Id: Iddd45b0c420213ca2b82bbcb164367acb6104ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add test for qHash(QString) / qHash(QStringRef)Giuseppe D'Angelo2012-04-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Two equal strings / stringrefs must return the same hash. Change-Id: I2af9a11ab721ca25f4039048a7e5f260e6ff0148 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add zero-termination checks to QString and QByteArray testsJoão Abecasis2012-04-052-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Revert "Add tests to verify QByteArray's zero termination"João Abecasis2012-04-051-123/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The approach used to verify for zero-termination is too intrusive and requires additional maintenance work to ensure new zero-termination tests are added with new functionality. Zero-termination testing will be re-established in a subsequent commit. This reverts commit 4ef5a6269c1465662ea3872596ba284a13cce25e. Change-Id: I862434a072f447f7f0c4bbf8f757ba216212db3c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Introduce initializer macros for QString- and QByteArrayDataJoão Abecasis2012-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables easier updating of those structs, by reducing the amount of code that needs to be fixed. The common (and known) use cases are covered by the two macros being introduced in each case. Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Clean up constructors for "statics" in QString and QByteArrayJoão Abecasis2012-04-042-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two constuctors offering essentially the same functionality. One taking the QStatic*Data<N> struct, the other what essentially amounts to a pointer wrapper of that struct. The former was dropped and the latter untemplatized and kept, as that is the most generic and widely applicable. The template parameter in the wrapper was not very useful as it essentially duplicated information that already maintained in the struct, and there were no consistency checks to ensure they were in sync. In this case, using a wrapper is preferred over the use of naked pointers both as a way to make explicit the transfer of ownership as well as to avoid unintended conversions. By using the reference count (even if only by calling deref() in the destructor), QByteArray and QString must own their Data pointers. Const qualification was dropped from the member variable in these wrappers as it causes some compilers to emit warnings on the lack of constructors, and because it isn't needed there. To otherwise reduce noise, QStatic*Data<N> gained a member function to directly access the const_cast'ed naked pointer. This plays nicely with the above constructor. Its use also allows us to do further changes in the QStatic*Data structs with fewer changes in remaining code. The function has an assert on isStatic(), to ensure it is not inadvertently used with data that requires ref-count operations. With this change, the need for the private constructor taking a naked Q*Data pointer is obviated and that was dropped too. In updating QStringBuilder's QConcatenable specializations I noticed they were broken (using data, instead of data()), so a test was added to avoid this happening again in the future. An unnecessary ref-count increment in QByteArray::clear was also dropped. Change-Id: I9b92fbaae726ab9807837e83d0d19812bf7db5ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QHash security fix (1.5/2): qHash two arguments overload supportGiuseppe D'Angelo2012-04-041-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 adds a qHash overload taking two arguments: the value to be hashed, and a uint to be used as a seed for the hash function itself (support the global QHash seed was added in a previous patch). The seed itself is not used just yet; instead, 0 is passed. Compatibility with the one-argument qHash(T) implementation is kept through a catch-all template. [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: I1d0a84899476d134db455418c8043a349a7e5317 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | Introduce QArrayDataPointer::needsDetachJoão Abecasis2012-04-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While QArrayDataPointer offers generic detach() functionality, this is only useful for operations that may modify data, but don't otherwise affect the container itself, such as non-const iteration, front() and back(). For other modifying operations, users of the API typically need to decide whether a detach is needed based on QArrayData's requirements (is data mutable? is it currently shared?) and its own (do we have spare capacity for growth?). Now that data may be shared, static or otherwise immutable (e.g., fromRawData) it no longer suffices to check the ref-count for isShared(). This commit adds needsDetach() which, from the point-of-view of QArrayData(Pointer), answers the question: 'Can contained data and associated metadata be changed?'. This fixes QArrayDataPointer::setSharable for static data (e.g., Q_ARRAY_LITERAL), previously it only catered to shared_null. SimpleVector is also fixed since it wasn't checking Mutability and it needs to because it supports fromRawData(). Change-Id: I3c7f9c85c83dfd02333762852fa456208e96d5ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Introduce QArrayDataOps::truncateJoão Abecasis2012-04-022-2/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables a truncating resize() to be implemented. It is similar to destroyAll(), but updates the size() as it goes, so it is safe to use outside a container's destructor (and doesn't necessarily destroy all elements). The appendInitialize test was repurposed and now doubles as an additional test for QArrayDataOps as well as exercising SimpleVector's resize(). Change-Id: Iee94a685c9ea436c6af5b1b77486734a38c49ca1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Introduce QArrayData::detachCapacityJoão Abecasis2012-04-022-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows QArrayData::detachFlags's lead. Given the (known) size for a detached container, the function helps determine capacity, ensuring the capacityReserved flag is respected. This further helps aggregating behaviour on detach in QArrayData itself. SimpleVector was previously using qMax(capacity(), newSize), but there's no reason to pin the previous capacity value if reserve() wasn't requested. It now uses detachCapacity(). Change-Id: Ide2d99ea7ecd2cd98ae4c1aa397b4475d09c8485 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Introduce QArrayDataOps::appendInitializeJoão Abecasis2012-04-022-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds given number of default-initialized elements at end of array. For POD types, initialization is reduced to a single memset call. Other types get default constructed in place. As part of adding a test for the new functionality the arrayOps test was extended to verify objects are being constructed and assigned as desired. Change-Id: I9fb2afe0d92667e76993313fcd370fe129d72b90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add tests to verify QByteArray's zero terminationJoão Abecasis2012-03-301-5/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For data allocated and maintained by QByteArray, there's a guarantee that data() is null-terminated. This holds true even for null and empty, where logically the terminating character should never be dereferenced. For tests that modify or generate QByteArrays, this ensures the invariant is kept. In the toFromHex() text, const-ness of temporary variables was dropped to enable the test macro to be used, as the qualification didn't add much to the test otherwise. Change-Id: I7ee52e79e3a9df7de18c743f3698dab688e6bf0e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Move the QByteArray-based percent-encoding activities to QByteArrayThiago Macieira2012-03-301-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the unit tests that related to percent-encoding to tst_qbytearray.cpp and use public functions to execute QUrl::fromPercentEncoded and QUrl::toPercentEncoded. Change-Id: I6639ea566d82dabeb91280177a854e89e18f6f8d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: David Faure <faure@kde.org>
| * | | Make QArrayData::shared_null zero terminated.Jędrzej Nowacki2012-03-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is expected by QByteArray and QString Change-Id: Ib668b144bdc0d2c793018c8f8d794f249eaf935c Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | Fix loop conditions, after warnings from clangJoão Abecasis2012-03-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_qmap.cpp:697:43: warning: inequality comparison result unused tst_qmap.cpp:717:50: warning: inequality comparison result unused Change-Id: I300f9e10b7748306b99c3c8c38f3cc2661a569ad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Merge master into api_changesKent Hansen2012-03-272-3/+20
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * | | | Update QLocale data from CLDR v1.8.1 to CLDR v1.9.1Jędrzej Nowacki2012-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic84bbc82b364b92605c1bba64b6ec815bff970cb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | | Add test cases to tst_QByteArrayJędrzej Nowacki2012-03-231-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally we construct QByteArrays from QStaticByteArrays. For example moc is generating QStaticByteArray structure for every string it saves. New test cases check if a QByteArray constructed from a QStaticByteArray behaves as a not statically constructed one. Change-Id: Ia4aa9a1a5bc0209507636c683a782dda00eae85c Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | tst_qsharedpointer: don't inherit from QSharedPointerMarc Mutz2012-03-231-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSharedPointer is about to be made final. Instead of inheriting from it to gain access to the d-pointer, cast it to a layout-compatible struct and access the pointer from there. Assert liberally to ensure layout compatibility. Change-Id: Ifc0fa6a6608e861469286673844325663f4f7fcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Rewrite QMap to use a RB treeLars Knoll2012-03-231-4/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMap used to use a skiplist in Qt 4.x, which has variable sized nodes and we can thus not optimise using custom allocators. The rewrite now uses a red-black tree, and all allocations and tree operations happen in the cpp file. This will allow us to introduce custom allocation schemes in later versions of Qt. Added some more tests and a benchmark. Memory consumption of the new QMap implementation is pretty much the same as before. Performance of insertion and lookup has increased by 10-30%. iteration is slower, but still extremely fast and should not matter compared to the work usually done when iterating. Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | QRegularExpression: support for QStringList overloadsGiuseppe D'Angelo2012-03-211-18/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia9017348742e41187684185d04b56d27edd383b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Merge master into api_changesKent Hansen2012-03-192-12/+14
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * \ \ \ \ Merge master into api_changesKent Hansen2012-03-163-5/+13
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178