summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Correct a mistake about non-characters in the documentation.Thiago Macieira2012-05-161-2/+2
| | | | | | | | | | | The Unicode non-characters are 32 characters, from U+FDD0 to U+FDEF. The code matching these comments was fixed in 9327bc87c3abf58bb471693b5448cd78e3db1b46, but the comment wasn't fixed. Change-Id: I5bde0ab9d70c1c6623893de36d31235cbd9fb152 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-1/+1
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Change to/fromAscii to to/fromUtf8 in the QString conversionsThiago Macieira2012-05-111-4/+4
| | | | | | | | | | | This commit matches the previous documentation commit that says that the conversions are applied using to/fromUtf8. Change-Id: I304e4d866ddedac5094fef8500cbeba299a02cb5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QString::isRightToLeft() for SMP code pointsKonstantin Ritt2012-05-111-1/+9
| | | | | | Change-Id: Ib8afc932d9566df1a8922da9a75b9f9cbbdd321d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix MSVC warnings about inconsistent DLL linkage.Friedemann Kleint2012-05-071-4/+4
| | | | | Change-Id: I42f817caf212b871cd00f976054381487b238d31 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Change QString's default codec to be UTF-8Thiago Macieira2012-05-071-2/+40
| | | | | | | | | This is a crude change, not the most efficient way. I'll clean up and make it prettier later on, when I've had the chance to optimise the UTF-8 codec too. Change-Id: I78e30e8d3bddf6ad0210c9c4cedb9a7ce63d1a7d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge "Merge remote-tracking branch 'origin/api_changes'" into ↵Lars Knoll2012-05-031-61/+24
|\ | | | | | | refs/staging/master
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-61/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Migrate QString over to QArrayDataJoão Abecasis2012-04-241-61/+24
| | | | | | | | | | | | | | | | | | Change-Id: Ieadc60523a2bef61a088920576c65c720b11bfb9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove references to to/fromAscii in QString and QByteArray main docsThiago Macieira2012-05-031-69/+69
|/ / | | | | | | | | | | | | | | | | | | | | | | Those functions are about to be deprecated and shouldn't be referred to in the main documentation. Since they were temporarily changed to mean UTF-8, this is not a behaviour change. The next commit will update the code to match the documentation. Change-Id: Ia8c2843c7f2b478f5691fe0224d5e631d94b1af6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | workaround issue where casing diff overflows signed shortKonstantin Ritt2012-04-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-132/+130
|/ | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Merge "Merge remote-tracking branch 'origin/master' into api_changes" into ↵Sergio Ahumada2012-04-171-2/+2
|\ | | | | | | refs/staging/api_changes
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * minor improvement for NormalizationCorrectionsKonstantin Ritt2012-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Make QByteArray and QString keep track of terminating nullJoão Abecasis2012-04-161-17/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | unite QString::normalized() overloadsKonstantin Ritt2012-04-111-24/+11
| | | | | | | | | | Change-Id: I27545e599a1831728e491a9fad1e52fa255535fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Make reallocData() take (unsigned) size, including nullJoão Abecasis2012-04-111-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-1/+1
|\| | | | | | | | | | | | | | | | | | | 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/update Qt 5 to-do's that won't be done for Qt 5.Jason McDonald2012-04-041-1/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-23524 Change-Id: Iebf5b78dc2ff27310b5a484bae588862417f693c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove references to QT_NO_STL from QtCoreThiago Macieira2012-04-071-9/+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 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>
* | Don't allocate space for null when using fromRawDataJoão Abecasis2012-04-051-1/+1
| | | | | | | | | | | | | | | | In this case we only need to allocate space for the "header" data. Change-Id: I059627e47a5bae7a02c82d837c826a6ed0fd20fd Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Simplify conditionalsJoão Abecasis2012-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | alloc >= size is an invariant of both QString and QByteArray, unless string data is immutable (e.g., when using fromRawData()), in which case alloc will be 0, regardless of size, That's what needs to be checked here. Change-Id: Ief9e6a52a1d5ea1941d23ed3c141edfd15d2a6a7 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rename realloc -> reallocDataJoão Abecasis2012-04-051-9/+8
| | | | | | | | | | | | | | | | This avoids confusion with standard ::realloc. Change-Id: Ibeccf2f702ec37161033febf4f3926bee8f7aea6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move growth computation to re-allocation functionJoão Abecasis2012-04-051-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers of QByteArray/QString::realloc() are still responsible for the heuristics and decide whether to provide the "grow" hint, but computation is centralized there. With this change we also ensure growth takes into account the terminating null. Previously, calls to qAllocMore took into account header and string size, for left out the null, meaning we ended up allocating ("nice-size" + Null). Change-Id: Iad1536e7706cd2d446daee96859db9b01c5f9680 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Drop nullary overload of private QString::reallocJoão Abecasis2012-04-051-9/+6
| | | | | | | | | | | | Change-Id: I196ec038ab7b648287e310525681f2d218059b51 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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-041-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge master into api_changesKent Hansen2012-03-231-5/+5
|\| | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * Whitespace fix for brace in qstring.cppThiago Macieira2012-03-231-1/+1
| | | | | | | | | | Change-Id: Ia6cf0d2babd931c9ac2a441a9cfec35f2297dddb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Quick optimisations to QString: no const-ref for QLatin1XXXThiago Macieira2012-03-231-4/+4
| | | | | | | | | | Change-Id: I2c96adc6ae451f085024464791e53739b2d38bab Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Merge master into api_changesKent Hansen2012-03-191-0/+18
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()Marc Mutz2012-03-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 adds cbegin()/cend() functions for the same reason Qt has constBegin()/constEnd(). This patch adds these functions to the Qt containers with the same implementation as constBegin()/constEnd(). It also fixes the return types in the documentation of existing constFind() functions (documentation only). C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have). In particular, it doesn't add cfind(), so I didn't supply these, even though Qt comes with constFind(). This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365. Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QRegularExpression: support for QString overloadsGiuseppe D'Angelo2012-03-151-31/+403
| | | | | | | | | | | | | | | | Added support for QString overloads taking a QRegularExpression. Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QByteArray overload for the QLatin1String ctor.Stephen Kelly2012-03-141-0/+11
| | | | | | | | | | | | | | | | This increases source compatibility when QT_NO_CAST_FROM_BYTEARRAY is used. Change-Id: Ie1a1cfa8acac2fa91aa8f217d91e22289be8b38f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix QString:mid and midRef, againJoão Abecasis2012-03-121-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 75286739 it was assumed that negative positions shouldn't influence the size of the returned substring. That however changes behaviour that was depended on even inside Qt. With this change, the old behaviour is reestablished. A negative value of n is still taken to mean "all the way to the end", regardless of position, and overflows are still avoided. Change-Id: I7d6ed17cc5e274c7c7ddf0eb0c3238e1159ec4f6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-081-36/+42
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-20/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| | * Merge master -> api_changesRohan McGovern2012-02-291-64/+12
| | |\ | | | | | | | | | | | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| | * | Move the QString comparison operator as non member functionOlivier Goffart2012-02-271-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator== and similar should not be member of the class. This ensure a symertry. Indeed, consider this code string == string1 + string2; string1 + string2 == string; The first line compile fine even if QStringBuilder is used, because QStringBuilder will be converted to QString implicitly. But the second line do not compile if the operator== is a member of QString, because the implicit conversion rules do not apply. For this reason, the symetric operators should not be declared as member. Change-Id: I3f7c11fab45a9133f7a424bdfcb894f97da9282b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | QByteArray: deprecate QT_NO_CAST_FROM_BYTEARRAY-protected operatorsMarc Mutz2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QByteArray::operator const {char,void}*() implicit conversions are a source of subtle bugs, so they right- fully can be disabled with QT_NO_CAST_FROM_BYTEARRAY. const char *d = qstring.toLatin1(); // implicit conversion while ( d ) // oops: d points to freed memory // ... But almost no-one ever enabled this macros in the wild and many were bitten by these implicit conversions, so this patch deprecates them. I would have liked to remove them completely, but there are just too many occurrences even in Qt itself to hope to find all conditionally-compiled code that uses these. Also fixes all code that needs to compile under QT_NO_DEPRECATED (in qmake/, src/tools/). I984706452db7d0841620a0f64e179906123f3849 separately deals with the bulk of changes in src/ and examples/. Depends on I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68. Change-Id: I8d47e6c293c80f61c6288c9f8d42fda41afe2267 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-16/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Merge remote-tracking branch 'gerrit/master' into containersJoão Abecasis2012-02-291-123/+109
|\| | | | | | | | | | | Change-Id: I97ba222435ff50a9e5422e6f2c73e4bb8d1b865c
| * | Remove custom text codec for C strings.Robin Burchell2012-02-221-64/+12
| |/ | | | | | | | | | | | | | | | | | | This setting is extremely harmful, as code cannot know whether or not to expect it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive, and caused a lot of people to make mistakes with it. Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * optimize QString::toLower()/toUpper() for special cases, step 2Konstantin Ritt2012-02-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | from now, QUnicodeTables::specialCaseMap[] starts with a placeholder; so, if somethingCaseSpecial is true, then somethingCaseDiff is always greater than 0 Change-Id: Ibb1870512836eee71b1521564c0745096c05b2f9 Merge-request: 70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * optimize QString::toLower()/toUpper() for special cases, step 1Konstantin Ritt2012-02-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | reorganize QUnicodeTables::specialCaseMap as follows: specialCaseMap contains sequence entries in form { length, a, b, .. } Change-Id: Iea1f80bc2f4dc1f505428dad981cde26daaa52c7 Merge-request: 70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * optimize QString::toCaseFolded()Konstantin Ritt2012-02-211-16/+36
| | | | | | | | | | | | | | | | | | | | use the codepath similar to QString::toLower() Change-Id: Ica1948c5e9c82199307d9f823e07d42b50d59480 Merge-request: 70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * optimize handling of surrogate pairs in toLower()/toUpper()Konstantin Ritt2012-02-211-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | high surrogate part never changes on upper/lower casing (which tested explicitly in the qunicodetables generator), thus we can copy the high surrogate part in the loop Change-Id: I24642b35eea7596c6ad494f2a7bc670f10b759a8 Merge-request: 70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Reviewed-by: Olivier Goffart <ogoffart@woboq.com>