summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Mark QObject::deleteLater() as \threadsafeMarc Mutz2019-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | | Because it is. It's just QCoreApplication::postEvent(), which is thread-safe. It also _has_ to be, because we recommend to use deleteLater() to delete QObjects that live in another thread: Quoting the ~QObject() docs: > Warning: Deleting a QObject while pending events are waiting to be delivered > can cause a crash. You must not delete the QObject directly if it exists in > a different thread than the one currently executing. Use deleteLater() > instead, which will cause the event loop to delete the object after all > pending events have been delivered to it. If deleteLater() is not thread-safe, it cannot be used for one of its intended purposes. Change-Id: I333d506b42bdfcdff00fe6cefa234c21865625a6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* [docs] Fix issues in QRect/QMargin API docsMarc Mutz2019-07-031-2/+2
| | | | | | | | - Fix grammar in op-(QRect, QMargin) - Correct shunk for grown in op-(QRectF, QMarginsF) Change-Id: Ia0dbd933cc9f6ed5e0dad05a27794c1135c794ed Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QRandomGenerator: assert that bounded() calls have correct argumentsThiago Macieira2019-06-282-8/+18
| | | | | | | | Otherwise, the math will fail badly. Documentation improved to reflect reality. Change-Id: I9e3d261ad9bf41cfb2b6fffd159085cd38e3c388 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid undefined behavior in qjsonwriter.cppUlf Hermann2019-06-201-2/+4
| | | | | | | | | | | See comment in qnumeric_p.h:convertDoubleTo for details. Change-Id: Ifcd13f7f67995af6a60e50ccabe843a855be04ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* move ENDSESSION_* compat defines to before they are actually usedRolf Eike Beer2019-06-131-6/+6
| | | | | | | | This commit amends 144d33df72e5ca905b1d64134784923d5c. Change-Id: Ic6bc475c9d8c3bb727ee209dbab437a18e219b6d Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QCborValue::fromJsonValue: rewrite code to remove UBThiago Macieira2019-06-191-4/+6
| | | | | | | | | | Converting an out-of-range FP to integer is UB. See comment in qnumeric_p.h. Change-Id: Ief874765cd7b43798de3fffd15a9bfe2c5fbbc01 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Report correct state change when destroying QAbstractAnimationTor Arne Vestbø2019-06-201-1/+1
| | | | | Change-Id: Ibe5310e20268d1baa5b329a4d02a3dc38d875008 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Report correct data when multiple volumes are mounted to the same pathVolker Hilsheimer2019-06-191-0/+3
| | | | | | | | | | | | | | | | We read the data into the iterator from the system, but then recreate the QStorageInfo object based on the rootPath, and then stat, discarding the data in the iterator. We can overwrite the data with the information in the iterator, which partially fixes the issue. Volume information that can only be retrieved by stat'ing the root path, such as size information, will only be correct for one of the entries. Change-Id: Ie98590876d6a5f525af009f4ff5d595cbc308b3f Fixes: QTBUG-63209 Reviewed-by: Andrius Štikonas <andrius@stikonas.eu> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix bogus setAttribute setter warningMichal Klocek2019-06-191-0/+4
| | | | | | | | | | | | | | | Since e9e16c74643 running webengine application you can get warning "Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created." WebEngine set shared open gl context on qt_call_pre_routines, so when QCoreApplicationPrivate init() runs. Fixes: QTBUG-76391 Change-Id: I5fc146ed70054b0c1597fe06615cea2d7a8969d8 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12.4' into 5.12"Qt Forward Merge Bot2019-06-171-0/+6
|\
| * Merge remote-tracking branch 'origin/5.12.4' into 5.12Qt Forward Merge Bot2019-06-171-0/+6
| |\ | | | | | | | | | Change-Id: I61c92717cf82cfe2b14a4d7cbe17f03c3634e827
| | * Add names for pthreads in IntegrityJanne Koskinen2019-06-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Set name for pthread instead of "name too long" for easier tracking. Change-Id: Iab22cbeac01277e4dc1325399c7892de2e5bd551 Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Doc: Correct documentation of QFuture::cancelPaul Wicking2019-06-112-9/+9
|/ / | | | | | | | | | | | | | | Fixes: QTBUG-76305 Change-Id: I192a7f0bc2c15e532bc6d51c7e9c39561ae3436c Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Doc: Fix typos in QDateTime docsTopi Reinio2019-06-071-2/+2
| | | | | | | | | | | | | | Change-Id: Ibff4555cbd1e980333acd88c697021b4a74998a8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | macOS: Introduce QMacKeyValueObserver and use in theme and styleTor Arne Vestbø2019-06-072-0/+86
| | | | | | | | | | | | Change-Id: I2d21c883628933543ae5a66b694ff7503119bc4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Detect system time zone from linked symlinksDamien Caliste2019-06-041-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTimeZone] The IANA timezone database backend now properly follows symlinks even when they point to variable locations like /run or /var (useful when /etc is mounted read-only). Fixes: QTBUG-75936 Fixes: QTBUG-75527 Change-Id: If0dc2bfa20659e76c3bd062c75597a9ad01ad954 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Overhaul Q(Date|Time)+ documentationEdward Welbourne2019-05-291-96/+103
| | | | | | | | | | | | | | | | Various things were out of date, misdescribed or just plain wrong. Change-Id: I11b7bd419604067fce2577a42882ebf126629016 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Do not strip off the fragment and query in the qfileselectorJan Arve Sæther2019-06-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | This is needed for cases where we use e.g. "file:///test.html?query#Fragment". The fragment and query were already preserved for the qrc scheme. This fixes it for the file scheme. Change-Id: I5713e4a25372fdd55ac255b1c6228b4dea419244 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | cmake: correct version dependency for qt5_add_big_resourcesLiang Qi2019-05-202-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | qt5_add_big_resources is only available if using CMake 3.9 and later. This amends cdccd0222bbed1954d5d7fe0da9d2308c202f3b1. Task-number: QTBUG-55680 Task-number: QTBUG-75806 Change-Id: Ibba7af6ee7edfb226368937d543b7ec5cc93eb16 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Rename QMacScopedObserver to the more fittingly QMacNotificationObserverTor Arne Vestbø2019-05-291-8/+8
| | | | | | | | | | | | Change-Id: I1d8280fe88871572a3a27e612de49717b3b9ef77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Automatically sysrootify $$[FOO/get] propertiesJoerg Bornemann2019-05-282-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If automatic sysrootification is in effect (SysrootifyPrefix=true in qt.conf) then the qmake property variants $$[FOO] and $$[FOO/get] must be sysrootified. The latter was never sysrootified. All other variants (src, dev, raw) are supposed to be without sysroot. Flesh out a sysrootify function and readabilitify the code a bit while we're at it. Fixes: QTBUG-71673 Change-Id: Ifcbce8c035b9da447da9d6937edd5a4aa84573ba Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QRegExp: remove an out of bounds access into QStringGiuseppe D'Angelo2019-05-271-1/+1
|/ | | | | | | | | | | | | | | | | | | | ... spotted with the brand-new checks for that in QCharRef. The rx[i] == ~~~ check is clearly wrong, as rx is the regexp we're building and `i` was not supposed to index into it. The intended meaning was wc[i] == ~~~, testing if we were seeing the closing bracket of a character set. We need to check for that immediately for dealing with the special syntax of []...] where the ] belongs to the character set (it can't be the closing one as character sets cannot be empty). Fix and add a regression test. Bonus: this code was almost unchanged since 2009. Change-Id: I958cd87fc25558e9d202d18b3dd4a35d0db16d8d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: hjk <hjk@qt.io>
* Update QMetaEnum::fromType()'s static assert's error messageEdward Welbourne2019-05-151-1/+2
| | | | | | | | | QMetaEnum fromType() also works for enums declared with Q_{ENUM,FLAG}_NS. This hadn't been added to the message when we added Q_{ENUM,FLAG}_NS. Fixes: QTBUG-75829 Change-Id: Ib71dae83dd8d837adf46b73cd299b8e61bdb1f64 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Qt Core: Document CMake macrosKai Koehne2019-05-162-0/+238
| | | | | | | | | | Document public macros in Qt5CoreMacros.cmake. This will replace the list in the current CMake Manual. Task-number: QTBUG-72159 Change-Id: I377412fe0c1d0a9b232162bbab88ac830d2cac80 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Warn when setting attributes after QCoreApplication is createdSergio Martins2019-05-141-0/+26
| | | | | | | | | | | It's a recurring bug seen in user code and a warning will help reduce it. Warns only for the attributes that have such requirement in the docs, but maybe we should be more strict and warn for any attribute. Change-Id: I68148521953221ad0e8be1028181f52a7f22d2cc Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSharedPointer: fix threadsafety docsGiuseppe D'Angelo2019-05-111-8/+13
| | | | | | | | | Try and explain better the situation around QSharedPointer: it's reentrant, not thread safe. Change-Id: Ief9d28be8ea3fbaa6014cb6b999626db1bab52ca Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Work around VS2015/17 bitset + qfloat16.h compiler bugKeith Kyzivat2019-05-102-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][Global] Added the QT_NO_FLOAT16_OPERATORS macro in order to work around a Microsoft <= VS2017 compiler bug that is exposed when using std::bitset along with any Qt header that includes <qfloat16.h>. This is fixed in MSVC 2019[1], but the workaround is needed for earlier versions. In this case, cl.exe fails with C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\bitset(270): error C2666: 'operator /': 10 overloads have similar conversions C:\Qt\5.12.0\msvc2017_64\include\QtCore/qsize.h(364): note: could be 'const QSizeF operator /(const QSizeF &,qreal)' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qsize.h(194): note: or 'const QSize operator /(const QSize &,qreal)' c:\qt\5.12.0\msvc2017_64\include\qtcore\qmargins.h(427): note: or 'QMarginsF operator /(const QMarginsF &,qreal)' c:\qt\5.12.0\msvc2017_64\include\qtcore\qmargins.h(213): note: or 'QMargins operator /(const QMargins &,qreal)' c:\qt\5.12.0\msvc2017_64\include\qtcore\qmargins.h(207): note: or 'QMargins operator /(const QMargins &,int)' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(205): note: or 'double operator /(int,qfloat16) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(205): note: or 'double operator /(qfloat16,int) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(195): note: or 'float operator /(float,qfloat16) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(195): note: or 'float operator /(qfloat16,float) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(194): note: or 'double operator /(double,qfloat16) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(194): note: or 'double operator /(qfloat16,double) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(193): note: or 'long double operator /(long double,qfloat16) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(193): note: or 'long double operator /(qfloat16,long double) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qfloat16.h(176): note: or 'qfloat16 operator /(qfloat16,qfloat16) noexcept' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qpoint.h(402): note: or 'const QPointF operator /(const QPointF &,qreal)' C:\Qt\5.12.0\msvc2017_64\include\QtCore/qpoint.h(206): note: or 'const QPoint operator /(const QPoint &,qreal)' C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\bitset(270): note: or 'built-in C++ operator/(::size_t, )' C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\bitset(270): note: while trying to match the argument list '(::size_t, )' C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\bitset(266): note: while compiling class template member function 'std::bitset<8> &std::bitset<8>::set(::size_t,bool)' C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\bitset(39): note: see reference to function template instantiation 'std::bitset<8> &std::bitset<8>::set(::size_t,bool)' being compiled ..\Qt5.12.0-C2666\main.cpp(7): note: see reference to class template instantiation 'std::bitset<8>' being compiled Invoke this workaround by defining the macro QT_NO_FLOAT16_OPERATORS in user code prior to the inclusion of Qt includes in a translation unit. Arithmetic operators from qfloat16 will then not be present in that compilation unit. [1] https://developercommunity.visualstudio.com/content/problem/406329/compiler-error-c2666-when-using-stdbitset-and-cust.html Task-number: QTBUG-72073 Change-Id: I58f8400bf933ad781d4213731695e20e0c482166 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Update CLDR version in attributionEdward Welbourne2019-05-091-1/+1
| | | | | | | This is a follow-up to 43abe86e. Change-Id: I2442304c9c79bcb1932fb173b8d993a242d79f4b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Define Q_OS_WINDOWS, make it an alias to Q_OS_WINSergio Martins2019-05-082-0/+8
| | | | | | | | | | | | | | | As seen in several occasions, both in user code and in Qt proper, people make these mistakes. What makes it harder to spot is that it doesn't look like a typo, and feels natural (natural as Q_OS_LINUX instead of Q_OS_LIN feels). There's been a P1 in qtdeclarative/ and currently there's a Q_OS_WINDOWS usage in qtwebengine. This is a recurring problem, no matter how much people test and review these errors will happen, so the alias is justified. Change-Id: If6943b52e17f0c8b238c36bb1f7834802123f12a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix integer overflows in QDeadlineTimerKonstantin Shegunov2019-05-082-60/+383
| | | | | | | | | | | | | | If the deadline is far in the future, the conversions to nanoseconds or internal arithmetic may overflow and give an invalid object, thus the deadline may end up in the past. Added a test to the testlib selftest for sleep. [ChangeLog][QtCore][QDeadlineTimer] Fixed integer overflows leading to immediate timeouts. Task-number: QTBUG-69750 Change-Id: I9814eccdf9f9b3add9ca66ec3e27e10cd5ad54a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Add debug output for message WM_DPICHANGEDFriedemann Kleint2019-05-081-0/+9
| | | | | | | | | Add it to the name lookup and add verbose formatting to the debug operator. Task-number: QTBUG-73014 Change-Id: I31ee31bc28ef563fdbc0adedcea03546ced5faad Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Update locale data to CLDR v35.1Edward Welbourne2019-05-072-3623/+3645
| | | | | | | | | | The formatting of times in Norwegian has reverted to using dots in place of colons, as it did before v31 (commit 82deb0ad1), so reverted the tests to their state before that. Change-Id: I8a09ce253731bb0f0f3caca117f06ad568940a81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document how to use CMake on Qt Core, Qt GUI's central pagesKai Koehne2019-05-074-71/+14
| | | | | | | | | | | | | | | Add documentation on how to use a module from CMake, alongside the existing documentation about qmake. Separate generic info from module-specific examples, to make it possible to use one include file in all modules. While at it, also remove the mentioning of the central include; it is not something we should actively advocate anymore. Instead, the documentation of every class gives the correct include to use. Task-number: QTBUG-73058 Change-Id: I6b3c0e5ea218dd9c06a491c8fb799a7fcf42dd92 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* fix crash when using ALDI usb-stick with broken filesystemNick Shaforostov2019-05-051-1/+2
| | | | | | | | | | | I was using a cheap usb-stick from ALDI supermarket with fat32, and my application crashed because filesystem was empty. Unrealistic scenario, but still just returning here false is better than a crash Change-Id: I8979d5a4e19ce57770ab03983e847b272ebf7019 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>