summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qcollator_posix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use the correct size argument for wcsxfrmMikolaj Boc2023-01-121-6/+12
| | | | | | | | | | The documentation says that the size argument to wcsxfrm should include the null terminating character. Currently it doesn't, which breaks collation, as the last character is omitted. Task-number: QTBUG-109954 Change-Id: Ic0c78a617ed1d50e31e50cae56e21675d2069ead Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QCollator/Posix to qsizetypeMarc Mutz2022-07-221-2/+2
| | | | | | | | | Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-105038 Change-Id: If0cbe82105b753dfebfe1fa1ca7cbd759012e3d5 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCollator: Extract Method Private::ensureInitialized()Marc Mutz2022-07-201-4/+3
| | | | | | | | Avoids repetition of if (d->dirty) d->init() all over the place. Pick-to: 6.4 Change-Id: Ifc819151b7c694e6cc1f48bbb837b37d108ca49a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Core: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | Change-Id: I2c71188a4d27692a2d6ef1aa447b329627214b17 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Correct qcollator_posix.cpp's check against system localeEdward Welbourne2021-11-011-3/+6
| | | | | | | | | | | | | | The check was made against the default locale but the code calls the system functions (wcscoll, wcsxfrm, wcscmp) for locale-specific collation, so should be comparing to the system locale's collation locale (i.e. LC_COLLATE). Also correct the Android-only check in tst_QCollator::compare() which duplicated the check but neglected the C locale, which is also supported (via QString::compare). Pick-to: 6.2 Change-Id: I48c3237dd6825e2070272ab88d95bdb8cbb9fc37 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-291-1/+1
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Take care of NULL data from QStringView in QCollatorEdward Welbourne2020-02-051-1/+6
| | | | | | | | | | | | | Back-ends need to catch NULL data so as not to call system APIs with invalid pointers. [ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0 that caused QCollator not to operate with default-constructed QStrings and print a warning on Windows. Fixes: QTBUG-81673 Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-101-0/+116
This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>