summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qshareddata.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Make QExplicitlySharedDataPointer<T> copy-ctor from QESDP<X> more safeKevin Funk2014-07-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "QExplicitlySharedDataPointer::QExplicitlySharedDataPointer( const QExplicitlySharedDataPointer<X> & other)" implicitly doing an static_cast<T *>(...) on other.data(), this could lead to dangerous use of this copy constructor. Example code: QExplicitlySharedDataPointer<Base> base(new Base); QExplicitlySharedDataPointer<Derived> derived(base); // that works! This patchs disables the use of the static_cast, and adds a new define called QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST to re-enable that code path. Note, that the other way-around (assigning 'derived' to 'base') still works as intended. Other side note: QtXmlPatterns is relying heavily on the hidden static_cast "feature". The other default Qt modules compile fine with the static_cast removed. [ChangeLog][Important Behavior Changes] QExplicitelySharedDataPointer's copy constructor which performs a static_cast from "X *" to "T *" (when constructing a QExplicitlySharedDataPointer<T> from a QExplicitlySharedDataPointer<X>) doesn't perform a static_cast from "X *" to "T *" any more. Instead, an implicit cast is now performed. This change will break compilation of code that relied on the downcast (i.e. cast towards a more derived type) of the templated type when copy costructing a QExplicitelySharedDataPointer object. Please refer to the class documentation for more information about this issue and a workaround to keep old code compiling. Change-Id: Id32aba6cda4e6d44728d7bc3a5c0c7a20f19adc6 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qHash overload for Q{Explicitly,}SharedDataPointerKevin Funk2014-06-301-0/+12
| | | | | | | | | | | | | | | | | Interestingly, before that patch this compiled fine: typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr; Ptr p(new QSharedData); auto hash = qHash(p); This was because both Q{Explicitly,}SharedDataPointer overload 'operator bool()' => qHash(int) was accepted. This, however, doesn't make sense. Someone should probably take care of applying the safe bool idiom to these classes as well. Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove references to QT_NO_STL from QtCoreThiago Macieira2012-04-071-2/+0
| | | | | | | | QT_NO_STL is now no longer defined, so remove the conditionals and select the STL side. Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-031-2/+2
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Added meta type info for Q[Explicitly]SharedDataPointerDenis Dzyubenko2011-07-281-0/+3
| | | | | | | Change-Id: I1269630ae5154f7318e1c7ae9fa2014a15234bf4 Reviewed-on: http://codereview.qt.nokia.com/2110 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+286
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12