summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [docs] Remove references to C++11 feature availabilityMarc Mutz2024-01-091-3/+2
| | | | | | | | | | | | | QVersionNumber, e.g., was added for Qt 5.6, the last Qt version that didn't require C++11. So it made sense that the original documentation stated that certain functions were only available in C++11 mode. But already Qt 5.7 required C++11, so these historical anecdotes are no longer pertient to today's Qt users, so remove them from the docs. Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I5c732d3b9b33e1fb6947eff4fac546476c8379f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove references to Qt 4 in Qt 5.0 in Qt Core documentationKai Köhne2023-12-181-2/+1
| | | | | | | Pick-to: 6.6 6.7 Change-Id: Ide0c1ed441c923753f1e81141460719161662c15 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* QSharedPointer: Remove support code for tracking weak-pointerFabian Kosmale2023-12-061-0/+4
| | | | | | | | | | | | | | In Qt 6, it is no longer possible to create a weak pointer from a plain QObject pointer. Consequently, we don't need the work-aronuds introduced for QTBUG-22622. Except that we still need to keep the functions as they are exported. Mark them as QT6_ONLY, so that they'll be gone automatically come Qt 6. Amends e40320c552a9ccd4c1879a4da13c8d909b2cd21e. Change-Id: I568da04008374c891a111eee49f6679dabdfdee4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix template information in "qsharedpointer.cpp"Luca Di Sera2023-11-171-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QDoc parses a project, it parses the source code to extract the user-provided documentation and perform sanity checkings based on the code itself on it. When QDoc parses an "\fn" command as part of this process, it tries to understand, based on its intermediate representation built on the information extracted from the code-base, which "documentable element" the "\fn" refers to. When QDoc performs this "matching" process, it takes into consideration only a certain amount of information. For example, no checking is performed over the template declaration of a callable. Due to some upcoming documentation, where two callables are indistinguishable to the current process, as they differ only in their template declaration, QDoc will start to take into consideration the template declaration of a callable when matching. This implies that an "\fn" command should now provide information parity, with regards to template declaration for callables, with the code-base so that QDoc can perform the match correctly. Some of the documented callables in "qsharedpointer.cpp" are not in sync with the template declaration of their intended target. Hence, add the missing information to the relevant "\fn" commands. Task-number: QTBUG-118080 Change-Id: Iadac55e944aa425205b9d1cd8b4189ffacb4a089 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSP/QWP: introduce owner_before, owner_equal, owner_hashGiuseppe D'Angelo2023-10-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | While at the moment we don't have aliasing support in QSharedPointer, introduce owner-based comparisons and hashing. This also fulfills some use cases in lieu of operator== for QWeakPointer (which got deprecated by bb23a05905d7dc0e416a646e40592436daa939f2). I'm using C++26/P1901's spelling of owner_equal, instead of Boost.SmartPtr's spelling (owner_equal*s*). Given the niche use case, the lack of interoperability with Qt's own containers, as well as the Standard comparison objects' semantics (std::owner_less, std::owner_equal), I don't think we should be giving these a Qt-ish name as it would be pretty useless. [ChangeLog][QtCore][QSharedPointer] Added owner_before, owner_equal, owner_hash. [ChangeLog][QtCore][QWeakPointer] Added owner_before, owner_equal, owner_hash. Done-with: Fabian Kosmale <fabian.kosmale@qt.io> Change-Id: I8b792ae79f14cd518ba4a006edaa17786a8352a0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definitionEdward Welbourne2023-03-201-1/+1
| | | | | | | | | | I got tired of being told off by the inanity 'bot for faithfully reflecting existing #if-ery in new #if-ery. Retain only the documentation and definition of the deprecated define. Change-Id: I47f47b76bd239a360f27ae5afe593dfad8746538 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* [doc] QSharedPointer: add some missing docsMarc Mutz2022-12-221-0/+49
| | | | | | | | | | | | | | | | | | | | | Added docs for - move-ctor, -assignment operator - move-construction and -assignment from QSP<X> - qHash() There's more stuff missing, but I declare 'twas enough qdoc wrangling for this round. The texts are taken from other smart pointer docs, esp. QESDP, so they're consistent. Fixes: QTBUG-83134 Fixes: QTBUG-63700 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Iff980d043e1635ed6cfdd3113c68bc23f3a0bad7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use SPDX license identifiersLucie Gérard2022-05-161-40/+4
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Use \deprecated instead of \obsoletePaul Wicking2021-05-261-1/+1
| | | | | | Task-number: QTBUG-93990 Change-Id: I4e512354a49dde6678ca89cabc56bc76ba666bb3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSharedPointer: Use matching new/deleteFabian Kosmale2021-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | When a weak pointer calls getAndRef and there is no strong reference yet, getAndRef creates a new ExternalRefCountData. Normally, ExternalRefCountData is never constructed directly, only its subclasses are constructed via placement new into a memory buffer. To that end, ExternalRefCountData has a custom operator delete, which calls the global operator delete (do deallocate the memory buffer correctly). When using operator new directly in getAndRef, gcc notices a new/delete mismatch with the delete in the same function: global operator new matched with class operator delete. This isn't actually an issue in practice, as the class operator delete simply calls the global delete. But to avoid the warning, we can simply call the global operators explicitly. To make it clear that allocation of ExternalRefCountData requires some care, we additionally delete the class operator new, and only allow placement new (or usage of global operator new, as in getAndRef). Pick-to: 6.1 Task-number: QTBUG-93360 Change-Id: I132d1e4e07520eadc5b8f3f955c06aecec80c646 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-241-2/+3
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QSharedPointer: do allow calling deleters on null pointersThiago Macieira2020-07-311-2/+9
| | | | | | | | | | | | | I don't know why std::shared_ptr allows this, but why not. [ChangeLog][Important Behavior Changes] QSharedPointer objects will now call custom deleters even when the pointer being tracked was null. This behavior is the same as std::shared_ptr. Fixes: QTBUG-85285 Pick-to: 5.15 Change-Id: I24006db8360041f598c5fffd161c260df0313b55 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* New QHash implementationLars Knoll2020-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A brand new QHash implementation using a faster and more memory efficient data structure than the old QHash. A new implementation for QHash. Instead of a node based approach as the old QHash, this implementation now uses a two stage lookup table. The total amount of buckets in the table are divided into spans of 128 entries. Inside each span, we use an array of chars to index into a storage area for the span. The storage area for each span is a simple array, that gets (re-)allocated with size increments of 16 items. This gives an average memory overhead of 8*sizeof(struct{ Key; Value; }) + 128*sizeof(char) + 16 for each span. To give good performance and avoid too many collisions, the array keeps its load factor between .25 and .5 (and grows and rehashes if the load factor goes above .5). This design allows us to keep the memory overhead of the Hash very small, while at the same time giving very good performance. The calculated overhead for a QHash<int, int> comes to 1.7-3.3 bytes per entry and to 2.2-4.3 bytes for a QHash<ptr, ptr>. The new implementation also completely splits the QHash and QMultiHash classes. One behavioral change to note is that the new QHash implementation will not provide stable references to nodes in the hash when the table needs to grow. Benchmarking using https://github.com/Tessil/hash-table-shootout shows very nice performance compared to many different hash table implementation. Numbers shown below are for a hash<int64, int64> with 1 million entries. These numbers scale nicely (mostly in a linear fashion with some variation due to varying load factors) to smaller and larger tables. All numbers are in seconds, measured with gcc on Linux: Hash table random random random random reads full insertion insertion full full after iteration (reserved) deletes reads deletes ------------------------------------------------------------------------------ std::unordered_map 0,3842 0,1969 0,4511 0,1300 0,1169 0,0708 google::dense_hash_map 0,1091 0,0846 0,0550 0,0452 0,0754 0,0160 google::sparse_hash_map 0,2888 0,1582 0,0948 0,1020 0,1348 0,0112 tsl::sparse_map 0,1487 0,1013 0,0735 0,0448 0,0505 0,0042 old QHash 0,2886 0,1798 0,5065 0,0840 0,0717 0,1387 new QHash 0,0940 0,0714 0,1494 0,0579 0,0449 0,0146 Numbers for hash<std::string, int64>, with the string having 15 characters: Hash table random random random random reads insertion insertion full full after (reserved) deletes reads deletes -------------------------------------------------------------------- std::unordered_map 0,4993 0,2563 0,5515 0,2950 0,2153 google::dense_hash_map 0,2691 0,1870 0,1547 0,1125 0,1622 google::sparse_hash_map 0,6979 0,3304 0,1884 0,1822 0,2122 tsl::sparse_map 0,4066 0,2586 0,1929 0,1146 0,1095 old QHash 0,3236 0,2064 0,5986 0,2115 0,1666 new QHash 0,2119 0,1652 0,2390 0,1378 0,0965 Memory usage numbers (in MB for a table with 1M entries) also look very nice: Hash table Key int64 std::string (15 chars) Value int64 int64 --------------------------------------------------------- std::unordered_map 44.63 75.35 google::dense_hash_map 32.32 80,60 google::sparse_hash_map 18.08 44.21 tsl::sparse_map 20.44 45,93 old QHash 53.95 69,16 new QHash 23.23 51,32 Fixes: QTBUG-80311 Change-Id: I5679734144bc9bca2102acbe725fcc2fa89f0dff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Correct non-link related qdoc compilation errorsNico Vertriest2020-01-141-0/+2
| | | | | | Task-number: QTBUG-79824 Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-5/+5
| | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Deprecate QWeakPointer::data()Giuseppe D'Angelo2019-05-161-6/+1
| | | | | | | | | | | It's a dangerous API to have. Upgrade to a shared pointer if accessing the raw pointer is required. [ChangeLog][QtCore][QWeakPointer] The data() function has been deprecated. Change-Id: Ie5d34f4fb500b3cfa14d2c0b1b08484df072129c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-151-8/+13
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qfloat16.cpp src/corelib/global/qfloat16.h src/plugins/platforms/windows/qwindowswindow.cpp Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-121-8/+13
| |\ | | | | | | | | | Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
| | * 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>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-131-45/+34
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| * | Doc: replace even more null/0/nullptr with \nullptr macroChristian Ehrlicher2019-05-081-45/+34
| | | | | | | | | | | | | | | | | | | | | | | | Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-071-25/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-031-25/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/pcre2/qt_attribution.json Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
| | * QSharedPointer: fix docs for create()Giuseppe D'Angelo2019-05-021-25/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add qobject_cast operators for std::shared_ptrGiuseppe D'Angelo2019-05-011-0/+51
|/ / | | | | | | | | | | | | | | | | | | | | | | Mimicking what we currently have for QSharedPointer, but also adding * snake_case version (matching the ones in std) * rvalue-overloaded versions (matching the C++2a overloads). [ChangeLog][QtCore][QSharedPointer] Overloads of qSharedPointerObjectCast have been added to work on std::shared_ptr. Change-Id: I26ddffd82b000bf876e7c141fdce86a7b8c1d75a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-041-1/+1
|\| | | | | | | Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
| * Doc: Use the \nullptr macro instead of 0Venugopal Shivashankar2019-04-021-1/+1
| | | | | | | | | | | | | | | | This enables overriding the macro so that it translates to 'None' in the Qt for Python context. Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Fix can not -> cannotRobert Loehning2019-02-251-1/+1
| | | | | | | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtCore: replace null and nullptr with \nullptr in documentationChristian Ehrlicher2019-02-181-4/+4
|/ | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: Ib9e0cfc2eb2830b213e6523773603d56180b0998 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Optimize QSharedPointer::getAndRef with the three-operand testAndSetThiago Macieira2018-11-281-4/+7
| | | | | | | | | | | | | | | | | | | | Originally QAtomicPointer didn't have the three-operand version, resulting in code like: if (!atomic.testAndSetXxx(expected, newvalue)) expected = atomic.load(); The three-operand version gives us the current value of the atomic in case the test failed and it's free in all architectures, unlike the extra load. I have to use testAndSetOrdered here because I need the failing load to use the Acquire memory order, even though that has an extra Acquire for the successful case we don't need. QAtomicPointer does not have testAndSetReleaseAcquire. Change-Id: I1bd327aeaf73421a8ec5fffd1560fe30d3bfd9b8 Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-11-051-0/+3
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
| * Fix deleting of QSharedPointer internals in case QPointer loses the raceThiago Macieira2018-10-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPointer uses QWeakPointer / QSharedPointer internals in QObject and has the code to make sure two threads won't stomp on each other if both try to create a QPointer for the same QObject at the same time. The threading code was fine, but had a mistake in the clean up code for the loser thread: the QtSharedPointer::ExternalRefCountData destructor has a Q_ASSERT for the state of the reference counts. So we need to set the state correctly before calling the destructor. But we don't want to do it in case the Q_ASSERT compiled to nothing. So we use a hack that violates the Second Rule of Q_ASSERTs: don't do something with side-effects. This way, we can insert code that will only be compiled if Q_ASSERTs do something, without having to duplicate the preprocessor conditions from qglobal.h. Fixes: QTBUG-71412 Change-Id: I1bd327aeaf73421a8ec5fffd1560fdfc8b73b70c Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-95/+13
|/ | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add missing full stops in briefsPaul Wicking2018-06-211-3/+3
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: link to QEnableSharedFromThis from QSharedPointer docsMitch Curtis2018-04-181-1/+1
| | | | | Change-Id: I1c4a168c0581b6273b99a7ea8faa29114bda39e2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* doc: Correct remaining qdoc warnings in a few filesMartin Smith2018-01-051-1/+1
| | | | | | | | Added missing template clause to \fn commands required by clang-qdoc in qsharedpointer.cpp, qscopedpointer.cpp, and qstringbuilder.cpp. Change-Id: Ifca5b81db96e678a53e40080d351c69f14db604a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing template parameters to \fn commandsMartin Smith2017-12-061-88/+88
| | | | | | | | | This update corrects many qdoc warnings in qsharedpointer.cpp and qshareddata.cpp caused by incomplete \fn commands. Template stuff was added to the \fn commands. Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-061-1/+5
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSharedPointer: add get() for STL compatibilityGiuseppe D'Angelo2017-09-121-0/+9
| | | | | | | | [ChangeLog][QtCore][QSharedPointer] Added get(), for compatibility with std::shared_ptr. Change-Id: I77189c89bc6a222313b9b2353f1fb3969433c750 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSharedPointer/QWeakPointer/QScopedPointer: add comparison against nullptrGiuseppe D'Angelo2016-06-081-0/+84
| | | | | | | | Some constructors were added, but the comparison operators were missing. The STL has them, so we ought have them too. Change-Id: I030c14a3b355988f509716b4b1b1a835b3ab9481 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-11/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * QSharedPointer: move QDebug stream operators into qdebug.hGiuseppe D'Angelo2016-05-121-11/+0
| | | | | | | | | | | | | | | | In order to avoid pulling in QDebug when including QSharedPointer. Change-Id: I14b86d1f100ed44a68258c91bbda394b655bac83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QSharedPointer without custom deleters call the correct destructorThiago Macieira2016-04-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where "correct" is defined by what std::shared_ptr does as well as what happens when an intermediate QSharedPointer of the exact type of the constructor behaves That is, QSharedPointer<X> ptr(new Y); Behaves like QSharedPointer<X> ptr; { QSharedPointer<Y> tmp(new Y); ptr = tmp; } Change-Id: Id75834dab9ed466e94c7ffff14455d445f72592b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add support for initializing QSharedPointer from nullptrThiago Macieira2016-04-191-2/+18
|/ | | | | | | | | | std::shared_ptr supports it. To resolve an ambiguous overload when a literal 0 is passed as a parameter, the normal constructors needed to be made a template, like std::shared_ptr. Task-number: QTBUG-52569 Change-Id: Id75834dab9ed466e94c7ffff14451417892d2148 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * Doc: correct minor typoGabriel Pannwitz2016-02-051-2/+2
| | | | | | | | | | Change-Id: If19900309bbef8b65d3dbda4f7795113bfe0678f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | | | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Make use of new QHash::erase(const_iterator) overloadMarc Mutz2015-12-191-4/+4
| | | | | | | | | | | | | | | | | | | | Drive-by changes: - use auto for iterators - add Q_UNLIKELY for conditions leading to a qWarning etc Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <iamsergio@gmail.com>