summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontiguouscache.h
Commit message (Collapse)AuthorAgeFilesLines
* Make QContiguousCache with zero capacity not crashThiago Macieira2013-05-071-0/+6
| | | | | | | | | | | These containers don't make sense and will just result in no action being taken (all items added will simply be discarded), but it shouldn't crash due to a division by zero. Task-number: QTBUG-27339 Change-Id: Ib9acf5c0a9a826e6853e7beaf5e56511fde98dc6 (cherry-picked from qt5 commit 320c4e31e124f99601399d00935362b587c77510) Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixes possible memory leak in QContiguousCacheFabian Bumberger2012-08-301-2/+4
| | | | | | | | | When inserting an item on a position that is already occupied, the destructor of the old item was never invoked. Qt5 SHA1: b4075c8ea31b235cdbb61fcd6290105b9914d627 Change-Id: I842fd81f284d9ca58760bce7e1adfea84da0a788 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Containers: add member-swapMarc Mutz2010-11-031-0/+1
| | | | | | | | | | | | | | Member-swap is required by the STL Sequence concept, but is also needed to write exception-safe code. Merge-request: 871 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | C++0x move operatorsOlivier Goffart2010-09-031-0/+4
|/ | | | | | | This makes assignement faster from temporaries, as the operator is fully inline, and doesn't do any atomic operations. Reviewed-by: joao
* Change all ptrdiff_t to qptrdiff.Thiago Macieira2010-02-171-1/+1
| | | | Reviewed-By: Bradley T. Hughes
* Fix for using QContiguousCache with default constructor or capacity=0Zeno Albisser2010-02-151-14/+21
| | | | Reviewed-by: Peter Hartmann
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fix compilation in QContiguousCache.Thiago Macieira2009-10-291-3/+3
| | | | Reviewed-by: TrustMe
* Initialise the reserved bits to 0.Thiago Macieira2009-10-281-1/+2
| | | | | | | This is future compatibility: we must rely on them being 0 in older versions of Qt. Reviewed-by: Bradley T. Hughes
* Fix Qt containers to properly support types with strict alignments.Thiago Macieira2009-10-281-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | QContiguousCache is a new type, so there are no binary compatibility issues. QHash and QMap didn't have any public qMalloc / qFree, so the entire logic is contained in .cpp code. However, since old code will not inform us of the alignment requirements, we need to add a bit to the structure to indicate whether strict alignment is in use or not. QList doesn't require any changes. For small, movable types, they're all stored in the pointer array itself, so they're aligned. For larger types, we use new(), so types with stricter requirements should define their own operator new(). QLinkedList cannot be fixed. It uses new() on the QLinkedListNode, which contains a T type. Sorry. QVector did have public qMalloc / qFree. I've moved the calls to the inner function and made it keep the old calls if the alignment requirement is below a certain threshold. The idea is that, if it's above, no one was using QVector anyway. Reviewed-by: Bradley T. Hughes
* Add some STL compatibility for QContiguousCache and private inheritanceThiago Macieira2009-10-281-60/+65
| | | | | | | | The private inheritance ensures that we don't try to access the types under the wrong pointer. If we did that, we'd cause strict aliasing violations. Reviewed-by: Olivier Goffart
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | Reviewed-by: Trust Me
* Fix compilation: add #include <new> if placement new is usedThiago Macieira2009-07-311-0/+7
| | | | | | | | | | | | I'm not sure this is the proper fix, though. xlC 7 complains with: "/usr/vacpp/include/new", line 97.10: 1540-1298 (I) "void *operator new(size_t, void *) throw()" needs to be declared in the containing scope to be found by name lookup. Also add some calculations to the padding in the data structure. Reviewed-by: Trust Me
* Silence compiler warnings on shadowing of member functions.Volker Hilsheimer2009-07-211-11/+11
|
* Update license headers in files that are new in 4.6.Jason McDonald2009-06-171-2/+2
| | | | Reviewed-by: Trust Me
* Protect dump function by ifdef.Ian Walters2009-05-251-1/+7
| | | | | Use the same pattern for protecting the dump function as qmap.h and qhash.h employ.
* Various fixes resulting from QA code review.Ian Walters2009-05-121-17/+15
| | | | | | | Some documentation fixes. More clear handling of what is and isn't a valid indexes. Added functions for the 'really long lived circular buffer use case' Improved unit tests.
* Update licensing headers.Ian Walters2009-04-071-3/+43
| | | | | Update files to have consistent licencesing with the rest of Qt.
* Rename OffsetVector to ContiguousCacheIan Walters2009-04-031-0/+386