summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QCryptographicHash: Add a static method to retrieve hash lengthMårten Nordheim2018-04-102-0/+41
| | | | | | | | | | | | It's useful when you need to check how long a hash will be without first generating one. [ChangeLog][QtCore][QCryptographicHash] Add a static method, hashLength, which returns the length of the output of a hash function in bytes. Change-Id: Id6a454016523de83d157fd95c50105c6db4bb1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-102-46/+55
|\ | | | | | | Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
| * Doc: Update QVariant::toString description, update see also linksPaul Wicking2018-04-091-43/+48
| | | | | | | | | | | | | | | | | | | | Change the toString description to reflect that the listed types are not exclusive, and update see also link to link to the canConvert method that includes conversion table. Task-number: QTBUG-67174 Change-Id: I3ad2889c98a235995b94a2d0496a6fb8c024b7bb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QSemaphore: Fix 64-bit Linux QSemaphores initialized to non-zeroThiago Macieira2018-04-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original design for the 64-bit futex had the token count replicated in the high part. But the constructor wasn't setting it. This is one of the issues I had noticed when investigating QTBUG-66875, but didn't need to address since the the fix I ended up applying in commit 081c001deb75fa38385d3ff8cbbdb4f788529133 made that unnecessary: the high part only had the number of waiters. Unfortunately, when commit f502270c0f06daba75c1da381bd1658d81aa7bba brought back the token count in the high part, I failed to correct that problem. As a consequence, every QSemaphore that was initialized in the constructor to a non-zero value would eventually deadlock. This commit fixes that oversight. Task-number: QTBUG-67481 Change-Id: I662b8f168c74440ab1a8fffd1522be6b85adb4d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io>
* | Declare the operator| in the Qt namespace for QFlags in that namespacesOlivier Goffart2018-04-081-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a long overdue change so we don't break ADL of operator|. I think will not break source or binary compatibility. The problem is code like this: namespace Foo { struct MyStruct; MyStruct operator|(MyStruct, MyStruct); void someFunction() { fooLabel->setAlignement(Qt::AlignLeft | Qt::AlignTop) } } This would be an error before as ADL would find only the Foo::operator| and not the global one since the arguments are not in the global namespace. After this change, ADL works fine and this code compiles This bites people with misterious error, see questions on https://stackoverflow.com/questions/10755058/qflags-enum-type-conversion-fails-all-of-a-sudden https://stackoverflow.com/questions/39919142/broken-bitwise-or-operator-in-a-qt-project [ChangeLog][QtCore] QFlags's operator| for enum types in the Qt namespace are now declared in the Qt namespace itself. Change-Id: I021bce11ec1521b4d8795a2cf3084a0be1960804 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QVariant: Avoid a memory allocation with custom typesOlivier Goffart2018-04-081-3/+10
| | | | | | | | | | | | | | | | | | | | Store big or un-movable custom type within the same memory region as the QVariant::PrivateShared. Makes tst_qvariant::bigClassVariantCreation 33% faster Change-Id: I60a757d1f0a9a02cf9ac36fb53a72426b2f8cfa8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-071-0/+2
|\| | | | | | | Change-Id: Idf2bef470663864069bbf7e41af07b534936863a
| * QMimeDatabase: fix assert when fetching data for invalid mimetypeDavid Faure2018-04-061-0/+2
| | | | | | | | | | | | | | | | | | The Q_ASSERT(mimePrivate.fromCache) at qmimedatabase.cpp:218 which I added in commit 7a5644d648, was being triggered when calling comment() for invalid mimetypes such as db.mimeTypeForName(""). Change-Id: I8037041a4b435d2a5ba24ec94b7858e38b2f0bf2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-061-2/+2
|\| | | | | | | Change-Id: Ic811cd444e523b904211797112bba6aaec85dddd
| * Doc: Add missing punctuation in qCritical, qFatal documentationKai Koehne2018-04-051-2/+2
| | | | | | | | | | Change-Id: If4175502f81e569f031d97da6cc7f5d46428442a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-312-16/+23
|\| | | | | | | Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
| * doc: Improve QByteArray::fromRawData snippetSamuel Gaist2018-03-291-3/+3
| | | | | | | | | | | | | | | | | | The current snippet uses integer literals that will trigger the Wnarrowing warning with recent version of gcc. This patch replaces them with character literals to fix this warning. Change-Id: Iffad495f24cc9d4c1674a7fe3f6b45c46a625ff8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * QSemaphore: attempt to fix again the 64-bit Linux semaphoreThiago Macieira2018-03-291-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time, the issue was that we could race a wait and a wake. A multi- token waiter would not notice that the number of tokens changed because it only performed a fetch-and-OR, then waited on the high part which did not change. That means the futex_wait() would succeed, when we wanted it to have failed. So we have to bring back a portion of what commit 081c001deb75fa38385d3ff8cbbdb4f788529133 removed: we need to keep both the token count and the waiter count in the high word. Task-number: QTBUG-67214 Change-Id: I04a43ee94975482f9e32fffd151e467a9e0030b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add wildcard-to-regexp support to QRegularExpressionSamuel Gaist2018-03-304-1/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method will make QRegularExpression on par with QRegExp and will allow to replace this class when a wildcard expression can be set through an API (e.g. QSortFilterProxyModel::setFilterWildcard). For other use cases, see QTBUG-34052. [ChangeLog][QRegularExpression] Implemented support for wildcard patterns. Warning: QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for the wildcard expressions. Change-Id: I5ed4617ca679159430c3d46da3449f6b3100e366 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-302-5/+7
|\| | | | | | | Change-Id: If9cc79a7cc098104333821bc3b345f6890f01825
| * QFutureWatcher: Refer to convenience method resultAt in documentationKari Oikarinen2018-03-281-1/+1
| | | | | | | | | | | | | | | | | | The future does not actually have a result() member function that takes an int. The correct function is resultAt(). But that is also available directly in the QFutureWatcher, so refer to that instead of advising to get to the future. Change-Id: I53d267b4b48b1171bf611e11130b9dacabc059a4 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Fix MSVC2017 compilation with enabled relaxed constexpr on 32-bit targetOlivier Goffart2018-03-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that qCountLeadingZeroBits is calling qPopulationCount which is only conditionally constexpr, so qCountLeadingZeroBits can only be marked constexpr if qPopulationCount is also. On MSVC2017 64bit this is not a problem because it uses builtins function in this case. (which is not constexpr, but it works because the compiler is not forced to diagnose the problem because of the "?:" operator. The error being fixed is: qalgorithms.h(847): error C3615: constexpr function 'qCountLeadingZeroBits' cannot result in a constant expression qalgorithms.h(858): note: failure was caused by call of undefined function or one not declared 'constexpr' qalgorithms.h(858): note: see usage of 'qPopulationCount' Task-number: QTBUG-67259 Change-Id: I65a3dfae12ca49394bec14ffefdd41a07fee1c32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-2827-188/+181
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * Animation: Fix case where QEasingCurve::valueForProgress returns nanSvenn-Arne Dragly2018-03-261-21/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we would divide by zero in BezierEase::findTForX if factorT3 was zero when solving the cubic equation. This change fixes the problem by adding solutions for the special cases where the cubic equation can be reduced to a quadratic or linear equation. This change also adds tests that cover cases where the equation becomes quadratic, linear or invalid. Task-number: QTBUG-67061 Change-Id: I2b59f7e0392eb807663c3c8927509fd8b226ebc7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Revert "Detect C standard and try using the most recent"Friedemann Kleint2018-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The change causes a crash when compiling the xkbcommon 3rdparty library and compile failures (qtimageformats on Android). This reverts commit a47cb146809e32f43449dcfe9932833c2f0ab987. Task-number: QTBUG-67326 Task-number: QTBUG-67327 Change-Id: I5ddc4eccad699e3eaec535fd6a63d11b0026b42e Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * fixup oversight in rvalue overloads of operator+=() and operator<<()Eric Lemanissier2018-03-262-4/+4
| | | | | | | | | | | | | | ammends 4dee5446bee9c7417bf6f5dc44294a0b7238a9ba Change-Id: Ia0ca27644eb71815a93d6e76681b8a9e61a4e7ab Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Remove CMake code for CMake < 3.1Kevin Funk2018-03-243-79/+5
| | | | | | | | | | | | | | | | | | This removes the following functions from Qt5CoreMacros: - qt5_use_modules(...) Task-number: QTBUG-63519 Change-Id: I59769060a3a93686bf319b558c0ede55755fdb70 Reviewed-by: David Faure <david.faure@kdab.com>
| * QFile::rename: fix the error message if renaming a file by copy failsThiago Macieira2018-03-211-1/+4
| | | | | | | | | | | | | | | | | | | | The QFile out variable cannot be open because if out.open() succeeded, we could never reach this line. Instead, we want to capture *why* either the source or the destination failed to open. Task-number: QTBUG-66445 Change-Id: I940917d6763842499b18fffd15142f231bf34a47 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| * Make sure we can build with -no-feature-itemmodelUlf Hermann2018-03-2120-83/+114
| | | | | | | | | | | | | | Various pieces of code have to be disabled in this case. Change-Id: I83b133f17e9f024016a79c9103293627185449d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Detect C standard and try using the most recentAllan Sandfeld Jensen2018-03-211-1/+1
| | | | | | | | | | | | | | Fixes the default C version used with gcc < 5 Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | qdoc: properly omit comments for enums marked with omitvalueChristian Ehrlicher2018-03-272-2/+2
| | | | | | | | | | | | | | | | | | | | When a value is omitted with \omitvalue, the comment must be either deleted or omitted with \omit .. \endomit. Otherwise the comment is merged into the comment for the previous value Change-Id: Ic5cfb20d36853526ae939529b4609712cd0eb341 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Allow QWinEventNotifier to coexist with waiting functionsAlex Trotsenko2018-03-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many subclasses of QIODevice have a functionality to block execution until some asynchronous I/O operation completes. In case we are using QWinEventNotifier, a typical reimplemented waitFor{ReadyRead |BytesWritten}() function could look like: if (WaitForSingleObject(notifier.handle(),...) == WAIT_OBJECT_0) { notifier.setEnabled(false); ResetEvent(notifier.handle()); bool res = GetOverlappedResult(...); ... return true; } Despite the fact that the operation ends synchronously, it leaves the notifier in a state that indicates it has received the event, so its next call to setEnabled(true) will produce a fake notification. So, we should reset a notifier's history before enabling it again. Change-Id: I62a9dd809ce6a7a40e9d8038f2a49299b36f8142 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add QTimer::connectTo(), a shorthand way of connecting to timeout()Sergio Martins2018-03-252-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of Qt classes where you almost always use the same signal, for example QTimer::timeout, QPushButton::clicked, and QAction::triggered. Simply doing timer.connectTo([]{}) is much more convenient, less tedious and even fun. Not overloading connect() as it would be confusing to see the receiver as first argument. And not naming it onTimeout, as that's a popular way of doing it in other frameworks. People would assume you could use on* with any signal. If we ever have on* it should be all or nothing. [ChangeLog][QtCore] Added QTimer::connectTo(), a shorthand way of connecting to the timeout() signal. Change-Id: Ida57e5442b13d50972ed585c3ea7be07e3d8e8d2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-2125-644/+198
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * Modernize the "regularexpression" featureUlf Hermann2018-03-2014-90/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QSharedDataPointer: use swap-and-move in the move constructorThiago Macieira2018-03-191-2/+10
| | | | | | | | | | | | | | | | | | | | This makes the pointer that was in the moved-into object be destroyed before the return of this function (if the reference count was 1), instead of letting it live in the moved-from object. Task-number: QTBUG-66322 Change-Id: I3debfc11127e4516b505fffd151209292bd3adaa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QSemaphore: add minor optimization for 64-bit Linux systemsThiago Macieira2018-03-191-0/+7
| | | | | | | | | | | | | | | | Since we won't use the high bit of the low 32-bit word at all, we don't need the AND with 0x7fffffff either. Just cast. Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QSemaphore: fix deadlock when the woken up thread wakes up anotherThiago Macieira2018-03-191-43/+88
| | | | | | | | | | | | | | | | | | | | | | | | When the thread that got woken up by release() is supposed to release() to wake up another thread, we were deadlocking. This happened because we cleared the bit indicating that there was contention when the first release(). Instead of storing a single bit, we now store the number of threads waiting. Task-number: QTBUG-66875 Change-Id: I72f5230ad59948f784eafffd15193873502ecba4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove src/corelib/arch, merging with src/corelib/threadThiago Macieira2018-03-195-6/+4
| | | | | | | | | | | | | | There is no more architecture-specific code. Change-Id: Ie9d9215342d449c48a11fffd151d11411cd73fc7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomics: remove qatomic_msvc.hThiago Macieira2018-03-193-501/+2
| | | | | | | | | | | | | | | | | | No longer needed. The comment about missing constexpr support is incorrect: MSVC 2015 does have constexpr issues, but they don't affect our use of std::atomic. Change-Id: Ie9d9215342d449c48a11fffd151d11208137f00d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomic: silence MSVC warning in the generic fetchAndSubThiago Macieira2018-03-191-0/+3
| | | | | | | | | | | | | | | | | | MSVC atomics still use the generic version, instead of qatomic_cxx11.h. The implementation of fetchAndSub is implemented on top of fetchAndAdd, but produced a warning with unsigned types. Change-Id: I72f5230ad59948f784eafffd151aa53435b75298 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * q{,Utf8}Printable: avoid creating a copy of a QStringThiago Macieira2018-03-182-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have this QString() constructor call to permit things that convert to QString but aren't QString to be used in qPrintable, like a QStringBuilder-powered fast operator+ expression, like: qPrintable(string1 + ": " + string2) Unfortunately, it meant that we unnecessarily created a QString copy if the input was already QString. Change-Id: Iecab8770aa5840aba8edfffd1516bc94cec791a9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Share and cache QRegExp engines where possibleLars Knoll2018-03-201-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | QRegExpEngine is immutable once created, so we can easily share them between different QRegExp instances. This requires a QHash for engines that are currently in use in addition to the cache for currently unused engines. Task-number: QTBUG-65710 Change-Id: I165c12a7b065c488ecd14258a7cdfe0e62666632 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add nullptr comparison to Q{Explicitly,}SharedDataPointerThiago Macieira2018-03-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSharedDataPointer] Added operator== for nullptr. [ChangeLog][QtCore][QExplicitlySharedDataPointer] Added operator== for nullptr. Task-number: QTBUG-66635 Task-number: QTBUG-66946 Change-Id: I72f5230ad59948f784eafffd151a18e34384d844 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-181-0/+5
|\| | | | | | | Change-Id: Icf3b9346117ce7149d8687e4cfa182e7586713f3
| * qglobal.h: compile Q_UINT64_C in C modeThiago Macieira2018-03-171-0/+5
| | | | | | | | | | | | | | This is used by qfloat_f16c.c → qsimd_p.h → qsimd_x86_p.h. Change-Id: I359898686ce545f69847fffd151c785237a54b94 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-171-1/+4
|\| | | | | | | Change-Id: Id3e318f276fc56b5105561a1904cc242b663e9e4
| * QIpAddress: reject IPv6 addresses with more than 4 hex digitsThiago Macieira2018-03-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matches glibc commit 9a0cc8c1bd7645bf3c988890ffb59639c07a5812. [ChangeLog][QtCore][QUrl] Fixed a bug in parsing IPv6 addresses with more than 4 hex digits in a component. [ChangeLog][QtNetwork][QHostAddress] Fixed a bug in parsing IPv6 addresses with more than 4 hex digits in a component. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9a0cc8c1bd7645bf3c988890ffb59639c07a5812 Change-Id: I2701038131d91eb108aebb3bec16278e4efe3de2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Explicitly link to debug version of framework when neededTor Arne Vestbø2018-03-161-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Qt is configured for both debug and release, and frameworks are enabled, we produce two dynamic libraries inside each framework, eg: QtCore.framework/QtCore QtCore.framework/QtCore_debug When building an executable against these frameworks, we pass -framework QtCore, and the resulting executable will have its LC_LOAD_DYLIB load commands pointing to e.g.: @rpath/QtCore.framework/Versions/5/QtCore When running the executable, the dynamic loader will load the dynamic library dependencies based on these load commands. By setting the DYLD_IMAGE_SUFFIX environment variable at runtime to '_debug', the dynamic loader will prefer the debug versions of each library inside the frameworks. Unfortunately the use of an environment variable to choose debug or release versions leaves room for mismatches between the executable and the libraries that are loaded. An executable built in debug mode will at runtime pick up the release versions of the Qt libraries unless the DYLD_IMAGE_SUFFIX has also been set to match the build configuration of the executable. This results in confusing situations such as building your application in debug mode, and then stepping into Qt code but not getting any symbols. Qt Creator has an option to run the application with DYLD_IMAGE_SUFFIX set, but this is not enabled by default due to the startup cost of loading the Qt debug libraries. More critically, it results in tests failing when the tests are using QTest::ignoreMessage to ignore warnings produced by Qt, and these calls are ifdefed (correctly) inside QT_NO_DEBUG, as the test (built in debug mode) will then expect warnings from Qt, but those warnings are not emittet, as the test is run against the release version of the Qt libraries. To mitigate this mismatch, we now link the Qt frameworks using an explicit suffix, just like we would for no-framework builds on macOS, for debug and release builds on Windows, and for normal builds on other Unixes, leaving the dependency chain for the application predictable: @rpath/QtCore.framework/Versions/5/QtCore_debug This also conceptually matches how Xcode builds applications and frameworks, where it never relies on DYLD_IMAGE_SUFFIX, and instead uses two separate build directories, one for each configuration. The change means that Qt Creator will always load the Qt debug libraries if the application is built in debug mode. For Qt development this is a good thing, as you expect to be able to step into Qt code. For our users, the added startup cost can be mitigated by shipping our binary packages as release-only, but with separate debug info enabled. Change-Id: Ib9f1f2dab90ed00b9fb011200e3a69c71955e399 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Allow log messages to be grouped by activity on Apple OSesTor Arne Vestbø2018-03-152-2/+133
| | | | | | | | | | | | | | | | Useful for making sense of the event dispatcher, especially when running tests. Change-Id: Iea84bcfb40d4954439c2e31ffc0197c64907e800 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-157-15/+55
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * Disable statx(2) and renameat2(2) system calls on AndroidThiago Macieira2018-03-141-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many Android systems come with a locked down system call list, causing the statx(2) system call to fail with an unexpected error code or by delivering a signal to the application. Because of the signal, we can't do runtime detection... This is not our bug: it's obviously a mistake in the SECCOMP rules in Android. But we work around the issue. Unfortunately, because of a few manufacturers who can't configure their rules properly, everyone will suffer. Task-number: QTBUG-64490 Change-Id: I39332e0a867442d58082fffd1507a49415917384 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * QByteArray::setRawData(): don't null-terminate initialization from nullptrOswald Buddenhagen2018-03-141-1/+0
| | | | | | | | | | | | | | | | it's antithetical to do that, as raw data is documented to be not null- terminated. QString doesn't, either. Change-Id: I7ded83a09f64e747a248f9bdac2a364032aae4c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Fix possible crashBogDan Vatra2018-03-141-1/+1
| | | | | | | | | | Change-Id: I3362dffe0f30196a2a1eabcffe6cb3b2d52a7785 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * doc: Make fromStdVariant() appear in the QVariant docsMartin Smith2018-03-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This function was not appearing in the QVariant docs because the \fn command was wrong and because clang was not seeing the declaration in qvariant.h in the first place. With this update, the function does appear in the docs, but it's signature is not correct because clang can't find a definition for std::variant<Types...>, which probably means it doesn't have the most recent declarations in the std namespace. Change-Id: I7912ff333e5d4a8619461dd3ab7ee34bcd8f2289 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>