summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringmatcher.h
Commit message (Collapse)AuthorAgeFilesLines
* QStringMatcher: add a method that returns a string view of the patternAhmad Samir2023-10-211-0/+3
| | | | | | | | | | | | | | | | | The existing pattern() method always returns a QString, which means that if the matcher was constructed using a QStringView, pattern() would uncoditionally convert it to a QString. This is useful to check if a match is exact: auto pattern = matcher.patternView(); if (pattern.size() == needle.size() && matcher.indexIn(needle) == 0) .... This may be needed for a later change in QStringList::contains(); regardless of that, this change makes sense on its own. Change-Id: I49018551dd22a8f88cf6b9f878a5166902a26f58 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* Make QStringMatcher ready for Qt 6Lars Knoll2020-09-071-16/+14
| | | | | | | | | | Use qsizetype for string indices everywhere. Clean up the data structures and remove some Qt 3 or Qt 4 left-overs. This reduces the size of the QStringMatcher from 1056 to 288 bytes. Change-Id: Icc351da8e3aad10a6c940196f52c39f8d2f5bf80 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port QString to qsizetypeLars Knoll2020-07-061-2/+2
| | | | | | Change-Id: Id9477ccfabadd578546bb265a9483f128efb6736 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringMatcher: port internals to QStringView and char16_tMarc Mutz2020-05-141-2/+2
| | | | | | Change-Id: If540b094d003ad373d3c581e1de8c526ad4c7d73 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-101-0/+93
This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>