summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa: Get the right zero digit for the localeAndy Shaw2019-05-021-1/+13
| | | | | | Change-Id: Ic23e541e1b12b3c94f8d191cb8fb0f76086b69a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSharedPointer: fix docs for create()Giuseppe D'Angelo2019-05-022-27/+4
| | | | | | | | | | In 5.12 only the variadic argument version is left (as all supported compilers have variadic templates). Remove the docs of the nullary overload, and fix the docs for the remaining overload. Change-Id: I54cc7ea71cc61ba1330a9ad92e4fa2ae7f749bac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reduce amount of tracepoints required for event trackingMilian Wolff2019-05-022-15/+10
| | | | | | | | | Encode the consumed/filtered state in the _exit tracepoint and remove the separate tracking of receiver event handling. Combined, this reduces the size of the trace file. Change-Id: Icb3cb2dd47798543905cea450046d6fad559a15b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't pass scope args to _exit trace pointsMilian Wolff2019-04-302-7/+7
| | | | | | | | | | | | | | When we trace a scope, then we pass the scope args to the _entry trace point. There is no need to do that also for the _exit trace points, it just blows up the trace data for no obvious gain. Any decent tracing consumer can easily find the args for the _exit call by matching it to its _entry call. Note that this is standard practice in trace points, and also done like this in the Linux Kernel trace points for example. Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QMetaObject::activate tracepointsMilian Wolff2019-04-302-25/+25
| | | | | | | | | Use Q_TRACE_SCOPE and the corresponding naming scheme. Additionally, don't change the behavior of the code when tracing is enabled, i.e. continue to return early if possible. Change-Id: I9ba9679869db1541a19bc832beede902224c52f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve QObject::moveToThread docMiłosz Kosobucki2019-04-281-4/+10
| | | | | | | | | | | | | | | | | | Change mentions of parameter value being "zero" to nullptr. Clarify that when nullptr is passed to moveToThread() event processing is stopped because the object is no longer associated with any thread. Also, reitarete this fact in the paragraph about processing of new events. There's an exception to the rule that QObjects cannot be "pulled" by moveToThread that is buried in the implementation and not mentioned in the doc. This information is worth noting explicitly. Change-Id: I816ff737c48d8057b39e36b566079710aeb8e690 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make QFile::copy() less likely to create zero-sizedThiago Macieira2019-04-271-4/+10
| | | | | | | | | | | | | | | | | | QFile::copy() didn't have the syncToDisk() call that QSaveFile::commit() has. So add it. [ChangeLog][QtCore][QFile] Made QFile::copy() issue a filesystem- synchronization system call, which would make it less likely to result in incomplete or corrupt files if the system reboots or uncleanly shuts down soon after the function returns. New code is advised to use QSaveFile instead, which also allows to display a progress report while copying. Fixes: QTBUG-75407 Change-Id: I95ecabe2f50e450c991afffd1598d09ec73f6482 Reviewed-by: Henrik Hartz <hhartz@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* qdoc: Fix warnings about missing \inmodule commandKai Koehne2019-04-262-0/+2
| | | | | | | | | | Fix warnings qtbase/src/corelib/io/qprocess.cpp:776: (qdoc) warning: Class CreateProcessArguments has no \inmodule command; using project name by default: QtCore qtbase/src/corelib/serialization/qcborstream.cpp:1441: (qdoc) warning: Class StringResult has no \inmodule command; using project name by default: QtCore Change-Id: I1c85ca32aff1f89f70898af7b11cfead96c80349 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Android: Fix hang in runOnAndroidThreadSync and requestPermissionsSyncBogDan Vatra2019-04-251-2/+14
| | | | | | | | | Keep spinning the main event loop if we can't acquire the semaphore, this way the Android UI thread can post events on it. Fixes: QTBUG-74076 Change-Id: Ia87e0535f94c67728176918ab928ff5ce8b00f8e Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-171-3/+2
|\ | | | | | | Change-Id: I2816cb8a3cbc4a2cf5ca5f333a1fddc245b3c06a
| * Doc-fixes in QRandomGenerator::bounded(int...)Edward Welbourne2019-04-091-3/+2
| | | | | | | | | | | | | | | | They return int, not quint32. Change-Id: I9879b58cccf9ea324ea1fc0c567a9d30b82fa44d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6ed2ea86db63c72a38a60543da5a95d3543d39b1)
* | corelib: invokeMethod: Allow non copyable functors to be usedHugo Beauzée-Luyssen2019-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QMetaObject] Non-copyable lambdas can now be used with invokeMethod(). For consistency reasons, the functor object is now always moved. Fixes: QTBUG-69683 Change-Id: I66ff5e21d6d1926f0f7c5f8c304bed1a90b69917 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Correct the description of the "C" localeEdward Welbourne2019-04-112-1/+12
| | | | | | | | | | | | | | | | | | It is not identical to en_US, as we have long claimed. Fixes: QTBUG-75069 Change-Id: I236adcefdcb4120d2bf5adbcde727c5e3ca13986 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix resolving NTFS symbolic links that point to UNC sharesVolker Hilsheimer2019-04-101-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, the target of a symbolic link that points to a UNC share would include UNC in the target path, and not be correctly made absolute. Add a relevant test case, and use the opportunity to factor out the helper code that creates NTFS symlinks into a function that takes care of error handling. The file created with the new test case only gets cleaned up correctly when passing the file path into QDir::rmdir, which is either way the right thing to do. [ChangeLog][QtCore][QFileInfo] Fixed resolving of symbolic links to UNC shares on NTFS file systems. Change-Id: I9ba75d627aedf7c4cc289f0cb71088d795d30d8a Fixes: QTBUG-73688 Task-number: QTBUG-63970 Task-number: QTBUG-30401 Task-number: QTBUG-20791 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix QMetaObject::newInstance on non-QObject meta objectMilian Wolff2019-04-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | QMetaObject::newInstance returns a QObject, thus it's not possible to create a new instance of a Q_GADGET using this function. Previously, we returned a non-null QObject pointer for such scenarios, which then leads to crashes when one tries to use it. Now, we check whether the meta object inherits QObject's meta object, and error out early otherwise. Change-Id: I7b1fb6c8d48b3e98161894be2f281a491963345e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix off-by-one error in QTranslatorPrivate::do_load()Edward Welbourne2019-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | The central loop starts by reading five bytes; but the loop condition only checked that four were available. Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk@qt.io>
* | QElapsedTimer: Remove unused static nanosecondsToTicks methodKai Koehne2019-04-091-9/+0
| | | | | | | | | | | | | | | | Fixes clang-cl warning qelapsedtimer_win.cpp(80,22): warning: unused function 'nanosecondsToTicks' [-Wunused-function] Change-Id: I1ff334049fcf4b265fe97235b7daf06969331313 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update TinyCBOR with bugfixesThiago Macieira2019-04-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated to https://github.com/thiagomacieira/tinycbor commit ac9369d8ec8511bc7516266ae6b07f7da860c954. Fabrice Fontaine (1): fix undefined encode_half in json2cbor Pedro Oliveira (1): Fixed minor error in the example code. Svyatoslav Phirsov (2): Typo fixed in stdlib fread(...) usage typo in dumprecursive return type Thiago Macieira (9): Install the tinycbor-version.h header. Update version number for a possible but unlikely 0.5.3 release Fix #137: off-by-one error in UTF-8 decoding Update Travis CI to Ubuntu Xenial Pretty: fix use of uninitialised variable Validation: fix out-of-bounds access when content ends in a string Parser: apply the same memory-check update Tests: remove useless comment Tests: Catch an earlier QCOMPARE failure in compare() phirsov (6): Fix off-by-one causing buffer overflow in open_memstream Protect macro argument expansion using parentheses eliminating misleading messages in case .config file not yet created Run check silently in Travis Make AppVeyor test suit run silent as in Travis enhancement #149 implemented: access half-precision floating point data as single float Change-Id: I9e3d261ad9bf41cfb2b6fffd159088f1cc9b3b02 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix various uncommon cases in QTzTimeZonePrivate backendEdward Welbourne2019-04-052-22/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes a fixup for 03fadc26e7617aece89949bc7d0acf50f6f050a9, which removed the check on empty transition list, needed when no data are available. Ensured that such a data-free zone would in fact be noticed as invalid during init(). Fixed handling of times before the epoch (we still want to consult a POSIX rule, if that's all that's available) while ensuring we (as documented) ignore DST for such times. Fixed handling of large times (milliseconds since epoch outside int range) when looking up POSIX rules. Gave QTimeZonePrivate a YearRange enum (to be moved to QTimeZone once this merges up to dev) so as to eliminate a magic number (and avoid adding another). Moved year-munging in POSIX rules after the one early return, which doesn't need the year range. Added test-cases for the distant past/future (just checking UTC's offsets; SLES has a minimal version of the UTC data-file that triggers the bugs fixed here for them). Fixes: QTBUG-74666 Fixes: QTBUG-74550 Change-Id: Ief7b7e55c62cf11064700934f404b2fc283614e1 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add missing _exit tracepoints for event handlingMilian Wolff2019-04-052-2/+4
| | | | | | | | | | | | | | | | | | | | | | This allows tools that look for matching `foo_entry/exit` pairs in the trace data to work properly. An unmatched `_entry` would otherwise confuse them, making them think that the call stack is continuously increasing. Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194 Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce Q_TRACE_SCOPE to simplify tracing of a function entry/exitMilian Wolff2019-04-052-4/+17
| | | | | | | | | | | | | | | | | | | | | | Additionally, we also add a Q_TRACE_EXIT which runs a trace point when the scope is exited, leveraging qScopeGuard behind the scenes. Q_TRACE_SCOPE uses Q_TRACE_EXIT internally - the difference is that the _SCOPE version enforces the naming scheme of _entry / _exit for the tracepoints, whereas Q_TRACE_EXIT can be used generically. Change-Id: I4a2f5ea09f451fcf664d07fd493b679f7527ac06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add tracepoint to qt_message_printMilian Wolff2019-04-052-0/+5
| | | | | | | | | | | | | | | | | | This allows us to deduce a lot about what a Qt application is doing, since the debug output usually contains a lot of information. Change-Id: I28a18afd151a1640a44ba8c7c9cd87d5d66c99b0 Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Forward declare all types required for compilation with `-trace`Milian Wolff2019-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes compilation with `-trace lttng` or `-trace etw`. We need to forward declare QEvent, QImageReader etc., otherwise the types will be unknown while compiling the trace points. In order to handle this generically, the tracegen utility is extended to support a 'prefix text' in the `*.tracepoints` input files. Any text within curly braces will be embedded as-is in the generated file. This can then be used to add forward declarations for the types we need, including potential namespaces and such. Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
* | Remove unused static methodKai Koehne2019-04-051-9/+0
| | | | | | | | | | | | | | | | The only use of this method got removed already in commit bebae3737624. Change-Id: I9757cbe34710efd9a9d31c74f81e01da40453ff9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Make qt_is_ascii work properly on big endian systemsDmitry Shachnev2019-04-051-0/+4
| | | | | | | | | | Change-Id: Ia053fbc854a77e333edadb0be6c2e04826b8fbdb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine: Fix typoOrgad Shaneh2019-04-051-3/+3
| | | | | | | | | | Change-Id: I538ef771dcf6b757025c8d31f13a91222c2ebd3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix recursive includeAllan Sandfeld Jensen2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | qatomic.h included qbasicatomic.h which included qatomic.h. Due to a define in qbasicatomic.h, the definitions from QAtomic would change depending on which was included first. Fortunately qbasicatomic does not need qatomic.h so the include can be removed. Change-Id: I086009f2e16a6e20b2b76fc6b3bf66a343414206 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows: Fix QFileSystemEngine::id() for FAT32 drivesFriedemann Kleint2019-04-021-1/+3
| | | | | | | | | | | | | | | | | | | | GetFileInformationByHandleEx() which is used to to obtain the ID, has been found to fail on FAT32 (USB removable drives). Fall back to GetFileInformationByHandle() for these. Fixes: QTBUG-74759 Change-Id: Ib3ef60a6bf9e9edaf41af86bf71666001cb0aa58 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix disabling AUTOMOC and AUTOUIC for generated resource cpp filesAlexandru Croitor2019-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using qt5_add_big_resources. The previous approach of just setting SKIP_AUTOMOC and SKIP_AUTOUIC on the generated source files is not enough because if AUTOMOC is globally enabled, AUTOMOC will still run for the rcc_object_{outfilename} target, which ends up creating a mos_compilation.cpp.o file and adding it as a target object to the target. Thus later when $<TARGET_OBJECTS:rcc_object_${outfilename}> is passed to the rcc invocation, the expression evaluates to a list of two files: the rcc-related .o file and the mocs_compilation.o file. Obviously that breaks the rcc invocation. The fix is to disable AUTOMOC and AUTOUIC on the whole target, instead of just the source files. This prevents the creation of the mocs_compilation.cpp file. Fixes: QTBUG-74270 Change-Id: I51f757b110e940fe224010acb25b88c52ef612b1 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Doc: Use the \nullptr macro instead of 0Venugopal Shivashankar2019-04-0210-14/+14
| | | | | | | | | | | | | | | | This enables overriding the macro so that it translates to 'None' in the Qt for Python context. Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Refine underflow check in QLocaleData::convertDoubleToFloat()Edward Welbourne2019-04-011-4/+2
|/ | | | | | | | | | | | | | | A string can parse as a non-zero double that's smaller than the smallest float yet be a faithful representation of the smallest float. So rather than testing for non-zero doubles less than the smallest float, test for non-zero doubles that cast to float zero; these underflow. This means small values close below the smallest float shall round up to it, rather than down to zero, requiring a tweak to an existing test. Added a test for the boundary case (and tidied the test data). Fixes: QTBUG-74833 Change-Id: I4cb30b3c0e54683574b98253505607caaf88fbfb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: mention what is the suggested replacement for QSignalMapperAlbert Astals Cid2019-03-251-1/+1
| | | | | Change-Id: I0f230c8b59eae4b2b63a73b8223ed99545be44ec Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Fix tree recursion in QAbstractItemModel::match()Friedemann Kleint2019-03-221-5/+9
| | | | | | | | | Recurse down the sibling at column 0 of the index instead down the index. Change-Id: Ie78d8b28eab7438ca3f83ee0df177115ca82806e Fixes: QTBUG-73864 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix broken data for time-zones with no transitionsEdward Welbourne2019-03-222-24/+23
| | | | | | | | | | | | | | | | | | While an invalid time-zone shall have no transitions, so may various constant zones, like UTC. The TZ data may include only the POSIX rule for such a zone, in which case we should use it, even if there are no transitions. Broke out a piece of repeated code as a common method, in the process, since I was complicating it further. Added test for the case that revealed this; and made sure we see a warning if any of the checkOffset() tests gets skipped because its zone is unsupported. Fixes: QTBUG-74614 Change-Id: Ic8e039a2a9b3f4e0f567585682a94f4b494b558d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct a misguided assertion in QTzTimeZonePrivateEdward Welbourne2019-03-221-2/+4
| | | | | | | | | | | Without ICU, the TZ-DB backend for time-zones tripped over an assertion when running tst_QTimeZone::stressTest(), which happened to probe a zone between its last transition and the first transition of a POSIX rule that followed it. The code assumed there was no interval between these two; apparently, there can be. Change-Id: I3d0ad41fec0a255db2f9bfac54d33aa9b83938e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Accept that glibc's statx() falls back for usThiago Macieira2019-03-222-1/+21
| | | | | | | | | | | | | | | | | | | So we don't need to have a high kernel requirement on its account. I needed to introduce a configure-time check because we need to include a header to get the __GLIBC__ macro, but we can't include any header in assembler until we know it's glibc (we need to know that the header is assembler-safe). glibc, uClibc and MUSL do provide an assembler-safe features.h, but Bionic does not. And we need to know that it's glibc's implementation, since the fallback was not required. The other three libraries may not implement such a thing when they get around to adding the system call. Fixes: QTBUG-74526 Change-Id: I1004b4b819774c4c9296fffd158d14da98bf571c Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QTemporaryFile: Return early if the passed in QFile cannot be openedAndy Shaw2019-03-191-2/+2
| | | | | | | Change-Id: I97f00163c24f74d31e1b41ec7337f72600bda2d5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTranslator: avoid unhandled exceptionAnton Kudryavtsev2019-03-161-1/+2
| | | | | | | | | | Add std::nothrow param to avoid exception and to check pointer against nullptr. Change-Id: I505abb1ca15b8c10a80b0cd3784a6b0c4c6bcc1c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix compilation of qCDebug("", ...) with QT_NO_DEBUG_OUTPUTKai Koehne2019-03-141-16/+33
| | | | | | | | ... and fix QT_NO_INFO_OUTPUT, QT_NO_WARNING_OUTPUT alongside. Fixes: QTBUG-74359 Change-Id: I2167dc943ae8c52602e08e24ca815d95f82a5db8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: "UTF" -> "UTF-8"Thiago Macieira2019-03-141-1/+1
| | | | | Change-Id: Ifbadc62ac2d04a9a8952fffd158a5a9ba87c30e0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add a pair of functions to convert to and from Q/CborErrorThiago Macieira2019-03-141-4/+21
| | | | | | | | | | | | | | | We've so far made our public API match the TinyCBOR error codes, so the conversion is trivial. Having the two functions allows us to change that, if it becomes necessary. It also effectively concentrates the Coverity warning about mixed enums in a single pair of functions. >>> CID 190307: Incorrect expression (MIXED_ENUMS) >>> Mixing enum types "CborError" and "QCborError::Code" for "err". Change-Id: Ifbadc62ac2d04a9a8952fffd1589e739c7a5b745 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Use nullptr in Signals & SlotsKai Koehne2019-03-132-3/+3
| | | | | Change-Id: I9b377e00ce177ae33972479bde11dd03061224d7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: fix some typos and missing doc for QScopeGuardEirik Aavitsland2019-03-111-0/+6
| | | | | Change-Id: Ifd492387abbffa551e08a6bcc01e248b8402254d Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix Coverity warning about mixing enumsThiago Macieira2019-03-091-1/+1
| | | | | | | | | | Coverity says: >>> CID 190310: Incorrect expression (MIXED_ENUMS) >>> Mixing enum types "CborType" and "QCborStreamReader::Type" for "type_". Change-Id: Ifbadc62ac2d04a9a8952fffd1589e6e304fc7703 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix a couple of small doc things in relation to QScopeGuardAndy Shaw2019-03-092-2/+2
| | | | | | Change-Id: I6e61a18697b95d9e3f534d1d71ebf32fdff4a04f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Handle error from MS-Win API in QCollator::compare()Edward Welbourne2019-03-061-6/+28
| | | | | | | | | | | CompreString(Ex|) can fail, e.g. if it doesn't like the flags given. Report such failure and treat compared values as equal rather than whichever is first being less. Fixes: QTBUG-74209 Change-Id: If8fa962f9e14ee43cc423a09a67bc58259a24794 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* testlib: Prevent Apple test logger from stomping on other loggersTor Arne Vestbø2019-03-052-9/+15
| | | | | | | | | | | | | | We were potentially adding the Apple test logger multiple times, and we didn't consider whether the existing loggers were logging to file or not when circumventing them. We now don't use the Apple logger if it would touch stderr and some other logger is using stdout. In the case of no explicit logger being specified on the command line, we allow the Apple logger to take priority over the default plain test logger. Change-Id: I31bbec4f4b3ab84ba9a2be35e8e5db08fee071a7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Handle the situation where QTemporaryFile::open() failsAndy Shaw2019-03-051-9/+13
| | | | | | | | | If open() fails then we should make sure we do not try to write to it and just return 0 in that case. Change-Id: I2980b65766b322efed6708fb10cc27567174dc37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* nothread: add exit function to QThread stubLorn Potter2019-03-041-0/+10
| | | | | | | This allows QtDeclarative examples to build. Change-Id: Icd20304f76f8ba15c94eaf01b9fcd7b151b16146 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: update the note about nested deleteLater()Thiago Macieira2019-02-271-2/+4
| | | | | | | | | | | If you enter a nested event loop, cause a deleteLater(), exit that event loop, then enter a new one, the nesting count will be the same so those are legitimate targets for deletion. Task-number: QTBUG-73432 Change-Id: Id98140e1c2f0426cabbefffd157f975b5e291ccd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>