summaryrefslogtreecommitdiffstats
path: root/src/corelib/text
Commit message (Collapse)AuthorAgeFilesLines
* Remove non-Qt6 compile time switches from QtCoreAllan Sandfeld Jensen2020-07-245-99/+0
| | | | | | | | We already manage to compile without this code, and none of it are full classes or separate functions suitable for qt5compat. Change-Id: I47facac7ec621cfc4b0b26214b7de37897443519 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix a number of qdoc warnings related to deprecationFriedemann Kleint2020-07-247-121/+2
| | | | | | | Remove obsolete documentation. Change-Id: Iaf4b6f9852a883dea0f256c5c89e74f6ebbe85f3 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QLocale: purge deprecated APIEdward Welbourne2020-07-232-43/+0
| | | | | | | | Since 5.15 - toTime() with a calendar in the argument list The calendar was never used. Change-Id: I37897d47b42e69d1a8312e6389d6349febb889ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some qdoc warningsFriedemann Kleint2020-07-211-1/+1
| | | | | | | | | | | | | | | | | | src/corelib/text/qstringconverter.h:160:54: error: no matching constructor for initialization of 'QStringConverterBase::State' src/corelib/text/qstringconverter.h:72:19: note: candidate constructor not viable: no known conversion from 'QFlags<QStringConverter::Flag>' to 'QFlags<QStringConverterBase::Flag>' for 1st argument src/corelib/text/qstringconverter.h:75:9: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'QStringConverterBase::State' for 1st argument src/corelib/text/qstringconverter.h:108:24: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'const QStringConverterBase::State' for 1st argument src/corelib/text/qstringconverter.h:159:32: warning: constexpr constructor that does not initialize all members is a C++20 extension [-Wc++20-extensions] src/corelib/text/qstringconverter.h:187:11: note: member not initialized by constructor src/corelib/kernel/qproperty.h:403:14: error: deduction guide must be declared in the same scope as template 'QProperty' src/corelib/kernel/qproperty.h:202:7: note: template is declared here src/corelib/kernel/qproperty.h:403:14: error: deduction guide declaration without trailing return type src/gui/painting/qregion.h:139:5: error: unknown type name 'HRGN' src/gui/painting/qregion.h:140:29: error: unknown type name 'HRGN' Change-Id: I3c195a60ceeb51664368a4aeef90c70c31954fc3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QRegularExpression: Purge deprecated PatternOption membersEdward Welbourne2020-07-202-10/+5
| | | | | | | | | They've been no-ops since (at least) 5.12. At the same time, save future readers the need to git blame to find out how long the other deprecated enum name is. Change-Id: I2081ba2859c6540651b6f6807cc6bd59890bfce5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QChar: purge deprecated APIEdward Welbourne2020-07-202-82/+1
| | | | | | | | Since 5.3 joining() and old Joining type Replaced by JoiningType joiningType() Change-Id: Iefee50aaf94cec6d67b5fc004b3e68357b2015c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix handling of Suzhou numbering systemEdward Welbourne2020-07-175-18/+46
| | | | | | | | | | | | | | | | This only arises when the system locale tells us to use its zero as our zero digit, since no CLDR locale uses it by default. Adapt an MS-specific QLocale::system() test to use Suzhou numbering, so as to test this. While updating the locale-restoration code to also restore the digits being set in that test, add restore code for the long time format, where previously only the short time format was restored. Add a comment to make it less likely one of those shall be missed in future. Fixes: QTBUG-85409 Change-Id: I343324bb563ee0e455dfe77d4825bf8c3082ca30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qsizetype instead of int in QByteArrayMatcherSona Kurazyan2020-07-152-8/+7
| | | | | Change-Id: Id32dc567fa0359ad281d34fcf88c46484f87ce2c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QSystemLocalePrivate::substituteDigits(): change to move semanticsEdward Welbourne2020-07-151-6/+6
| | | | | | | | | | Rather than passing an in-out reference parameter and ignoring the return (of that parameter) use an actual rvalue ref parameter and move the value through the function, to make it easier for compilers to see how to optimize it. Change-Id: Ie239400345da012d8fb8a731394f1687b8b62430 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify uses of QSystemLocale::query()Edward Welbourne2020-07-152-61/+60
| | | | | | | | | | | | | | | QVariant::isNull() shall no longer return true when the variant does package an object, but that object's isNull() is true, so take care to catch QString-wrapping returns that contain an empty string, except where this is a valid return. Generally tidy code processing the returned value. At the same time, make the second argument of query() optional, since it's only used by a subset of the query types. Change-Id: I3dba9a59260f9f182ca277784c77277e2ea255e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify qlocale_win's getLocaleInfo() and its _int variantEdward Welbourne2020-07-151-32/+28
| | | | | | | | | | | | One of the former's overloads was a template; it and its _int variant took an optional maxlen; no caller passed maxlen, only three callers didn't over-ride the template's <QString> default return value to <QVariant>; so eliminate maxlen and have it simply return QVariant, using .toString() on it where needed. Change-Id: Icf3ff32f167ee96cfbb6412613ecd7f0886a2fe9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support digit-grouping correctlyEdward Welbourne2020-07-145-651/+650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Read three more values from CLDR and add a byte to the bit-fields at the end of QLocaleData, indicating the three group sizes. This adds three new parameters to various low-level formatting functions. At the same time, rename ThousandsGroup to GroupDigits, more faithfully expressing what this (internal) option means. This replaces commit 27d139128013c969a939779536485c1a80be977e with a fuller implementation that handles digit-grouping in any of the ways that CLDR supports. The formerly "Indian" formatting now also applies to at least some locales for Bangladesh, Bhutan and Sri Lanka. Fixed Costa Rica currency formatting test that wrongly put a separator after the first digit; the locale (in common with several Spanish locales) requires at least two digits before the first separator. [ChangeLog][QtCore][Important Behavior Changes] Some locales require more than one digit before the first grouping separator; others use group sizes other than three. The latter was partially supported (only for India) at 5.15 but is now systematically supported; the former is now also supported. Task-number: QTBUG-24301 Fixes: QTBUG-81050 Change-Id: I4ea4e331f3254d1f34801cddf51f3c65d3815573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QLocale's integer formattingEdward Welbourne2020-07-142-127/+51
| | | | | | | | | Break out some shared code in the integer formatting to save duplicating it. Simplify what's left. Renamed some variables to match Qt style. Change-Id: I369a013802a267a94725302de0d1d33291c29538 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocalePrivate: rearrange number format statics and toolsEdward Welbourne2020-07-144-201/+130
| | | | | | | | | | | | Instead of passing lots of instance data around among public static methods and functions in qlocale_tools, do the work in instance methods that can access the relevant attributes of the locale when they need them. Incidentally reduces clutter in the global namespace. Add a signPrefix() to handle a repeated computation. Keep new internal methods private. Change-Id: I9556a960acac9fb645872337c61f509fb902984e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix floating-point 'g'-format's choice between 'e' and 'f' formsEdward Welbourne2020-07-142-43/+81
| | | | | | | | | | | | | | During review of a refactor (coming shortly), Thiago wondered what the magic numbers were. On closer examination, I concluded that they were wrong and wrote some tests to prove it. This commit adds those tests; replaces the misguided old code with something that passes them; and documents the reasons for the various parts of its decisions. In the process, tidy up QLocaleData::doubleToString() somewhat and rename some of its variables to conform to Qt coding style. Change-Id: Ibee43659b1bdb0707639cdb444cfe941c31d409f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify qlocale_win's currency formattingEdward Welbourne2020-07-141-11/+5
| | | | | | | | | | | | Use QLocaleData::c()'s instance method, rather than QLocaleData's static method, to format integers. This avoids the need to duplicate various arguments as literals, that the C locale provides as default. It also future-proofs against changes to the static methods. Change-Id: I5bba407cfc29e3f33d1e9fa878ddf35fff3b113c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use numeric_limits instead of hand-coded equivalentsEdward Welbourne2020-07-134-22/+20
| | | | | | | | | | | | | | As a comment noted, the reason for QLocaleData rolling its own values describing the ranges of digits and exponents in a double were all about std::numeric_limits's constants not being constexpr - which they have now been since C++11, so we can do away with our own. One of the constants was used in two places in the same way; so abstract that use out into an inline function in qlocale_tools, to save duplication and give somewhere to document it. Change-Id: I7e3740ece9b499c0ec434de18d70abe69e1fe079 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QRegExp and its remaining mentions out of QtCoreSona Kurazyan2020-07-133-5192/+0
| | | | | | Task-number: QTBUG-85235 Change-Id: Ibd6c98d952c1bb9916b64715c6430fb0d3fe3843 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QStringView: Remove outdated note about usage with QListLinus Jahn2020-07-121-4/+0
| | | | | Change-Id: Id1cef09642ccde701e57e8f0a3a3d0e5fcf47e5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove that casts to int/uint that shouldn't be there anymoreLars Knoll2020-07-101-35/+26
| | | | | | | Remove casts that truncate a qsizetype or size_t in qstring.cpp Change-Id: Ibc1515f9906d5a0840254e60e2e7dfca716b63b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename local variable hiding parameterDimitrios Apostolou2020-07-101-2/+2
| | | | | | | As found by LGTM.com. Change-Id: If3024bdaad06cafcd401b4ee04524ad03bd69a97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove local variable masking a global oneDimitrios Apostolou2020-07-101-2/+1
| | | | | | | As found by LGTM.com. Change-Id: Ied926a9eace9044ec9abc859557cd28178e5defb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QByteArray::count implementation for longer dataSona Kurazyan2020-07-091-2/+2
| | | | | | | | | | | | | The issue has been introduced when refactoring QByteArray::count implementation (see 631127126cc14e7c01cc611532b3256b58785670). Because the last argument of QByteArrayMatcher::indexIn() method has a defult value, it has been compiling without issues, but was being called with incorrect size parameter. Fixed it to pass the length of the input data correctly. Change-Id: Ic9c2f33733131ec17276aa889f2d7ea40ec79b01 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Silence some warnings about fallthroughFriedemann Kleint2020-07-091-2/+2
| | | | | | | | src/corelib/text/qunicodetools.cpp:1243:13: warning: this statement may fall through [-Wimplicit-fallthrough=] src/corelib/text/qunicodetools.cpp:1247:55: warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: I441000db46cb6d85a5dcd0534ea2168b39a3f3bd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce QByteArrayViewSona Kurazyan2020-07-086-292/+1261
| | | | | | | | | | | | | | | | | | | | Created a QByteArrayView in symmetry with QStringView. Added the basic tests symmetrical to QStringView tests. Moved the implementations of non-modifying methods of QByteArray to namespace QtPrivate, to be reused inline from both QByteArray and QByteArrayView. Changed QByteArray's counterparts of those methods to take QByteArrayView as argument instead of QByteArray. Removed QByteArray's operator QNoImplicitBoolCast(), because it was causing ambiguity when calling those methods with QByteArray argument (it was there to perevnt if(!ba)/if(ba) from compiling, but currently that would be ambiguous and won't compile anyway). [ChangeLog][QtCore][QByteArrayView] New class. Task-number: QTBUG-84321 Change-Id: I05f92e654cf65c95f2bb31b9c9018746ac110426 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Try to workaround bogus compiler warning in gcc 9 for ARMv7Lars Knoll2020-07-062-2/+5
| | | | | | | | | | | | | | | | | | | | | | | ../../src/corelib/io/qurlidna.cpp: In function ‘QString qt_ACE_do(QStringView, AceOperation, AceLeadingDot)’: ../../src/corelib/io/qurlidna.cpp:2543:23: error: ‘int __builtin_memcmp_eq(const void*, const void*, unsigned int)’ reading 8 bytes from a region of size 2 [-Werror=stringop-overflow=] if (memcmp(result.constData() + prevLen, acePrefixUtf16, sizeof acePrefixUtf16) == 0) ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors In function ‘bool operator==(const QByteArray&, const QByteArray&)’, inlined from ‘virtual void (* QLinuxFbIntegration::platformFunction(const QByteArray&) const)()’ at ../../src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp:185:18: include/QtCore/../../../../src/corelib/text/qbytearray.h:571:45: error: ‘int __builtin_memcmp_eq(const void*, const void*, unsigned int)’ reading 17 bytes from a region of size 1 [-Werror=stringop-overflow=] The warnings/errors are bogus. Fix them by using QStringView::sliced() and de-inlining the comparison operator for QByteArray. Change-Id: I24956fe74a7989e75cd03d717570b8fca493ab23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename from() to sliced()Lars Knoll2020-07-066-11/+14
| | | | | | | | After API discussions, agreement was that from(n) is a bad name for the method. Let's go with sliced(n) instead. Change-Id: I0338cc150148a5008c3ee72bd8fda96fb93e9c35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QString to qsizetypeLars Knoll2020-07-065-330/+315
| | | | | | Change-Id: Id9477ccfabadd578546bb265a9483f128efb6736 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qsizetype in QListLars Knoll2020-07-062-47/+47
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QArrayDataPointer::size a qsizetypeLars Knoll2020-07-063-4/+4
| | | | | | | | This is a next step towards making QList, QString and QByteArray able to deal with large sizes. Change-Id: Icad49b33f503401ac4912678b2f88584c6f91a63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QArrayData::sharedNull()Lars Knoll2020-07-061-2/+2
| | | | | | | | Remove the last places where those got used and avoid allocations when we resize to 0. Change-Id: Ib553f4e7ce7cc24c31da15a55a86d18bdf1cc5c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid allocating a d-pointer for empty stringsLars Knoll2020-07-063-24/+15
| | | | | | | | Those can simply be handled as compile time constant strings pointing to the empty (Q)Char. Change-Id: I1f6f6ab923a30c68a720003ca68c34c572aa29da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify Q_ARRAY_LITERALLars Knoll2020-07-061-1/+1
| | | | | | | And clean up some unused pieces of code. Change-Id: I285b6862dc67b7130af66d3e08f652b1a56b990e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of shared null for QByteArray, QString and QVectorLars Knoll2020-07-065-65/+80
| | | | | | | | | | | | | | As a side effect, data() can now return a nullptr. This has the potential to cause crashes in existig code. To work around this, return an empty string from QString::data() and QByteArray::data() for now. For Qt 6 (and once all our internal issues are fixed), data() will by default return a nullptr for a null QString, but we'll offer a #define to enable backwards compatible behavior. Change-Id: I4f66d97ff1dce3eb99a239f1eab9106fa9b1741a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a crash in QClipBoard when copying utf16 dataLars Knoll2020-07-062-26/+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 the reallocate() method from QArrayDataPointer to the Ops classLars Knoll2020-07-022-2/+2
| | | | | | | | | And only implement it for QPodArrayOps, as that's the only case where we should be using it. Change-Id: If48f3e4b142c322d3451309d6d1cf68aee569ea2 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Documentation fixes for QStringTokenizerKai Koehne2020-07-011-9/+9
| | | | | | Task-number: QTBUG-85343 Change-Id: Ib647d90ba3cfa1181690dc745249637031c7ad67 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QByteArray::insert: do not assert that pos must be non-negativeGiuseppe D'Angelo2020-06-301-2/+0
| | | | | | | | The insert() overloads have generally a very wide contract. The very next line accepts negative positions, so remove the related assert. Change-Id: I89b67615c59287825942047a28572bf896cf30e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArray::operator[] no longer resizesAlbert Astals Cid2020-06-291-3/+2
| | | | | | | Fix the documentation Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-298-79/+71
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add explicit encode()/decode() methods to QStringConverterLars Knoll2020-06-262-4/+28
| | | | | | | | | The functional style interface is nice, but does feel alien in some contexts, so better also have explicit encode and decode methods. Change-Id: Ic07ced15f65cdb3a7f1cf044041e341d2ef87f79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVector in corelibJarek Kobus2020-06-255-23/+19
| | | | | | | | | | Applied to headers only. Source file to be changed separately. Omitted statemachine for now to avoid conflicts. Omitted qmetatype.h for now - to be handled later. Task-number: QTBUG-84469 Change-Id: I317376037a62467c313467d92955ad0b7473aa97 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Improve castingAllan Sandfeld Jensen2020-06-252-2/+2
| | | | | | | Make a handful of narrowing casts explicit Change-Id: I318e9778840f2437963377b6b97f269d569909dc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove QByteArray's methods taking QString and their usesSona Kurazyan2020-06-253-247/+0
| | | | | | | | | | [ChangeLog][QtCore][QByteArray] Remove method overloads taking QString as argument, all of which were equivalent to passing the toUtf8() of the string instead. Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QString: add char8_t overload of fromUtf8()Marc Mutz2020-06-232-0/+13
| | | | | | | | | | | | | Use the overload-with-template trick from P1423 to avoid ambiguities when existing callers pass 0 or nullptr. Add a qdoc-ignored macro to hide the fact that the overload is a template. [ChangeLog][QtCore][QString] Added char8_t overload of fromUtf8(). Change-Id: Iaa2d365bfa161ef36cc73fa3bad50aabf34d01db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move implementation of QVector/List back to qlist.hLars Knoll2020-06-205-47/+45
| | | | | | | | | | | | | And name the main class QList. That's also the one we document. This gives less porting pain for our users, and a lot less churn in our API, as we use QList in Qt 5 in 95% of our API. In addition, it gives more consistent naming with QStringList and QByteArrayList and disambiguates QList vs QVector(2|3|4)D. Fixes: QTBUG-84468 Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move QTextCodec support out of QtCoreKarsten Heimrich2020-06-202-9/+9
| | | | | | | | | | * 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>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-1910-28/+28
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't truncate parameters passed to QStringView::{first/last/from/slice}Sona Kurazyan2020-06-191-4/+4
| | | | | | | | QStringView doesn't need to convert qsizetype parameters to int. Change-Id: Iba8b5259ab3ed7a24a57bb6748446fd3e45bb182 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>