summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Make QObjectPrivate::threadData a proper atomicGiuseppe D'Angelo2019-11-1312-113/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObjectPrivate::threadData used to be a QThreadData *, and was read and written from multiple threads without proper synchronization. As an example, it was read from QCoreApplication::postEvent and written from QObject::moveToThread, therefore causing UB. Port threadData to a proper atomic, removing the races. Fix all usage points. In general, QObject is documented to be simply reentrant, not thread-safe, and certain bits (e.g. timers, moveToThread) are not even reentrant. The reasoning therefore is that a given QObject's threadData is not supposed to be touched by multiple threads without some synchronization happening elsewhere, and therefore relaxed loads should be sufficient. As drive-by change: refactor QCoreApplication::postEvent. It was particularly subtle, because it had a loop using a volatile to cope with the possibility of the receiver object switching thread while we tried to lock its thread's event queue. However, volatile does not achieve any synchronization, so drop it, and refactor the algorithm using better locking primitives. Put this algorithm in a common place, and also reuse it from removePostedEvents, which was lacking any synchronization. Change-Id: Icc755f7eb418ff54b33db4bdd87fd8eaf4e82c7a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEventDispatcherWin32: unify input checks in {un}register...()Alex Trotsenko2019-11-131-18/+18
| | | | | | | | | | | | | | The event manager has a family of the functions for registering sockets notifiers, event notifiers, and timers. To ensure efficient debugging, it would be useful to have one approach regarding input parameters validation for the entire set of that functions. Based on registerSocketNotifier() implementation, this patch offers the same debugging principles for QWinEventNotifier and QTimer. Some debug messages have also been refined. Change-Id: I1418ef43c51f7b794462b5e9c8a849633e0c60f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QBasicTimer: release timer id on exitAlex Trotsenko2019-11-131-6/+4
| | | | | | | | | | | In some cases of inheritance, timer deletion can be triggered from the event dispatcher destructor where QThreadData::eventDispatcher is already nullptr. Despite the fact that the application is in shutdown phase, we should free the resource. Change-Id: I61ed1d817fd7638953f7d629823f19d4f6f1ee00 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make Qt aware of NTFS Junctions on WindowsRyan Chu2019-11-093-3/+33
| | | | | | | | | | | | | | | | | | | | | | On NTFS, a junction point can be created and deleted by the mklink and rmdir commands, respectively. If a directory is not identified correctly as a junction, then applications will likely try to remove it using recursive methods, leading to fatal data loss. With this change, Qt can identify file system entries as junctions, allowing applications to use the correct file system operation to remove it. The test needs to delay the cleaning up of junctions and files it creates until the checks are complete; since they might fail and make the test function return prematurely, use a scope guard. [ChangeLog][QtCore][QFileInfo] Add QFileInfo::isJunction so that applications can recognize NTFS file system entries as junctions Task-number: QTBUG-75869 Change-Id: I3c208245afbd9fb7555515fb776ff63b133ca858 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QWaitCondition: fix dummy QWaitCondition implementationChristian Ehrlicher2019-11-081-7/+14
| | | | | | | | | | The dummy implementation of QWaitCondition which is used when the thread feature is not available lacks some functions which were recently added. So we have to add them now. Change-Id: I32720e0857a1bd3fcf0e70078404a38dd8a8ca88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Avoid erroneous creation of QScopedValueRollback objectsSimon Hausmann2019-11-081-1/+5
| | | | | | | | | | | | | | | | | | Mark the class as [[nodiscard]] to ensure that instances are given names and do not destruct (roll back) immediately. This avoids accidental code like this: QScopedValueRollback<Foo>(bar, baz); which rolls back instantly, when it should be QScopedValueRollback<Foo> blah(bar, baz); which rolls back at the end of the scope. Change-Id: I00269fe325b804078bd0a9d5058c941af7ba5597 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-083-157/+65
|\ | | | | | | Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
| * Rationalize descriptions of date-time formatsEdward Welbourne2019-11-071-154/+61
| | | | | | | | | | | | | | | | | | | | Document QDateTime's methods by reference to QDate and QTime, to avoid repetition. Use consistent descriptions between toString() and fromString(), in each case. Document the truth: various things were simply wrong, in at least some copies. Change-Id: Ie80017250cd470f65733f96d182ed7d043694f0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-11-061-1/+1
| |\
| | * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-061-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/features/mac/default_post.prf src/corelib/tools/qsimd_p.h src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm util/qfloat16-tables/gen_qfloat16_tables.cpp Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
| | | * Merge remote-tracking branch 'origin/5.13.2' into 5.13Qt Forward Merge Bot2019-10-301-1/+1
| | | |\ | | | | | | | | | | | | | | | Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
| | | | * Merge 5.13 into 5.13.2Frederik Gladhorn2019-10-113-2/+9
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: Id8852e90bfc5e4bd3e344435195992c5c7a0ab86
| | | | * | Fix build: disable the HWRNG in bootstrapped modeThiago Macieira2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake build fails: qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)': /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)' Fixes: QTBUG-78937 Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * | | Fix a -Wclass-memaccess problem in qjsonVille Voutilainen2019-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/serialization/qjson_p.h:230:38: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘QJsonPrivate::qle_ushort’ {aka ‘class QSpecialInteger<QLittleEndianStorageType<short unsigned int> >’} with ‘private’ member ‘QSpecialInteger<QLittleEndianStorageType<short unsigned int> >::val’ from an array of ‘const class QChar’; use assignment or copy-initialization instead [-Werror=class-memaccess] 230 | str.length()*sizeof(ushort)); | ^ Change-Id: Ie58e7fe4bae3003227364012ad56ab23bd560d8c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | Make QDir::cleanPath documentation less misleadingVolker Hilsheimer2019-11-061-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code doesn't convert anything that might be a separator on other platforms (most notably, '\') to '/', it only replaces platform-native separators (i.e. '\' if running on Windows) with '/'. Change-Id: I2e241b88b8bd271dfa5d7db61402fe8ef9a6bb6f Fixes: QTBUG-79736 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | | QWaitCondition: mark obsolete functions as deprecatedChristian Ehrlicher2019-11-076-24/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QWaitCondition:wait(..., ulong) as deprecated so they can be removed in Qt6. Also replace the usages of this deprecated functions inside QtCore. Change-Id: I77313255fa05f5c112b0b40d4c55339cc4f85346 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Add support for a signaling NaN in qfloat16Edward Welbourne2019-11-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a comment saying what value does the job, so might as well put it to work. Change-Id: I47f1a8ce7ce889580f71aa784ccbcc227ebe0b23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Add qfloat16::copySign() since we can't overload std::copysign()Edward Welbourne2019-11-062-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idfaf841b3eb3538f076ae4f0de2d7d029e1588fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Deprecate reverse iteration on QHashLars Knoll2019-11-052-18/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::unordered_map only supports forward iteration for good reasons. Align our API with this by deprecating reverse iteration and the operator+/-() for iterators. [ChangeLog][QtCore][QHash] Reverse iteration over QHash is now deprecated. [ChangeLog][Potentially Binary-Incompatible Changes] QHash's iterator category was changed from bidirectional iterator to forward iterator. This may cause trouble if a library uses the iterator category to alter functionality through tag dispatching. This only applies when compiling the library or application with QT_DISABLE_DEPRECATED_BEFORE=0x050F00 and the other with a lower value. Change-Id: I0fb6d017cabdef1bc508e62f76dc2fa73cd3652d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-052-3/+10
|\| | | | | | | | | | | | | | | | | | | Change-Id: Icd98de8592828c60cfea3d69f9c7ae2711b9f059
| * | | | QProcess: explicitly mark QProcess::error() as deprecatedChristian Ehrlicher2019-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal QProcess::error() was deprecated in Qt5.6 but not annotated with QT_DEPRECATED_X. Change-Id: I9dd11c9b8019a0554cb82d6acb6b7e0a01c78123 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | | | QFile::decodeName(const char *): don't construct QByteArray but use the ↵Adam Sowa2019-11-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument directly Use QString::fromLocal8Bit(const QByteArray &str) instead of constructing QByteArray to avoid memory allocation and strcpy. Change-Id: I32bbb47fbc45681c621adaebe8f8574d8f8ad6bf Fixes: QTBUG-79644 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-012-3/+1
|\| | | | | | | | | | | | | | | | | | | Change-Id: Ic13ef00d76c81295076bb2432576db70ec84fe29
| * | | | Doc: Remove empty section title from QMilankovicCalendarTopi Reinio2019-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I01b311cbe67fbb89625beb5a3941a652c9e851ed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | Doc: Clarify the ownership of a state for addState()Kavindra Palaraja2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibe498c5288faa478a4dba934bc3c403829b337db Fixes: QTBUG-62445 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | | Unify QFSFileEngine implementations on Windows and UnixVolker Hilsheimer2019-10-313-175/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions for standard file system operations simply delegate to the static functions in QFileSystemEngine, which are then implemented separately for each platform. There is no need for the wrappers in QFSFileEngine to be separately implemented as well. The only noticeable difference between Unix and Windows versions was the clearing of the meta data in QFSFileEngine::remove, which was only done on Unix. This is now also done on Windows. As a fly-by fix, correct the (internal only) documentation about case sensitivity. Change-Id: I274b34d5407fdfff2e0a2157bb5220607740a92a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | | Update UCD data to Unicode 12.1.0's Revision 24Edward Welbourne2019-10-305-7370/+7896
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Had to teach the update program to accept category Lm as for Joining_Transparent, for the sake of a new ArabicShaping.txt entry. Added three new Unicode versions, several new scripts and a new word-break class. Updated UCD's test data for tst_QTextBoundaryFinder. This left 57 tests failing; I have commented out the data rows for those tests, pending someone with more knowledge addressing this. Task-number: QTBUG-79631 Task-number: QTBUG-79418 Change-Id: Ic33d3b3551195d47a84d98e84020f57a68f0b201 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-302-0/+16
|\| | | | | | | | | | | | | | | | | | | Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
| * | | | CMake: Fix androiddeployqt support when using add_library MODULEAlexandru Croitor2019-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent change to support android with CMake assumes that the user project will have add_library(foo SHARED), and sets the CMAKE_SHARED_LIBRARY_SUFFIX_CXX variable to modify the final library name to contain an ABI suffix. This did not work when using add_library(foo MODULE), and androiddeployqt failed saying it can't find the application binary. Make sure to apply the ABI suffix to MODULE targets. Also cover the suffix to be added regardless if the language used for compiling the SO is C or C++. Amends 52c799ed4425076df4353c02950ea1444fe5f102 Change-Id: Ic44d67e33a123bd0104d98b368ceda0844474980 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | | | no-thread: Add dummy implementations for stackSize functions in QThreadEskil Abrahamsen Blomfeldt2019-10-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently added a call to setStackSize() in the QML thread, which revealed that the dummy implementation for this function was missing in no-thread builds. Fixes: QTBUG-79571 Change-Id: Ibabb48d9cba73afda0842642045a2961e65523f9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | Add a getter for QObjectPrivate::threadDataGiuseppe D'Angelo2019-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strictly a temporary measure to deal with cross-module merges. Change-Id: I344bb3f20f68f04367041834e608669122ff70b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2019-10-2621-19765/+20319
|\ \ \ \ \
| * | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-2621-19765/+20319
| |\| | | | | | | | | | | | | | | | | | | | | | Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
| | * | | | Update public suffix list to latest versionEdward Welbourne2019-10-252-13712/+13877
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Updated DNS public suffix list Task-number: QTBUG-79418 Change-Id: I02dbe2b1f5b5f3e4a1ed4fde60ee71f5b0a50cb5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | | Android: Add multi-abi support for CMakeCristian Adam2019-10-254-1/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds ANDROID_BUILD_ABI_<abi> CMake options, which when enabled will determine CMake to build the current project with the enabled ABI settings. When building with CMake and the official Android CMake toolchain one needs to specify the Qt base directory as an argument to CMAKE_FIND_ROOT_PATH, which contains the Android NDK sysroot set by the toolchain. CMake will consider directories that contain this base path as valid directories to search packages. In the developer build case we have to append "lib/cmake" because the Qt base directory passed as CMAKE_FIND_ROOT_PATH will be the same directory as the developer build base, and will not be considered. Change-Id: I180502032c8ea1105bde2456252b367497f511d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * | | | Disable Clang warning for 'using namespace' in qtextstream.hJüri Valdmann2019-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header file intentionally puts a 'using namespace' into the global namespace, the artful cleverness of which Clang doesn't properly appreciate. Teach Clang a lesson by disabling the warning. Change-Id: I9754ac5fc9d4c53654854082e1145d8b5fef186d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | | | Update CLDR to v36Edward Welbourne2019-10-258-6052/+6190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Released on October 4th. Adds Windows names for two time zones, Qyzylorda and Volgograd. Added languages Chickasaw (cic), Muscogee (mus) and Silesian (szl). Norwegian number formatting has flipped back to using colon rather than dot as time separator; it's flipped back and forth over the last several CLDR releases. The dot form is present as a variant, the colon form was long given as the normal pattern, then went away; but now it's back as a contributed draft and that's what we pick up. The MS-Win time-zone ID script was iterating a dict, causing random reshuffling when new entries are added. Fixed that by doing the critical iteration in sorted order. Omitted locales ccp_BD and ccp_IN due to QTBUG-69324. Task-number: QTBUG-79418 Change-Id: I43869ee1810ecc1fe876523947ddcbcddf4e550a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | | QSet: Document to/from QVector transformation techniquesSamuel Gaist2019-10-246-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a2ff6332bd6e8ed3d4ba7b4765da0a94a06f133 Fixes: QTBUG-71067 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | | QFileSystemEngine: Rework createDirectory on WindowsChristoph Schleifenbaum2019-10-251-54/+49
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try starting to create the directory at the end, not at the front. This is the same way as the Unix implementation is doing. This avoids problems like us trying to enter directories we are not allowed to read, which might be due to access rights or due to sandboxing. Change-Id: I67c1ed4bdc20a15b1af9b33aa48d59fea359da22 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
* | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-258-97/+131
|\| | | | | | | | | | | | | | | | | | | Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
| * | | | QFileSystemEngine: Consistently check for invalid file namesUlf Hermann2019-10-243-34/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stat() and friends expect a null-terminated C string. There is no way to generate anything useful from a string that has null bytes in the middle. It's important to catch this early, as otherwise, for example, a QDir::exists() on such a path can return true, as the path is silently truncated. Extend the checks for empty file names to windows and add checks for null bytes. Change-Id: Ie9794c3a7c4fd57f9a66bdbbab8b45a08b6f9170 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | QStateMachine: Don't scream at the userRobert Loehning2019-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-244-61/+54
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| | * | | QEndian: do not use "raw" constexprGiuseppe D'Angelo2019-10-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the Qt's macros instead, since constexpr support may be revoked on certain compilers. Amends d26289ffb43a5fcf34e855db1dfbf42aa03c4f5a. Change-Id: I62354b14b57ae5fcbf3f1186ddb48bcf26535e90 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | | Use arrays rather than assigning literals to char* (warning-fix)Edward Welbourne2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrity has a hack, to let us link to the library mmap is in, that depends on two extern "C" symbols of type char *; but assigning a string literal to a char * variable as initializer is a const-ness violation (as the Integrity compiler does point out), so change the two variables to be char[] instead of char *, so that the literals populate (and determine the size of) the arrays, instead. Change-Id: Iab34fb378bc0522e14539592ead066f068751ad0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QStandardPaths: Correct handling for XDG_RUNTIME_DIRSamuli Piippo2019-10-121-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always try to create the runtime directory and never change the permissions of an existing directory. Conform to the XDG Base Directory Specification: "If, when attempting to write a file, the destination directory is non-existent an attempt should be made to create it with permission 0700. If the destination directory exists already the permissions should not be changed." Fixes: QTBUG-68338 Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversionsMilian Wolff2019-10-111-31/+20
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow implicit conversions when the types involved are compatible. That means, only allow construction and copy assignment when the type X* is convertible to type T*. This is done using SFINAE and the std::is_convertible type trait, which makes the previous QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete. This patch fixes compilation when a function is overloaded with Q{Shared,Weak}Pointer of different, incompatible types. Previously, this resulted in a compilation error due to an ambiguous overload. Change-Id: I069d22f3582e69842f14284d4f27827326597ca2 Fixes: QTBUG-75222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QItemSelectionModel: make parent an optional parameterChristian Ehrlicher2019-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make parent an optional parameter to be consistent with the rest of the API. Change-Id: I5942fee69ca33bd87d4d14b6919d2b8d5b60c0b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | | Reimplement JSON support on top of CborUlf Hermann2019-10-2128-2320/+2807
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In turn, deprecate the QJsonDocument methods that deal with JSON binary data. You should use CBOR for data serialization these days. [ChangeLog][Deprecation Notice] The binary JSON representation is deprecated. The CBOR format should be used instead. Fixes: QTBUG-47629 Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-191-10/+30
|\| | | | | | | | | | | | | | | Change-Id: I69f44ea7254cb2643a00b040bbb46f41b7f76a87