summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: Change some custom commands to mention the target nameAlexandru Croitor2021-06-161-3/+3
| | | | | | Pick-to: 6.2 Change-Id: I3a198c87ba2d71306478809095083694b65c7086 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Check the impact of static link order for user projectsAlexey Edelev2021-06-161-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For user projects we run the static link order check once 'find_package(Qt6 ...)' is called. If linker can resolve circular dependencies between static libraries and object files we set the _qt_link_order_matters property of the Qt::Platform target. This indicates the use of finalizers is not required and we may rely on CMake-base propagation of resource libraries and resource object files. If linker could not resolve circular dependencies depending on the _qt_resource_objects_finalizer_mode value: - Finalizer will be called and collected resource objects will be linked to the target directly. - Finalizer will be omitted and resource objects will be linked using the target_sources function implicitly. This only propagates resource one level up if consumer links the static library PUBLICly, but all symbols will be resolved correctly since object files are placed in the beginning of the linker line. In the CMake version 3.21 we expect that CMake will take care about the order of the resource object files in a linker line, it's expected that all object files are located at the beginning of the linker line. TODO: Need to confirm that the CMake 3.21 meets the expectations. Amends 4e901a2f99cbfda3b479253ea54b16f02e1c3aa5 Pick-to: 6.2 Task-number: QTBUG-93002 Task-number: QTBUG-94528 Change-Id: Ia68976df8182d3d3007b90c475c1e3928a305339 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use year with same day-of-week pattern as fallback for out-of-rangeEdward Welbourne2021-06-163-22/+51
| | | | | | | | | | | | | | | | | | | The kludge previously implemented for handling dates outside the supported time_t range, by asking for a corresponding date in a year in the range, had a comment remarking that this is broken due to the wrong day of the week and, consequently, the placement of DST transitions, e.g. those scheduled by the last Sunday of a month, happening on different dates in the year asked about and the in-range year passed to the system time_t functions. This can be handled by selecting a year in the time_t range which has the same pattern days of the week (and length of the year, i.e leap-ness). That may (particularly for leap years) need to select a year far from the end of the range (and there may be a change to the zone's rules between the selected year and the end). Change-Id: Ia353b2cc7b7d266b7abf80e37cac61544ce95c2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Apple: Use POSIX IPC instead of System V in sandboxed applicationsTor Arne Vestbø2021-06-169-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | System V semaphores are not supported in sandboxed applications, so when Qt is configured with App Store compliance, or the user requests POSIX IPC explicitly, we use that instead. https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24 As the shared memory name limit on Apple platforms is very low, we have to skip the existing logic for naming, and instead use a truncated hash of the key. This should still be fine for avoiding any collisions in practice. An explicit check for the ENAMETOOLONG error has been added to catch any cases where they key goes beyond the allowed length. Sandboxed applications also have an extra requirement that the key must include an application group identifier. This requirement has been pushed up to the user and documented, as we don't have enough information in Qt to know which identifier to use. Both tst_QSystemSemaphore and tst_QSharedMemory work as before with both sandboxed and non-sandboxed applications, after removing some assumptions in tst_QSharedMemory about System V behavior. Fixes: QTBUG-91130 Change-Id: Iaf1edb36a5d84d69e42ec31471a48d112faa8c6a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Detect sandboxed state for command line appsTor Arne Vestbø2021-06-161-2/+2
| | | | | | | | | | | | The documentation says that if we "pass a URL to the main executable of a bundle, the bundle as a whole is generally recognized.". By passing the executable instead of the bundle we include command line applications that don't have a app bundle folder (but have an embedded Info.plist). Pick-to: 6.2 6.1 5.15 Change-Id: I3a2f145c1ec6e16607e9c04baf08678d5dea0b81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QLoggingSettingsParser: port setContent() to QStringViewMarc Mutz2021-06-162-4/+4
| | | | | | | | | | | Amends 16f927a4f1ffeff399351b625d73ac3cd7bccd51. At the time the original change was written, QStringTokenizer had not been integrated, yet. Change-Id: I83c31d816199bc48c4baea855d13cbf9eda9aaa2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Revert "Remove old Android code that have now has alternative public APIs"Jani Heikkinen2021-06-165-3/+2901
| | | | | | | | | | | | | This reverts commit 03eb44394e4cdf3d2a9aa7be632b487313519fbb. Reason for revert: This breaks the dependecy update round in dev now. The revert can be reverted again after 1) Full dependency round is succeed in 'dev' 2) Android extras submodule has been removed from qt5.git#dev (7aa41d22fa485f212aebbef500ea91921c7bc38b) 3)qtmultimedia has been ported to use new api instead of this old one 4) Full dependency round with all above is succeed in 'dev' Change-Id: I23241d2a90307074ecfc9573d2b58baba1874cfc Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Bindable property docs: mention virtual setters and gettersIvan Solovev2021-06-152-0/+58
| | | | | | | | | | Update the bindable property docs to explain how to deal with virtual getters and setters. Task-number: QTBUG-92994 Pick-to: 6.2 Change-Id: I6c29011817e83623414b39afee0f39ad4cc5c1c9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace misdescribed link with one matching its descriptionEdward Welbourne2021-06-151-3/+3
| | | | | | | | | | The link, allegedly to the pcrepattern(3) man page, was in fact a link to a .txt file giving an over-view of the pcre library, but not describing the pattern syntax. Link, instead, to the actual HTML version of the pcrepattern(3) man page. Change-Id: I566fa5185b909bceb51dfe9f253c98f858f6a182 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Adjust the EntryPoint target name according to the internal module naming policyAlexey Edelev2021-06-151-5/+7
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-87775 Change-Id: I1d6097c950f97e102c44e2952edc98caa4deb6c6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add common internal macros to request jni objectsAssam Boudjelthia2021-06-151-0/+39
| | | | | | | | | | | | | | | | | | There are multiple macros used to get/check and return with error in case the requested object is not valid. These macros are defined in multiple places and duplicated. This patch defines them in one place and then they can be reused. This macro expects a "char m_qtTag[]" variable to be defined in the scope where the macro is used. That variable is used as a tag for the error message printed when an error occur. Another consecutive patch use the new macros over qtbase code. Pick-to: 6.2 Change-Id: Ibb8558d1229cec6dad9ec9da6e2635ea54fd18d6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QSettings: hide the return type of actualKey() and normalizedKey()Marc Mutz2021-06-151-7/+4
| | | | | | | | It may change in the future. Change-Id: If65bf690b12d4e6474557d7a48567941b18413bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: add missing docs for new QVLA streaming operatorMarc Mutz2021-06-151-0/+9
| | | | | Change-Id: I02af3b0e5615c8281b204fad0e6454bf40aca475 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QTimeZonePrivate: Reduce copying by not using QByteArrayMårten Nordheim2021-06-141-26/+32
| | | | | | | | | | QByteArray creates copies of data, but we usually don't need the copy and a view, for comparison or fetching substrings, is enough. So instead we use QBAView and QLatin1String (when we need to go through QStringTokenizer). Change-Id: I12e0bd8777fc63f676b9371abfd345fab1046c44 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add "We mean it" warning to qidentityproxymodel_p.hMitch Curtis2021-06-141-0/+12
| | | | | | | | This was missed in b42e2d70fbda5afb462b869583b925ad5f1a5480. Pick-to: 6.2 Change-Id: Id06bd880456534293cf6c0d215f794b6ad0552ca Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document that WA_TranslucentBackground will not have an effectLaszlo Agocs2021-06-141-3/+6
| | | | | | | | | | | | ...if changed after the widget is shown. Just documents the current state of things. Task-number: QTBUG-60822 Task-number: QTBUG-59126 Pick-to: 6.2 6.1 Change-Id: If8281dce4457707a1673aca7a50744d8b231b030 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up types in Unicode decomposition codeEdward Welbourne2021-06-141-31/+28
| | | | | | | | | | Use integral consts instead of enums for algorithm constants; handle QChar::Decomposition as such, rather than as an int; pass QChar pointers to cut down on reinterpret_cast<>s; use char32_t instead of uint for UCS4. Change-Id: Ia535128602065392a1b46fbb0a81572026be5d00 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix snippet for QRandomGenerator64 docsPaul Wicking2021-06-141-1/+1
| | | | | | | Pick-to: 6.2 6.1 5.15 Fixes: QTBUG-94347 Change-Id: Iaf007534214cffc83858833e80dad447df9b297a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Rework massageAdjusted and make the most of its DST knowledgeEdward Welbourne2021-06-141-17/+41
| | | | | | | | | | | | | | | | | | Since massageAdjustedDateTime() has to split LocalTime from TimeZone and call {local,zone}MSecsToEpochMSecs() in any case, its call to refreshZonedDateTime(), via checkValidDateTime(), was duplicating that work uselessly. So handle UTC and offset-from-UTC separately with a call to refreshSimple and handle local/zone time by inlining what remains of refreshZonedDateTime() aside from the duplication. At the same time, recent reworking of qt_mktime() make localMSecsToEpochMSecs() handle its DST-hint the same way zoneMSecsToEpochMSecs() has long done so, to take care of the intended handling of DST gaps and repeats. Change-Id: Id6bef7dd0f8983c3e923f4580a62a76aa6fcb810 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QException: Fix no-exception buildNodir Temirkhodjaev2021-06-141-0/+2
| | | | | | | | | | qtbase\src\corelib\thread\qfutureinterface_p.h(180): error C2039: 'setException': is not a member of 'QtPrivate::ExceptionStore' qtbase\src\corelib\thread\qexception.h(109): note: see declaration of 'QtPrivate::ExceptionStore' Change-Id: Id746b87af3f88d91c473f6a3d986dc0f022dfa2f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Update CLDR qt_attribution.jsonMårten Nordheim2021-06-141-1/+1
| | | | | | | | | We updated to v39 in 6235893d54b8fbf5c8bd54e33cd82b55042555f1 Task-number: QTBUG-94410 Pick-to: 6.2 6.1 5.15 Change-Id: I73d539d677c9066dc5ceb6b4fc65fb544f39ac7f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDebug: add support for QVarLengthArrayMarc Mutz2021-06-131-0/+7
| | | | | | | | | | | | | | Remove a conflicting definition of the same operator from qrhi.cpp. Who knows how many ODR violations this hidden gem may have caused... [ChangeLog][QtCore][QDebug] Can now stream QVarLengthArray objects. [ChangeLog][QtCore][QVarLengthArray] Can now be output via QDebug streaming. Change-Id: I12f7670e32029fa8c96b446e9a98ebf3b9732d0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QThread: avoid mixed enum arithmeticGiuseppe D'Angelo2021-06-131-3/+3
| | | | | | | | It's deprecated. Task-number: QTBUG-94059 Change-Id: If4fb81b650edb7cdb96980986dc4710a1a5040af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Stop using mixed enum arithmeticGiuseppe D'Angelo2021-06-132-24/+22
| | | | | | | | | | | It's deprecated. Port some unnamed enumerations (used only to declare constants) to constexpr integers instead. Apply qToUnderlying as needed. Task-number: QTBUG-94059 Change-Id: Ifaa64ece966ce08df40dc71ffcfa7ac038110e0b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindowsPipeWriter: centralize write result handlingAlex Trotsenko2021-06-122-36/+29
| | | | | | | | | | Both code paths (write() for the main thread and waitCallback() for the worker thread) use the same logic when processing write results. To avoid code duplication, consolidate the common part for both threads in the startAsyncWriteLocked() function. Change-Id: Ie2663b2ed221e2797a1ecbdb3fcee0ee8f030cc0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Doc: Mention that you cannot order QVariants anymoreKai Köhne2021-06-121-0/+4
| | | | | | | Pick-to: 6.1 6.2 Task-number: QTBUG-87263 Change-Id: I3d1332c43e4c06d47b249e4b9adb32685070f56a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allocate progress related data on demandSona Kurazyan2021-06-122-29/+62
| | | | | | | | | | | | | | | | Some of the data members related to progress reporting (min, max and text) aren't used when user doesn't want manual progress reporting, so the data for them can be allocated on demand, when the user explicitly sets them. Note, that we still need to always create other related data (current value and progress timer), since in the non-manual mode progress is still reported by incrementing the current value each time a new result is reported. Task-number: QTBUG-92045 Change-Id: I1e5bd17de2613a6ea72ccff0029812f67686708b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QFuture: put the result store and the exception store in a unionSona Kurazyan2021-06-127-31/+118
| | | | | | | | | | | | | | QFuture doesn't need both at the same time, calling QFuture::result(s) either returns a result or throws an exception. Store result and exception stores in a union, to reduce the memory. Also added a note for making the ResultStoreBase destructor non-virtual in Qt 7. Task-number: QTBUG-92045 Change-Id: I7f0ac03804d19cc67c1a1466c7a1365219768a14 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QLatin1String: Add a constructor taking QByteArrayViewMårten Nordheim2021-06-122-0/+15
| | | | | | Change-Id: Ie90645486431d7af3fe8128417b0fb6bd02a88b5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZonePrivate::territory: use QStringTokenizerMårten Nordheim2021-06-121-6/+4
| | | | | | | | | | A follow-up to 6ec3321875b9fb2f72cc875ba191aa8123e7d5a5 where the function was optimized using a hand-rolled lazy-split on a QBAView. Now that QLatin1String::indexOf(QLatin1String) has been optimized we can use QStringTokenizer instead. Change-Id: I30b15d309e7c364c0a4dafe31651b39ea14db7e5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* String API Symmetry: test for indexOf with large negative offsetMårten Nordheim2021-06-111-0/+2
| | | | | | | | | | | | | | Small change needed to make QString_char16 and QString_QChar return -1 in this case, but other combinations already returns -1. [ChangeLog][QtCore][Behavior Change] QString::indexOf(QChar) and QString::indexOf(char16_t) now treat a negative start-position, from, bigger than the string's size as invalid. It previously clipped such start-positions to the start of the string, inconsistently with other QString indexOf overloads. Change-Id: Ic56c8a558bf40a94845c649647db569892d4df02 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix date parsing when local time lacks the start of the dayEdward Welbourne2021-06-111-13/+26
| | | | | | | | | | | | | | | | | | | The case where a parsed date-time fell in a transition, but only because the default value for some field lead it there, only dealt with the case of parsing a date-time, which is the only time it should be relevant. However, since the date and time do get combined as a date-time (even when only one of them is relevant) the same problem could arise when parsing a date (on which the current time-zone happened to make a transition at the start of the day) or a time (if the default date happens to be one on which the current zone had a transition). So handle both of those cases, as well as the date-time case. Fixes: QTBUG-91120 Pick-to: 5.15 6.1 6.2 Change-Id: I565d115eb85cd2ee69fa500fcd40b05bcf8f6fff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Record useful URL in qlocale_unix.cppEdward Welbourne2021-06-111-1/+3
| | | | | | | | The Open Group's documentation of the meanings of the locale-determining environment variables. Change-Id: I5e3ae7de033b569b1c691b85ed65e441832359c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: optimize indexOfMårten Nordheim2021-06-115-24/+163
| | | | | | | | | | Some time ago I wanted to use QStringTokenizer with a QL1S haystack and needle to optimize a particular bottleneck. Only to realize the new bottleneck was more expensive (continuously converting both the strings to QString). Change-Id: Ica86db0043c839c2336a3c3886ffbe3875659b5b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSemaphore: Fix warning in 32-bit buildNodir Temirkhodjaev2021-06-121-1/+1
| | | | | | | | qtbase\src\corelib\thread\qsemaphore.cpp(157): warning C4293: '>>': shift count negative or too big, undefined behavior Change-Id: Iddf76e52770576bd57a4630884c0e0d6310cd4ff Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QLatin1String: Add overloads taking QLatin1CharMårten Nordheim2021-06-112-0/+48
| | | | | | | | | Without the overloads using QLatin1Char in QL1S member functions results in the QL1Char being converted to QChar and QL1String being converted to QString. Change-Id: Ic19545539a207f025a6293f0b2d929de475dc166 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: Remove a non-null assert in comparisonMårten Nordheim2021-06-111-1/+0
| | | | | | | | | | | It's a latin-1 string so embedded nulls are weird, but it makes it easier for the follow-up patch adding overloads for QLatin1Char. A test case in tst_qstringapisymmetry.cpp, which checks handling of "empty" values, end up with a '\0' latin-1 char. Which makes the code assert. Change-Id: I0ff6628087cfac4d875b19f572c59ef7b5406293 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QObject: Fix memory leak in queued_activateFabian Kosmale2021-06-111-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | queued_activate adds a reference to the slot object. It also attempts to deref it again, but that did not work correctly so far. We could end up with T1 | T2 queued_activate | checks isSlotObject | adds ref | locker.unlock() | | QObject::~QObject | //In disconnect all senders loop | sets isSlotObject to false | derefs slotObj, but not deleted checks isSlotObject | (no deref because it's null) | To solve this issue and others caused by early returns, we now use a RAII helper, which always takes care of calling destroyIfLastRef if the ref count has been incremented. Change-Id: I9c011cdb8faa5f344d7e70f024fc13f407e39ccf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix Qt tool apks not to be built as part of default all targetAlexandru Croitor2021-06-111-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | The code already checked for QT_BUILDING_QT to decide whether the 'apk' target should be part of the default 'all' target, but it only worked properly for qtbase. The 'apk' target was created before the value of QT_BUILDING_QT is set when building other repos like qttools. Postpone the decision on whether 'apk' should be part of 'all' to the first call of qt_add_executable -> qt_android_add_apk_target. At this point QT_BUILDING_QT will be defined. Achieve that by relying on an additional 'apk_all' target as an implementation detail. Amends 8b8679f73d6cfb513141cc0a9f4925a64ca19455 Pick-to: 6.2 6.1 Fixes: QTBUG-94442 Task-number: QTBUG-94264 Change-Id: I92ff0a7eef2caad244340ab7835e77c9fb3377c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Correct handling of last second of 1969 (again)Edward Welbourne2021-06-111-48/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In my prior attempt to handle the last second of 1969, I forgot that the QTime we're describing is a local time, so whether *it* thinks we're at the last second of the day is beside the point. Fortunately, preceding second should get -2 as return if mktime()'s initial -1 actually meant the last second of 1969, so we can test via that, after a cheap pre-test to save doing this too often (albeit we only even attempt the check if mktime() returned -1 in any case). Restructured qt_mktime() in the process to deal with the error case's early return promptly instead of doing it in an else clause. Also repackage the calls to mktime to isolate various quirks and simplify the logic in qt_mktime(). This also prepares for setting tm_isdst as a hint when we know when we came from, in massageAdjustedDateTime(). Refined one test, added two more test cases. These didn't fail before this fix, but a judiciously-placed qDebug() in testing revealed that localMSecsToEpochMSecs() resorted to its fall-back handling - as if the date-time were outside the time_t range - due to qt_mktime() failing, for these test-cases (and several others). This fix evades that fall-back behavior; a judiciously-placed qDebug() shows none of our test-cases now fail callMkTime(). Change-Id: I11aa5015191dc4a565c28482307f7bc341c207e7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rework setMSecsSinceEpoch() to avoid local->UTC conversionsEdward Welbourne2021-06-111-44/+41
| | | | | | | | | | | | | The function takes a UTC time, which it converts to local time when needed, but its (two) calls to refresh a local time instance were doing the (more expensive) reverse conversion, which we don't need (because we knew UTC to start with) and, in this case, it can't land on an invalid time, so we don't need to cope with that. Change-Id: I49b42bfa9f6a5fde12810f5a0da9ff4466ca86a4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove old Android code that have now has alternative public APIsAssam Boudjelthia2021-06-115-2901/+3
| | | | | | | | | | * Remove the old qjni private APIs. * Remove the Android permission private APIs. * Remove runOnAndroidThread(). Pick-to: 6.2 Change-Id: I37ba8b4cb87a099f067e2e0b6744b8d01a0f9bbc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Hangul composition: use < base + count checks, not <= checksEdward Welbourne2021-06-111-2/+2
| | | | | | | | | | | | | | | Before Unicode 4.1.0 there was an error in the example code for Hangul normalization that used <= on the ends of some ranges of values, where they should have used < tests. This was faithfully copied but the need for correction has only lately come to light. Thanks to Ma Lin for pointing this out and providing the fix and test-cases. Fixes: QTBUG-71894 Pick-to: 6.2 6.1 5.15 Change-Id: I5c7fec1f9fac1f7a25b2d5e9c3109a90a7ff49e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build without features.itemmodelTasuku Suzuki2021-06-111-2/+6
| | | | | Change-Id: Ic768f12861db5366ff3fa25b28f9252358ce3a72 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add the check for linker capabilities to resolve circular dependenciesAlexey Edelev2021-06-101-1/+15
| | | | | | | | | | | | | | 'ld' only capable to resolve circular dependencies by wrapping the suspected static libraries and objects using --start/end-group arguments. We want to detect if linker is 'ld' at configure time to decide how to link the resource objects if finalizers are not enabled. The qt_config_compile_test function is extended with an extra argument since it's required to pass custom cmake flags to the ld-related test. Pick-to: 6.2 Change-Id: I484fcc99e2886952d8b0232f37e4e6a35d072931 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* JNI: check if clazz is null before doing a jni callAssam Boudjelthia2021-06-101-8/+16
| | | | | | | | | | Also add missing \since keyword. Task-number: QTBUG-92952 Pick-to: 6.2 Change-Id: Ia1472f04955809fb5132a4b6239dbcbdf63cca93 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* JNI: state that findClass() returns a global refAssam Boudjelthia2021-06-101-11/+13
| | | | | | | | | Fix docs to state that findClass() returns a global ref from the cached classes list. Pick-to: 6.2 Change-Id: I7c45cc4c9e1c6e109db7cf7d926a250592798972 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QLocalSocket/Win: avoid double buffering on writeAlex Trotsenko2021-06-094-9/+36
| | | | | | | | | As QWindowsPipeWriter now maintains a chunk queue, there is no need to use the internal QIODevice buffer and wait for the previous operation to complete. Change-Id: Id4d54edfe920aeb4a534980cb0cc85a56c067a70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Doc: Fix QVariant documentationKai Köhne2021-06-092-61/+56
| | | | | | | | | | Update documentation to not reference API that is obsolete in Qt 6. Also fix documentation for changed behavior (isNull()), and fix snippets. Pick-to: 6.1 6.2 Change-Id: I526efeff63d907bbadd5e8a539ccf237cb992125 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Revert "QMetaType: Don't normalize name which should already be normalized"Fabian Kosmale2021-06-091-2/+3
| | | | | | | | | | | This reverts commit f6fa4b39ee32ba4a5c6a3db5581dd50b3afc7a47. Reason for revert: c76a2d7c9cfc5e2edd45a30681df51b37125bc01 was not enough to catch all cases. Pick-to: 6.2 Change-Id: I5830ab20b1f4d26a0a201c3dd5aaee6b10aa12ac Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>