summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring
Commit message (Collapse)AuthorAgeFilesLines
* Convert QString to use QArrayDataPointerLars Knoll2019-12-161-7/+8
| | | | | | | | | | | | We're now using the same infrastructure for QVector, QString and QByteArray. This should also make it easier to remove the shared null in a follow-up change. Change-Id: I3aae9cf7912845cfca8e8150e9e82aa3673e3756 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* Use QString::DataPointer instead of QStringPrivateLars Knoll2019-12-081-1/+1
| | | | | | | | Preparations to move QString over to use QArrayDataPointer instead of it's own private struct. Change-Id: I7796a595393394083f6a85863e3c710ebbdea149 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QCharRef and QByteRefLars Knoll2019-12-081-23/+1
| | | | | | | | | | We already detach immediately since change c2d2757bccc68e1b981df059786c2e76f2969530. That basically removes the main purpose of having QChar/ByteRef, and we can just as well get rid of those classes for Qt 6. Change-Id: I8dc566a1948ddc29c0cb8a77ec7310654a7219a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Inline the size and data pointer members in QStringThiago Macieira2019-12-081-9/+7
| | | | | | | | | | | | | | | | | I'd have preferred to use QArrayDataPointer<ushort> for QString, but that option wasn't the best one. QArrayDataPointer try to do some operations using QArrayDataOps and that would expand to unnecessary code. What's more, the existing code expected to be able to modify and access the d pointer. Instead, this commit introduces QStringPrivate (named differently from QStringData to catch potential users), which contains the three members. This POD class is also used in QJsonValue to store the "inlined" QString. QHashedString in qtdeclarative will need a similar solution. Change-Id: I33f072158e6e2cd031d4d2ffc81f4a8dbaf4e616 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add reference-count manipulation functions to QArrayData and hide refThiago Macieira2019-12-081-3/+3
| | | | | | | | The next change will stop using some values in the reference counter as settings from the data. Change-Id: I94df1fe643896373fac2f000fff55bc7708fc807 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't try to define QT_NO_CAST_TO_ASCII when the test undefines itEdward Welbourne2019-10-251-1/+1
| | | | | | | | | | | The qmake config for tst_QString tried to impose QT_NO_CAST_TO_ASCII on it, but the source file explicitly #undef-s this symbol and its friends. Leave the define commented out in the .pro so that a comment can explain why it's no good. Change-Id: I7620f4e104f0cdab05fdc246b903c40026e63d76 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move a test for feature ICU from .pro to .cppEdward Welbourne2019-10-252-11/+11
| | | | | | | | | | | | | Test QT_CONFIG(icu) in the code instead of testing qtConfig(icu) in the profile and setting an extra define just to shadow what's already defined. Also remove the matching define from qcollator.pro, whose test code didn't use it. Noticed while reviewing the conversions to CMake. Change-Id: I19d3b1026b2a8f50ec424c450614e721500fd38a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Suppress deprecation warnings on a test of a deprecated QString methodEdward Welbourne2019-10-091-0/+3
| | | | | | | | QString::fromAscii() is deprecated since 5.0 but still tested. So suppress deprecations for its code. Change-Id: Ic048a843c43551021da39a16d94c3222201573dc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port from QStringViewLiteral to u""Marc Mutz2019-07-291-3/+3
| | | | | | | | | Now that all our supported compilers know char16_t, we no longer need QStringViewLiteral, whose only purpose in life was to turn u"" into L"" for MSVC < 2015. Change-Id: I25a094fe7992d9d5dbeb4a524d9e99e043dcb8ce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-105-0/+17135
This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>