summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearray.h
Commit message (Collapse)AuthorAgeFilesLines
* Un-deprecate QByteArray's relational operators taking QStringSona Kurazyan2020-08-261-7/+1
| | | | | | | | | | | | QString still has the overloads of relational operators taking QByteArray. Un-deprecate QByteArray's relational operators taking QString for symmetry. See also the comments of d7ccd8cb4565c8643b158891c9de3187c1586dc9 for more details. Change-Id: If3f59376b389fe4cbc2bd649a748bb78378a530c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d8ee1f6385b4dfeb57cb466b6c5f6bcfd3a90dfb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Deprecate QByteArray's methods taking QStringSona Kurazyan2020-06-241-17/+31
| | | | | | | Change-Id: I5aba5a91f288173c2d4f1bd3538191757abd3202 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix Clang 10 warnings about deprecated copy constructorsThiago Macieira2020-06-101-0/+1
| | | | | | | | | qstring.h:1235:22: warning: definition of implicit copy constructor for 'QCharRef' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy] Task-number: QTBUG-83666 Change-Id: I99ab0f318b1c43b89888fffd160b4a12bee11723 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QByteArrayLiteral: Remove const temporary that may prevent optimizationAlbert Astals Cid2020-05-211-2/+1
| | | | | | | | | | clang-tidy 10 was complaining about http://clang.llvm.org/extra/clang-tidy/checks/performance-no-automatic-move.html Change-Id: I63ba4111e01bb9d3ee87940253c4a79cc42c0bdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4fa94440902d87b41f6cda7e5fd057dc8e79f08d) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString/QByteArray: make all symmetry-checked member-compare() combinations ↵Marc Mutz2020-03-051-4/+4
| | | | | | | | | | | | | | | | | | | noexcept In QByteArray, they were just not marked as such. In QString and QStringRef, the implicit conversion from QChar to QString would destroy it. Add a QChar overload, delegating to QStringView. Added docs for the new overloads, copying from the nearest neighbor so as to not look out of place. All string classes use different wording for these functions. A cleanup of this state of affairs is out of the scope of this patch. Change-Id: I0b7b1d037aa229bcaf29b793841a18caf977d66b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-101-1/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| * Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QByteArray: add a strict mode to fromBase64Giuseppe D'Angelo2019-12-051-1/+59
|/ | | | | | | | | | | | | | | | | | | | | | | | | | QByteArray::fromBase64 was liberal in its input, simply skipping over invalid characters. As a side-effect of this, it had no error reporting, meaning it could not be used to convert fromBase64 _and_ validate the input in one go. Add more option flags to make fromBase64 strictly validate its input. Since we want to know whether it has succeeded or not, and the existing fromBase64 overloads do not allow for that, introduce a new function that returns an optional-like datatype. While at it: base64 decoding can be done in-place; add an rvalue overload to enable this use case. [ChangeLog][QtCore][QByteArray] Added the new fromBase64Encoding function. [ChangeLog][QtCore][QByteArray] Added new flags to make fromBase64 / fromBase64Encoding strictly validate their input, instead of skipping over invalid characters. Change-Id: I99cd5f2230f3d62970b28b4cb102913301da6ccd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-101-0/+754
This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>