summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Move QStringRef and remains to Qt5CompatKarsten Heimrich2020-08-201-2/+2
| | | | | | | | | Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Implement UTF-16 to UTF-8 case-insensitive compare and make publicThiago Macieira2020-08-051-1/+1
| | | | | Change-Id: Ied637aece2a7427b8a2dfffd16116cf3645c6359 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow use of charXX_t in QUtf8FunctionsThiago Macieira2020-08-051-2/+42
| | | | | | | Even added an internal char8_t type if the compiler doesn't have one. Change-Id: Ied637aece2a7427b8a2dfffd1611813c345d10ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a crash in QClipBoard when copying utf16 dataLars Knoll2020-07-061-6/+0
| | | | | | | | | | | | Properly use the new QStringConverter API and not an internal qFromUtfEncoded method that was buggy after the changes. Take the oppportunity to clean up and remove qFromUtfEncoded, as QClipboard was its only user. Fixes: QTBUG-85417 Change-Id: I8540d12056bf3f448c1f628ce0bd0ad462a6447d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move QTextCodec support out of QtCoreKarsten Heimrich2020-06-201-7/+7
| | | | | | | | | | * Assume UTF-8 on all Unix like systems * Export some functions to be able to compile QTextCodec once moved to Qt5Compat. Task-number: QTBUG-75665 Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update QUtfFunctions and QUtfTraits to use qsizetypeLars Knoll2020-05-141-7/+7
| | | | | Change-Id: Ic7d76513395645dba05f0023fdfcef0692c9b03b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup QUtf32::convertToUnicodeLars Knoll2020-05-141-1/+2
| | | | | | | | | | Cleanup the implementation and improve performance by handling the first char outside of the main loop. Also avoid one copy of the data when using QStringConverter. Change-Id: Ie698e62de1864352612a4dddc907cb139e7e6407 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QUtf32::convertFromUnicodeLars Knoll2020-05-141-0/+1
| | | | | | | | Implement proper state handling, and avoid a copy when using it through QStringConverter. Change-Id: I201fe966601c424c337e452e359a2e71f76354ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up QUtf16::convertTo/FromUnicodeLars Knoll2020-05-141-0/+2
| | | | | | | | | | | Clean up the method, and refactor it so we can avoid one copy of the data when using QStringConverter. Make the conversion to unicode more by avoiding conditions in the inner loop and doing a memcpy if endianness matches. Change-Id: I869daf861f886d69b67a1b223ac2238498b609ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup state handling in QUtf8::convertFromUnicodeLars Knoll2020-05-141-0/+2
| | | | | | | | And optimize the method so we can avoid a copy of the data. Change-Id: Ic267150db80358dbc4010bb1db2af5c0eb97dc65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move local8bit conversion over to qutfsupportLars Knoll2020-05-141-0/+13
| | | | | | | | Local8Bit is always UTF-8 except for Windows platforms. Also add a Locale encoding to QStringConverter. Change-Id: I8d729931fd4c1d7fc6857696b6442a44def3fd9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move the UTF conversion methods to qstringconverterLars Knoll2020-05-141-0/+323
Separate them from the qutfcodec, so that the codec can later on be moved out of Qt Core. Fix the QUtf methods to take qsizetype instead of int for length arguments. This also makes it possible to not build QTextCodec into the bootstrap lib anymore. Change-Id: I0b4f83139d61b19c651520a2f3a5012aa7e85cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>