summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-193-23/+15
|\ | | | | | | Change-Id: I999ba23a27cd897017d15c6ffe41ea8cd008ffb9
| * QStandardPaths: update docs to what $HOME is on iOSThiago Macieira2019-07-171-1/+1
| | | | | | | | | | | | | | | | It's not <APPROOT> (any more, or was ever). Fixes: QTBUG-76911 Change-Id: I6aed4df6a12e43c3ac8efffd15aed22128862c23 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-181-21/+13
| |\ | | | | | | | | | Change-Id: I685000c4f33fb3707b2102fae0b58092107dc8f0
| | * QDateTime docs: don't encourage use of deprecated textdate functionsEdward Welbourne2019-07-171-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The textdate API methods are deprecated in favor of QLocale; so suggest use of QLocale in place of them. Don't credit the deprecated methods as being used where they aren't. Change-Id: I0abcb1f69729760ae1b86cb8088e4158c0ad6010 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
| | * Work around Apple Clang's -Wshadow warningThiago Macieira2019-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, yeah, it technically does... qcborstream.h:245:15: warning: declaration shadows a typedef in the global namespace [-Wshadow] /usr/include/libkern/OSTypes.h:36:26: note: previous declaration is here Fixes: QTBUG-75825 Change-Id: Idce141629dd34287808bfffd159ee2a75428bf12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Fix regression causing QVector::fill w/ same size to not detachThiago Macieira2019-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caused by commit 01301b0b340df736dd1b0a54b3026e00b49c5ea3, which made vector.resize(vector.size()) not to detach, which was used by fill() and assumed that detaching happened. The test does not test the resize() behavior, only that fill() is not broken anymore. [ChangeLog][QtCore][QVector] Fixed a regression that caused fill() not to detach, corrupting shared copies. Fixes: QTBUG-77058 Change-Id: I6aed4df6a12e43c3ac8efffd15b1b527a8007bf3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QDir: strip Windows' long-path markers when converting from nativeVolker Hilsheimer2019-07-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications might receive paths with Windows' '\\?\' markers, which indicates a long path to Win32 APIs, when the application is opened by explorer via file association. Qt not ignoring those markers will fail to open such files. By stripping the marker in QDir::fromNativeSeparators, QFile, QFileInfo etc automatically are able to handle such paths. QDir::cleanPath is also documented to normalize separators, so it needs to be done there as well. [ChangeLog][QtCore][QDir] Remove Windows specific long path markers when handling file paths with native separators. Change-Id: I526a890614edee8c85b39fc12c98e7ddb6e0d793 Fixes: QTBUG-75117 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-173-7/+48
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-173-7/+48
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-133-18/+65
| | |\| | | | | | | | | | | | | Change-Id: I5d2a4fa33b4aa22da39ac045e6b85ab940b8720b
| | | * Optimize and fix handling of QtMessageHandlersMarc Mutz2019-07-111-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A function may almost always have static storage duration, but that does not necessarily mean that we can store and load pointers to them without memory ordering. Play it safe and use store-release and load-acquire for them (which combines to ordered for the fetchAndSet call in qInstall*Handler(), as we don't know what the caller will do with the returned function pointer). Also change the initial value of the atomic pointer to nullptr. Nullptr already signified the default handler in qInstall*Handler(), so the API doesn't change. But by using nullptr to mean default, we place these variables in the BSS segment instead of TEXT, save dynamic init, or at least a relocation, and we dodge the smelly comparison of function pointers, using comparison against nullptr instead. Also, as a drive-by, put the call to ungrabMessageHandler() in a scope-guard. Both the message handler, as well as the Qt code calling it (toLocal8Bit()!), may throw, and that would stop all further logging. In Qt 5.9, we can't use qScopeGuard(), yet, so use a local struct calling ungrabMessageHandler() in its dtor. The code still has one problem: When a logging action is underway, and another thread exchanges the message handler, we might still execute code in the old handler. This is probably not a problem in practice, since no-one will use a dynamically-compiled function for logging (right? :), but should probably be documented or fixed. This patch does not address this issue, though. Change-Id: I21aa907288b9c8c6646787b4001002d145b114a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit cd401b74a13cd9d9a47d977f195c7985cf725d55) (cherry picked from commit ea16c860bd75a35134ebb1d4f3be5db58f4a4e21)
| | | * QSaveFile: Fix changing the file name after hitting on readonly fileFriedemann Kleint2019-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to QFileDevice::unsetError() in QSaveFile::open() does not clear QSaveFilePrivate::writeError. Clear it in addition. Fixes: QTBUG-77007 Change-Id: I5e5009750f1726d1c74c1b4eb1c33f3a5393fe4f Reviewed-by: David Faure <david.faure@kdab.com>
| | | * QDirIterator: don't require NFD normalization on Darwin for validityThiago Macieira2019-07-111-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HFS+ filesystems do enforce NFD normalization, so the test worked for those filesystems. But on APFS, the filesystem is normalization- insensitive but preserves it, so our transformation caused valid files to be rejected. This commit also optimizes the solution for all systems too. Instead of converting from 8-bit to UTF-16 then back to 8-bit (allocating memory in both steps), we only convert to UTF-16. And if we detect the locale is UTF-8, then we use the further optimized QUtf8::isValidUtf8 function that doesn't allocate any memory at all (ditto for US-ASCII, the case of someone running with LANG=C). Fixes: QTBUG-76522 Change-Id: Ief874765cd7b43798de3fffd15aa0d81620ad317 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-122-4/+4
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-122-4/+4
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| | | | * QFreeList: fix memory order on block deletionMarc Mutz2019-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blocks are likely to have been created in a differnt thread from the one performing their deletion, so we need an acquire fence. The rest of the atomics use in the class looks ok, but nevertheless warrants a deeper analysis. Change-Id: I1571ded3a06695b0d58b5bf1d80d6283ac21f959 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6fa34930c23c7494a3f2703777f46794ff091e2b) (cherry picked from commit 51bcc7e07e2bb5b42bb200dcd5269e9e9e2fe240) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | | * QSimpleTextCodec: fix load memory order of atomic pointerMarc Mutz2019-07-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer value is not the only data we're interested in, but instead points to indirect data, so we need a release fence on store (present) and a corresponding acquire fence on load (was missing). Change-Id: I51f8251c0c7f4056192880430f2be5e0836dbed6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6f84829031f318bfda1deff5f409b5ea6c6a5c5f) (cherry picked from commit 4cc6e1419294a729e53d698bace2254903c1429b) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | | QByteArray: Clarify that QByteArrays always use the Latin-1 encodingAndre Hartmann2019-07-121-4/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... irrespective from the users current locale. Fixes: QTBUG-76938 Change-Id: I78810a75ecf9e9f1067363ce56656124b6ddcefd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QResource: deprecate isCompressed()Thiago Macieira2019-07-163-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current codebases assume isCompressed() implies ZlibCompression, since there was no compressionAlgorithm() getter. In order to force codebases to change, deprecate isCompressed() and force handling of the algorithm. The replacement API is being introduced in 5.14, which is why the warning is being emitted in 5.15 only. Change-Id: Ief874765cd7b43798de3fffd15a9f5d978951ea5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Remove useless null pointer checksThiago Macieira2019-07-161-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache can't be null, since it's a member of an extant object. Change-Id: Id98140e1c2f0426cabbefffd157ed3cdd62a8bba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Qt6: Fix uninitialized meta objects on WindowsThiago Macieira2019-07-165-15/+52
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows has a problem relating to cross-DLL variable relocations: they are not supported. Since QMetaObject's link to the parent class is done via a pointer, every QMetaObject in a DLL or in the EXE that derives from a class from another DLL (such as QObject) will be dynamically initialized. This commit changes the meta object pointers in QMetaObject::d from raw pointers to a wrapper class SuperData, which is almost entirely source- compatible with the pointer itself. On all systems except for Windows with Qt 6, it's binary compatible with the current implementation. But for Windows with Qt 6, this commit will store both the raw pointer and a pointer to a function that returns the QMetaObject, with one of them non-null only. For all meta objects constructed by moc, we store the function pointer, which allows the staticMetaObject to be statically intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml, ActiveQt), we'll store the actual raw pointer. [ChangeLog][QtCore][QMetaObject] Some internal members of the QMetaObject class have changed types. Those members are not public API and thus should not cause source incompatibilities. The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in commit 24a72c4efa929648d3afd95b3c269a95ecf46e57 ("qglobal: Remove symbian specific features"). Task-number: QTBUG-38876 Fixes: QTBUG-69963 Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix more implicit QAtomic<T> <-> T conversionsMarc Mutz2019-07-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were hidden in !QT_CONFIG(thread) code. The irony! This patch does not change the semantics of the operations. It just makes the implicit operations explicit. Any fixes or optimizations are left for follow-up patches, if any. Change-Id: I014eb71745532dae2efe7963aa87321f61b1bd7a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QAbstractItemModel: don't inherit QHash just to add elementsMarc Mutz2019-07-161-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can depend on C++11, use _WITH_ARGS and std::initializer_list. Saves ~400B in text size on optimized AMD64 GCC 9.1 Linux LTO builds. Change-Id: I37fce1c63a5f74f6dfc059febf0152ac93c8be7f Reviewed-by: David Faure <david.faure@kdab.com>
* | | QProcessEnvironment: simplify lockingMarc Mutz2019-07-163-37/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mutex is only protecting 'nameMap'. Proof: it's only defined on platforms on which there is a 'nameMap'. Also, nothing else is mutable, so no lazy init going on here. So, drop all the mutex protection, except where we access 'nameMap', and draw the mutex as close as possible to the nameMap uses, iow: copy ctor, prepareName() and nameToString(). As a consequence, the old (Ordered)MutexLocker class only needs to be defined on Unix. Change-Id: Ic969313bc48ad7ebf24c5dca7fd48359956b048d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Optimize QInotifyFileSystemWatcherEngine::getPathFromID()Marc Mutz2019-07-151-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code basically wants to get the last element of equal_range(id). The problem is that backwards iteration on QHash is very expensive, because it's implemented as forward search with wrap-around at bucket end. So it was implementing its own equal_range with look-ahead. The problem is that it compared each key in the equal_range twice: once in the if, and once more in the following while iteration. I expect to see this kind of algorithm more as we move away from the fake bidirectionalism of QHash, so I decided to implement it in a generic way. We can copy it somewhere else when we find more users. Change-Id: I7951652107ab897f6a456035f02e0339835e078d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Fix qdoublescanprint_p.h path in corelibTasuku Suzuki2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qdoublescanprint_p.h header moved from tools/ to text/ when text/ was introduced. Amends a9aa206b7b8ac4e69f8c46233b4080e00e845ff5. Change-Id: Ia7167fc3c4cdb05d4f2e56c0a0427a80e3cee362 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QVarLengthArray: optimize pop_back()Marc Mutz2019-07-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't call realloc() with all its machinery when we know exactly what to do: destroy the last element and decrease the size by one. Extend the test, removing the unused Foo class for a new Tracker one. Change-Id: I568eef4f6335669689fb16fd23af92cb4d6464bd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QAbstractMetaCallEvent: fix compilation with out feature.thread on ClangMarc Mutz2019-07-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Clang warns that the private field semaphore_ is unused, and is correct, of course. Change-Id: Ic1372cedd3f4b2facca9f6f6be398d26f406b379 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QFilesystemEngine: fix unused variable warning-turned-error on WASMMarc Mutz2019-07-131-0/+4
| | | | | | | | | | | | | | | | | | | | | ... and, presumably, Integrity. Change-Id: I54d35fd11b7df139022e2575c29b2d832f80f761 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Centralize the MSVC work-around for std::is_permutationMarc Mutz2019-07-122-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's currently only one user, but another one is coming up, so apply DRY and centralize the work-around for the MSVC warning C4996 on use of 3-arg STL algorithms in one place. The code is prepared to handle other algorithms with ease, should any more crop up. Change-Id: Ia881888d6a2b5286c6d8d823bc2b76788efad624 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QHash: optimize equality operatorMarc Mutz2019-07-121-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - First compare the d-pointer before dipping into *d - Keep a running count as we calculate thisEqualRange, as std::distance() on QHash::iterator is very expensive. - Skip the pointless first comparison of the unadvanced iterator's key() with itself (found by Mårten Nordheim) Also rename (it, thisEqualRangeEnd) → (thisEqualRangeStart, it), to keep advancing `it`, which is more natural than advancing an `end` and later resetting it = end. Change-Id: I2c27c071b9ee23425a763328402dad9efee4cbd0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of itMarc Mutz2019-07-124-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | QLinkedList is still used in several tests. Add exceptions for these subdirs. Change-Id: I50ccd2a0892129d4a47aa4e2400211690da9a82d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-128-11/+15
|\| | | | | | | | | | | Change-Id: Icaabf08f9af539ddf844d96bc9c3a2d09408ba8a
| * | doc: Enable a declaration for qdocMartin Smith2019-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A declaration of fromStdVariant() was not visible to qdoc because it was ifdef'ed out. This update ensures that qdoc sees the declaration. Change-Id: I4b00a895aa61175296ec80806b43311eff4f25ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Fix MinGW cross-build with precompiled headers on LinuxJoerg Bornemann2019-07-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need localtime_r() in several places. To have this function declared when including time.h, _POSIX_THREAD_SAFE_FUNCTIONS must be defined. E.g. qdatetime.cpp includes unistd.h before time.h to define said macro. However, this falls apart when precompiled headers are used, because of the following include chain in qt_pch.h: qcoreapplication.h -> qobject.h -> chrono -> time.h This patch ensures that _POSIX_THREAD_SAFE_FUNCTIONS is defined before including time.h in qt_pch.h by including unistd.h early. Fixes: QTBUG-76680 Change-Id: I3875072edf37f45492f29d84fc297a9682e11db4 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | [Doc] Fix minor typosSze Howe Koh2019-07-106-10/+10
| | | | | | | | | | | | | | | Change-Id: I7e74806218dcc07d800f4ec08e94abce32483f5e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | | return value in QOrderedMutexLocker::relock when thread is disabledTasuku Suzuki2019-07-111-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic96e777491cc8d304be056a3476a4de4c4700a0f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-1065-94/+106
| | | | | | | | | | | | | | | | | | | | | | | | This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-102-5/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/time/qdatetime.cpp src/widgets/widgets/qcombobox.h Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
| * | doc: Add missing class qualifierMartin Smith2019-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A glass qualifier was missing in a \fn command. This caused clang to report an error. The class qualifier is added by this ubdate. Change-Id: I1c4928183f4c8eb1b28f0fde2ce659a1feb24175 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | doc: Remove erroneous double left braceMartin Smith2019-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A double left brace in a link command was causing qdoc to fail for the remainder of the qdoc comment. This update just removes one of the left braces. Change-Id: Ie4fc0122e0799955b7804c2b6f61393af01747c7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Be less laissez-faire with implicit conversions to QCharMarc Mutz2019-07-0915-50/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QHash: mark the equality operator for QHashDummyValue constexpr noexceptMarc Mutz2019-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Who knows what this may end up being good for. Change-Id: Ib5e73b0170ebba54f87f36e75b7c407f801c52a0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Inline QMutexPool into its only remaining userMarc Mutz2019-07-083-241/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also reduce the pool size from 131 to 17, and use QBasicMutex instead of recursive ones. Change-Id: I3bf0374cce5ff2c07427070aba6128a22c9b70e4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Q_ARRAY_LITERAL: protect the check for literal typesGiuseppe D'Angelo2019-07-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers (hello, MSVC) do not produce literal types in Qt because their constexpr support has been blacklisted. Therefore, amend the check for literal types in Q_ARRAY_LITERAL: only do the check if the compiler supports constexpr. Change-Id: I7cffe00dde447d975aa6a7d02248df9c351508ff Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Port some trivial cases from QMutex to QRecursiveMutexMarc Mutz2019-07-063-4/+4
| | | | | | | | | | | | | | | | | | | | | In all of these cases, the effect of the change is local to one file. Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Short live QRecursiveMutex!Marc Mutz2019-07-062-12/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the recursive mutex use case out of QMutex into a separate class, unsurprisingly called QRecursiveMutex. As an immediate benefit, 90% of the QMutex users now enjoy a constexpr QMutex ctor. This change prepares for a real split in Qt 6, so that both use-cases are no longer bundled up in one class. [ChangeLog][QtCore][QMutex] Added QRecursiveMutex as a replacement of QMutex(QMutex::Recursive). Change-Id: I79b8724e8a8ee65e4bd0f06acd76103fe4197b8c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-054-10/+22
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-054-10/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/generators/makefile.cpp Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-034-10/+22
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37