summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringtokenizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Qt-Security score:(sensitive => significant)Marc Mutz2025-09-221-1/+1
| | | | | | | | | | | | | | | | | We merged several markings with the wrong tag. Fix them. Amends 677f97ecad30577a7e4cc7423554e66a4f19abba, 17e58599bed71be3b119874aa4ea296f44081977, 993f327901cc93e5617fa0b2172aab4793d5be34, 9e479614d95a0859491ef8cbcc79a3a92f18a649, 5f6bfa3692a91c9f162606c25ec496656c253dfe, 9efcf1457229ef33a4c336b6a8ffd31333f5c105, and 8a5b5584006b21cdefd931c7f173ac546a89a100. Pick-to: 6.10.0 6.10 6.8 Task-number: QTBUG-135195 Change-Id: Ica405acf0915fd584c98a504f0d4bfa57dc33482 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Mark QStringTokenizer as security-criticalMarc Mutz2025-09-111-0/+1
| | | | | | | | | | | | | | QString and QByteArray are critical, too, and not because of their ownership semantics, but because of the algorithms operating on them. QStringTokenizer is one of those algorithms. The implementation is completely in the header, so mark the header critical. The .cpp file contains only documentation blocks. Task-nunber: QTBUG-135195 Pick-to: 6.10.0 6.10 6.9 6.8 Change-Id: I0780b342d0886efa773a5af24066de11b6f3b621 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* doc: Remove invalid link and tone down languageDavid Boddie2025-02-101-6/+5
| | | | | | | | QLatin1StringView::split() appears to be invalid. Pick-to: 6.8 6.9 Change-Id: I11066b8224cce0a6091c758367f602a63c6136a0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QStringTokenizer: update docs for a world in which C++17 is requiredMarc Mutz2024-08-281-9/+4
| | | | | | | | | | | | Remove mentions of pre-C++17 behavior. Don't recommend against qTokenize() any longer (it's shorter than "QStringTokenizer") and mention it in the QStringTokenizer class documentation, too. Pick-to: 6.8 6.7 6.5 6.2 Change-Id: I8cf3310fc9de80db0a89aecfdf695a49d390da47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | 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>
* QtCore: Replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-03-261-2/+2
| | | | | | | Task-number: QTBUG-98434 Change-Id: Ib7c5fc0aaca6ef33b93c7486e99502c555bf20bc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix documentation of QStringTokenizerAndreas Buhr2020-12-031-11/+11
| | | | | | | | | | | | Documentation of QStringTokenizer was broken, mainly because most parts of the interface were defined in base classes. This patch gets those members into QStringTokenizer itself in order to document them. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: Id00a79db4b293958a9c5ed53a518a97721d228c0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation issues for QStringTokenizerTopi Reinio2020-10-291-14/+7
| | | | | | | | | | | Add documentation-specific variants of lvalue/rvalue-this overloads that QDoc manages to parse as separate entities. Document begin() and cbegin() iterator getters in one go. Task-number: QTBUG-86295 Change-Id: I2768dc6525bbf067e1597aa12e2e727f6d9fc35a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Reference proper SplitBehaviour enum in docsNicolas Fella2020-10-021-1/+1
| | | | | | | | | QString::SkipEmptyParts is Qt::SkipEmptyParts now. Pick-to: 5.15 Change-Id: Ie351bbe9d2350e771f821a9f0bc9f581be5b0022 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix some qdoc warnings for QString/View/TokenizerVolker Hilsheimer2020-09-261-32/+47
| | | | | | | | | | | | | | | | | Use correct member function prototype, which requires the template declaration. Remove see-alsos that don't exist. Document parameters for qTokenize. Still lots of warnings from QStringTokenizer, due to the inheritance structure of that template class and the declarations of nested types in undocumented base classes. Also, qdoc doesn't seem to recognize training this-lvalue/this-rvalue declarations for overloads, and considers the second toContainer documentations to override the first. Change-Id: Iadf967d3328ddda52b6f66786836853bddeda79b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Documentation fixes for QStringTokenizerKai Koehne2020-07-011-9/+9
| | | | | | Task-number: QTBUG-85343 Change-Id: Ib647d90ba3cfa1181690dc745249637031c7ad67 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* 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>
* Long live QStringTokenizer!Marc Mutz2020-06-031-0/+357
This class is designed as C++20-style generator / lazy sequence, and the new return value of QString{,View}::tokenize(). It thus is more similar to a hand-coded loop around indexOf() than QString::split(), which returns a container (the filling of which allocates memory). The template arguments of QStringTokenizer intricately depend on the arguments with which it is constructed, so QStringTokenizer cannot be used directly without C++17 CTAD. To work around this issue, add a factory function, qTokenize(). LATER: - ~Optimize QLatin1String needles (avoid repeated L1->UTF16 conversion)~ (out of scope for QStringTokenizer, should be solved in the respective indexOf()) - Keep per-instantiation state: * Boyer-Moore table [ChangeLog][QtCore][QStringTokenizer] New class. [ChangeLog][QtCore][qTokenize] New function. Change-Id: I7a7a02e9175cdd3887778f29f2f91933329be759 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>