summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qshareddata_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Q(E)SDP(V2): fill the API gap left by take()Giuseppe D'Angelo2020-10-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | take() returns a pointer to the shared data object *without* decrementing the reference counter. The primary use case is adopting the object from a Q(E)SDP into a different reference counting mechanism. This is fine, but if we support the "extraction" part, we shall also support the "adoption" part. Also, the API for the shared data pointer classes should match. Add an adopting tag type and suitable constructors to the shared data pointer classes, and add take() to the classes lacking it. Drive by, apply qExchange to take()'s implementation. [ChangeLog][QtCore][QAdoptSharedDataTag] New class. It is now possible to adopt pointers to shared data into a QExplicitlySharedDataPointer or a QSharedDataPointer object without incrementing the object's reference counter. Change-Id: I62b8b005c1bfbe2add58566206fca27634bb7e70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix -Wshadow warningsGiuseppe D'Angelo2020-08-041-2/+2
| | | | | | | Turns out headersclean doesn't run on this header... Change-Id: Ice8691dc0b4b46b2bde38467ca398b61b569a769 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Temporarily add a private QESDPv2Giuseppe D'Angelo2020-07-221-0/+167
To unlock work while waiting for QISP. QESDP is lacking a few crucial APIs (isDetached() / isShared() / reset(ptr) / deep const), so we can't go there right away. Change-Id: I647eb0db4ea800488a323f3b64661e848998168d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>