summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Doc: Clarify equivalence of two QDate instancesTopi Reinio2020-04-031-7/+9
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-83212 Change-Id: I627716522a962a4c90c5833446dd62f6a18d7d86 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QEventDispatcherWin32: fix posted events deliveringAlex Trotsenko2020-04-032-33/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid livelocks, posted events should be delivered when all pending messages have been processed, and the thread's message queue becomes empty. Although the logic of the previous patch is correct, it turned out that determining the moment when the message queue is really empty is not so simple. It is worth noting that the GetQueueStatus function sometimes reports unexpected results due to internal filtering and processing. Indeed, Windows docs say that "the return value from GetQueueStatus should be considered only a hint as to whether GetMessage or PeekMessage should be called". Thus, we cannot rely on GetQueueStatus in unambiguous logic inside the qt_GetMessageHook. To solve the problem, this patch introduces a guard timer which guarantees low priority processing for posted events in foreign loop. The wakeUps flag reset logic has also been changed to provide clearer synchronization of the Qt internal loop. Fixes: QTBUG-82701 Fixes: QTBUG-83151 Change-Id: I33d5001a40d2a4879ef4eb878c09bc1c0616e289 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * QLibrary/Android: Correct improper mergingThiago Macieira2020-04-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | I had originally developed ae6f73e8566fa76470937aca737141183929a5ec in 5.13, where this code for Android didn't exist. I didn't notice the use of pHnd there when I merged up for the push. Change-Id: Ibdc95e9af7bd456a94ecfffd160208dfaa596d95 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Doc: Make Qt Test snippets compilableNico Vertriest2020-04-031-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-81498 Change-Id: I22f07cd539e5e317b6cf15eb369d59915146bd13 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-04-031-20/+13
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-031-20/+13
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/benchmarks/corelib/text/qstringlist/qstringlist.pro Change-Id: Ie9b97bd83c2df00fd9b556b5f09d405f71970169
| | | * Clean up QTzTimeZonePrivate::systemTimeZoneId()Edward Welbourne2020-04-021-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The special handling of ":/etc/localtime" should only apply if that's the exact value of $TZ; the old code would have treated "/etc/localtime" the same, due to stripping a leading ':' before checking for it. We can also test whether to do that stripping using startsWith(). When reading the content of files, avoid QTextStream's trip via QString and back to QByteArray by using the QFile's readLine() directly, or by using readAll(). Task-number: QTBUG-75585 Change-Id: I1524529a2c34d83a9fbd00d41c11f2d994dfc49d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-038-12/+12
| | | | | | | | | | | | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | No-thread: Don’t assert in ~QThreadData()Morten Johan Sørvig2020-04-031-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | The no-thread build is not maintaining the QThreadData refcount. Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * | Purge a stray space from calendar locale dataEdward Welbourne2020-04-023-1779/+1779
| | | | | | | | | | | | | | | | | | | | | | | | It was causing all lines after the first, in each calendar's locale_data[], to be over-indented. This only changes spacing. Change-Id: Ibfc4986548eecbfdba2902cc18f44a2af669bc6d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Change QLocale to use CLDR's accounting formats for currenciesEdward Welbourne2020-04-021-433/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, this changed the US currency formats for negative amounts to be parenthesised versions of the positive amount forms, rather than having a minus sign after the $ sign. Test updated. [ChangeLog][QtCore][QLocale] Currency formats are now based on CLDR's accounting formats, where they were previously mostly based (more or less by accident) on standard formats. In particular, this now means negative currency formats are specified, where available, where they (mostly) were not previously. Task-number: QTBUG-79902 Change-Id: Ie0c07515ece8bd518a74a6956bf97ca85e9894eb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Take CLDR's distinguished attributes into accountEdward Welbourne2020-04-021-146/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing XPATH searches, child nodes that have distinguished attributes that were not asked for should be skipped. This is part of the LDML spec and matters when resolving locale inheritance. Scan the LDML DTD (previously only scanned for the CLDR version) to find which attributes of which tags are ignorable - all others are distinguished - and take the result into account when performing XPATH searches. The XPath we were using for currency formats wasn't excluding currencyFormatLength elements with type="short" and patterns specific to thousands (and larger multiples); this is fixed by taking distinguished attributes into account. However, the XPATH also wasn't specifying the always distinguished attribute type="standard" that was, in practice, used for nearly all locales that weren't (wrongly) using short-forms for thousands; so type="standard" is now made explicit, so as to minimize the diff. This leaves only twenty-one locales with a negative currency formats. A later commit shall switch to using accounting by default (it falls back via an alias to standard, in any case), thereby restoring the two mentioned below that were using it by accident, but the present change gives the minimal diff here. Thousands-specific formats replaced with sensible ones: * zh_Hant_{HK,MO} (Traditional Mandarin, Hong Kong and Macau) * eo_001 (Esperanto) * fr_CA (Canadian French) * ha_* (Hausa, when not written in Arabic) * es_{GT,MX,US} (Spanish - Guatemala, Mexico, USA) * sw_KE (Swahili, Kenya) * yi_001 (Yiddish) * mfe_MU (Morisyen, Mauritius) * lag_TZ (Langi, Tanzania) * mgh_MZ (Makhuwa Meetto, Mozambique) * wae_CH (Walser, Switzerland) * kkj_CM (Kako, Cameroon) * lkt_US (Lakota, USA) * pa_Arab_PK (Punjabi, in Arabic script, as used in Pakistan; uses arabext number system, whose currency falls back to latn's, for which pa_Arab over-rides the thousands-format). Format changed from an over-ridden type="accounting" to standard (so these lost a negative-specific form) in: * en_SI (English, Slovenia) * es_DO (Spanish, Dominican Republic; same) For some locales we were picking up over-rides of narrow or short list formats, or formats for or-lists or unit-lists rather than and-lists, in place of the standard list format, that these locales don't over-ride, provided by a parent locale. This changed list formats for: * en_CA, en_IN (dropped "Oxford" comma before "and") * qu_* (Quechua; dropped "utaq", presumably meaning "and") * ur_IN (Urdu, India; was using unit-list formats) [ChangeLog][QtCore][QLocale] Data used for currency formats in several locales and list patterns in some locales have changed due to now parsing the CLDR data more faithfully. Fixes: QTBUG-81344 Change-Id: I6b95c6c37db92df167153767c1b103becfb0ac98 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Take number system into account in currency format look-upEdward Welbourne2020-04-021-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLDR's currency formats do have number system variation, so take it into account. (The old xpathlite code clearly intended to do this, but failed at it due to looking for the wrong component of an XPATH to fix.) This changes the currency formats in use for * all Dutch locales (because nl.xml lists a currency format for arab before the one for latn, and they differ), * Punjabi, Urdu - specifically pa_Guru_IN, ur_Arab_PK (both like Dutch, arabext before latn; which is correct for pa_Arab_PK and ur_Arab_IN), * Sindi (whose over-ride of latn currency format we were using, where we should be using arab's format, supplied by root's default), * Tatar (which specifies a generic currency format, which we were using, before one specific to latn, which we now use), * Tongan (same as Dutch), * Konkani (like Dutch, deva before latn) and * several North African Arabic locales (whose default number system is latn, rather than arab, but previously used arab's formats). Task-number: QTBUG-79902 Change-Id: I18d8ec16bfd3a516d1bcd2f63bc7f7f15179a3f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Rework qlocalexml2cpp.py to use writers based on TranscriberEdward Welbourne2020-04-022-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This saves repetition of temporary-file manipulation code. In the process, ensure that we tidy away temporary files on failure. Moved a comment in qlocale.h to *outside* the re-written portion, to save having to rewrite it every time. Added blank lines to separate script data from country data in the generated output. Changed 0s in one comment to zeros, to match another comment. Isolated use of sys to the __main__ block. Isolated use of enumdata to the new LocaleHeaderWriter class. Modernised all the string-formatting I touched. Task-number: QTBUG-81344 Change-Id: I5768e45d9a8ea23facc303b3dd8af8b3ccbf7ff2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Rework cldr2qtimezone.py into more maintainable formEdward Welbourne2020-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke out the updating of a source file to a ZoneIdWriter helper class, which enables tidying away the temporary file if we fail. Collected up the rest of the script into a main() that's now called from a __name__ == '__main__' block. Rationalized the imports. Eliminated an inefficient lookup function by constructing a suitable dict() before entering the loop that needed it. Separated the "data you might need to update" tables from the code that does the work, to make it easier for those adding support for new zones to see what they're doing. Removed the spurious $Revision$ from the output and reworded the premable of the generated file. (It would seem CLDR no longer uses an RCS-based version-control system.) Generated output is otherwise unchanged. Task-number: QTBUG-81344 Change-Id: I7d9de8357ebcb599d154de9f862e25f7ade00390 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Warn that the EDITABLE flag for property declarations is deprecatedLars Knoll2020-04-022-1/+5
| | | | | | | | | | | | | | | | | | | | | Additionally mark QMetaProperty::isEditable as deprecated. Change-Id: I1abe4c6f2d30c2f96380f9e5942be431dbfed38f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-313-21/+48
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp Change-Id: Ifaa56153f5f0d687a6b4d94f84fcfa1e1751afd2
| | * CBOR support: prevent overflowing QByteArray's max allocationThiago Macieira2020-03-273-21/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QByteArray doesn't like it. Apply the same protection to QString, which we know uses the same backend but uses elements twice as big. That means it can contain slightly more than half as many elements, but exact half will suffice for our needs. Change-Id: Iaa63461109844e978376fffd15f9d4c7a9137856 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-272-46/+67
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I539d8cae5fd413b8a6c9c5d8a6364c79c8133a0a
| | * QCborValue: apply a simple optimization to avoid unnecessary allocationsThiago Macieira2020-03-252-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the map or array is known to be empty, we don't need to allocate a QCborContainerPrivate. Change-Id: Ief61acdfbe4d4b5ba1f0fffd15fe212b6a6e77c3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * QCborValue::fromCbor: Apply a recursion limit to decodingThiago Macieira2020-03-252-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simple 16k file can produce deep enough recursion in Qt to cause stack overflow. So prevent that. I tested 4096 recursions just fine on my Linux system (8 MB stack), but decided 1024 was sufficient, as this code will also be run on embedded systems that could have smaller stacks. [ChangeLog][QtCore][QCborValue] fromCbor() now limits decoding to at most 1024 nested maps, arrays, and tags to prevent stack overflows. This should be sufficient for most uses of CBOR. An API to limit further or to relax the limit will be provided in 5.15. Meanwhile, if decoding more is required, QCborStreamReader can be used (note that each level of map and array allocates memory). Change-Id: Iaa63461109844e978376fffd15fa0fbefbf607a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * QCborValue: create a wrapper to set the QCborStreamReader error stateThiago Macieira2020-03-252-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | The next commit will need to do so from outside QCborContainerPrivate, where QCborStreamReader::d can't be accessed (private). Change-Id: Iaa63461109844e978376fffd15fa0f6f04081bf2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Doc: Document new property change notifiers for QSortFilterProxyModelTopi Reinio2020-03-261-3/+45
| | | | | | | | | | | | | | | Change-Id: I02789fa2281d33c7344a5d5e730a27fe6fa50e56 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: QItemSelectionModel: Note when function default arguments were addedTopi Reinio2020-03-261-0/+12
| | | | | | | | | | | | | | | Change-Id: I4b7a9269b68c86548035b57211c4c1b5ad451767 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Mark QTextStream manipulators as deprecatedTopi Reinio2020-03-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | and instruct to use the ones from the Qt namespace instead. Task-number: QTBUG-82532 Change-Id: I6a85f5096da8aec925a287beff136b77d113926e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Expand reasoning for QHash deprecationsTopi Reinio2020-03-261-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | and mark QHash::[const_|key_]iterator operators correctly as deprecated. Change-Id: I01da16254759b9bdb7920709de45a72933d6b5c8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Expand reasoning for QMap deprecationsTopi Reinio2020-03-261-6/+5
| | | | | | | | | | | | | | | | | | Change-Id: Idaec1ebd2a392af2b8d778e72acda6bd117d1a48 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Doc: Fix \fn command for qScopeGuard(F &&f)Topi Reinio2020-03-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | and tag it in the header file to ensure the documentation is matched. Change-Id: Id1e7cd395ca0ec337845da9a207bfbf95db01064 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Doc: Fix documentation for deprecated QSet functionsTopi Reinio2020-03-261-6/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc has trouble applying the \obsolete command for multiple topic (\fn) commands in one go. Separate them out and expand the reasoning for deprecation. Mark the rest of the deprecated functions and typedefs related to reverse iterators as \obsolete. Change-Id: I09858efd7e1e5fc890d4f3f063f00c8812fc0b52 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Mark deprecated QMutableSetIterator functions as \obsoleteTopi Reinio2020-03-261-4/+50
| | | | | | | | | | | | | | | | | | Change-Id: I07a4ade20242fbe4139c0b88cf8728dd74628511 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | QProcess/Linux: use the FFD_VFORK_SEMANTICS flagThiago Macieira2020-03-251-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... when we are not using the FFD_USE_FORK flag. We use the FFD_USE_FORK flag when we have user code to run in setupChildProcess(). This code is enabled for all Unix, but forkfd() honors this flag only on Linux >= 5.4. See the commit adding the flag for more information on what the flag does and see the comment in this commit on why it's safe to use it. Fixes: QTBUG-17331 Change-Id: I1bee3bc466a04f19bd6efffd15f448cb23ce1e91 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | CMake: Warn about using internal macros and functionsKai Koehne2020-03-251-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | These functions and macros were never documented. Let's warn about using them for now, with the option of removing / renaming them in Qt 6. Change-Id: Ia595aa35b73e54534e535d2946581651af8023f2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2020-03-243-58/+101
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-243-58/+101
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbdrag.cpp Change-Id: I0b47324b70b0b4894e54b21aa3e7a5041f9bd5e3
| | | * qtimezoneprivate_tz: Apply a cache over the top of timezone dataRobin Burchell2020-03-202-57/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Constantly re-reading the timezone information only to be told the exact same thing is wildly expensive, which can hurt in operations that cause a lot of QTimeZone creation, for example, V4's DateObject - which creates them a lot (in DaylightSavingTA). This performance problem was identified when I noticed that a QDateTime binding updated once per frame was causing >100% CPU usage (on a desktop!) thanks to a QtQuickControls 1 Calendar (which has a number of bindings to the date's properties like getMonth() and so on). The newly added tst_QTimeZone::systemTimeZone benchmark gets a ~90% decrease in instruction count: --- before +++ after PASS : tst_QTimeZone::systemTimeZone() RESULT : tst_QTimeZone::systemTimeZone(): - 0.024 msecs per iteration (total: 51, iterations: 2048) + 0.0036 msecs per iteration (total: 59, iterations: 16384) Also impacted (over in QDateTime) is tst_QDateTime::setMSecsSinceEpochTz(). The results here are - on the surface - less impressive (~0.17% drop), however, it isn't even creating QTimeZone on a hot path to begin with, so a large drop would have been a surprise. Added several further benchmarks to cover non-system zones and traverse transitions. Done-With: Edward Welbourne <edward.welbourne@qt.io> Task-number: QTBUG-75585 Change-Id: I044a84fc2d3a2dc965f63cd3a3299fc509750bf7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * Doc: replace QFileInfo::created with birthTimeMauro Persano2020-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia497febcbf28e4b3babe50fc6f05e12f3d686b91 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Fix use of deprecated ::forcesignAllan Sandfeld Jensen2020-03-241-1/+1
| |/ / | | | | | | | | | | | | Change-Id: I39322bcc0e24d0bfccf43c8700a166ce350208ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Mitch Curtis2020-03-231-8/+6
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Mitch Curtis2020-03-201-8/+6
| | |\| | | | | | | | | | | | | Change-Id: Ib2a2e3a292af43be3a980c2ccc943c08f4bbf72f
| | | * Merge remote-tracking branch 'origin/5.14.2' into 5.14Mitch Curtis2020-03-191-8/+6
| | | |\ | | | | | | | | | | | | | | | Change-Id: I34ca28c75b88e882c3f35f182bf01acb22b77637
| | | | * Merge 5.14 into 5.14.2Kari Oikarinen2020-03-109-87/+116
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: Ib4b26bad47a850cde6253fb3422aae34b2cf622b
| | | | * | QLibraryInfo: avoid unneeded conversion for path prefixKirill Burtsev2020-03-041-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ammends 4ac872639e. Change return type for getPrefix to eliminate toLatin1/fromLocal8bit conversion of initial value for relocatable prefix to preserve not-latin1 characters and return valid prefix path. Fixes: QTBUG-81462 Change-Id: I15cfa49e9e440e257b04dd31803cd1478f3b07f5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | | | 64-bit atomics: fix bad copy/paste in macro definitionsThiago Macieira2020-03-201-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82864 Change-Id: I35d5bcc92b2e4bddaacbfffd15fc42d054fcb2b1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | | | Fix binary compatibility issue in QJson{Array,Object} initializer_listThiago Macieira2020-03-202-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rewrite using CBOR internals replaced one of the two naked pointers that were members of QJsonArray and QJsonObject with a QExplicitlySharedDataPointer. The problem is that its operator= will read the current value to decrement the refcount and possibly delete the pointed object. But QJson{Array,Object}::initialize() are called from inlined code, without initialization. So we can't call operator=. We need to memcpy to write a nullptr. This is not unit-testable because it requires compiling against 5.14 or earlier, then running against 5.15. Fixes: QTBUG-82700 Change-Id: Iaa63461109844e978376fffd15f98c62656d197c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | | | Doc: update QJsonObject::operator[] non-const to say it creates keyThiago Macieira2020-03-201-1/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the non-const QJsonArray::operator[] requires a valid index and all the const operator[] say that it returns Undefined if the key or index doesn't exist. This is the exception. Task-number: QTBUG-39864 Change-Id: Iaa63461109844e978376fffd15f9716f0cc66cca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-03-182-6/+6
| |\ \ \ \
| | * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-182-6/+6
| | |\| | | | | | | | | | | | | | | | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| | | * | | Fix JNI signature for the timezone getDisplayName callVolker Krause2020-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the changes in 5.14.1 this code now actually seems to be hit here, throwing NoSuchMethodError exceptions all over the place and breaking date/time handling quite spectacularly. Change-Id: I9bee3de39ec98f86d7944b94e89119505f62dc6c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * | | Fix QVarLengthArray documentationGiuseppe D'Angelo2020-03-121-5/+5
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVLA *does* have iterators and *can* be used with foreach (... I didn't say it should). Move its description together with the other containers. Change-Id: Ib60d1f7b3dc0e8c7004991bd4fdff95b3f23af60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | / | QSequentialIterable: Treat sets as appendableFabian Kosmale2020-03-181-0/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSet and std::(unordered_)set were so far not treated as appendable, as they lack a push_back method. We do however need support for this in declarative to enable converting back from QJSValue arrays to sets. We achieve this by testing for and using the insert method. While vector has also such a method, it doesn't take a single value, but rather a position or iterator + value, so the template specialization is not ambiguous. Task-number: QTBUG-82743 Change-Id: I74fc7b1b856d9bcd38100b274ba2b69578ea8bbb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>