summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-221-3/+2
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Adjust resize() behavior of QString and QByteArray to match Qt 5Lars Knoll2020-05-212-25/+7
| | | | | | | | | | | | | resize() to a smaller size does not reallocate in Qt 5 if the container is not shared. Match this here. As a drive-by also fix resize calls on raw data strings to ensure they are null terminated after the resize. Change-Id: Ic4d8830e86ed3f247020d7ece3217cebd344ae96 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Extend QTypeInfoMerger to more than four argumentsMarc Mutz2020-05-191-15/+11
| | | | | | | | | | | Use template argument pack and C++17 fold expressions. Because MSVC doesn't grok fold expressions in enumerator-definition contexts, use static constexpr bool variables. Change-Id: I13a676d9be687679ef41f7b003e50116c4cd533c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Sweep Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 -> Q_DECLARE_SHAREDMarc Mutz2020-05-196-6/+6
| | | | | | | | | | | | This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as Q_DECLARE_SHARED. Let's hope we'll collectively get better at detecting missing Q_DECLARE_SHARED so we won't need a Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future. Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-191-11/+15
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix relocated Qt to be found when its path has non-ASCII charactersAlexandru Croitor2020-05-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The path returned by dladdr seems to be encoded with the current locale encoding which means that if it contains unicode characters, the fromLatin1() call mangles the path, and QFile::exists reports that the path does not exist. To preserve non-ASCII characters use fromLocal8Bit() instead. This should fix the runtime issue of finding the Qt prefix when the Qt library path has non-ASCII characters. Amends 2f52afda8e77429c00029f94e887ed37dfb4e584. Amends 4ac872639ed0dd3ae6627e05bdda821f7d128500. Fixes: QTBUG-84272 Task-number: QTBUG-15234 Pick-to: 5.14 5.15 Change-Id: I37019ed219cf2cf7d9663cb1e16acdb97b3bdf09 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: throughly port internals to char16_tMarc Mutz2020-05-194-108/+76
| | | | | | | | | | This includes allocating QString data as char16_t instead of ushort. This isn't the end of the port, but an important milestone: the traditional foldChar() functions are now all unused. Change-Id: I766bebc2d70b6972e2045d3474c7f5770f4676d9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Liang Qi2020-05-192-2/+7
|\
| * Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-05-182-2/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
| | * Merge remote-tracking branch 'origin/5.15.0' into 5.15Qt Forward Merge Bot2020-05-142-2/+7
| | |\ | | | | | | | | | | | | Change-Id: I06396fa0a3d1687a0935e48d290358edbb0e59e8
| | | * qstandardpaths_win.cpp: Fix GetCurrentProcessToken() for Win7v5.15.0-rc2Fredrik Orderud2020-05-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GetCurrentProcessToken() was made an inline function for Windows 8. Expand it to ensure builds work independent of WINVER and disable low integrity support for Windows 7. Fixes: QTBUG-83941 Task-number: QTBUG-83453 Change-Id: Ic989f16621cd80cbc70c6b62779afab8a12714df Reviewed-by: Fredrik Orderud <forderud@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * QCborValue: catch overflow in QByteArray when decoding chunked stringsThiago Macieira2020-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We checked against integer overflow, but not against overflowing the QByteArray size limit. That caused a std::bad_alloc to be thrown, which is bad when decoding unknown data. QCborStreamReader wasn't affected, since it doesn't merge chunks. Change-Id: I99ab0f318b1c43b89888fffd160c36f495fada87 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Small fixes for the Q*Ref deprecation stuffMarc Mutz2020-05-141-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - don't force the deprecation sentence into a separate memory location (gives the compiler more leeway in how to lay stuff out) - split the switch (will be useful when extending) - fix a spelling mistake in one of the messages Change-Id: Ied137dc8eee7047177983660e1a6776a0bf46bde Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Fix QRunnable::ref use in QThreadPoolAllan Sandfeld Jensen2020-05-122-26/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reference counter could only ever be -1, 0 or 1, as an autoDeleted QRunnable can only be in a single thread pool. This commits keeps the reference counting for now, but asserts sanity, simplifies locking and fixes a leak. Pick-To: 5.15 Fixes: QTBUG-20251 Fixes: QTBUG-65486 Change-Id: I4de44e9a4e3710225971d1eab8f2e332513f75ad Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit 891b60bbc84ddde077072df3426539c716d47459)
* | | | webOS: Fix allocateTimerIdJani Hautakangas2020-05-181-1/+8
|/ / / | | | | | | | | | | | | | | | Change-Id: I8b3777f4035401763d86b0245de43b63573b9ea6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Cleanup qUncompressLars Knoll2020-05-171-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | Cleanup the code in qUncompress and make use of QArrayDataPointer to keep track of memory. Change-Id: I2c11f0468813698d2b7c25acd0f8786a289739a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Don't access QArrayData::sharedNull() from QByteArray anymoreLars Knoll2020-05-171-4/+2
| | | | | | | | | | | | | | | | | | Change-Id: I1292f8d2d62fa96ae4c6aa91c7c95c1f3a18570f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QChar: make fullConvertCase()'s result type more usableMarc Mutz2020-05-172-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | Move it into the function, give it an explicit size and make it iterable and indicate to QStringView that it's a compatible container. Change-Id: I483d9225ac73ad93f2037489f2d32473c377e8b7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Add central macro to disable float comparison warningsMarc Mutz2020-05-161-0/+6
| | | | | | | | | | | | | | | | | | | | | QParsedNumber will need it, as do some others, like QAngle. Change-Id: Iee09f498d2cdbb28d43b94301328ec7858661ad2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add support of cancellation handler callbacks to QFutureSona Kurazyan2020-05-155-18/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added QFuture::onCanceled() method, for attaching handlers to be called when the QFuture gets canceled. Change-Id: I1f01647d6173ba0c1db6641e14140108b33ac7c4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Add support of connecting signals to QFutureSona Kurazyan2020-05-153-1/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced QtFuture::connect(sender, signal) function returning a QFuture object, which is resolved when the signal is emitted. Task-number: QTBUG-81589 Change-Id: Idbe301eb247b468b9b34f3470c3359d6a7af2f3a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | QTaggedPointer: some API cleanupsMarc Mutz2020-05-152-31/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - don't refer to the class with template arguments in the body of the class (incl. one where we got the template args wrong) - make namespace-level swap a non-member friend - make default ctor constexpr and non-explicit (default ctors should never be explicit) - make ctor from std::nullptr_t constexpr - remove op= from std::nullptr (will be handled by op=(T*) anyway) - pass QTaggedPointer by value (it's a Trivial Type, so can be passed in registers) - fix missing QTypeInfo for non-default Tag types - remove unused include limits.h - make qHash-able (why is the tag ignored?) Change-Id: Idee1d685ac365c988698a8637fd5df3accfc1396 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QMetaType: Support char16_t and char32_tFabian Kosmale2020-05-153-1/+58
| | | | | | | | | | | | | | | Change-Id: Ieec6d4bc64967d875ea12b31638aab05bc682ea3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | CMake: Enable default usage of utf8 sources for Qt consumersAlexandru Croitor2020-05-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And enable the same default when building Qt itself (it's implicit). Allow opting out on a target-by-target basis, by using the public qt_disable_utf8_sources() API call. Change-Id: Ifc19a744d57b96b1c74a6926a0c6628c2a820464 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | QString: remove more functions overloaded on charMarc Mutz2020-05-152-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions mess in bad ways with the overload set (they, fatally, attract char16_t, e.g.). The no-ascii warning now comes from the QChar(char) constructor, so it's not lost. [ChangeLog][QtCore][QString] Also removed op=(char), op+(char, QString), op+(QString, char). Change-Id: I1471c9ddb4c6869aff6e527516e2c78b80b7d7d3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QString: fix an aliasing issue in remove(QString)Marc Mutz2020-05-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even in Qt 5, remove() can be passed an alias to *this. In Qt 6, with the advent of substring sharing, this will become even more pronounced. Use the same fix as was already used in QString::insert(). Pick-to: 5.15 Change-Id: I1a0d3d99fd7dff6e727661646d2cbfdc94df2682 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QString: fix quadratic behavior in QString::remove(QString)Marc Mutz2020-05-141-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling linear-complexity remove(int, int) in a loop is O(N²). Fix by implementing a remove_if()-like algorithm which ensures each character is written at most once, which is linear. [ChangeLog][QtCore][QString] Fixed quadratic worst-case complexity of remove(QString). The function now has linear complexity in all cases. Pick-to: 5.15 Change-Id: I12f70fbc83fb5da4a9aae4bd02f525d7657cc940 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringView: add converting constructor from array-like containersGiuseppe D'Angelo2020-05-141-35/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralize, rather than keeping adding constructors from any array-like container. A more robust implementation, likely following the converting constructor for std::span ([span.cons]), is out of scope for C++17 and will require C++20's ranges and concepts. [ChangeLog][QtCore][QStringView] QStringView can now be constructed from any contiguous container, as long as they hold string-like data. For instance, it's now possible to create a QStringView object from a std::vector<char16_t>, a QVarLengthArray<ushort> and so on. Change-Id: I7043eb194f617e98bd1f8af1237777a93a6c5e75 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Enforce that statically allocated array-like containers have 0 capacityGiuseppe D'Angelo2020-05-143-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been the case for both QStringLiteral and QByteArrayLiteral since Qt 5.0, and Q_ARRAY_LITERAL since Qt 6.0. Since it's definitely surprising, add a note in the docs, which is "somehow" consistent with the interpretation of capacity as the biggest possible size before we reallocate. Since it's 0, any manipulation of the size will cause a reallocation. (Alternatively: the capacity() is for how many elements memory was requested from the free store. No memory was allocated, so 0...) Task-number: QTBUG-84069 Change-Id: I5c7d21a22d1bd8b8d9b71143e33d537ca0224acd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QRegExp from QVariantLars Knoll2020-05-147-56/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an operator QVariant() to QRegExp to keep things at source compatible as possible. Add a hack to QVariant::load/save() to recognize the old typeid for QRegExp and stream them correctly as long as the streaming operators for QRegExp are registered. Also move the datastream test for QRegExp to tst_qregexp, and adjust it to the qvariant changes. Change-Id: I120b38a7541b43ec07a21b17f7f35c55f071eb75 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Remove QRegExp support from QString and StringListLars Knoll2020-05-149-667/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacement methods do now exist in QRegExp, or for QRegularExpression when porting to it. Remove all autotests associated with the old methods. Change-Id: I3ff1e0da4b53adb64d5a48a30aecd8b960f5e633 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Move methods using QRegExp in QString(List) over to QRegExpLars Knoll2020-05-144-223/+443
| | | | | | | | | | | | | | | | | | | | | | | | The prepares for the removal of those methods from QString and QStringList. The new methods in QRegExp are left as a porting help. Change-Id: Ieffa33a79caf53b83029e9b070c4eb5cadca1418 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QStringMatcher: port internals to QStringView and char16_tMarc Mutz2020-05-142-24/+30
| | | | | | | | | | | | | | | | | | Change-Id: If540b094d003ad373d3c581e1de8c526ad4c7d73 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Streamline the code in the conversion to and from utf8Lars Knoll2020-05-141-90/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move pre/and post condition handling out of the main loop to make that one as fast as possible. Remove special handling of a corner case when the input length is zero, where the utf8 decoder did something else than all other decoders. Change-Id: I94992767ea15405b38f7953adadaa6ff98b20b6f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Update QUtfFunctions and QUtfTraits to use qsizetypeLars Knoll2020-05-142-8/+8
| | | | | | | | | | | | | | | Change-Id: Ic7d76513395645dba05f0023fdfcef0692c9b03b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QTextCodec references from QString docsLars Knoll2020-05-142-29/+27
| | | | | | | | | | | | | | | Change-Id: I2882f8aed61d92ed5eff6efd2e65679e6688454f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of some QTextCodec leftoversLars Knoll2020-05-146-12/+2
| | | | | | | | | | | | | | | | | | | | | There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove qtextcodec.h from the pch for Qt CoreLars Knoll2020-05-141-3/+0
| | | | | | | | | | | | | | | Change-Id: I32e34675fc0579ba3d4bdffb3474ef452bc4bffc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QTextCodec dependency from QMimeDataLars Knoll2020-05-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already assumed that 8bit data is utf8 encoded in all cases but for HTML. Handle HTML through QStringDecoder now. This removes support for encodings other than UTF based one and Latin1. This is ok, as HTML should nowadays always be encoded in utf8 as well (anything else is strongly discouraged by the HTML spec). In addition, utf-8 and latin1 together seem to cover ~98% of all HTML data. Change-Id: I7e7165edd38cfac395faf72681e5715b6d014c14 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Document the string converter classesLars Knoll2020-05-145-40/+502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document QStringConverter, QStringDecoder and QStringEncoder. In addition, do some touches to the API, renaming one enum value, add a flags argument to one constructor and make some members private. Change-Id: I8f99dc3d98fb8860cf6fa46301e34b7eb400511b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Optimize appending to an existing stringLars Knoll2020-05-141-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Optimize the common pattern of "str += decode(data);" and "bytearray += encode(string);" Change-Id: I1da621fa1ad400f23c9718ecf8ae64c00d9d459c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of QTextCodec in QTextStreamLars Knoll2020-05-143-216/+71
| | | | | | | | | | | | | | | | | | | | | | | | Use QStringConverter instead. Also change the default encoding of QTextStream to utf8. Change-Id: I30682e75fe0462d1a937539f773640c83a2d82e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Start porting QTextStream away from QTextCodecLars Knoll2020-05-145-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a first step add setEncoding/encoding() methods that use the QStringConverter::Encoding enum, and port all uses of setCodec()/ codec() over to the new API. Internally QTextStream still uses QTextCodec, this will be ported over to QStringConverter in a follow-up change. Change-Id: Icd764cf47b449b57f4ebd010c2dad89e6717d6c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of the QTextCodec dependency in QXmlStreamReaderLars Knoll2020-05-143-91/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringDecoder to convert the data instead. [ChangeLog][Important Behavior Changes] QXmlStreamWriter always encodes XML in UTF-8, and QXmlStreamReader is limited to XML files encoded in Unicode encodings (UTF-8, UTF-16 and UTF-32) and latin1 (ISO-8859-1). Change-Id: I10da612b951f4312ddaf63a89587697777dd8dc1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add a method to determine the encoding for encoded HTML dataLars Knoll2020-05-142-0/+49
| | | | | | | | | | | | | | | | | | | | | This is a replacement for Qt::codecForHtml(). Change-Id: I31f03518fd9c70507cbd210a8bcf405b6a0106b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QStringConverter::encodingForData()Lars Knoll2020-05-142-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | Add method that tries to determine the encoding of the data from an initial byte order mark. Change-Id: I348c51a3d4db9b434af53359b739a7e17acfc760 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add methods to convert between encoding and name to QStringConverterLars Knoll2020-05-142-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | Add static methods that allow converting between a name for an encoding and the Encoding enum. Change-Id: I12bc503cf757ea31d3ca8d5e1f1216efddcb16d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Construct a string converter by nameLars Knoll2020-05-142-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a constructor, that allows constructing a string converter by name. This is required in some cases and also makes it possible to (in the future) extend the API to 3rd party encodings. Also add a name() accessor. Change-Id: I606d6ce9405ee967f76197b803615e27c5b001cf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QTextCodec dependency from the cbor readerLars Knoll2020-05-141-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I5abc60846d95931860133b9318690b457bb886d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Get rid of QSettings::iniCodec()Lars Knoll2020-05-143-116/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always encodee INI files as utf-8 in Qt6. This is mostly backwards compatible, as old ini files would encode all non ascii characters. [ChangeLog][Important behavioral changes] QSettings will now always encode INI files as utf-8 (and the iniCodec/setIniCode methods are removed). This is a change from Qt 5 and earlier, where QSettings would by default escape all non ascii characters. The behavior is equivalent to what you got in Qt5 by setting a utf-8 iniCodec on the settings object. Settings files written in Qt 5 will still be readable in Qt 6 (unless an iniCodec different from utf-8 was used), but to read Qt6 based ini files in Qt 5 applications, setting the iniCodec to utf-8 is required. Change-Id: Ic7dffcca17779bd5e3dae50d42ce633170289f6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>